]> sjero.net Git - linphone/blobdiff - coreapi/upnp.h
Aac-eld add missing header according to RFC3640 3.3.6
[linphone] / coreapi / upnp.h
index f0a93d1d6e1ef1717e252406bc9563796ccfa7fd..d785954a4b6006557ecbc044c7e72ce55d0aea84 100644 (file)
@@ -22,51 +22,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "mediastreamer2/upnp_igd.h"
 #include "linphonecore.h"
+#include "sal.h"
 
-typedef enum {
-       UPNP_Idle,
-       UPNP_Pending,
-       UPNP_Ok,
-       UPNP_Ko,
-} UpnpState;
-
-typedef struct _UpnpSession  UpnpSession;
-
-typedef struct _UpnpPortBinding {
-       ms_mutex_t mutex;
-       UpnpState state;
-       upnp_igd_ip_protocol protocol;
-       int local_port;
-       int remote_port;
-       int retry;
-       int ref;
-} UpnpPortBinding;
-
-struct _UpnpSession {
-       UpnpPortBinding *audio_rtp;
-       UpnpPortBinding *audio_rtcp;
-       UpnpPortBinding *video_rtp;
-       UpnpPortBinding *video_rtcp;
-       UpnpState state;
-};
-
-typedef struct _UpnpContext {
-       upnp_igd_context *upnp_igd_ctxt;
-       UpnpPortBinding *sip_tcp;
-       UpnpPortBinding *sip_tls;
-       UpnpPortBinding *sip_udp;
-       UpnpState state;
-       MSList *pending_bindinds;
-       ms_mutex_t mutex;
-} UpnpContext;
-
+typedef struct _UpnpSession UpnpSession;
+typedef struct _UpnpContext UpnpContext;
 
+int linphone_core_update_local_media_description_from_upnp(SalMediaDescription *desc, UpnpSession *session);
+int linphone_core_update_upnp_from_remote_media_description(LinphoneCall *call, const SalMediaDescription *md);
 int linphone_core_update_upnp(LinphoneCore *lc, LinphoneCall *call);
-int upnp_call_process(LinphoneCall *call);
-UpnpSession* upnp_session_new();
-void upnp_session_destroy(UpnpSession* session);
 
-int upnp_context_init(LinphoneCore *lc);
-void upnp_context_uninit(LinphoneCore *lc);
+int linphone_upnp_call_process(LinphoneCall *call);
+UpnpSession* linphone_upnp_session_new(LinphoneCall *call);
+void linphone_upnp_session_destroy(UpnpSession* session);
+LinphoneUpnpState linphone_upnp_session_get_state(UpnpSession *session);
+
+UpnpContext *linphone_upnp_context_new(LinphoneCore *lc);
+void linphone_upnp_context_destroy(UpnpContext *ctx);
+void linphone_upnp_refresh(UpnpContext *ctx);
+LinphoneUpnpState linphone_upnp_context_get_state(UpnpContext *ctx);
+const char *linphone_upnp_context_get_external_ipaddress(UpnpContext *ctx);
+int linphone_upnp_context_get_external_port(UpnpContext *ctx);
+bool_t linphone_upnp_context_is_ready_for_register(UpnpContext *ctx);
+void linphone_core_update_upnp_state_in_call_stats(LinphoneCall *call);
 
 #endif //LINPHONE_UPNP_H