summaryrefslogtreecommitdiffstats
path: root/bindings/winrt/doubango_rt/include
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/winrt/doubango_rt/include')
-rw-r--r--bindings/winrt/doubango_rt/include/rt_ActionConfig.h53
-rw-r--r--bindings/winrt/doubango_rt/include/rt_Config.h31
-rw-r--r--bindings/winrt/doubango_rt/include/rt_DDebug.h53
-rw-r--r--bindings/winrt/doubango_rt/include/rt_Enums.h333
-rw-r--r--bindings/winrt/doubango_rt/include/rt_MediaContent.h18
-rw-r--r--bindings/winrt/doubango_rt/include/rt_MediaSessionMgr.h130
-rw-r--r--bindings/winrt/doubango_rt/include/rt_Msrp.h109
-rw-r--r--bindings/winrt/doubango_rt/include/rt_SMSEncoder.h18
-rw-r--r--bindings/winrt/doubango_rt/include/rt_SipCallback.h70
-rw-r--r--bindings/winrt/doubango_rt/include/rt_SipEvent.h244
-rw-r--r--bindings/winrt/doubango_rt/include/rt_SipMessage.h78
-rw-r--r--bindings/winrt/doubango_rt/include/rt_SipSession.h510
-rw-r--r--bindings/winrt/doubango_rt/include/rt_SipStack.h120
-rw-r--r--bindings/winrt/doubango_rt/include/rt_SipUri.h60
-rw-r--r--bindings/winrt/doubango_rt/include/rt_String.h33
-rw-r--r--bindings/winrt/doubango_rt/include/rt_Xcap.h18
16 files changed, 1878 insertions, 0 deletions
diff --git a/bindings/winrt/doubango_rt/include/rt_ActionConfig.h b/bindings/winrt/doubango_rt/include/rt_ActionConfig.h
new file mode 100644
index 0000000..abafc37
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_ActionConfig.h
@@ -0,0 +1,53 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include "rt_Enums.h"
+
+class ActionConfig;
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ public ref class rtActionConfig sealed
+ {
+ public:
+ rtActionConfig();
+ virtual ~rtActionConfig();
+
+ bool addHeader(Platform::String^ name, Platform::String^ value);
+#if COM_VISIBLE
+ bool addPayload(Platform::String^ payload);
+#else
+ bool addPayload(Platform::IntPtr payload, unsigned len);
+#endif
+ bool setActiveMedia(rt_twrap_media_type_t type);
+
+ rtActionConfig^ setResponseLine(short code, Platform::String^ phrase);
+ rtActionConfig^ setMediaString(rt_twrap_media_type_t type, Platform::String^ key, Platform::String^ value);
+ rtActionConfig^ setMediaInt(rt_twrap_media_type_t type, Platform::String^ key, int value);
+
+ internal:
+ ActionConfig* getWrappedActionConfig(){ return m_pActionConfig; }
+
+ private:
+ ActionConfig* m_pActionConfig;
+ };
+ }
+} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_Config.h b/bindings/winrt/doubango_rt/include/rt_Config.h
new file mode 100644
index 0000000..e8d7dde
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_Config.h
@@ -0,0 +1,31 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#define rtSafeDelete(ptr) if((ptr)) delete (ptr), (ptr) = nullptr;
+
+#if COM_VISIBLE
+# define OVERRIDE_FUNC(fun)
+# define VISIBLE_VOID_PTR Platform::String^
+# define VISIBLE_VOID_PTR_2_VOID_PTR(ptr) rtString::toUtf8((ptr)).data()
+#else
+# define OVERRIDE_FUNC(fun) fun
+# define VISIBLE_VOID_PTR Platform::IntPtr
+# define VISIBLE_VOID_PTR_2_VOID_PTR(ptr) (void*)((ptr))
+#endif
+ \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_DDebug.h b/bindings/winrt/doubango_rt/include/rt_DDebug.h
new file mode 100644
index 0000000..e4300b5
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_DDebug.h
@@ -0,0 +1,53 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include "rt_Config.h"
+
+class DDebugCallback;
+class DDebugCallbackProxy;
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ public interface class rtIDDebugCallback
+ {
+ virtual int OnDebugInfo(Platform::String^ message);
+ virtual int OnDebugWarn(Platform::String^ message);
+ virtual int OnDebugError(Platform::String^ message);
+ virtual int OnDebugFatal(Platform::String^ message);
+ };
+
+ public ref class rtDDebugCallback sealed
+ {
+ internal:
+ rtDDebugCallback(rtIDDebugCallback^ pI);
+ public:
+ virtual ~rtDDebugCallback();
+ friend class DDebugCallbackProxy;
+
+ internal:
+ const DDebugCallback* getWrappedCallback();
+
+ private:
+ rtIDDebugCallback^ m_pI;
+ DDebugCallbackProxy* m_pCallback;
+ };
+ }
+} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_Enums.h b/bindings/winrt/doubango_rt/include/rt_Enums.h
new file mode 100644
index 0000000..78e97bf
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_Enums.h
@@ -0,0 +1,333 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include "rt_config.h"
+
+#include "tinysip.h"
+#include "tinymsrp.h"
+#include "tinymedia.h"
+
+#include "Common.h"
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ public enum class rtConstants
+ {
+ rt_tsip_event_code_dialog_transport_error = tsip_event_code_dialog_transport_error,
+ rt_tsip_event_code_dialog_global_error = tsip_event_code_dialog_global_error,
+ rt_tsip_event_code_dialog_message_error = tsip_event_code_dialog_message_error,
+
+ // 8xx ==> success
+ rt_tsip_event_code_dialog_request_incoming = tsip_event_code_dialog_request_incoming,
+ rt_tsip_event_code_dialog_request_outgoing = tsip_event_code_dialog_request_outgoing,
+ rt_tsip_event_code_dialog_request_cancelled = tsip_event_code_dialog_request_cancelled,
+ rt_tsip_event_code_dialog_request_sent = tsip_event_code_dialog_request_sent,
+
+ // 9xx ==> Informational
+ rt_tsip_event_code_dialog_connecting = tsip_event_code_dialog_connecting,
+ rt_tsip_event_code_dialog_connected = tsip_event_code_dialog_connected,
+ rt_tsip_event_code_dialog_terminating = tsip_event_code_dialog_terminating,
+ rt_tsip_event_code_dialog_terminated = tsip_event_code_dialog_terminated,
+ rt_tsip_event_code_stack_starting = tsip_event_code_stack_starting,
+ rt_tsip_event_code_stack_started = tsip_event_code_stack_started,
+ rt_tsip_event_code_stack_stopping = tsip_event_code_stack_stopping,
+ rt_tsip_event_code_stack_stopped = tsip_event_code_stack_stopped,
+ rt_tsip_event_code_stack_failed_to_start = tsip_event_code_stack_failed_to_start,
+ rt_tsip_event_code_stack_failed_to_stop = tsip_event_code_stack_failed_to_stop
+ };
+
+ public enum class rt_twrap_media_type_t
+ {
+ twrap_media_none = twrap_media_none,
+
+ twrap_media_audio = twrap_media_audio,
+ twrap_media_video = twrap_media_video,
+ twrap_media_msrp = twrap_media_msrp,
+ twrap_media_t140 = twrap_media_t140,
+ twrap_media_bfcp = twrap_media_bfcp,
+ twrap_media_bfcp_audio = twrap_media_bfcp_audio,
+ twrap_media_bfcp_video = twrap_media_bfcp_video,
+
+ twrap_media_audiovideo = twrap_media_audiovideo, /* @deprecated */
+ twrap_media_audio_video = twrap_media_audio_video,
+ };
+
+ public enum class rt_tmedia_bandwidth_level_t
+ {
+ tmedia_bl_low = tmedia_bl_low,
+ tmedia_bl_medium = tmedia_bl_medium,
+ tmedia_bl_hight = tmedia_bl_hight,
+ tmedia_bl_unrestricted = tmedia_bl_unrestricted
+ };
+
+ public enum class rt_tmedia_pref_video_size_t
+ {/* must be sorted like this */
+ tmedia_pref_video_size_sqcif = tmedia_pref_video_size_sqcif, // 128 x 98
+ tmedia_pref_video_size_qcif = tmedia_pref_video_size_qcif, // 176 x 144
+ tmedia_pref_video_size_qvga = tmedia_pref_video_size_qvga, // 320 x 240
+ tmedia_pref_video_size_cif = tmedia_pref_video_size_cif, // 352 x 288
+ tmedia_pref_video_size_hvga = tmedia_pref_video_size_hvga, // 480 x 320
+ tmedia_pref_video_size_vga = tmedia_pref_video_size_vga, // 640 x 480
+ tmedia_pref_video_size_4cif = tmedia_pref_video_size_4cif, // 704 x 576
+ tmedia_pref_video_size_wvga = tmedia_pref_video_size_wvga, // 800 x 480
+ tmedia_pref_video_size_svga = tmedia_pref_video_size_svga, // 800 x 600
+ tmedia_pref_video_size_480p = tmedia_pref_video_size_480p, // 852 x 480
+ tmedia_pref_video_size_xga = tmedia_pref_video_size_xga, // 1024 x 768
+ tmedia_pref_video_size_720p = tmedia_pref_video_size_720p, // 1280 x 720
+ tmedia_pref_video_size_16cif = tmedia_pref_video_size_16cif, // 1408 x 1152
+ tmedia_pref_video_size_1080p = tmedia_pref_video_size_1080p, // 1920 x 1080
+ };
+
+ public enum class rt_tmedia_profile_t
+ {
+ tmedia_profile_default = tmedia_profile_default,
+ tmedia_profile_rtcweb = tmedia_profile_rtcweb
+ };
+
+ public enum class rt_tmedia_qos_strength_t
+ {
+ tmedia_qos_strength_none = tmedia_qos_strength_none,
+ tmedia_qos_strength_failure = tmedia_qos_strength_failure,
+ tmedia_qos_strength_unknown = tmedia_qos_strength_unknown,
+ tmedia_qos_strength_optional = tmedia_qos_strength_optional,
+ tmedia_qos_strength_mandatory = tmedia_qos_strength_mandatory
+ };
+
+ public enum class rt_tmedia_qos_stype_t
+ {
+ tmedia_qos_stype_none = tmedia_qos_stype_none,
+
+ tmedia_qos_stype_segmented = tmedia_qos_stype_segmented,
+ tmedia_qos_stype_e2e = tmedia_qos_stype_e2e,
+ };
+
+ public enum class rt_tmedia_srtp_mode_t
+ {
+ tmedia_srtp_mode_none = tmedia_srtp_mode_none,
+ tmedia_srtp_mode_optional = tmedia_srtp_mode_optional,
+ tmedia_srtp_mode_mandatory = tmedia_srtp_mode_mandatory
+ };
+
+ public enum class rt_tmedia_srtp_type_t
+ {
+ tmedia_srtp_type_none = tmedia_srtp_type_none,
+ tmedia_srtp_type_sdes = tmedia_srtp_type_sdes,
+ tmedia_srtp_type_dtls = tmedia_srtp_type_dtls,
+ tmedia_srtp_type_sdes_dtls = tmedia_srtp_type_sdes_dtls
+ };
+
+ public enum class rt_tmedia_t140_data_type_t
+ {
+ tmedia_t140_data_type_utf8 = tmedia_t140_data_type_utf8,
+ tmedia_t140_data_type_zero_width_no_break_space = tmedia_t140_data_type_zero_width_no_break_space,
+ tmedia_t140_data_type_backspace = tmedia_t140_data_type_backspace,
+ tmedia_t140_data_type_esc = tmedia_t140_data_type_esc,
+ tmedia_t140_data_type_cr = tmedia_t140_data_type_cr,
+ tmedia_t140_data_type_lf = tmedia_t140_data_type_lf,
+ tmedia_t140_data_type_cr_lf = tmedia_t140_data_type_cr_lf,
+ tmedia_t140_data_type_bell = tmedia_t140_data_type_bell,
+ tmedia_t140_data_type_sos = tmedia_t140_data_type_sos,
+ tmedia_t140_data_type_string_term = tmedia_t140_data_type_string_term,
+ tmedia_t140_data_type_graphic_start = tmedia_t140_data_type_graphic_start,
+ tmedia_t140_data_type_graphic_end = tmedia_t140_data_type_graphic_end,
+ tmedia_t140_data_type_loss_char_char = tmedia_t140_data_type_loss_char_char,
+ tmedia_t140_data_type_loss_utf8 = tmedia_t140_data_type_loss_utf8,
+ };
+
+ public enum class rt_tmedia_type_t
+ {
+ tmedia_none = tmedia_none,
+ tmedia_ghost = tmedia_ghost,
+
+ tmedia_audio = tmedia_audio,
+ tmedia_video = tmedia_video,
+ tmedia_chat = tmedia_chat,
+ tmedia_file = tmedia_file,
+ tmedia_t38 = tmedia_t38,
+ tmedia_t140 = tmedia_t140,
+
+ tmedia_msrp = tmedia_msrp,
+ tmedia_audiovideo = tmedia_audiovideo,
+
+ tmedia_all = tmedia_all
+ };
+
+ public enum class rt_tmsrp_event_type_t
+ {
+ tmsrp_event_type_none = tmsrp_event_type_none,
+ tmsrp_event_type_connected = tmsrp_event_type_connected,
+ tmsrp_event_type_disconnected = tmsrp_event_type_disconnected,
+ tmsrp_event_type_message = tmsrp_event_type_message,
+ };
+
+ public enum class rt_tmsrp_request_type_t
+ {
+ tmsrp_NONE = tmsrp_NONE,
+
+ tmsrp_SEND = tmsrp_SEND,
+ tmsrp_REPORT = tmsrp_REPORT,
+ tmsrp_AUTH = tmsrp_AUTH
+ };
+
+ public enum class rt_tsip_info_event_type_t
+ {
+ tsip_i_info = tsip_i_info,
+ tsip_ao_info = tsip_ao_info,
+ };
+
+ public enum class rt_tsip_invite_event_type_t
+ {
+ tsip_i_newcall = tsip_i_newcall,
+
+ tsip_i_request = tsip_i_request,
+ tsip_ao_request = tsip_ao_request,
+
+ tsip_o_ect_trying = tsip_o_ect_trying,
+ tsip_o_ect_accepted = tsip_o_ect_accepted,
+ tsip_o_ect_completed = tsip_o_ect_completed,
+ tsip_o_ect_failed = tsip_o_ect_failed,
+ tsip_o_ect_notify = tsip_o_ect_notify,
+ tsip_i_ect_requested = tsip_i_ect_requested,
+ tsip_i_ect_newcall = tsip_i_ect_newcall,
+ tsip_i_ect_completed = tsip_i_ect_completed,
+ tsip_i_ect_failed = tsip_i_ect_failed,
+ tsip_i_ect_notify = tsip_i_ect_notify,
+
+ tsip_m_early_media = tsip_m_early_media,
+ tsip_m_updating = tsip_m_updating,
+ tsip_m_updated = tsip_m_updated,
+
+ tsip_m_local_hold_ok = tsip_m_local_hold_ok,
+ tsip_m_local_hold_nok = tsip_m_local_hold_nok,
+ tsip_m_local_resume_ok = tsip_m_local_resume_ok,
+ tsip_m_local_resume_nok = tsip_m_local_resume_nok,
+ tsip_m_remote_hold = tsip_m_remote_hold,
+ tsip_m_remote_resume = tsip_m_remote_resume,
+ };
+
+ public enum class rt_tsip_message_event_type_t
+ {
+ tsip_i_message = tsip_i_message,
+ tsip_ao_message = tsip_ao_message,
+ };
+
+ public enum class rt_tsip_options_event_type_t
+ {
+ tsip_i_options = tsip_i_options,
+ tsip_ao_options = tsip_ao_options,
+ };
+
+ public enum class rt_tsip_publish_event_type_t
+ {
+ tsip_i_publish = tsip_i_publish,
+ tsip_ao_publish = tsip_ao_publish,
+
+ tsip_i_unpublish = tsip_i_unpublish,
+ tsip_ao_unpublish = tsip_ao_unpublish
+ };
+
+ public enum class rt_tsip_register_event_type_t
+ {
+ tsip_i_newreg = tsip_i_newreg,
+
+ tsip_i_register = tsip_i_register,
+ tsip_ao_register = tsip_ao_register,
+
+ tsip_i_unregister = tsip_i_unregister,
+ tsip_ao_unregister = tsip_ao_unregister,
+ };
+
+ public enum class rt_tsip_request_type_t
+ {
+ tsip_NONE = tsip_NONE,
+
+ tsip_ACK = tsip_ACK,
+ tsip_BYE = tsip_BYE,
+ tsip_CANCEL = tsip_CANCEL,
+ tsip_INVITE = tsip_INVITE,
+ tsip_OPTIONS = tsip_OPTIONS,
+ tsip_REGISTER = tsip_REGISTER,
+ tsip_SUBSCRIBE = tsip_SUBSCRIBE,
+ tsip_NOTIFY = tsip_NOTIFY,
+ tsip_REFER = tsip_REFER,
+ tsip_INFO = tsip_INFO,
+ tsip_UPDATE = tsip_UPDATE,
+ tsip_MESSAGE = tsip_MESSAGE,
+ tsip_PUBLISH = tsip_PUBLISH,
+ tsip_PRACK = tsip_PRACK
+ };
+
+ public enum class rt_tsip_subscribe_event_type_t
+ {
+ tsip_i_subscribe = tsip_i_subscribe,
+ tsip_ao_subscribe = tsip_ao_subscribe,
+
+ tsip_i_unsubscribe = tsip_i_unsubscribe,
+ tsip_ao_unsubscribe = tsip_ao_unsubscribe,
+
+ tsip_i_notify = tsip_i_notify,
+ tsip_ao_notify = tsip_ao_notify
+ };
+
+ public enum class rt_tdav_codec_id_t
+ {
+ tdav_codec_id_none = tmedia_codec_id_none,
+
+ tdav_codec_id_amr_nb_oa = tmedia_codec_id_amr_nb_oa,
+ tdav_codec_id_amr_nb_be = tmedia_codec_id_amr_nb_be,
+ tdav_codec_id_amr_wb_oa = tmedia_codec_id_amr_wb_oa,
+ tdav_codec_id_amr_wb_be = tmedia_codec_id_amr_wb_be,
+ tdav_codec_id_gsm = tmedia_codec_id_gsm,
+ tdav_codec_id_pcma = tmedia_codec_id_pcma,
+ tdav_codec_id_pcmu = tmedia_codec_id_pcmu,
+ tdav_codec_id_ilbc = tmedia_codec_id_ilbc,
+ tdav_codec_id_speex_nb = tmedia_codec_id_speex_nb,
+ tdav_codec_id_speex_wb = tmedia_codec_id_speex_wb,
+ tdav_codec_id_speex_uwb = tmedia_codec_id_speex_uwb,
+ tdav_codec_id_bv16 = tmedia_codec_id_bv16,
+ tdav_codec_id_bv32 = tmedia_codec_id_bv32,
+ tdav_codec_id_opus = tmedia_codec_id_opus,
+ tdav_codec_id_g729ab = tmedia_codec_id_g729ab,
+ tdav_codec_id_g722 = tmedia_codec_id_g722,
+
+ tdav_codec_id_h261 = tmedia_codec_id_h261,
+ tdav_codec_id_h263 = tmedia_codec_id_h263,
+ tdav_codec_id_h263p = tmedia_codec_id_h263p,
+ tdav_codec_id_h263pp = tmedia_codec_id_h263pp,
+ tdav_codec_id_h264_bp = tmedia_codec_id_h264_bp,
+ tdav_codec_id_h264_mp = tmedia_codec_id_h264_mp,
+ tdav_codec_id_h264_hp = tmedia_codec_id_h264_hp,
+ tdav_codec_id_h264_bp10 = tmedia_codec_id_h264_bp, // @deprecated
+ tdav_codec_id_h264_bp20 = tmedia_codec_id_h264_bp, // @deprecated
+ tdav_codec_id_h264_bp30 = tmedia_codec_id_h264_bp, // @deprecated
+ tdav_codec_id_h264_svc = tmedia_codec_id_h264_svc,
+ tdav_codec_id_theora = tmedia_codec_id_theora,
+ tdav_codec_id_mp4ves_es = tmedia_codec_id_mp4ves_es,
+ tdav_codec_id_vp8 = tmedia_codec_id_vp8,
+
+ tdav_codec_id_t140 = tmedia_codec_id_t140,
+#if !COM_VISIBLE
+ tdav_codec_id_red = tmedia_codec_id_red,
+#endif
+ tdav_codec_id_all = tmedia_codec_id_all,
+ };
+ }
+}
diff --git a/bindings/winrt/doubango_rt/include/rt_MediaContent.h b/bindings/winrt/doubango_rt/include/rt_MediaContent.h
new file mode 100644
index 0000000..9385aed
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_MediaContent.h
@@ -0,0 +1,18 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_MediaSessionMgr.h b/bindings/winrt/doubango_rt/include/rt_MediaSessionMgr.h
new file mode 100644
index 0000000..3878667
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_MediaSessionMgr.h
@@ -0,0 +1,130 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+class MediaSessionMgr;
+class Codec;
+
+struct tmedia_codec_s;
+struct tmedia_session_mgr_s;
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ enum class rt_twrap_media_type_t;
+ enum class rt_tmedia_profile_t;
+ enum class rt_tmedia_srtp_mode_t;
+ enum class rt_tmedia_srtp_type_t;
+ enum class rt_tmedia_profile_t;
+ enum class rt_tmedia_pref_video_size_t;
+
+ public ref class rtCodec sealed
+ {
+ internal:
+ rtCodec(struct tmedia_codec_s* pCodec);
+ public:
+ virtual ~rtCodec();
+ enum class rt_twrap_media_type_t getMediaType();
+ Platform::String^ getName();
+ Platform::String^ getDescription();
+ Platform::String^ getNegFormat();
+ int getAudioSamplingRate();
+ int getAudioChannels();
+ int getAudioPTime();
+
+ private:
+ Codec* m_pCodec;
+ };
+
+ public ref class rtMediaSessionMgr sealed
+ {
+ internal:
+ rtMediaSessionMgr(struct tmedia_session_mgr_s* pWrappedMgr);
+
+ public:
+ virtual ~rtMediaSessionMgr();
+ bool sessionSetInt32(rt_twrap_media_type_t media, Platform::String^ key, int32 value);
+ int32 sessionGetInt32(rt_twrap_media_type_t media, Platform::String^ key);
+
+ bool consumerSetInt32(rt_twrap_media_type_t media, Platform::String^ key, int32 value);
+ bool consumerSetInt64(rt_twrap_media_type_t media, Platform::String^ key, int64 value);
+
+ bool producerSetInt32(rt_twrap_media_type_t media, Platform::String^ key, int32 value);
+ bool producerSetInt64(rt_twrap_media_type_t media, Platform::String^ key, int64 value);
+ rtCodec^ producerGetCodec(rt_twrap_media_type_t media);
+
+ static unsigned int registerAudioPluginFromFile(Platform::String^ path);
+
+ uint64 getSessionId(rt_twrap_media_type_t media);
+
+ internal: // Must be from SIP service to share same global memory space
+ static bool defaultsSetProfile(rt_tmedia_profile_t profile);
+ static rt_tmedia_profile_t defaultsGetProfile();
+ static bool defaultsSetPrefVideoSize(enum class rt_tmedia_pref_video_size_t pref_video_size);
+ static bool defaultsSetJbMargin(uint32 jb_margin_ms);
+ static bool defaultsSetJbMaxLateRate(uint32 jb_late_rate_percent);
+ static bool defaultsSetEchoTail(uint32 echo_tail);
+ static uint32 defaultsGetEchoTail();
+ static bool defaultsSetEchoSkew(uint32 echo_skew);
+ static bool defaultsSetEchoSuppEnabled(bool echo_supp_enabled);
+ static bool defaultsGetEchoSuppEnabled();
+ static bool defaultsSetAgcEnabled(bool agc_enabled);
+ static bool defaultsGetAgcEnabled();
+ static bool defaultsSetAgcLevel(float agc_level);
+ static float defaultsGetAgcLevel();
+ static bool defaultsSetVadEnabled(bool vad_enabled);
+ static bool defaultsGetGetVadEnabled();
+ static bool defaultsSetNoiseSuppEnabled(bool noise_supp_enabled);
+ static bool defaultsGetNoiseSuppEnabled();
+ static bool defaultsSetNoiseSuppLevel(int32 noise_supp_level);
+ static int32 defaultsGetNoiseSuppLevel();
+ static bool defaultsSet100relEnabled(bool _100rel_enabled);
+ static bool defaultsGet100relEnabled();
+ static bool defaultsSetScreenSize(int32 sx, int32 sy);
+ static bool defaultsSetAudioGain(int32 producer_gain, int32 consumer_gain);
+ static bool defaultsSetRtpPortRange(uint16 range_start, uint16 range_stop);
+ static bool defaultsSetRtpSymetricEnabled(bool enabled);
+ static bool defaultsSetMediaType(enum class rt_twrap_media_type_t media_type);
+ static bool defaultsSetVolume(int32 volume);
+ static int32 defaultsGetVolume();
+ static bool defaultsSetInviteSessionTimers(int32 timeout, Platform::String^ refresher);
+ static bool defaultsSetSRtpMode(enum class rt_tmedia_srtp_mode_t mode);
+ static enum class rt_tmedia_srtp_mode_t defaultsGetSRtpMode();
+ static bool defaultsSetSRtpType(enum class rt_tmedia_srtp_type_t srtp_type);
+ static enum class rt_tmedia_srtp_type_t defaultsGetSRtpType();
+ static bool defaultsSetRtcpEnabled(bool enabled);
+ static bool defaultsGetRtcpEnabled();
+ static bool defaultsSetRtcpMuxEnabled(bool enabled);
+ static bool defaultsGetRtcpMuxEnabled();
+ static bool defaultsSetIceEnabled(bool ice_enabled);
+ static bool defaultsSetByPassEncoding(bool enabled);
+ static bool defaultsGetByPassEncoding();
+ static bool defaultsSetByPassDecoding(bool enabled);
+ static bool defaultsGetByPassDecoding();
+ static bool defaultsSetVideoJbEnabled(bool enabled);
+ static bool defaultsGetVideoJbEnabled();
+ static bool defaultsSetRtpBuffSize(unsigned buffSize);
+ static unsigned defaultsGetRtpBuffSize();
+ static bool defaultsSetAvpfTail(unsigned tail_min, unsigned tail_max);
+
+ private:
+ MediaSessionMgr* m_pMediaSessionMgr;
+ };
+ }
+} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_Msrp.h b/bindings/winrt/doubango_rt/include/rt_Msrp.h
new file mode 100644
index 0000000..b0fbe26
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_Msrp.h
@@ -0,0 +1,109 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include "rt_Enums.h"
+
+class MsrpCallback;
+class MsrpMessage;
+class MsrpEvent;
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ ref class rtMsrpSession;
+
+ public ref class rtMsrpByteRange sealed
+ {
+ internal:
+ rtMsrpByteRange(int64 start, int64 end, int64 total):_start(start),_end(end),_total(total){}
+ public:
+ property int64 Start{ int64 get() { return _start; }; }
+ property int64 End{ int64 get() { return _end; }; }
+ property int64 Total{ int64 get() { return _total; }; }
+ private:
+ int64 _start, _end, _total;
+ };
+
+ public ref class rtMsrpMessage sealed
+ {
+ public:
+ virtual ~rtMsrpMessage();
+ internal:
+ rtMsrpMessage(struct tmsrp_message_s *message);
+
+ public:
+ bool isRequest();
+ short getCode();
+ Platform::String^ getPhrase();
+ rt_tmsrp_request_type_t getRequestType();
+#if COM_VISIBLE
+ rtMsrpByteRange^ getByteRange();
+#else
+ void getByteRange(Platform::IntPtr start, Platform::IntPtr end, Platform::IntPtr total);
+#endif
+ bool isLastChunck();
+ bool isFirstChunck();
+ bool isSuccessReport();
+ Platform::String^ getMsrpHeaderValue(Platform::String^ name);
+ Platform::String^ getMsrpHeaderParamValue(Platform::String^ name, Platform::String^ param);
+ unsigned getMsrpContentLength();
+#if COM_VISIBLE
+ Platform::String^ getMsrpContent(unsigned maxsize);
+#else
+ unsigned getMsrpContent(Platform::IntPtr output, unsigned maxsize);
+#endif
+
+ private:
+ MsrpMessage* m_pMsrpMessage;
+ };
+
+ public ref class rtMsrpEvent sealed
+ {
+ internal:
+ rtMsrpEvent(const struct tmsrp_event_s *event);
+ public:
+ virtual ~rtMsrpEvent();
+
+ rt_tmsrp_event_type_t getType();
+ rtMsrpSession^ getSipSession();
+ rtMsrpMessage^ getMessage();
+
+ private:
+ MsrpEvent* m_pMsrpEvent;
+ };
+
+ public interface class rtIMsrpCallback
+ {
+ virtual int OnEvent(rtMsrpEvent^ pEvent);
+ };
+ public ref class rtMsrpCallback sealed
+ {
+ internal:
+ rtMsrpCallback(rtIMsrpCallback^ pI);
+ const MsrpCallback* getWrappedCallback(){ return m_pCallback; }
+ public:
+ virtual ~rtMsrpCallback();
+
+ private:
+ MsrpCallback* m_pCallback;
+ rtIMsrpCallback^ m_pI;
+ };
+ }
+} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_SMSEncoder.h b/bindings/winrt/doubango_rt/include/rt_SMSEncoder.h
new file mode 100644
index 0000000..9385aed
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_SMSEncoder.h
@@ -0,0 +1,18 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_SipCallback.h b/bindings/winrt/doubango_rt/include/rt_SipCallback.h
new file mode 100644
index 0000000..1f0a9e0
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_SipCallback.h
@@ -0,0 +1,70 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+class SipCallback;
+class SipCallbackProxy;
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ ref class rtDialogEvent;
+ ref class rtStackEvent;
+
+ ref class rtInviteEvent;
+ ref class rtMessagingEvent;
+ ref class rtInfoEvent;
+ ref class rtOptionsEvent;
+ ref class rtPublicationEvent;
+ ref class rtRegistrationEvent;
+ ref class rtSubscriptionEvent;
+
+ public interface class rtISipCallback
+ {
+ virtual int OnDialogEvent(rtDialogEvent^ e);
+ virtual int OnStackEvent(rtStackEvent^ e);
+
+ virtual int OnInviteEvent(rtInviteEvent^ e);
+ virtual int OnMessagingEvent(rtMessagingEvent^ e);
+ virtual int OnInfoEvent(rtInfoEvent^ e);
+ virtual int OnOptionsEvent(rtOptionsEvent^ e);
+ virtual int OnPublicationEvent(rtPublicationEvent^ e);
+ virtual int OnRegistrationEvent(rtRegistrationEvent^ e);
+ virtual int OnSubscriptionEvent(rtSubscriptionEvent^ e);
+ };
+
+ public ref class rtSipCallback sealed
+ {
+ internal:
+ rtSipCallback(rtISipCallback^ pI);
+ public:
+ virtual ~rtSipCallback();
+ friend class SipCallbackProxy;
+
+ internal:
+ const SipCallback* getWrappedCallback();
+
+ private:
+ rtISipCallback^ m_pI;
+ SipCallbackProxy* m_pCallback;
+ };
+ }
+}
+
+
diff --git a/bindings/winrt/doubango_rt/include/rt_SipEvent.h b/bindings/winrt/doubango_rt/include/rt_SipEvent.h
new file mode 100644
index 0000000..e615bde
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_SipEvent.h
@@ -0,0 +1,244 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include "rt_Config.h"
+#include "rt_Enums.h"
+
+struct tsip_event_s;
+
+class SipEvent;
+class DialogEvent;
+class StackEvent;
+class InviteEvent;
+class MessagingEvent;
+class InfoEvent;
+class OptionsEvent;
+class PublicationEvent;
+class RegistrationEvent;
+class SubscriptionEvent;
+
+
+#define rtISipEvent_Declare() \
+ virtual short getCode(); \
+ virtual Platform::String^ getPhrase(); \
+ virtual rtISipSession^ getBaseSession(); \
+ virtual rtSipMessage^ getSipMessage(); \
+
+#define rtISipEvent_Implement(cls) \
+short cls##::getCode(){ \
+ return m_pEvent->getCode(); \
+} \
+Platform::String^ cls##::getPhrase(){ \
+ return rtString::toString(m_pEvent->getPhrase()); \
+} \
+rtISipSession^ cls##::getBaseSession(){ \
+ return ref new rtSipSession(const_cast<SipStack*>(m_pEvent->getStack()), const_cast<tsip_ssession_handle_t*>(m_pEvent->getWrappedEvent()->ss)); \
+} \
+rtSipMessage^ cls##::getSipMessage(){ \
+ return ref new rtSipMessage(const_cast<struct tsip_message_s*>(const_cast<SipMessage*>(m_pEvent->getSipMessage())->getWrappedSipMessage())); \
+} \
+
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ interface class rtISipSession;
+ ref class rtSipMessage;
+ ref class rtInviteSession;
+ ref class rtMsrpSession;
+ ref class rtCallSession;
+ ref class rtMessagingSession;
+ ref class rtInfoSession;
+ ref class rtOptionsSession;
+ ref class rtPublicationSession;
+ ref class rtRegistrationSession;
+ ref class rtSubscriptionSession;
+
+
+ /* ======================== rtISipEvent ========================*/
+ public interface class rtISipEvent
+ {
+ short getCode();
+ Platform::String^ getPhrase();
+ rtISipSession^ getBaseSession();
+ rtSipMessage^ getSipMessage();
+ };
+
+
+ /* ======================== rtDialogEvent ========================*/
+ public ref class rtDialogEvent sealed : rtISipEvent
+ {
+ internal:
+ rtDialogEvent(const struct tsip_event_s *e);
+
+ public:
+ virtual ~rtDialogEvent();
+ rtISipEvent_Declare();
+
+ private:
+ DialogEvent* m_pEvent;
+ };
+
+ /* ======================== rtStackEvent ========================*/
+ public ref class rtStackEvent sealed : rtISipEvent
+ {
+ internal:
+ rtStackEvent(const struct tsip_event_s *e);
+
+ public:
+ virtual ~rtStackEvent();
+ rtISipEvent_Declare();
+
+ private:
+ StackEvent* m_pEvent;
+ };
+
+
+ /* ======================== rtInviteEvent ========================*/
+ public ref class rtInviteEvent sealed : rtISipEvent
+ {
+ internal:
+ rtInviteEvent(const struct tsip_event_s *e);
+
+ public:
+ virtual ~rtInviteEvent();
+ rtISipEvent_Declare();
+
+ rt_tsip_invite_event_type_t getType();
+ rt_twrap_media_type_t getMediaType();
+ rtInviteSession^ getSession();
+ rtCallSession^ takeCallSessionOwnership();
+ rtMsrpSession^ takeMsrpSessionOwnership();
+
+ private:
+ InviteEvent* m_pEvent;
+ };
+
+ /* ======================== rtMessagingEvent ========================*/
+ public ref class rtMessagingEvent sealed : rtISipEvent
+ {
+ internal:
+ rtMessagingEvent(const struct tsip_event_s *e);
+
+ public:
+ virtual ~rtMessagingEvent();
+ rtISipEvent_Declare();
+
+ rt_tsip_message_event_type_t getType();
+ rtMessagingSession^ getSession();
+ rtMessagingSession^ takeSessionOwnership();
+
+ private:
+ MessagingEvent* m_pEvent;
+ };
+
+
+ /* ======================== rtInfoEvent ========================*/
+ public ref class rtInfoEvent sealed : rtISipEvent
+ {
+ internal:
+ rtInfoEvent(const struct tsip_event_s *e);
+
+ public:
+ virtual ~rtInfoEvent();
+ rtISipEvent_Declare();
+
+ rt_tsip_info_event_type_t getType();
+ rtInfoSession^ getSession();
+ rtInfoSession^ takeSessionOwnership();
+
+ private:
+ InfoEvent* m_pEvent;
+ };
+
+
+ /* ======================== rtOptionsEvent ========================*/
+ public ref class rtOptionsEvent sealed : rtISipEvent
+ {
+ internal:
+ rtOptionsEvent(const struct tsip_event_s *e);
+
+ public:
+ virtual ~rtOptionsEvent();
+ rtISipEvent_Declare();
+
+ rt_tsip_options_event_type_t getType();
+ rtOptionsSession^ getSession();
+ rtOptionsSession^ takeSessionOwnership();
+
+ private:
+ OptionsEvent* m_pEvent;
+ };
+
+ /* ======================== rtPublicationEvent ========================*/
+ public ref class rtPublicationEvent sealed : rtISipEvent
+ {
+ internal:
+ rtPublicationEvent(const struct tsip_event_s *e);
+
+ public:
+ virtual ~rtPublicationEvent();
+ rtISipEvent_Declare();
+
+ rt_tsip_publish_event_type_t getType();
+ rtPublicationSession^ getSession();
+ rtPublicationSession^ takeSessionOwnership();
+
+ private:
+ PublicationEvent* m_pEvent;
+ };
+
+ /* ======================== rtRegistrationEvent ========================*/
+ public ref class rtRegistrationEvent sealed : rtISipEvent
+ {
+ internal:
+ rtRegistrationEvent(const struct tsip_event_s *e);
+
+ public:
+ virtual ~rtRegistrationEvent();
+ rtISipEvent_Declare();
+
+ rt_tsip_register_event_type_t getType();
+ rtRegistrationSession^ getSession();
+ rtRegistrationSession^ takeSessionOwnership();
+
+ private:
+ RegistrationEvent* m_pEvent;
+ };
+
+ /* ======================== rtSubscriptionEvent ========================*/
+ public ref class rtSubscriptionEvent sealed : rtISipEvent
+ {
+ internal:
+ rtSubscriptionEvent(const struct tsip_event_s *e);
+
+ public:
+ virtual ~rtSubscriptionEvent();
+ rtISipEvent_Declare();
+
+ rt_tsip_subscribe_event_type_t getType();
+ rtSubscriptionSession^ getSession();
+ rtSubscriptionSession^ takeSessionOwnership();
+
+ private:
+ SubscriptionEvent* m_pEvent;
+ };
+ }
+} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_SipMessage.h b/bindings/winrt/doubango_rt/include/rt_SipMessage.h
new file mode 100644
index 0000000..a61c1c3
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_SipMessage.h
@@ -0,0 +1,78 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include "rt_Enums.h"
+
+class SdpMessage;
+class SipMessage;
+
+struct tsdp_message_s;
+struct tsip_message_s;
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ public ref class rtSdpMessage sealed
+ {
+ internal:
+ rtSdpMessage();
+ rtSdpMessage(struct tsdp_message_s *message);
+ public:
+ virtual ~rtSdpMessage();
+
+ public:
+ Platform::String^ getSdpHeaderValue(Platform::String^ media, Platform::String^ name, unsigned index);
+ Platform::String^ getSdpHeaderValue(Platform::String^ media, Platform::String^ name);
+ Platform::String^ getSdpHeaderAValue(Platform::String^ media, Platform::String^ attributeName);
+
+ private:
+ SdpMessage* m_pSdpMessage;
+ };
+
+ public ref class rtSipMessage sealed
+ {
+ internal:
+ rtSipMessage();
+ rtSipMessage(struct tsip_message_s* message);
+ public:
+ virtual ~rtSipMessage();
+
+ public:
+ bool isResponse();
+ rt_tsip_request_type_t getRequestType();
+ short getResponseCode();
+ Platform::String^ getResponsePhrase();
+ Platform::String^ getSipHeaderValue(Platform::String^ name, unsigned index);
+ Platform::String^ getSipHeaderValue(Platform::String^ name);
+ Platform::String^ getSipHeaderParamValue(Platform::String^ name, Platform::String^ param, unsigned index);
+ Platform::String^ getSipHeaderParamValue(Platform::String^ name, Platform::String^ param);
+ unsigned getSipContentLength();
+#if COM_VISIBLE
+ Platform::String^ getSipContent();
+#else
+ unsigned getSipContent(Platform::IntPtr output, unsigned maxsize);
+#endif
+ rtSdpMessage^ getSdpMessage();
+
+ private:
+ SipMessage* m_pSipMessage;
+ };
+ }
+}
diff --git a/bindings/winrt/doubango_rt/include/rt_SipSession.h b/bindings/winrt/doubango_rt/include/rt_SipSession.h
new file mode 100644
index 0000000..bf52ba5
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_SipSession.h
@@ -0,0 +1,510 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include "rt_Config.h"
+#include "rt_SipStack.h"
+#include "rt_SipUri.h"
+#include "rt_String.h"
+#include "rt_ActionConfig.h"
+#include "rt_MediaSessionMgr.h"
+
+#include "tinysip.h"
+
+class SipSession;
+class InviteSession;
+class CallSession;
+class MsrpSession;
+class MessagingSession;
+class InfoSession;
+class OptionsSession;
+class PublicationSession;
+class RegistrationSession;
+class SubscriptionSession;
+class SipStack;
+
+class T140CallbackData;
+class T140Callback;
+
+// error C4585: 'doubango_rt::rtSipSession' : A WinRT 'public ref class' must either be sealed or derive from an existing unsealed class
+#define rtISession_Declare() \
+ virtual unsigned getId(); \
+ virtual bool haveOwnership(); \
+ virtual bool addHeader(Platform::String^ name, Platform::String^ value); \
+ virtual bool removeHeader(Platform::String^ name); \
+ [Windows::Foundation::Metadata::DefaultOverload] \
+ virtual bool addCaps(Platform::String^ name, Platform::String^ value); \
+ OVERRIDE_FUNC(virtual bool addCaps(Platform::String^ name);) \
+ virtual bool removeCaps(Platform::String^ name); \
+ virtual bool setExpires(unsigned expires); \
+ OVERRIDE_FUNC(virtual bool setFromUri(Platform::String^ fromUriString);) \
+ [Windows::Foundation::Metadata::DefaultOverload] \
+ virtual bool setFromUri(rtSipUri^ fromUri); \
+ OVERRIDE_FUNC(virtual bool setToUri(Platform::String^ toUriString);) \
+ [Windows::Foundation::Metadata::DefaultOverload] \
+ virtual bool setToUri(rtSipUri^ toUri); \
+ virtual bool setSilentHangup(bool silent); \
+ virtual bool addSigCompCompartment(Platform::String^ compId); \
+ virtual bool removeSigCompCompartment(); \
+
+#define rtISession_Implement(cls) \
+ unsigned cls##::getId(){ \
+ return m_pSipSession->getId(); \
+} \
+ bool cls##::haveOwnership(){ \
+ return m_pSipSession->haveOwnership(); \
+} \
+ bool cls##::addHeader(Platform::String^ name, Platform::String^ value){ \
+ return m_pSipSession->addHeader(rtString::toUtf8(name).data(), rtString::toUtf8(value).data()); \
+} \
+ bool cls##::removeHeader(Platform::String^ name){ \
+ return m_pSipSession->removeHeader(rtString::toUtf8(name).data()); \
+} \
+ bool cls##::addCaps(Platform::String^ name, Platform::String^ value){ \
+ return m_pSipSession->addCaps(rtString::toUtf8(name).data(), rtString::toUtf8(value).data()); \
+} \
+OVERRIDE_FUNC(bool cls##::addCaps(Platform::String^ name){ \
+ return addCaps(name, nullptr); \
+}) \
+ bool cls##::removeCaps(Platform::String^ name){ \
+ return m_pSipSession->removeCaps(rtString::toUtf8(name).data()); \
+} \
+ bool cls##::setExpires(unsigned expires){ \
+ return m_pSipSession->setExpires(expires); \
+} \
+OVERRIDE_FUNC(bool cls##::setFromUri(Platform::String^ fromUriString){ \
+ return m_pSipSession->setFromUri(rtString::toUtf8(fromUriString).data()); \
+}) \
+ bool cls##::setFromUri(rtSipUri^ fromUri){ \
+ return m_pSipSession->setFromUri(fromUri->getWrappedUri()); \
+} \
+OVERRIDE_FUNC(bool cls##::setToUri(Platform::String^ toUriString){ \
+ return m_pSipSession->setToUri(rtString::toUtf8(toUriString).data()); \
+}) \
+ bool cls##::setToUri(rtSipUri^ toUri){ \
+ return m_pSipSession->setToUri(toUri->getWrappedUri()); \
+} \
+ bool cls##::setSilentHangup(bool silent){ \
+ return m_pSipSession->setSilentHangup(silent); \
+} \
+ bool cls##::addSigCompCompartment(Platform::String^ compId){ \
+ return m_pSipSession->addSigCompCompartment(rtString::toUtf8(compId).data()); \
+} \
+ bool cls##::removeSigCompCompartment(){ \
+ return m_pSipSession->removeSigCompCompartment(); \
+}\
+
+
+#define rtIInviteSession_Declare() \
+ [Windows::Foundation::Metadata::DefaultOverload] \
+ virtual bool accept(rtActionConfig^ config); \
+ OVERRIDE_FUNC(virtual bool accept();) \
+ [Windows::Foundation::Metadata::DefaultOverload] \
+ virtual bool hangup(rtActionConfig^ config); \
+ OVERRIDE_FUNC(virtual bool hangup();) \
+ [Windows::Foundation::Metadata::DefaultOverload] \
+ virtual bool reject(rtActionConfig^ config); \
+ OVERRIDE_FUNC(virtual bool reject();) \
+ [Windows::Foundation::Metadata::DefaultOverload] \
+ virtual bool sendInfo(VISIBLE_VOID_PTR payload, unsigned len, rtActionConfig^ config); \
+ OVERRIDE_FUNC(virtual bool sendInfo(VISIBLE_VOID_PTR payload, unsigned len);) \
+ virtual rtMediaSessionMgr^ getMediaMgr(); \
+
+#define rtIInviteSession_Implement(cls) \
+bool cls##::accept(rtActionConfig^ config){ \
+ return m_pSipSession->accept(config ? config->getWrappedActionConfig() : tsk_null); \
+} \
+OVERRIDE_FUNC(bool cls##::accept(){ \
+ return accept(nullptr); \
+}) \
+bool cls##::hangup(rtActionConfig^ config){ \
+ return m_pSipSession->hangup(config ? config->getWrappedActionConfig() : tsk_null); \
+} \
+OVERRIDE_FUNC(bool cls##::hangup(){ \
+ return hangup(nullptr); \
+}) \
+bool cls##::reject(rtActionConfig^ config){ \
+ return m_pSipSession->reject(config ? config->getWrappedActionConfig() : tsk_null); \
+} \
+OVERRIDE_FUNC(bool cls##::reject(){ \
+ return reject(nullptr); \
+}) \
+bool cls##::sendInfo(VISIBLE_VOID_PTR payload, unsigned len, rtActionConfig^ config){ \
+ return m_pSipSession->sendInfo(VISIBLE_VOID_PTR_2_VOID_PTR(payload), len, config ? config->getWrappedActionConfig() : tsk_null); \
+} \
+OVERRIDE_FUNC(bool cls##::sendInfo(VISIBLE_VOID_PTR payload, unsigned len){ \
+ return sendInfo(payload, len, nullptr); \
+}) \
+rtMediaSessionMgr^ cls##::getMediaMgr(){ \
+ if(m_pSipSession->getMediaMgr()){ \
+ return ref new rtMediaSessionMgr(const_cast<struct tmedia_session_mgr_s*>(m_pSipSession->getMediaMgr()->getWrappedMgr())); \
+ } \
+ return nullptr; \
+} \
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ ref class rtMsrpCallback;
+ interface class rtIMsrpCallback;
+
+
+ /* ======================== rtT140CallbackData ========================*/
+ public ref class rtT140CallbackData sealed
+ {
+ internal:
+ rtT140CallbackData(enum tmedia_t140_data_type_e data_type, const void* data_ptr, unsigned data_size);
+ public:
+ virtual ~rtT140CallbackData();
+
+ private:
+ T140CallbackData* m_pData;
+ };
+
+ /* ======================== rtT140Callback ========================*/
+ public interface class rtIT140Callback
+ {
+ virtual int ondata(rtT140CallbackData^ pData);
+ };
+ public ref class rtT140Callback sealed
+ {
+ internal:
+ rtT140Callback();
+ const T140Callback* getWrappedCallback(){ return m_pCallback; }
+
+ public:
+ rtT140Callback(rtIT140Callback^ pI)
+ {
+ m_pI = pI;
+ }
+ virtual ~rtT140Callback();
+
+ protected:
+ virtual int ondata(rtT140CallbackData^ pData){
+ if(m_pI)
+ {
+ return m_pI->ondata(pData);
+ }
+ return 0;
+ }
+
+ private:
+ T140Callback* m_pCallback;
+ rtIT140Callback^ m_pI;
+ };
+
+
+ /* ======================== rtISipSession ========================*/
+ public interface class rtISipSession
+ {
+ rtISession_Declare();
+ };
+
+
+ /* ======================== rtIInviteSession ========================*/
+ public interface class rtIInviteSession : rtISipSession
+ {
+ rtIInviteSession_Declare();
+ };
+
+ /* ======================== rtSipSession ========================*/
+ public ref class rtSipSession sealed: rtISipSession
+ {
+ public:
+ rtSipSession(rtSipStack^ pStack);
+ virtual ~rtSipSession();
+ internal:
+ rtSipSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ SipSession* getWrappedSession(){ return m_pSipSession; }
+
+ public:
+ rtISession_Declare();
+
+ private:
+ SipSession* m_pSipSession;
+ };
+
+ /* ======================== rtInviteSession ========================*/
+ public ref class rtInviteSession sealed: rtIInviteSession
+ {
+ public:
+ rtInviteSession(rtSipStack^ pStack);
+ virtual ~rtInviteSession();
+ internal:
+ rtInviteSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ InviteSession* getWrappedSession(){ return m_pSipSession; }
+
+ public:
+ rtISession_Declare();
+ rtIInviteSession_Declare();
+
+ private:
+ InviteSession* m_pSipSession;
+ };
+
+ /* ======================== CallSession ========================*/
+ public ref class rtCallSession sealed : rtIInviteSession
+ {
+ public:
+ rtCallSession(rtSipStack^ pStack);
+ virtual ~rtCallSession();
+ internal:
+ rtCallSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ CallSession* getWrappedSession(){ return m_pSipSession; }
+
+ public:
+ rtISession_Declare();
+ rtIInviteSession_Declare();
+
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool call(Platform::String^ remoteUriString, rt_twrap_media_type_t media, rtActionConfig^ config);
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool call(Platform::String^ remoteUriString, rt_twrap_media_type_t media);
+ bool call(rtSipUri^ remoteUri, rt_twrap_media_type_t media, rtActionConfig^ config);
+ bool call(rtSipUri^ remoteUri, rt_twrap_media_type_t media);
+
+ bool setSessionTimer(unsigned timeout, Platform::String^ refresher);
+ bool set100rel(bool enabled);
+ bool setRtcp(bool enabled);
+ bool setRtcpMux(bool enabled);
+ bool setICE(bool enabled);
+ bool setQoS(rt_tmedia_qos_stype_t type, rt_tmedia_qos_strength_t strength);
+ bool setVideoFps(int32_t fps);
+ bool setVideoBandwidthUploadMax(int32_t max);
+ bool setVideoBandwidthDownloadMax(int32_t max);
+ bool setVideoPrefSize(rt_tmedia_pref_video_size_t pref_video_size);
+ bool hold(rtActionConfig^ config);
+ bool hold();
+ bool resume(rtActionConfig^ config);
+ bool resume();
+ bool transfer(Platform::String^ referToUriString, rtActionConfig^ config);
+ bool transfer(Platform::String^ referToUriString);
+ bool acceptTransfer(rtActionConfig^ config);
+ bool acceptTransfer();
+ bool rejectTransfer(rtActionConfig^ config);
+ bool rejectTransfer();
+ bool sendDTMF(int number);
+ unsigned getSessionTransferId();
+#if COM_VISIBLE
+ bool sendT140Data(rt_tmedia_t140_data_type_t data_type, Platform::String^ data);
+#else
+ bool sendT140Data(rt_tmedia_t140_data_type_t data_type, Platform::IntPtr data_ptr, unsigned data_size);
+#endif
+ bool sendT140Data(rt_tmedia_t140_data_type_t data_type);
+ bool setT140Callback(rtT140Callback^ pT140Callback);
+
+ private:
+ CallSession* m_pSipSession;
+ };
+
+
+ /* ======================== rtMsrpSession ========================*/
+ public ref class rtMsrpSession sealed : rtIInviteSession
+ {
+ public:
+ rtMsrpSession(rtSipStack^ pStack, rtIMsrpCallback^ pCallback);
+ virtual ~rtMsrpSession();
+
+ internal:
+ rtMsrpSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ MsrpSession* getWrappedSession(){ return m_pSipSession; }
+
+ public:
+ rtISession_Declare();
+ rtIInviteSession_Declare();
+
+ bool setCallback(rtIMsrpCallback^ pCallback);
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool callMsrp(Platform::String^ remoteUriString, rtActionConfig^ config);
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool callMsrp(Platform::String^ remoteUriString);
+ bool callMsrp(rtSipUri^ remoteUri, rtActionConfig^ config);
+ bool callMsrp(rtSipUri^ remoteUri);
+#if COM_VISIBLE
+ bool sendMessage(Platform::String^ payload, rtActionConfig^ config);
+ bool sendMessage(Platform::String^ payload);
+#else
+ bool sendMessage(Platform::IntPtr payload, unsigned len, rtActionConfig^ config);
+ bool sendMessage(Platform::IntPtr payload, unsigned len);
+#endif
+
+ private:
+ MsrpSession* m_pSipSession;
+ rtMsrpCallback^ m_pCallback;
+ };
+
+ /* ======================== rtMessagingSession ========================*/
+ public ref class rtMessagingSession sealed : rtISipSession
+ {
+ internal:
+ rtMessagingSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ public:
+ rtMessagingSession(rtSipStack^ pStack);
+ virtual ~rtMessagingSession();
+
+ rtISession_Declare();
+
+#if COM_VISIBLE
+ bool send(Platform::String^ payload, rtActionConfig^ config);
+ bool send(Platform::String^ payload);
+#else
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool send(Platform::IntPtr payload, unsigned len, rtActionConfig^ config);
+ bool send(Platform::IntPtr payload, unsigned len);
+#endif
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool accept(rtActionConfig^ config);
+ bool accept();
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool reject(rtActionConfig^ config);
+ bool reject();
+
+ private:
+ MessagingSession* m_pSipSession;
+ };
+
+
+ /* ======================== rtInfoSession ========================*/
+ public ref class rtInfoSession sealed : rtISipSession
+ {
+ internal:
+ rtInfoSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ public:
+ rtInfoSession(rtSipStack^ pStack);
+ virtual ~rtInfoSession();
+
+ rtISession_Declare();
+
+#if COM_VISIBLE
+ bool send(Platform::String^ payload, rtActionConfig^ config);
+ bool send(Platform::String^ payload);
+#else
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool send(Platform::IntPtr payload, unsigned len, rtActionConfig^ config);
+ bool send(Platform::IntPtr payload, unsigned len);
+#endif
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool accept(rtActionConfig^ config);
+ bool accept();
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool reject(rtActionConfig^ config);
+ bool reject();
+
+ private:
+ InfoSession* m_pSipSession;
+ };
+
+
+ /* ======================== rtOptionsSession ========================*/
+ public ref class rtOptionsSession sealed : rtISipSession
+ {
+ internal:
+ rtOptionsSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ public:
+ rtOptionsSession(rtSipStack^ pStack);
+ virtual ~rtOptionsSession();
+
+ rtISession_Declare();
+
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool send(rtActionConfig^ config);
+ bool send();
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool accept(rtActionConfig^ config);
+ bool accept();
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool reject(rtActionConfig^ config);
+ bool reject();
+
+ private:
+ OptionsSession* m_pSipSession;
+ };
+
+
+ /* ======================== rtPublicationSession ========================*/
+ public ref class rtPublicationSession sealed : rtISipSession
+ {
+ internal:
+ rtPublicationSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ public:
+ rtPublicationSession(rtSipStack^ pStack);
+ virtual ~rtPublicationSession();
+
+ rtISession_Declare();
+
+#if COM_VISIBLE
+ bool publish(Platform::String^ payload, rtActionConfig^ config);
+ bool publish(Platform::String^ payload);
+#else
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool publish(Platform::IntPtr payload, unsigned len, rtActionConfig^ config);
+ bool publish(Platform::IntPtr payload, unsigned len);
+#endif
+ [Windows::Foundation::Metadata::DefaultOverload]
+ bool unPublish(rtActionConfig^ config);
+ bool unPublish();
+
+ private:
+ PublicationSession* m_pSipSession;
+ };
+
+
+ /* ======================== rtRegistrationSession ========================*/
+ public ref class rtRegistrationSession sealed : rtISipSession
+ {
+ internal:
+ rtRegistrationSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ public:
+ rtRegistrationSession(rtSipStack^ pStack);
+ virtual ~rtRegistrationSession();
+
+ rtISession_Declare();
+
+ bool register_(rtActionConfig^ config);
+ bool register_();
+ bool unRegister(rtActionConfig^ config);
+ bool unRegister();
+ bool accept(rtActionConfig^ config);
+ bool accept();
+ bool reject(rtActionConfig^ config);
+ bool reject();
+
+ private:
+ RegistrationSession* m_pSipSession;
+ };
+
+ /* ======================== rtSubscriptionSession ========================*/
+ public ref class rtSubscriptionSession sealed : rtISipSession
+ {
+ internal:
+ rtSubscriptionSession(SipStack* pStack, tsip_ssession_handle_t* pHandle);
+ public:
+ rtSubscriptionSession(rtSipStack^ pStack);
+ virtual ~rtSubscriptionSession();
+
+ rtISession_Declare();
+
+ bool subscribe();
+ bool unSubscribe();
+
+ private:
+ SubscriptionSession* m_pSipSession;
+ };
+ }
+}
diff --git a/bindings/winrt/doubango_rt/include/rt_SipStack.h b/bindings/winrt/doubango_rt/include/rt_SipStack.h
new file mode 100644
index 0000000..b55c5ae
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_SipStack.h
@@ -0,0 +1,120 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include <mutex>
+
+class SipStack;
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ ref class rtSipCallback;
+ interface class rtISipCallback;
+ ref class rtDDebugCallback;
+ interface class rtIDDebugCallback;
+
+ enum class rt_tdav_codec_id_t;
+
+ public ref class rtDnsResult sealed
+ {
+ internal:
+ rtDnsResult(uint16 port, Platform::String^ address):_port(port), _address(address){}
+ public:
+ property uint16 Port{ uint16 get() { return _port; }; }
+ property Platform::String^ Address{ Platform::String^ get() { return _address; }; }
+ private:
+ uint16 _port;
+ Platform::String^ _address;
+ };
+
+ public ref class rtSipStack sealed
+ {
+ public:
+ virtual ~rtSipStack();
+
+ internal:
+ rtSipStack(rtISipCallback^ callback, Platform::String^ realmUri, Platform::String^ impiString, Platform::String^ impuUri);
+ const SipStack* getWrappedStack() { return m_pSipStack; }
+
+ public:
+ bool start();
+ bool setDebugCallback(rtIDDebugCallback^ pCallback);
+ bool setDisplayName(Platform::String^ display_name);
+ bool setRealm(Platform::String^ realm_uri);
+ bool setIMPI(Platform::String^ impi);
+ bool setIMPU(Platform::String^ impu_uri);
+ bool setPassword(Platform::String^ password);
+ bool setAMF(Platform::String^ amf);
+ bool setOperatorId(Platform::String^ opid);
+ bool setProxyCSCF(Platform::String^ fqdn, unsigned short port, Platform::String^ transport, Platform::String^ ipversion);
+ bool setLocalIP(Platform::String^ ip, Platform::String^ transport);
+ bool setLocalIP(Platform::String^ ip);
+ bool setLocalPort(unsigned short port, Platform::String^ transport);
+ bool setLocalPort(unsigned short port);
+ bool setEarlyIMS(bool enabled);
+ bool addHeader(Platform::String^ name, Platform::String^ value);
+ bool removeHeader(Platform::String^ name);
+ bool addDnsServer(Platform::String^ ip);
+ bool setDnsDiscovery(bool enabled);
+ bool setAoR(Platform::String^ ip, int port);
+ bool setSigCompParams(unsigned dms, unsigned sms, unsigned cpb, bool enablePresDict);
+ bool addSigCompCompartment(Platform::String^ compId);
+ bool removeSigCompCompartment(Platform::String^ compId);
+
+ bool setSTUNServer(Platform::String^ ip, unsigned short port);
+ bool setSTUNCred(Platform::String^ login, Platform::String^ password);
+
+ bool setTLSSecAgree(bool enabled);
+ bool setSSLCertificates(Platform::String^ privKey, Platform::String^ pubKey, Platform::String^ caKey, bool verify);
+ bool setSSLCertificates(Platform::String^ privKey, Platform::String^ pubKey, Platform::String^ caKey);
+ bool setIPSecSecAgree(bool enabled);
+ bool setIPSecParameters(Platform::String^ algo, Platform::String^ ealgo, Platform::String^ mode, Platform::String^ proto);
+
+ Platform::String^ dnsENUM(Platform::String^ service, Platform::String^ e164num, Platform::String^ domain);
+#if COM_VISIBLE
+ rtDnsResult^ dnsNaptrSrv(Platform::String^ domain, Platform::String^ service);
+ rtDnsResult^ dnsSrv(Platform::String^ service);
+ Platform::String^ getLocalIP(Platform::String^ protocol);
+ uint16 getLocalPort(Platform::String^ protocol);
+#else
+ Platform::String^ dnsNaptrSrv(Platform::String^ domain, Platform::String^ service, Platform::IntPtr port);
+ Platform::String^ dnsSrv(Platform::String^ service, Platform::IntPtr port);
+ Platform::String^ getLocalIPnPort(Platform::String^ protocol, Platform::IntPtr port);
+#endif
+
+ Platform::String^ getPreferredIdentity();
+
+ bool isValid();
+ bool stop();
+
+ static bool initialize();
+ static bool deInitialize();
+ static void setCodecs(enum class rt_tdav_codec_id_t codecs);
+ static bool setCodecPriority(enum class rt_tdav_codec_id_t codec_id, int priority);
+ static bool isCodecSupported(enum class rt_tdav_codec_id_t codec_id);
+
+ private:
+ SipStack* m_pSipStack;
+ rtSipCallback^ m_pSipCallback;
+ rtDDebugCallback^ m_pDebugCallback;
+ std::recursive_mutex mLock;
+ };
+ }
+} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_SipUri.h b/bindings/winrt/doubango_rt/include/rt_SipUri.h
new file mode 100644
index 0000000..3917f87
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_SipUri.h
@@ -0,0 +1,60 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include "rt_Config.h"
+
+class SipUri;
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ public ref class rtSipUri sealed
+ {
+ public:
+ virtual ~rtSipUri();
+ rtSipUri(Platform::String^ uriString, Platform::String^ displayName);
+ rtSipUri(Platform::String^ uriString);
+
+
+ public:
+ static bool isValid(Platform::String^ uri);
+
+#if COM_VISIBLE
+ bool isValid_();
+#else
+ bool isValid();
+#endif
+ Platform::String^ getScheme();
+ Platform::String^ getHost();
+ unsigned short getPort();
+ Platform::String^ getUserName();
+ Platform::String^ getPassword();
+ Platform::String^ getDisplayName();
+ Platform::String^ getParamValue(Platform::String^ name);
+ void setDisplayName(Platform::String^ displayName);
+
+ internal:
+ const SipUri* getWrappedUri(){ return m_pSipUri; }
+
+ private:
+ SipUri* m_pSipUri;
+ };
+ }
+} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_String.h b/bindings/winrt/doubango_rt/include/rt_String.h
new file mode 100644
index 0000000..5562b5d
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_String.h
@@ -0,0 +1,33 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once
+
+#include <vector>
+
+namespace doubango_rt
+{
+ namespace BackEnd
+ {
+ ref class rtString sealed
+ {
+ internal:
+ static std::vector<char> toUtf8(Platform::String^ str);
+ static Platform::String^ toString(char const* str);
+ };
+ }
+} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/include/rt_Xcap.h b/bindings/winrt/doubango_rt/include/rt_Xcap.h
new file mode 100644
index 0000000..9385aed
--- /dev/null
+++ b/bindings/winrt/doubango_rt/include/rt_Xcap.h
@@ -0,0 +1,18 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#pragma once \ No newline at end of file
OpenPOWER on IntegriCloud