summaryrefslogtreecommitdiffstats
path: root/bindings/winrt
diff options
context:
space:
mode:
authorMamadou DIOP <bossiel@yahoo.fr>2016-02-23 22:00:35 +0100
committerMamadou DIOP <bossiel@yahoo.fr>2016-02-23 22:00:35 +0100
commit50dfb4359619563012997bc3ddafb7667741066c (patch)
treedb234c1edc3240a653363b5735fc4077af4b8720 /bindings/winrt
parent94b2219209038e05dd26395f6fb700be4d1062c0 (diff)
downloaddoubango-50dfb4359619563012997bc3ddafb7667741066c.zip
doubango-50dfb4359619563012997bc3ddafb7667741066c.tar.gz
Add new QoS implementation
Code formatting
Diffstat (limited to 'bindings/winrt')
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_ActionConfig.h52
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_Config.h9
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_DDebug.h54
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_Enums.h609
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_MediaContent.h6
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_MediaSessionMgr.h192
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_Msrp.h149
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_SMSEncoder.h6
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_SipCallback.h82
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_SipEvent.h378
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_SipMessage.h86
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_SipSession.h682
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_SipStack.h178
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_SipUri.h68
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_String.h24
-rwxr-xr-xbindings/winrt/doubango_rt/include/rt_Xcap.h6
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_ActionConfig.cxx36
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_DDebug.cxx62
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_Enums.cxx6
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_MediaContent.cxx6
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_MediaSessionMgr.cxx159
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_Msrp.cxx109
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_SMSEncoder.cxx6
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_SipCallback.cxx169
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_SipEvent.cxx68
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_SipMessage.cxx106
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_SipSession.cxx267
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_SipStack.cxx255
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_SipUri.cxx41
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_String.cxx50
-rwxr-xr-xbindings/winrt/doubango_rt/src/rt_Xcap.cxx6
31 files changed, 1957 insertions, 1970 deletions
diff --git a/bindings/winrt/doubango_rt/include/rt_ActionConfig.h b/bindings/winrt/doubango_rt/include/rt_ActionConfig.h
index abafc37..25a5809 100755
--- a/bindings/winrt/doubango_rt/include/rt_ActionConfig.h
+++ b/bindings/winrt/doubango_rt/include/rt_ActionConfig.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -23,31 +23,33 @@ class ActionConfig;
namespace doubango_rt
{
- namespace BackEnd
- {
- public ref class rtActionConfig sealed
- {
- public:
- rtActionConfig();
- virtual ~rtActionConfig();
-
- bool addHeader(Platform::String^ name, Platform::String^ value);
+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);
+ bool addPayload(Platform::String^ payload);
#else
- bool addPayload(Platform::IntPtr payload, unsigned len);
+ 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);
+ 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; }
+internal:
+ ActionConfig* getWrappedActionConfig() {
+ return m_pActionConfig;
+ }
- private:
- ActionConfig* 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
index e8d7dde..d5fb7eb 100755
--- a/bindings/winrt/doubango_rt/include/rt_Config.h
+++ b/bindings/winrt/doubango_rt/include/rt_Config.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -20,7 +20,7 @@
#define rtSafeDelete(ptr) if((ptr)) delete (ptr), (ptr) = nullptr;
#if COM_VISIBLE
-# define OVERRIDE_FUNC(fun)
+# define OVERRIDE_FUNC(fun)
# define VISIBLE_VOID_PTR Platform::String^
# define VISIBLE_VOID_PTR_2_VOID_PTR(ptr) rtString::toUtf8((ptr)).data()
#else
@@ -28,4 +28,3 @@
# 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
index e4300b5..8973271 100755
--- a/bindings/winrt/doubango_rt/include/rt_DDebug.h
+++ b/bindings/winrt/doubango_rt/include/rt_DDebug.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -24,30 +24,30 @@ 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);
- };
+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;
- public ref class rtDDebugCallback sealed
- {
- internal:
- rtDDebugCallback(rtIDDebugCallback^ pI);
- public:
- virtual ~rtDDebugCallback();
- friend class DDebugCallbackProxy;
-
- internal:
- const DDebugCallback* getWrappedCallback();
+internal:
+ const DDebugCallback* getWrappedCallback();
- private:
- rtIDDebugCallback^ m_pI;
- DDebugCallbackProxy* m_pCallback;
- };
- }
+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
index 78e97bf..843a501 100755
--- a/bindings/winrt/doubango_rt/include/rt_Enums.h
+++ b/bindings/winrt/doubango_rt/include/rt_Enums.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -27,307 +27,308 @@
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,
+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,
+ tdav_codec_id_red = tmedia_codec_id_red,
#endif
- tdav_codec_id_all = tmedia_codec_id_all,
- };
- }
+ 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
index 9385aed..d47a63c 100755
--- a/bindings/winrt/doubango_rt/include/rt_MediaContent.h
+++ b/bindings/winrt/doubango_rt/include/rt_MediaContent.h
@@ -1,17 +1,17 @@
/*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.
*/
diff --git a/bindings/winrt/doubango_rt/include/rt_MediaSessionMgr.h b/bindings/winrt/doubango_rt/include/rt_MediaSessionMgr.h
index 3878667..aeb0337 100755
--- a/bindings/winrt/doubango_rt/include/rt_MediaSessionMgr.h
+++ b/bindings/winrt/doubango_rt/include/rt_MediaSessionMgr.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -25,106 +25,106 @@ 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;
+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();
+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;
+};
- private:
- Codec* m_pCodec;
- };
+public ref class rtMediaSessionMgr sealed
+{
+internal:
+ rtMediaSessionMgr(struct tmedia_session_mgr_s* pWrappedMgr);
- 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);
- 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 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);
- 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);
- static unsigned int registerAudioPluginFromFile(Platform::String^ path);
+ uint64 getSessionId(rt_twrap_media_type_t media);
- 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);
+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;
- };
- }
+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
index b0fbe26..399f3b0 100755
--- a/bindings/winrt/doubango_rt/include/rt_Msrp.h
+++ b/bindings/winrt/doubango_rt/include/rt_Msrp.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -25,85 +25,96 @@ class MsrpEvent;
namespace doubango_rt
{
- namespace BackEnd
- {
- ref class rtMsrpSession;
+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 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 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();
+public:
+ bool isRequest();
+ short getCode();
+ Platform::String^ getPhrase();
+ rt_tmsrp_request_type_t getRequestType();
#if COM_VISIBLE
- rtMsrpByteRange^ getByteRange();
+ rtMsrpByteRange^ getByteRange();
#else
- void getByteRange(Platform::IntPtr start, Platform::IntPtr end, Platform::IntPtr total);
+ 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();
+ 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);
+ Platform::String^ getMsrpContent(unsigned maxsize);
#else
- unsigned getMsrpContent(Platform::IntPtr output, unsigned maxsize);
+ unsigned getMsrpContent(Platform::IntPtr output, unsigned maxsize);
#endif
- private:
- MsrpMessage* m_pMsrpMessage;
- };
+private:
+ MsrpMessage* m_pMsrpMessage;
+};
- public ref class rtMsrpEvent sealed
- {
- internal:
- rtMsrpEvent(const struct tmsrp_event_s *event);
- public:
- virtual ~rtMsrpEvent();
+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();
+ rt_tmsrp_event_type_t getType();
+ rtMsrpSession^ getSipSession();
+ rtMsrpMessage^ getMessage();
- private:
- MsrpEvent* m_pMsrpEvent;
- };
+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();
+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;
- };
- }
+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
index 9385aed..d47a63c 100755
--- a/bindings/winrt/doubango_rt/include/rt_SMSEncoder.h
+++ b/bindings/winrt/doubango_rt/include/rt_SMSEncoder.h
@@ -1,17 +1,17 @@
/*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.
*/
diff --git a/bindings/winrt/doubango_rt/include/rt_SipCallback.h b/bindings/winrt/doubango_rt/include/rt_SipCallback.h
index 1f0a9e0..ecd1d54 100755
--- a/bindings/winrt/doubango_rt/include/rt_SipCallback.h
+++ b/bindings/winrt/doubango_rt/include/rt_SipCallback.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -22,49 +22,49 @@ class SipCallbackProxy;
namespace doubango_rt
{
- namespace BackEnd
- {
- ref class rtDialogEvent;
- ref class rtStackEvent;
+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;
+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);
+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);
+};
- 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;
- public ref class rtSipCallback sealed
- {
- internal:
- rtSipCallback(rtISipCallback^ pI);
- public:
- virtual ~rtSipCallback();
- friend class SipCallbackProxy;
-
- internal:
- const SipCallback* getWrappedCallback();
+internal:
+ const SipCallback* getWrappedCallback();
- private:
- rtISipCallback^ m_pI;
- SipCallbackProxy* m_pCallback;
- };
- }
+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
index e615bde..f337262 100755
--- a/bindings/winrt/doubango_rt/include/rt_SipEvent.h
+++ b/bindings/winrt/doubango_rt/include/rt_SipEvent.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -39,7 +39,7 @@ class SubscriptionEvent;
virtual Platform::String^ getPhrase(); \
virtual rtISipSession^ getBaseSession(); \
virtual rtSipMessage^ getSipMessage(); \
-
+
#define rtISipEvent_Implement(cls) \
short cls##::getCode(){ \
return m_pEvent->getCode(); \
@@ -53,192 +53,192 @@ rtISipSession^ cls##::getBaseSession(){ \
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;
- };
- }
+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
index a61c1c3..2feac91 100755
--- a/bindings/winrt/doubango_rt/include/rt_SipMessage.h
+++ b/bindings/winrt/doubango_rt/include/rt_SipMessage.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -27,52 +27,52 @@ 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();
+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);
+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;
- };
+private:
+ SdpMessage* m_pSdpMessage;
+};
- public ref class rtSipMessage sealed
- {
- internal:
- rtSipMessage();
- rtSipMessage(struct tsip_message_s* message);
- public:
- virtual ~rtSipMessage();
+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();
+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();
+ Platform::String^ getSipContent();
#else
- unsigned getSipContent(Platform::IntPtr output, unsigned maxsize);
+ unsigned getSipContent(Platform::IntPtr output, unsigned maxsize);
#endif
- rtSdpMessage^ getSdpMessage();
+ rtSdpMessage^ getSdpMessage();
- private:
- SipMessage* m_pSipMessage;
- };
- }
+private:
+ SipMessage* m_pSipMessage;
+};
+}
}
diff --git a/bindings/winrt/doubango_rt/include/rt_SipSession.h b/bindings/winrt/doubango_rt/include/rt_SipSession.h
index bf52ba5..73a36dd 100755
--- a/bindings/winrt/doubango_rt/include/rt_SipSession.h
+++ b/bindings/winrt/doubango_rt/include/rt_SipSession.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -61,7 +61,7 @@ class T140Callback;
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(); \
@@ -108,7 +108,7 @@ OVERRIDE_FUNC(bool cls##::setToUri(Platform::String^ toUriString){ \
bool cls##::removeSigCompCompartment(){ \
return m_pSipSession->removeSigCompCompartment(); \
}\
-
+
#define rtIInviteSession_Declare() \
[Windows::Foundation::Metadata::DefaultOverload] \
@@ -124,7 +124,7 @@ OVERRIDE_FUNC(bool cls##::setToUri(Platform::String^ toUriString){ \
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); \
@@ -156,355 +156,363 @@ rtMediaSessionMgr^ cls##::getMediaMgr(){ \
} \
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();
+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);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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();
-
+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);
+ 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);
+ [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();
+ [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);
+ 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);
+ [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();
+ [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);
+ 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);
+ [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;
- };
- }
+ [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
index b55c5ae..6148420 100755
--- a/bindings/winrt/doubango_rt/include/rt_SipStack.h
+++ b/bindings/winrt/doubango_rt/include/rt_SipStack.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -23,98 +23,106 @@ class SipStack;
namespace doubango_rt
{
- namespace BackEnd
- {
- ref class rtSipCallback;
- interface class rtISipCallback;
- ref class rtDDebugCallback;
- interface class rtIDDebugCallback;
+namespace BackEnd
+{
+ref class rtSipCallback;
+interface class rtISipCallback;
+ref class rtDDebugCallback;
+interface class rtIDDebugCallback;
- enum class rt_tdav_codec_id_t;
+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 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();
+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;
+ }
- 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);
- 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 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);
+ 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);
+ 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);
+ 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();
+ Platform::String^ getPreferredIdentity();
+
+ bool isValid();
+ bool stop();
- 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);
+ 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;
- };
- }
+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
index 3917f87..99db756 100755
--- a/bindings/winrt/doubango_rt/include/rt_SipUri.h
+++ b/bindings/winrt/doubango_rt/include/rt_SipUri.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -23,38 +23,40 @@ 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);
+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_();
+ bool isValid_();
#else
- bool isValid();
+ 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;
- };
- }
+ 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
index 5562b5d..ce227ae 100755
--- a/bindings/winrt/doubango_rt/include/rt_String.h
+++ b/bindings/winrt/doubango_rt/include/rt_String.h
@@ -1,17 +1,17 @@
/*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.
*/
@@ -21,13 +21,13 @@
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);
- };
- }
+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
index 9385aed..d47a63c 100755
--- a/bindings/winrt/doubango_rt/include/rt_Xcap.h
+++ b/bindings/winrt/doubango_rt/include/rt_Xcap.h
@@ -1,17 +1,17 @@
/*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.
*/
diff --git a/bindings/winrt/doubango_rt/src/rt_ActionConfig.cxx b/bindings/winrt/doubango_rt/src/rt_ActionConfig.cxx
index 02f713e..b076eba 100755
--- a/bindings/winrt/doubango_rt/src/rt_ActionConfig.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_ActionConfig.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -26,51 +26,51 @@ using namespace std;
rtActionConfig::rtActionConfig()
{
- m_pActionConfig = new ActionConfig();
+ m_pActionConfig = new ActionConfig();
}
rtActionConfig::~rtActionConfig()
{
- rtSafeDelete(m_pActionConfig);
+ rtSafeDelete(m_pActionConfig);
}
-
+
bool rtActionConfig::addHeader(String^ name, String^ value)
{
- return m_pActionConfig->addHeader(rtString::toUtf8(name).data(), rtString::toUtf8(value).data());
+ return m_pActionConfig->addHeader(rtString::toUtf8(name).data(), rtString::toUtf8(value).data());
}
bool rtActionConfig::setActiveMedia(rt_twrap_media_type_t type)
{
- return m_pActionConfig->setActiveMedia((twrap_media_type_t)type);
+ return m_pActionConfig->setActiveMedia((twrap_media_type_t)type);
}
#if COM_VISIBLE
bool rtActionConfig::addPayload(Platform::String^ payload)
{
- static std::vector<char> _payload = rtString::toUtf8(payload);
- return m_pActionConfig->addPayload(_payload.data(), _payload.size());
+ static std::vector<char> _payload = rtString::toUtf8(payload);
+ return m_pActionConfig->addPayload(_payload.data(), _payload.size());
}
#else
bool rtActionConfig::addPayload(IntPtr payload, unsigned len)
{
- return m_pActionConfig->addPayload((const void*)payload, len);
+ return m_pActionConfig->addPayload((const void*)payload, len);
}
#endif /* COM_VISIBLE */
-
+
rtActionConfig^ rtActionConfig::setResponseLine(short code, String^ phrase)
{
- m_pActionConfig->setResponseLine(code, rtString::toUtf8(phrase).data());
- return this;
+ m_pActionConfig->setResponseLine(code, rtString::toUtf8(phrase).data());
+ return this;
}
rtActionConfig^ rtActionConfig::setMediaString(rt_twrap_media_type_t type, String^ key, String^ value)
{
- m_pActionConfig->setMediaString((twrap_media_type_t)type, rtString::toUtf8(key).data(), rtString::toUtf8(value).data());
- return this;
+ m_pActionConfig->setMediaString((twrap_media_type_t)type, rtString::toUtf8(key).data(), rtString::toUtf8(value).data());
+ return this;
}
rtActionConfig^ rtActionConfig::setMediaInt(rt_twrap_media_type_t type, String^ key, int value)
{
- m_pActionConfig->setMediaInt((twrap_media_type_t)type, rtString::toUtf8(key).data(), value);
- return this;
+ m_pActionConfig->setMediaInt((twrap_media_type_t)type, rtString::toUtf8(key).data(), value);
+ return this;
} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_DDebug.cxx b/bindings/winrt/doubango_rt/src/rt_DDebug.cxx
index a03300c..dcb75ea 100755
--- a/bindings/winrt/doubango_rt/src/rt_DDebug.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_DDebug.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -27,52 +27,46 @@ using namespace std;
class DDebugCallbackProxy : public DDebugCallback
{
public:
- DDebugCallbackProxy(rtDDebugCallback^ pCallback)
- {
- m_pCallback = pCallback;
- }
+ DDebugCallbackProxy(rtDDebugCallback^ pCallback) {
+ m_pCallback = pCallback;
+ }
- ~DDebugCallbackProxy()
- {
-
- }
+ ~DDebugCallbackProxy() {
- virtual int OnDebugInfo(const char* message)
- {
- return m_pCallback->m_pI->OnDebugInfo(rtString::toString(message));
- }
+ }
- virtual int OnDebugWarn(const char* message)
- {
- return m_pCallback->m_pI->OnDebugWarn(rtString::toString(message));
- }
+ virtual int OnDebugInfo(const char* message) {
+ return m_pCallback->m_pI->OnDebugInfo(rtString::toString(message));
+ }
- virtual int OnDebugError(const char* message)
- {
- return m_pCallback->m_pI->OnDebugError(rtString::toString(message));
- }
+ virtual int OnDebugWarn(const char* message) {
+ return m_pCallback->m_pI->OnDebugWarn(rtString::toString(message));
+ }
- virtual int OnDebugFatal(const char* message)
- {
- return m_pCallback->m_pI->OnDebugFatal(rtString::toString(message));
- }
+ virtual int OnDebugError(const char* message) {
+ return m_pCallback->m_pI->OnDebugError(rtString::toString(message));
+ }
+
+ virtual int OnDebugFatal(const char* message) {
+ return m_pCallback->m_pI->OnDebugFatal(rtString::toString(message));
+ }
private:
- rtDDebugCallback^ m_pCallback;
+ rtDDebugCallback^ m_pCallback;
};
rtDDebugCallback::rtDDebugCallback(rtIDDebugCallback^ pI)
{
- m_pI = pI;
- m_pCallback = new DDebugCallbackProxy(this);
+ m_pI = pI;
+ m_pCallback = new DDebugCallbackProxy(this);
}
rtDDebugCallback::~rtDDebugCallback()
{
- rtSafeDelete(m_pCallback);
-}
-
+ rtSafeDelete(m_pCallback);
+}
+
const DDebugCallback* rtDDebugCallback::getWrappedCallback()
{
- return dynamic_cast<const DDebugCallback*>(m_pCallback);
+ return dynamic_cast<const DDebugCallback*>(m_pCallback);
} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_Enums.cxx b/bindings/winrt/doubango_rt/src/rt_Enums.cxx
index fa2645c..888ffa4 100755
--- a/bindings/winrt/doubango_rt/src/rt_Enums.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_Enums.cxx
@@ -1,17 +1,17 @@
/*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.
*/#include "rt_enums.h" \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_MediaContent.cxx b/bindings/winrt/doubango_rt/src/rt_MediaContent.cxx
index 623cb1f..b510d81 100755
--- a/bindings/winrt/doubango_rt/src/rt_MediaContent.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_MediaContent.cxx
@@ -1,17 +1,17 @@
/*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.
*/ \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_MediaSessionMgr.cxx b/bindings/winrt/doubango_rt/src/rt_MediaSessionMgr.cxx
index 7d2c6f0..fcd9b21 100755
--- a/bindings/winrt/doubango_rt/src/rt_MediaSessionMgr.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_MediaSessionMgr.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -27,348 +27,347 @@ using namespace std;
rtCodec::rtCodec(struct tmedia_codec_s* pCodec)
{
- m_pCodec = new Codec(pCodec);
+ m_pCodec = new Codec(pCodec);
}
-
+
rtCodec::~rtCodec()
{
- rtSafeDelete(m_pCodec);
+ rtSafeDelete(m_pCodec);
}
enum class rt_twrap_media_type_t rtCodec::getMediaType()
{
- return (rt_twrap_media_type_t)m_pCodec->getMediaType();
+ return (rt_twrap_media_type_t)m_pCodec->getMediaType();
}
Platform::String^ rtCodec::getName()
{
- return rtString::toString(m_pCodec->getName());
+ return rtString::toString(m_pCodec->getName());
}
Platform::String^ rtCodec::getDescription()
{
- return rtString::toString(m_pCodec->getDescription());
+ return rtString::toString(m_pCodec->getDescription());
}
Platform::String^ rtCodec::getNegFormat()
{
- return rtString::toString(m_pCodec->getNegFormat());
+ return rtString::toString(m_pCodec->getNegFormat());
}
int rtCodec::getAudioSamplingRate()
{
- return m_pCodec->getAudioSamplingRate();
+ return m_pCodec->getAudioSamplingRate();
}
int rtCodec::getAudioChannels()
{
- return m_pCodec->getAudioChannels();
+ return m_pCodec->getAudioChannels();
}
int rtCodec::getAudioPTime()
{
- return m_pCodec->getAudioPTime();
+ return m_pCodec->getAudioPTime();
}
rtMediaSessionMgr::rtMediaSessionMgr(struct tmedia_session_mgr_s* pWrappedMgr)
{
- m_pMediaSessionMgr = new MediaSessionMgr(pWrappedMgr);
+ m_pMediaSessionMgr = new MediaSessionMgr(pWrappedMgr);
}
rtMediaSessionMgr::~rtMediaSessionMgr()
{
- rtSafeDelete(m_pMediaSessionMgr);
+ rtSafeDelete(m_pMediaSessionMgr);
}
bool rtMediaSessionMgr::sessionSetInt32(rt_twrap_media_type_t media, Platform::String^ key, int32 value)
{
- return m_pMediaSessionMgr->sessionSetInt32((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
+ return m_pMediaSessionMgr->sessionSetInt32((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
}
int32 rtMediaSessionMgr::sessionGetInt32(rt_twrap_media_type_t media, Platform::String^ key)
{
- return m_pMediaSessionMgr->sessionGetInt32((twrap_media_type_t)media, rtString::toUtf8(key).data());
+ return m_pMediaSessionMgr->sessionGetInt32((twrap_media_type_t)media, rtString::toUtf8(key).data());
}
bool rtMediaSessionMgr::consumerSetInt32(rt_twrap_media_type_t media, Platform::String^ key, int32 value)
{
- return m_pMediaSessionMgr->consumerSetInt32((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
+ return m_pMediaSessionMgr->consumerSetInt32((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
}
bool rtMediaSessionMgr::consumerSetInt64(rt_twrap_media_type_t media, Platform::String^ key, int64 value)
{
- return m_pMediaSessionMgr->consumerSetInt64((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
+ return m_pMediaSessionMgr->consumerSetInt64((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
}
bool rtMediaSessionMgr::producerSetInt32(rt_twrap_media_type_t media, Platform::String^ key, int32 value)
{
- return m_pMediaSessionMgr->producerSetInt32((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
+ return m_pMediaSessionMgr->producerSetInt32((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
}
bool rtMediaSessionMgr::producerSetInt64(rt_twrap_media_type_t media, Platform::String^ key, int64 value)
{
- return m_pMediaSessionMgr->producerSetInt64((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
+ return m_pMediaSessionMgr->producerSetInt64((twrap_media_type_t)media, rtString::toUtf8(key).data(), value);
}
rtCodec^ rtMediaSessionMgr::producerGetCodec(rt_twrap_media_type_t media)
{
- Codec* c = m_pMediaSessionMgr->producerGetCodec((twrap_media_type_t)media);
- if(c)
- {
- rtCodec^ codec = ref new rtCodec(const_cast<struct tmedia_codec_s*>(c->getWrappedCodec()));
- rtSafeDelete(c);
- return codec;
- }
- return nullptr;
+ Codec* c = m_pMediaSessionMgr->producerGetCodec((twrap_media_type_t)media);
+ if(c) {
+ rtCodec^ codec = ref new rtCodec(const_cast<struct tmedia_codec_s*>(c->getWrappedCodec()));
+ rtSafeDelete(c);
+ return codec;
+ }
+ return nullptr;
}
unsigned int rtMediaSessionMgr::registerAudioPluginFromFile(Platform::String^ path)
{
- return MediaSessionMgr::registerAudioPluginFromFile(rtString::toUtf8(path).data());
+ return MediaSessionMgr::registerAudioPluginFromFile(rtString::toUtf8(path).data());
}
uint64 rtMediaSessionMgr::getSessionId(rt_twrap_media_type_t media)
{
- return m_pMediaSessionMgr->getSessionId((twrap_media_type_t)media);
+ return m_pMediaSessionMgr->getSessionId((twrap_media_type_t)media);
}
-
+
bool rtMediaSessionMgr::defaultsSetProfile(rt_tmedia_profile_t profile)
{
- return MediaSessionMgr::defaultsSetProfile((tmedia_profile_t) profile);
+ return MediaSessionMgr::defaultsSetProfile((tmedia_profile_t) profile);
}
rt_tmedia_profile_t rtMediaSessionMgr::defaultsGetProfile()
{
- return (rt_tmedia_profile_t)MediaSessionMgr::defaultsGetProfile();
+ return (rt_tmedia_profile_t)MediaSessionMgr::defaultsGetProfile();
}
bool rtMediaSessionMgr::defaultsSetPrefVideoSize(enum class rt_tmedia_pref_video_size_t pref_video_size)
{
- return MediaSessionMgr::defaultsSetPrefVideoSize((tmedia_pref_video_size_t) pref_video_size);
+ return MediaSessionMgr::defaultsSetPrefVideoSize((tmedia_pref_video_size_t) pref_video_size);
}
bool rtMediaSessionMgr::defaultsSetJbMargin(uint32 jb_margin_ms)
{
- return MediaSessionMgr::defaultsSetJbMargin(jb_margin_ms);
+ return MediaSessionMgr::defaultsSetJbMargin(jb_margin_ms);
}
bool rtMediaSessionMgr::defaultsSetJbMaxLateRate(uint32 jb_late_rate_percent)
{
- return MediaSessionMgr::defaultsSetJbMaxLateRate(jb_late_rate_percent);
+ return MediaSessionMgr::defaultsSetJbMaxLateRate(jb_late_rate_percent);
}
bool rtMediaSessionMgr::defaultsSetEchoTail(uint32 echo_tail)
{
- return MediaSessionMgr::defaultsSetEchoTail(echo_tail);
+ return MediaSessionMgr::defaultsSetEchoTail(echo_tail);
}
uint32 rtMediaSessionMgr::defaultsGetEchoTail()
{
- return MediaSessionMgr::defaultsGetEchoTail();
+ return MediaSessionMgr::defaultsGetEchoTail();
}
bool rtMediaSessionMgr::defaultsSetEchoSkew(uint32 echo_skew)
{
- return MediaSessionMgr::defaultsSetEchoSkew(echo_skew);
+ return MediaSessionMgr::defaultsSetEchoSkew(echo_skew);
}
bool rtMediaSessionMgr::defaultsSetEchoSuppEnabled(bool echo_supp_enabled)
{
- return MediaSessionMgr::defaultsSetEchoSuppEnabled(echo_supp_enabled);
+ return MediaSessionMgr::defaultsSetEchoSuppEnabled(echo_supp_enabled);
}
bool rtMediaSessionMgr::defaultsGetEchoSuppEnabled()
{
- return MediaSessionMgr::defaultsGetEchoSuppEnabled();
+ return MediaSessionMgr::defaultsGetEchoSuppEnabled();
}
bool rtMediaSessionMgr::defaultsSetAgcEnabled(bool agc_enabled)
{
- return MediaSessionMgr::defaultsSetAgcEnabled(agc_enabled);
+ return MediaSessionMgr::defaultsSetAgcEnabled(agc_enabled);
}
bool rtMediaSessionMgr::defaultsGetAgcEnabled()
{
- return MediaSessionMgr::defaultsGetAgcEnabled();
+ return MediaSessionMgr::defaultsGetAgcEnabled();
}
bool rtMediaSessionMgr::defaultsSetAgcLevel(float agc_level)
{
- return MediaSessionMgr::defaultsSetAgcLevel(agc_level);
+ return MediaSessionMgr::defaultsSetAgcLevel(agc_level);
}
float rtMediaSessionMgr::defaultsGetAgcLevel()
{
- return MediaSessionMgr::defaultsGetAgcLevel();
+ return MediaSessionMgr::defaultsGetAgcLevel();
}
bool rtMediaSessionMgr::defaultsSetVadEnabled(bool vad_enabled)
{
- return MediaSessionMgr::defaultsSetVadEnabled(vad_enabled);
+ return MediaSessionMgr::defaultsSetVadEnabled(vad_enabled);
}
bool rtMediaSessionMgr::defaultsGetGetVadEnabled()
{
- return MediaSessionMgr::defaultsGetGetVadEnabled();
+ return MediaSessionMgr::defaultsGetGetVadEnabled();
}
bool rtMediaSessionMgr::defaultsSetNoiseSuppEnabled(bool noise_supp_enabled)
{
- return MediaSessionMgr::defaultsSetNoiseSuppEnabled(noise_supp_enabled);
+ return MediaSessionMgr::defaultsSetNoiseSuppEnabled(noise_supp_enabled);
}
bool rtMediaSessionMgr::defaultsGetNoiseSuppEnabled()
{
- return MediaSessionMgr::defaultsGetNoiseSuppEnabled();
+ return MediaSessionMgr::defaultsGetNoiseSuppEnabled();
}
bool rtMediaSessionMgr::defaultsSetNoiseSuppLevel(int32 noise_supp_level)
{
- return MediaSessionMgr::defaultsSetNoiseSuppLevel(noise_supp_level);
+ return MediaSessionMgr::defaultsSetNoiseSuppLevel(noise_supp_level);
}
int32 rtMediaSessionMgr::defaultsGetNoiseSuppLevel()
{
- return MediaSessionMgr::defaultsGetNoiseSuppLevel();
+ return MediaSessionMgr::defaultsGetNoiseSuppLevel();
}
bool rtMediaSessionMgr::defaultsSet100relEnabled(bool _100rel_enabled)
{
- return MediaSessionMgr::defaultsSet100relEnabled(_100rel_enabled);
+ return MediaSessionMgr::defaultsSet100relEnabled(_100rel_enabled);
}
bool rtMediaSessionMgr::defaultsGet100relEnabled()
{
- return MediaSessionMgr::defaultsGet100relEnabled();
+ return MediaSessionMgr::defaultsGet100relEnabled();
}
bool rtMediaSessionMgr::defaultsSetScreenSize(int32 sx, int32 sy)
{
- return MediaSessionMgr::defaultsSetScreenSize(sx, sy);
+ return MediaSessionMgr::defaultsSetScreenSize(sx, sy);
}
bool rtMediaSessionMgr::defaultsSetAudioGain(int32 producer_gain, int32 consumer_gain)
{
- return MediaSessionMgr::defaultsSetAudioGain(producer_gain, consumer_gain);
+ return MediaSessionMgr::defaultsSetAudioGain(producer_gain, consumer_gain);
}
bool rtMediaSessionMgr::defaultsSetRtpPortRange(uint16 range_start, uint16 range_stop)
{
- return MediaSessionMgr::defaultsSetRtpPortRange(range_start, range_stop);
+ return MediaSessionMgr::defaultsSetRtpPortRange(range_start, range_stop);
}
bool rtMediaSessionMgr::defaultsSetRtpSymetricEnabled(bool enabled)
{
- return MediaSessionMgr::defaultsSetRtpSymetricEnabled(enabled);
+ return MediaSessionMgr::defaultsSetRtpSymetricEnabled(enabled);
}
bool rtMediaSessionMgr::defaultsSetMediaType(enum class rt_twrap_media_type_t media_type)
{
- return MediaSessionMgr::defaultsSetMediaType((twrap_media_type_t) media_type);
+ return MediaSessionMgr::defaultsSetMediaType((twrap_media_type_t) media_type);
}
bool rtMediaSessionMgr::defaultsSetVolume(int32 volume)
{
- return MediaSessionMgr::defaultsSetVolume(volume);
+ return MediaSessionMgr::defaultsSetVolume(volume);
}
int32 rtMediaSessionMgr::defaultsGetVolume()
{
- return MediaSessionMgr::defaultsGetVolume();
+ return MediaSessionMgr::defaultsGetVolume();
}
bool rtMediaSessionMgr::defaultsSetInviteSessionTimers(int32 timeout, Platform::String^ refresher)
{
- return MediaSessionMgr::defaultsSetInviteSessionTimers(timeout, rtString::toUtf8(refresher).data());
+ return MediaSessionMgr::defaultsSetInviteSessionTimers(timeout, rtString::toUtf8(refresher).data());
}
bool rtMediaSessionMgr::defaultsSetSRtpMode(enum class rt_tmedia_srtp_mode_t mode)
{
- return MediaSessionMgr::defaultsSetSRtpMode((tmedia_srtp_mode_t) mode);
+ return MediaSessionMgr::defaultsSetSRtpMode((tmedia_srtp_mode_t) mode);
}
enum class rt_tmedia_srtp_mode_t rtMediaSessionMgr::defaultsGetSRtpMode()
{
- return (rt_tmedia_srtp_mode_t)MediaSessionMgr::defaultsGetSRtpMode();
+ return (rt_tmedia_srtp_mode_t)MediaSessionMgr::defaultsGetSRtpMode();
}
bool rtMediaSessionMgr::defaultsSetSRtpType(enum class rt_tmedia_srtp_type_t srtp_type)
{
- return MediaSessionMgr::defaultsSetSRtpType((tmedia_srtp_type_t) srtp_type);
+ return MediaSessionMgr::defaultsSetSRtpType((tmedia_srtp_type_t) srtp_type);
}
enum class rt_tmedia_srtp_type_t rtMediaSessionMgr::defaultsGetSRtpType()
{
- return (rt_tmedia_srtp_type_t)MediaSessionMgr::defaultsGetSRtpType();
+ return (rt_tmedia_srtp_type_t)MediaSessionMgr::defaultsGetSRtpType();
}
bool rtMediaSessionMgr::defaultsSetRtcpEnabled(bool enabled)
{
- return MediaSessionMgr::defaultsSetRtcpEnabled(enabled);
+ return MediaSessionMgr::defaultsSetRtcpEnabled(enabled);
}
bool rtMediaSessionMgr::defaultsGetRtcpEnabled()
{
- return MediaSessionMgr::defaultsGetRtcpEnabled();
+ return MediaSessionMgr::defaultsGetRtcpEnabled();
}
bool rtMediaSessionMgr::defaultsSetRtcpMuxEnabled(bool enabled)
{
- return MediaSessionMgr::defaultsSetRtcpMuxEnabled(enabled);
+ return MediaSessionMgr::defaultsSetRtcpMuxEnabled(enabled);
}
bool rtMediaSessionMgr::defaultsGetRtcpMuxEnabled()
{
- return MediaSessionMgr::defaultsGetRtcpMuxEnabled();
+ return MediaSessionMgr::defaultsGetRtcpMuxEnabled();
}
bool rtMediaSessionMgr::defaultsSetIceEnabled(bool ice_enabled)
{
- return MediaSessionMgr::defaultsSetIceEnabled(ice_enabled);
+ return MediaSessionMgr::defaultsSetIceEnabled(ice_enabled);
}
bool rtMediaSessionMgr::defaultsSetByPassEncoding(bool enabled)
{
- return MediaSessionMgr::defaultsSetByPassEncoding(enabled);
+ return MediaSessionMgr::defaultsSetByPassEncoding(enabled);
}
bool rtMediaSessionMgr::defaultsGetByPassEncoding()
{
- return MediaSessionMgr::defaultsGetByPassEncoding();
+ return MediaSessionMgr::defaultsGetByPassEncoding();
}
bool rtMediaSessionMgr::defaultsSetByPassDecoding(bool enabled)
{
- return MediaSessionMgr::defaultsSetByPassDecoding(enabled);
+ return MediaSessionMgr::defaultsSetByPassDecoding(enabled);
}
bool rtMediaSessionMgr::defaultsGetByPassDecoding()
{
- return MediaSessionMgr::defaultsGetByPassDecoding();
+ return MediaSessionMgr::defaultsGetByPassDecoding();
}
bool rtMediaSessionMgr::defaultsSetVideoJbEnabled(bool enabled)
{
- return MediaSessionMgr::defaultsSetVideoJbEnabled(enabled);
+ return MediaSessionMgr::defaultsSetVideoJbEnabled(enabled);
}
bool rtMediaSessionMgr::defaultsGetVideoJbEnabled()
{
- return MediaSessionMgr::defaultsGetVideoJbEnabled();
+ return MediaSessionMgr::defaultsGetVideoJbEnabled();
}
bool rtMediaSessionMgr::defaultsSetRtpBuffSize(unsigned buffSize)
{
- return MediaSessionMgr::defaultsSetRtpBuffSize(buffSize);
+ return MediaSessionMgr::defaultsSetRtpBuffSize(buffSize);
}
unsigned rtMediaSessionMgr::defaultsGetRtpBuffSize()
{
- return MediaSessionMgr::defaultsGetRtpBuffSize();
+ return MediaSessionMgr::defaultsGetRtpBuffSize();
}
bool rtMediaSessionMgr::defaultsSetAvpfTail(unsigned tail_min, unsigned tail_max)
{
- return MediaSessionMgr::defaultsSetAvpfTail(tail_min, tail_max);
+ return MediaSessionMgr::defaultsSetAvpfTail(tail_min, tail_max);
}
diff --git a/bindings/winrt/doubango_rt/src/rt_Msrp.cxx b/bindings/winrt/doubango_rt/src/rt_Msrp.cxx
index 1d09f06..6699495 100755
--- a/bindings/winrt/doubango_rt/src/rt_Msrp.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_Msrp.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -35,103 +35,101 @@ using namespace std;
rtMsrpMessage::rtMsrpMessage(struct tmsrp_message_s *message)
{
- m_pMsrpMessage= new MsrpMessage(message);
+ m_pMsrpMessage= new MsrpMessage(message);
}
rtMsrpMessage::~rtMsrpMessage()
{
- rtSafeDelete(m_pMsrpMessage);
+ rtSafeDelete(m_pMsrpMessage);
}
bool rtMsrpMessage::isRequest()
{
- return m_pMsrpMessage->isRequest();
+ return m_pMsrpMessage->isRequest();
}
short rtMsrpMessage::getCode()
{
- return m_pMsrpMessage->getCode();
+ return m_pMsrpMessage->getCode();
}
String^ rtMsrpMessage::getPhrase()
{
- return rtString::toString(m_pMsrpMessage->getPhrase());
+ return rtString::toString(m_pMsrpMessage->getPhrase());
}
rt_tmsrp_request_type_t rtMsrpMessage::getRequestType()
{
- return (rt_tmsrp_request_type_t)m_pMsrpMessage->getRequestType();
+ return (rt_tmsrp_request_type_t)m_pMsrpMessage->getRequestType();
}
#if COM_VISIBLE
rtMsrpByteRange^ rtMsrpMessage::getByteRange()
{
- int64_t _start = -1, _end = -1, _total = -1;
- m_pMsrpMessage->getByteRange(&_start, &_end, &_total);
- return ref new rtMsrpByteRange(_start, _end, _total);
+ int64_t _start = -1, _end = -1, _total = -1;
+ m_pMsrpMessage->getByteRange(&_start, &_end, &_total);
+ return ref new rtMsrpByteRange(_start, _end, _total);
}
#else
void rtMsrpMessage::getByteRange(IntPtr start, IntPtr end, IntPtr total)
{
- int64_t _start = -1, _end = -1, _total = -1;
- m_pMsrpMessage->getByteRange(&_start, &_end, &_total);
- // IntPtr is 32bit or 64bit -> 32 to be sure not memory errors will raise
- *((int32_t*)(void*)start) = (int32_t)_start;
- *((int32_t*)(void*)end) = (int32_t)_end;
- *((int32_t*)(void*)total) = (int32_t)_total;
+ int64_t _start = -1, _end = -1, _total = -1;
+ m_pMsrpMessage->getByteRange(&_start, &_end, &_total);
+ // IntPtr is 32bit or 64bit -> 32 to be sure not memory errors will raise
+ *((int32_t*)(void*)start) = (int32_t)_start;
+ *((int32_t*)(void*)end) = (int32_t)_end;
+ *((int32_t*)(void*)total) = (int32_t)_total;
}
#endif /* COM_VISIBLE */
bool rtMsrpMessage::isLastChunck()
{
- return m_pMsrpMessage->isLastChunck();
+ return m_pMsrpMessage->isLastChunck();
}
bool rtMsrpMessage::isFirstChunck()
{
- return m_pMsrpMessage->isFirstChunck();
+ return m_pMsrpMessage->isFirstChunck();
}
bool rtMsrpMessage::isSuccessReport()
{
- return m_pMsrpMessage->isSuccessReport();
+ return m_pMsrpMessage->isSuccessReport();
}
String^ rtMsrpMessage::getMsrpHeaderValue(String^ name)
{
- return rtString::toString(m_pMsrpMessage->getMsrpHeaderValue(rtString::toUtf8(name).data()));
+ return rtString::toString(m_pMsrpMessage->getMsrpHeaderValue(rtString::toUtf8(name).data()));
}
String^ rtMsrpMessage::getMsrpHeaderParamValue(String^ name, String^ param)
{
- return rtString::toString(m_pMsrpMessage->getMsrpHeaderParamValue(rtString::toUtf8(name).data(), rtString::toUtf8(param).data()));
+ return rtString::toString(m_pMsrpMessage->getMsrpHeaderParamValue(rtString::toUtf8(name).data(), rtString::toUtf8(param).data()));
}
unsigned rtMsrpMessage::getMsrpContentLength()
{
- return m_pMsrpMessage->getMsrpContentLength();
+ return m_pMsrpMessage->getMsrpContentLength();
}
#if COM_VISIBLE
String^ rtMsrpMessage::getMsrpContent(unsigned maxsize)
{
- if(maxsize)
- {
- void* _s = calloc(maxsize + 1, 1);
- if(_s)
- {
- unsigned len = m_pMsrpMessage->getMsrpContent(_s, maxsize);
- String^ s = rtString::toString((const char*)_s);
- free(_s);
- return s;
- }
- }
- return nullptr;
+ if(maxsize) {
+ void* _s = calloc(maxsize + 1, 1);
+ if(_s) {
+ unsigned len = m_pMsrpMessage->getMsrpContent(_s, maxsize);
+ String^ s = rtString::toString((const char*)_s);
+ free(_s);
+ return s;
+ }
+ }
+ return nullptr;
}
#else
unsigned rtMsrpMessage::getMsrpContent(IntPtr output, unsigned maxsize)
{
- return m_pMsrpMessage->getMsrpContent((void*)output, maxsize);
+ return m_pMsrpMessage->getMsrpContent((void*)output, maxsize);
}
#endif /* COM_VISIBLE */
@@ -142,37 +140,35 @@ unsigned rtMsrpMessage::getMsrpContent(IntPtr output, unsigned maxsize)
rtMsrpEvent::rtMsrpEvent(const struct tmsrp_event_s *event)
{
- m_pMsrpEvent = new MsrpEvent(event);
+ m_pMsrpEvent = new MsrpEvent(event);
}
-
+
rtMsrpEvent::~rtMsrpEvent()
{
- rtSafeDelete(m_pMsrpEvent);
+ rtSafeDelete(m_pMsrpEvent);
}
rt_tmsrp_event_type_t rtMsrpEvent::getType()
{
- return (rt_tmsrp_event_type_t)m_pMsrpEvent->getType();
+ return (rt_tmsrp_event_type_t)m_pMsrpEvent->getType();
}
rtMsrpSession^ rtMsrpEvent::getSipSession()
{
- if(m_pMsrpEvent->getSipSession())
- {
- assert(0); // FIXME: Not implemented
- return nullptr;
- // return ref new rtMsrpSession(m_pMsrpEvent->getSipSession()->getWrappedSession());
- }
- return nullptr;
+ if(m_pMsrpEvent->getSipSession()) {
+ assert(0); // FIXME: Not implemented
+ return nullptr;
+ // return ref new rtMsrpSession(m_pMsrpEvent->getSipSession()->getWrappedSession());
+ }
+ return nullptr;
}
rtMsrpMessage^ rtMsrpEvent::getMessage()
{
- if(m_pMsrpEvent->getMessage())
- {
- return ref new rtMsrpMessage(const_cast<struct tmsrp_message_s *>(const_cast<MsrpMessage*>(m_pMsrpEvent->getMessage())->getWrappedMsrpMessage()));
- }
- return nullptr;
+ if(m_pMsrpEvent->getMessage()) {
+ return ref new rtMsrpMessage(const_cast<struct tmsrp_message_s *>(const_cast<MsrpMessage*>(m_pMsrpEvent->getMessage())->getWrappedMsrpMessage()));
+ }
+ return nullptr;
}
//
@@ -181,14 +177,13 @@ rtMsrpMessage^ rtMsrpEvent::getMessage()
rtMsrpCallback::rtMsrpCallback(rtIMsrpCallback^ pI)
{
- m_pI = pI;
- m_pCallback = new MsrpCallback();
+ m_pI = pI;
+ m_pCallback = new MsrpCallback();
}
rtMsrpCallback::~rtMsrpCallback()
{
- rtSafeDelete(m_pCallback);
+ rtSafeDelete(m_pCallback);
}
- \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_SMSEncoder.cxx b/bindings/winrt/doubango_rt/src/rt_SMSEncoder.cxx
index 623cb1f..b510d81 100755
--- a/bindings/winrt/doubango_rt/src/rt_SMSEncoder.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_SMSEncoder.cxx
@@ -1,17 +1,17 @@
/*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.
*/ \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_SipCallback.cxx b/bindings/winrt/doubango_rt/src/rt_SipCallback.cxx
index 68c6299..ce5c0c9 100755
--- a/bindings/winrt/doubango_rt/src/rt_SipCallback.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_SipCallback.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -28,108 +28,89 @@ using namespace std;
class SipCallbackProxy : public SipCallback
{
public:
- SipCallbackProxy(rtSipCallback^ rtCallback)
- {
- m_pCallback = rtCallback;
- }
-
- virtual int OnDialogEvent(const DialogEvent* e) override
- {
- if(e && m_pCallback && m_pCallback->m_pI)
- {
- return m_pCallback->m_pI->OnDialogEvent(ref new rtDialogEvent(const_cast<tsip_event_t*>(const_cast<DialogEvent*>(e)->getWrappedEvent())));
- }
- return 0;
- }
-
- virtual int OnStackEvent(const StackEvent* e) override
- {
- if(e && m_pCallback && m_pCallback->m_pI)
- {
- return m_pCallback->m_pI->OnStackEvent(ref new rtStackEvent(const_cast<tsip_event_t*>(const_cast<StackEvent*>(e)->getWrappedEvent())));
- }
- return 0;
- }
-
- virtual int OnInviteEvent(const InviteEvent* e) override
- {
- if(e && m_pCallback && m_pCallback->m_pI)
- {
- return m_pCallback->m_pI->OnInviteEvent(ref new rtInviteEvent(const_cast<tsip_event_t*>(const_cast<InviteEvent*>(e)->getWrappedEvent())));
- }
- return 0;
- }
-
- virtual int OnMessagingEvent(const MessagingEvent* e) override
- {
- if(e && m_pCallback && m_pCallback->m_pI)
- {
- return m_pCallback->m_pI->OnMessagingEvent(ref new rtMessagingEvent(const_cast<tsip_event_t*>(const_cast<MessagingEvent*>(e)->getWrappedEvent())));
- }
- return 0;
- }
-
- virtual int OnInfoEvent(const InfoEvent* e) override
- {
- if(m_pCallback && m_pCallback->m_pI)
- {
- return m_pCallback->m_pI->OnInfoEvent(ref new rtInfoEvent(const_cast<tsip_event_t*>(const_cast<InfoEvent*>(e)->getWrappedEvent())));
- }
- return 0;
- }
-
- virtual int OnOptionsEvent(const OptionsEvent* e) override
- {
- if(e && m_pCallback && m_pCallback->m_pI)
- {
- return m_pCallback->m_pI->OnOptionsEvent(ref new rtOptionsEvent(const_cast<tsip_event_t*>(const_cast<OptionsEvent*>(e)->getWrappedEvent())));
- }
- return 0;
- }
-
- virtual int OnPublicationEvent(const PublicationEvent* e) override
- {
- if(e && m_pCallback && m_pCallback->m_pI)
- {
- return m_pCallback->m_pI->OnPublicationEvent(ref new rtPublicationEvent(const_cast<tsip_event_t*>(const_cast<PublicationEvent*>(e)->getWrappedEvent())));
- }
- return 0;
- }
-
- virtual int OnRegistrationEvent(const RegistrationEvent* e) override
- {
- if(m_pCallback && m_pCallback->m_pI)
- {
- return m_pCallback->m_pI->OnRegistrationEvent(ref new rtRegistrationEvent(const_cast<tsip_event_t*>(const_cast<RegistrationEvent*>(e)->getWrappedEvent())));
- }
- return 0;
- }
-
- virtual int OnSubscriptionEvent(const SubscriptionEvent* e) override
- {
- if(e && m_pCallback && m_pCallback->m_pI)
- {
- return m_pCallback->m_pI->OnSubscriptionEvent(ref new rtSubscriptionEvent(const_cast<tsip_event_t*>(const_cast<SubscriptionEvent*>(e)->getWrappedEvent())));
- }
- return 0;
- }
+ SipCallbackProxy(rtSipCallback^ rtCallback) {
+ m_pCallback = rtCallback;
+ }
+
+ virtual int OnDialogEvent(const DialogEvent* e) override {
+ if(e && m_pCallback && m_pCallback->m_pI) {
+ return m_pCallback->m_pI->OnDialogEvent(ref new rtDialogEvent(const_cast<tsip_event_t*>(const_cast<DialogEvent*>(e)->getWrappedEvent())));
+ }
+ return 0;
+ }
+
+ virtual int OnStackEvent(const StackEvent* e) override {
+ if(e && m_pCallback && m_pCallback->m_pI) {
+ return m_pCallback->m_pI->OnStackEvent(ref new rtStackEvent(const_cast<tsip_event_t*>(const_cast<StackEvent*>(e)->getWrappedEvent())));
+ }
+ return 0;
+ }
+
+ virtual int OnInviteEvent(const InviteEvent* e) override {
+ if(e && m_pCallback && m_pCallback->m_pI) {
+ return m_pCallback->m_pI->OnInviteEvent(ref new rtInviteEvent(const_cast<tsip_event_t*>(const_cast<InviteEvent*>(e)->getWrappedEvent())));
+ }
+ return 0;
+ }
+
+ virtual int OnMessagingEvent(const MessagingEvent* e) override {
+ if(e && m_pCallback && m_pCallback->m_pI) {
+ return m_pCallback->m_pI->OnMessagingEvent(ref new rtMessagingEvent(const_cast<tsip_event_t*>(const_cast<MessagingEvent*>(e)->getWrappedEvent())));
+ }
+ return 0;
+ }
+
+ virtual int OnInfoEvent(const InfoEvent* e) override {
+ if(m_pCallback && m_pCallback->m_pI) {
+ return m_pCallback->m_pI->OnInfoEvent(ref new rtInfoEvent(const_cast<tsip_event_t*>(const_cast<InfoEvent*>(e)->getWrappedEvent())));
+ }
+ return 0;
+ }
+
+ virtual int OnOptionsEvent(const OptionsEvent* e) override {
+ if(e && m_pCallback && m_pCallback->m_pI) {
+ return m_pCallback->m_pI->OnOptionsEvent(ref new rtOptionsEvent(const_cast<tsip_event_t*>(const_cast<OptionsEvent*>(e)->getWrappedEvent())));
+ }
+ return 0;
+ }
+
+ virtual int OnPublicationEvent(const PublicationEvent* e) override {
+ if(e && m_pCallback && m_pCallback->m_pI) {
+ return m_pCallback->m_pI->OnPublicationEvent(ref new rtPublicationEvent(const_cast<tsip_event_t*>(const_cast<PublicationEvent*>(e)->getWrappedEvent())));
+ }
+ return 0;
+ }
+
+ virtual int OnRegistrationEvent(const RegistrationEvent* e) override {
+ if(m_pCallback && m_pCallback->m_pI) {
+ return m_pCallback->m_pI->OnRegistrationEvent(ref new rtRegistrationEvent(const_cast<tsip_event_t*>(const_cast<RegistrationEvent*>(e)->getWrappedEvent())));
+ }
+ return 0;
+ }
+
+ virtual int OnSubscriptionEvent(const SubscriptionEvent* e) override {
+ if(e && m_pCallback && m_pCallback->m_pI) {
+ return m_pCallback->m_pI->OnSubscriptionEvent(ref new rtSubscriptionEvent(const_cast<tsip_event_t*>(const_cast<SubscriptionEvent*>(e)->getWrappedEvent())));
+ }
+ return 0;
+ }
private:
- rtSipCallback^ m_pCallback;
+ rtSipCallback^ m_pCallback;
};
rtSipCallback::rtSipCallback(rtISipCallback^ pI)
{
- m_pI = pI;
- m_pCallback = new SipCallbackProxy(this);
+ m_pI = pI;
+ m_pCallback = new SipCallbackProxy(this);
}
rtSipCallback::~rtSipCallback()
{
- rtSafeDelete(m_pCallback);
+ rtSafeDelete(m_pCallback);
}
const SipCallback* rtSipCallback::getWrappedCallback()
-{
- return dynamic_cast<const SipCallback*>(m_pCallback);
+{
+ return dynamic_cast<const SipCallback*>(m_pCallback);
} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_SipEvent.cxx b/bindings/winrt/doubango_rt/src/rt_SipEvent.cxx
index 1bd414e..65c5dbd 100755
--- a/bindings/winrt/doubango_rt/src/rt_SipEvent.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_SipEvent.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -38,7 +38,7 @@ rt##cls##Session^ rt##cls##Event::getSession(){ \
} \
return nullptr; \
} \
-
+
#define rt_takeOwnership_Implement(cls, name, session) \
rt##name##Session^ rt##cls##Event::take##session##Ownership(){ \
name##Session* s = m_pEvent->take##session##Ownership(); \
@@ -49,18 +49,18 @@ rt##name##Session^ rt##cls##Event::take##session##Ownership(){ \
} \
return nullptr; \
} \
-
+
/* ======================== rtDialogEvent ========================*/
rtISipEvent_Implement(rtDialogEvent);
rtDialogEvent::rtDialogEvent(const struct tsip_event_s *e)
{
- m_pEvent = new DialogEvent(e);
+ m_pEvent = new DialogEvent(e);
}
rtDialogEvent::~rtDialogEvent()
{
- rtSafeDelete(m_pEvent);
+ rtSafeDelete(m_pEvent);
}
@@ -69,36 +69,36 @@ rtISipEvent_Implement(rtStackEvent);
rtStackEvent::rtStackEvent(const struct tsip_event_s *e)
{
- m_pEvent = new StackEvent(e);
+ m_pEvent = new StackEvent(e);
}
rtStackEvent::~rtStackEvent()
{
- rtSafeDelete(m_pEvent);
+ rtSafeDelete(m_pEvent);
}
- /* ======================== rtInviteEvent ========================*/
+/* ======================== rtInviteEvent ========================*/
rtISipEvent_Implement(rtInviteEvent);
rtInviteEvent::rtInviteEvent(const struct tsip_event_s *e)
{
- m_pEvent = new InviteEvent(e);
+ m_pEvent = new InviteEvent(e);
}
rtInviteEvent::~rtInviteEvent()
{
- rtSafeDelete(m_pEvent);
+ rtSafeDelete(m_pEvent);
}
rt_tsip_invite_event_type_t rtInviteEvent::getType()
{
- return (rt_tsip_invite_event_type_t)m_pEvent->getType();
+ return (rt_tsip_invite_event_type_t)m_pEvent->getType();
}
rt_twrap_media_type_t rtInviteEvent::getMediaType()
{
- return (rt_twrap_media_type_t)m_pEvent->getMediaType();
+ return (rt_twrap_media_type_t)m_pEvent->getMediaType();
}
rt_getSession_Implement(Invite);
@@ -110,18 +110,18 @@ rtISipEvent_Implement(rtMessagingEvent);
rtMessagingEvent::rtMessagingEvent(const struct tsip_event_s *e)
{
- m_pEvent = new MessagingEvent(e);
+ m_pEvent = new MessagingEvent(e);
}
-
+
rtMessagingEvent::~rtMessagingEvent()
{
- rtSafeDelete(m_pEvent);
-}
+ rtSafeDelete(m_pEvent);
+}
rt_tsip_message_event_type_t rtMessagingEvent::getType()
{
- return (rt_tsip_message_event_type_t)m_pEvent->getType();
+ return (rt_tsip_message_event_type_t)m_pEvent->getType();
}
rt_getSession_Implement(Messaging);
@@ -133,17 +133,17 @@ rtISipEvent_Implement(rtInfoEvent);
rtInfoEvent::rtInfoEvent(const struct tsip_event_s *e)
{
- m_pEvent = new InfoEvent(e);
+ m_pEvent = new InfoEvent(e);
}
rtInfoEvent::~rtInfoEvent()
{
- rtSafeDelete(m_pEvent);
+ rtSafeDelete(m_pEvent);
}
rt_tsip_info_event_type_t rtInfoEvent::getType()
{
- return (rt_tsip_info_event_type_t)m_pEvent->getType();
+ return (rt_tsip_info_event_type_t)m_pEvent->getType();
}
rt_getSession_Implement(Info);
@@ -155,17 +155,17 @@ rtISipEvent_Implement(rtOptionsEvent);
rtOptionsEvent::rtOptionsEvent(const struct tsip_event_s *e)
{
- m_pEvent = new OptionsEvent(e);
+ m_pEvent = new OptionsEvent(e);
}
rtOptionsEvent::~rtOptionsEvent()
{
- rtSafeDelete(m_pEvent);
+ rtSafeDelete(m_pEvent);
}
rt_tsip_options_event_type_t rtOptionsEvent::getType()
{
- return (rt_tsip_options_event_type_t)m_pEvent->getType();
+ return (rt_tsip_options_event_type_t)m_pEvent->getType();
}
rt_getSession_Implement(Options);
@@ -177,17 +177,17 @@ rtISipEvent_Implement(rtPublicationEvent);
rtPublicationEvent::rtPublicationEvent(const struct tsip_event_s *e)
{
- m_pEvent = new PublicationEvent(e);
+ m_pEvent = new PublicationEvent(e);
}
rtPublicationEvent::~rtPublicationEvent()
{
- rtSafeDelete(m_pEvent);
+ rtSafeDelete(m_pEvent);
}
rt_tsip_publish_event_type_t rtPublicationEvent::getType()
{
- return (rt_tsip_publish_event_type_t)m_pEvent->getType();
+ return (rt_tsip_publish_event_type_t)m_pEvent->getType();
}
rt_getSession_Implement(Publication);
@@ -200,17 +200,17 @@ rtISipEvent_Implement(rtRegistrationEvent);
rtRegistrationEvent::rtRegistrationEvent(const struct tsip_event_s *e)
{
- m_pEvent = new RegistrationEvent(e);
+ m_pEvent = new RegistrationEvent(e);
}
rtRegistrationEvent::~rtRegistrationEvent()
{
- rtSafeDelete(m_pEvent);
+ rtSafeDelete(m_pEvent);
}
rt_tsip_register_event_type_t rtRegistrationEvent::getType()
{
- return (rt_tsip_register_event_type_t)m_pEvent->getType();
+ return (rt_tsip_register_event_type_t)m_pEvent->getType();
}
rt_getSession_Implement(Registration);
@@ -222,17 +222,17 @@ rtISipEvent_Implement(rtSubscriptionEvent);
rtSubscriptionEvent::rtSubscriptionEvent(const struct tsip_event_s *e)
{
- m_pEvent = new SubscriptionEvent(e);
+ m_pEvent = new SubscriptionEvent(e);
}
rtSubscriptionEvent::~rtSubscriptionEvent()
{
- rtSafeDelete(m_pEvent);
+ rtSafeDelete(m_pEvent);
}
rt_tsip_subscribe_event_type_t rtSubscriptionEvent::getType()
{
- return (rt_tsip_subscribe_event_type_t)m_pEvent->getType();
+ return (rt_tsip_subscribe_event_type_t)m_pEvent->getType();
}
rt_getSession_Implement(Subscription);
diff --git a/bindings/winrt/doubango_rt/src/rt_SipMessage.cxx b/bindings/winrt/doubango_rt/src/rt_SipMessage.cxx
index 55e05d9..1c5ba3e 100755
--- a/bindings/winrt/doubango_rt/src/rt_SipMessage.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_SipMessage.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -29,52 +29,50 @@ using namespace std;
//
rtSdpMessage::rtSdpMessage()
- :m_pSdpMessage(NULL)
+ :m_pSdpMessage(NULL)
{
}
rtSdpMessage::rtSdpMessage(struct tsdp_message_s *message)
{
- m_pSdpMessage = new SdpMessage(message);
+ m_pSdpMessage = new SdpMessage(message);
}
rtSdpMessage::~rtSdpMessage()
{
- rtSafeDelete(m_pSdpMessage);
+ rtSafeDelete(m_pSdpMessage);
}
String^ rtSdpMessage::getSdpHeaderValue(String^ media, String^ name, unsigned index)
{
- if(m_pSdpMessage)
- {
- char * _str = m_pSdpMessage->getSdpHeaderValue
- (rtString::toUtf8(media).data(),
- rtString::toUtf8(media).data()[0],
- index);
- String^ str = rtString::toString(_str);
- TSK_FREE(str);
- return str;
- }
- return nullptr;
+ if(m_pSdpMessage) {
+ char * _str = m_pSdpMessage->getSdpHeaderValue
+ (rtString::toUtf8(media).data(),
+ rtString::toUtf8(media).data()[0],
+ index);
+ String^ str = rtString::toString(_str);
+ TSK_FREE(str);
+ return str;
+ }
+ return nullptr;
}
String^ rtSdpMessage::getSdpHeaderValue(String^ media, String^ name)
{
- return getSdpHeaderValue(media, name, 0);
+ return getSdpHeaderValue(media, name, 0);
}
String^ rtSdpMessage::getSdpHeaderAValue(String^ media, String^ attributeName)
{
- if(m_pSdpMessage)
- {
- char * _str = m_pSdpMessage->getSdpHeaderAValue
- (rtString::toUtf8(media).data(),
- rtString::toUtf8(attributeName).data());
- String^ str = rtString::toString(_str);
- TSK_FREE(str);
- return str;
- }
- return nullptr;
+ if(m_pSdpMessage) {
+ char * _str = m_pSdpMessage->getSdpHeaderAValue
+ (rtString::toUtf8(media).data(),
+ rtString::toUtf8(attributeName).data());
+ String^ str = rtString::toString(_str);
+ TSK_FREE(str);
+ return str;
+ }
+ return nullptr;
}
//
@@ -82,90 +80,88 @@ String^ rtSdpMessage::getSdpHeaderAValue(String^ media, String^ attributeName)
//
rtSipMessage::rtSipMessage()
- :m_pSipMessage(NULL)
+ :m_pSipMessage(NULL)
{
}
rtSipMessage::rtSipMessage(struct tsip_message_s* message)
{
- m_pSipMessage = new SipMessage(message);
+ m_pSipMessage = new SipMessage(message);
}
rtSipMessage::~rtSipMessage()
{
- rtSafeDelete(m_pSipMessage);
+ rtSafeDelete(m_pSipMessage);
}
bool rtSipMessage::isResponse()
{
- return m_pSipMessage ? m_pSipMessage->isResponse() : false;
+ return m_pSipMessage ? m_pSipMessage->isResponse() : false;
}
rt_tsip_request_type_t rtSipMessage::getRequestType()
{
- return (rt_tsip_request_type_t)(m_pSipMessage ? m_pSipMessage->getRequestType() : 0);
+ return (rt_tsip_request_type_t)(m_pSipMessage ? m_pSipMessage->getRequestType() : 0);
}
short rtSipMessage::getResponseCode()
{
- return m_pSipMessage ? m_pSipMessage->getResponseCode() : 0;
+ return m_pSipMessage ? m_pSipMessage->getResponseCode() : 0;
}
String^ rtSipMessage::getResponsePhrase()
{
- return m_pSipMessage ? rtString::toString(m_pSipMessage->getResponsePhrase()) : nullptr;
+ return m_pSipMessage ? rtString::toString(m_pSipMessage->getResponsePhrase()) : nullptr;
}
String^ rtSipMessage::getSipHeaderValue(String^ name, unsigned index)
{
- return m_pSipMessage ? rtString::toString(m_pSipMessage->getSipHeaderValue(rtString::toUtf8(name).data(), index)) : nullptr;
+ return m_pSipMessage ? rtString::toString(m_pSipMessage->getSipHeaderValue(rtString::toUtf8(name).data(), index)) : nullptr;
}
String^ rtSipMessage::getSipHeaderValue(String^ name)
{
- return getSipHeaderValue(name, 0);
+ return getSipHeaderValue(name, 0);
}
String^ rtSipMessage::getSipHeaderParamValue(String^ name, String^ param, unsigned index)
{
- return m_pSipMessage ? rtString::toString(m_pSipMessage->getSipHeaderParamValue(rtString::toUtf8(name).data(), rtString::toUtf8(param).data(), index)) : nullptr;
+ return m_pSipMessage ? rtString::toString(m_pSipMessage->getSipHeaderParamValue(rtString::toUtf8(name).data(), rtString::toUtf8(param).data(), index)) : nullptr;
}
String^ rtSipMessage::getSipHeaderParamValue(String^ name, String^ param)
{
- return getSipHeaderParamValue(name, param, 0);
+ return getSipHeaderParamValue(name, param, 0);
}
unsigned rtSipMessage::getSipContentLength()
{
- return m_pSipMessage ? m_pSipMessage->getSipContentLength() : 0;
+ return m_pSipMessage ? m_pSipMessage->getSipContentLength() : 0;
}
#if COM_VISIBLE
String^ rtSipMessage::getSipContent()
{
- unsigned len = getSipContentLength();
- if(len > 0)
- {
- void* data_ptr = calloc(len, 1);
- if(data_ptr)
- {
- m_pSipMessage->getSipContent(data_ptr, len);
- String^ s = rtString::toString((const char*)data_ptr);
- free(data_ptr);
- return s;
- }
- }
- return nullptr;
+ unsigned len = getSipContentLength();
+ if(len > 0) {
+ void* data_ptr = calloc(len, 1);
+ if(data_ptr) {
+ m_pSipMessage->getSipContent(data_ptr, len);
+ String^ s = rtString::toString((const char*)data_ptr);
+ free(data_ptr);
+ return s;
+ }
+ }
+ return nullptr;
}
#else
unsigned rtSipMessage::getSipContent(IntPtr output, unsigned maxsize)
{
- return m_pSipMessage ? m_pSipMessage->getSipContent((void*)output, maxsize) : 0;
+ return m_pSipMessage ? m_pSipMessage->getSipContent((void*)output, maxsize) : 0;
}
#endif
rtSdpMessage^ rtSipMessage::getSdpMessage()
{
- return m_pSipMessage ? ref new rtSdpMessage(const_cast<struct tsdp_message_s *>(const_cast<SdpMessage*>(m_pSipMessage->getSdpMessage())->getWrappedSdpMessage())) : nullptr;
+ return m_pSipMessage ? ref new rtSdpMessage(const_cast<struct tsdp_message_s *>(const_cast<SdpMessage*>(m_pSipMessage->getSdpMessage())->getWrappedSdpMessage())) : nullptr;
} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_SipSession.cxx b/bindings/winrt/doubango_rt/src/rt_SipSession.cxx
index 872a2e2..487ba2e 100755
--- a/bindings/winrt/doubango_rt/src/rt_SipSession.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_SipSession.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -31,24 +31,24 @@ using namespace std;
/* ======================== T140Callback ========================*/
rtT140CallbackData::rtT140CallbackData(enum tmedia_t140_data_type_e data_type, const void* data_ptr, unsigned data_size)
{
- m_pData = new T140CallbackData(data_type, data_ptr, data_size);
+ m_pData = new T140CallbackData(data_type, data_ptr, data_size);
}
-
+
rtT140CallbackData::~rtT140CallbackData()
{
- rtSafeDelete(m_pData);
+ rtSafeDelete(m_pData);
}
/* ======================== rtT140Callback ========================*/
rtT140Callback::rtT140Callback()
{
- m_pCallback = new T140Callback();
+ m_pCallback = new T140Callback();
}
rtT140Callback::~rtT140Callback()
{
- rtSafeDelete(m_pCallback);
+ rtSafeDelete(m_pCallback);
}
/* ======================== rtSipSession ========================*/
@@ -56,17 +56,17 @@ rtISession_Implement(rtSipSession);
rtSipSession::rtSipSession(rtSipStack^ pStack)
{
- m_pSipSession = new SipSession(const_cast<SipStack*>(pStack->getWrappedStack()));
+ m_pSipSession = new SipSession(const_cast<SipStack*>(pStack->getWrappedStack()));
}
rtSipSession::rtSipSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new SipSession(pStack, pHandle);
+ m_pSipSession = new SipSession(pStack, pHandle);
}
rtSipSession::~rtSipSession()
{
- rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pSipSession);
}
@@ -76,19 +76,19 @@ rtIInviteSession_Implement(rtInviteSession);
rtInviteSession::rtInviteSession(rtSipStack^ pStack)
{
- m_pSipSession = new InviteSession(const_cast<SipStack*>(pStack->getWrappedStack()));
+ m_pSipSession = new InviteSession(const_cast<SipStack*>(pStack->getWrappedStack()));
}
rtInviteSession::rtInviteSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new InviteSession(pStack, pHandle);
+ m_pSipSession = new InviteSession(pStack, pHandle);
}
rtInviteSession::~rtInviteSession()
{
- rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pSipSession);
}
-
+
/* ======================== rtCallSession ========================*/
rtISession_Implement(rtCallSession);
@@ -96,177 +96,177 @@ rtIInviteSession_Implement(rtCallSession);
rtCallSession::rtCallSession(rtSipStack^ pStack)
{
- m_pSipSession = new CallSession(const_cast<SipStack*>(pStack->getWrappedStack()));
+ m_pSipSession = new CallSession(const_cast<SipStack*>(pStack->getWrappedStack()));
}
rtCallSession::rtCallSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new CallSession(pStack, pHandle);
+ m_pSipSession = new CallSession(pStack, pHandle);
}
rtCallSession::~rtCallSession()
{
- rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pSipSession);
}
bool rtCallSession::call(String^ remoteUriString, rt_twrap_media_type_t media, rtActionConfig^ config)
{
- return m_pSipSession->call(rtString::toUtf8(remoteUriString).data(), (twrap_media_type_t)media, config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->call(rtString::toUtf8(remoteUriString).data(), (twrap_media_type_t)media, config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtCallSession::call(String^ remoteUriString, rt_twrap_media_type_t media)
{
- return call(remoteUriString, media, nullptr);
+ return call(remoteUriString, media, nullptr);
}
bool rtCallSession::call(rtSipUri^ remoteUri, rt_twrap_media_type_t media, rtActionConfig^ config)
{
- return m_pSipSession->call(remoteUri->getWrappedUri(), (twrap_media_type_t)media, config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->call(remoteUri->getWrappedUri(), (twrap_media_type_t)media, config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtCallSession::call(rtSipUri^ remoteUri, rt_twrap_media_type_t media)
{
- return call(remoteUri, media, nullptr);
+ return call(remoteUri, media, nullptr);
}
bool rtCallSession::setSessionTimer(unsigned timeout, String^ refresher)
{
- return m_pSipSession->setSessionTimer(timeout, rtString::toUtf8(refresher).data());
+ return m_pSipSession->setSessionTimer(timeout, rtString::toUtf8(refresher).data());
}
bool rtCallSession::set100rel(bool enabled)
{
- return m_pSipSession->set100rel(enabled);
+ return m_pSipSession->set100rel(enabled);
}
bool rtCallSession::setRtcp(bool enabled)
{
- return m_pSipSession->setRtcp(enabled);
+ return m_pSipSession->setRtcp(enabled);
}
bool rtCallSession::setRtcpMux(bool enabled)
{
- return m_pSipSession->setRtcpMux(enabled);
+ return m_pSipSession->setRtcpMux(enabled);
}
bool rtCallSession::setICE(bool enabled)
{
- return m_pSipSession->setICE(enabled);
+ return m_pSipSession->setICE(enabled);
}
bool rtCallSession::setQoS(rt_tmedia_qos_stype_t type, rt_tmedia_qos_strength_t strength)
{
- return m_pSipSession->setQoS((tmedia_qos_stype_t) type, (tmedia_qos_strength_t) strength);
+ return m_pSipSession->setQoS((tmedia_qos_stype_t) type, (tmedia_qos_strength_t) strength);
}
bool rtCallSession::setVideoFps(int32_t fps)
{
- return m_pSipSession->setVideoFps(fps);
+ return m_pSipSession->setVideoFps(fps);
}
bool rtCallSession::setVideoBandwidthUploadMax(int32_t max)
{
- return m_pSipSession->setVideoBandwidthUploadMax(max);
+ return m_pSipSession->setVideoBandwidthUploadMax(max);
}
bool rtCallSession::setVideoBandwidthDownloadMax(int32_t max)
{
- return m_pSipSession->setVideoBandwidthDownloadMax(max);
+ return m_pSipSession->setVideoBandwidthDownloadMax(max);
}
bool rtCallSession::setVideoPrefSize(rt_tmedia_pref_video_size_t pref_video_size)
{
- return m_pSipSession->setVideoPrefSize((tmedia_pref_video_size_t)pref_video_size);
+ return m_pSipSession->setVideoPrefSize((tmedia_pref_video_size_t)pref_video_size);
}
bool rtCallSession::hold(rtActionConfig^ config)
{
- return m_pSipSession->hold(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->hold(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtCallSession::hold()
{
- return hold(nullptr);
+ return hold(nullptr);
}
bool rtCallSession::resume(rtActionConfig^ config)
{
- return m_pSipSession->resume(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->resume(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtCallSession::resume()
{
- return resume(nullptr);
+ return resume(nullptr);
}
bool rtCallSession::transfer(String^ referToUriString, rtActionConfig^ config)
{
- return m_pSipSession->transfer(rtString::toUtf8(referToUriString).data(), config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->transfer(rtString::toUtf8(referToUriString).data(), config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtCallSession::transfer(String^ referToUriString)
{
- return transfer(referToUriString, nullptr);
+ return transfer(referToUriString, nullptr);
}
bool rtCallSession::acceptTransfer(rtActionConfig^ config)
{
- return m_pSipSession->acceptTransfer(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->acceptTransfer(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtCallSession::acceptTransfer()
{
- return acceptTransfer(nullptr);
+ return acceptTransfer(nullptr);
}
bool rtCallSession::rejectTransfer(rtActionConfig^ config)
{
- return m_pSipSession->rejectTransfer(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->rejectTransfer(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtCallSession::rejectTransfer()
{
- return rejectTransfer(nullptr);
+ return rejectTransfer(nullptr);
}
bool rtCallSession::sendDTMF(int number)
{
- return m_pSipSession->sendDTMF(number);
+ return m_pSipSession->sendDTMF(number);
}
unsigned rtCallSession::getSessionTransferId()
{
- return m_pSipSession->getSessionTransferId();
+ return m_pSipSession->getSessionTransferId();
}
#if COM_VISIBLE
bool rtCallSession::sendT140Data(rt_tmedia_t140_data_type_t data_type, String^ data)
{
- std::vector<char> _data = rtString::toUtf8(data);
- return m_pSipSession->sendT140Data((tmedia_t140_data_type_t) data_type, (const void*)_data.data(), _data.size());
+ std::vector<char> _data = rtString::toUtf8(data);
+ return m_pSipSession->sendT140Data((tmedia_t140_data_type_t) data_type, (const void*)_data.data(), _data.size());
}
#else
bool rtCallSession::sendT140Data(rt_tmedia_t140_data_type_t data_type, IntPtr data_ptr, unsigned data_size)
{
- return m_pSipSession->sendT140Data((tmedia_t140_data_type_t) data_type, (const void*)data_ptr, data_size);
+ return m_pSipSession->sendT140Data((tmedia_t140_data_type_t) data_type, (const void*)data_ptr, data_size);
}
#endif
bool rtCallSession::sendT140Data(rt_tmedia_t140_data_type_t data_type)
{
- return sendT140Data(data_type, nullptr
+ return sendT140Data(data_type, nullptr
#if !COM_VISIBLE
- , 0
+ , 0
#endif
- );
+ );
}
bool rtCallSession::setT140Callback(rtT140Callback^ pT140Callback)
{
- return m_pSipSession->setT140Callback(const_cast<T140Callback*>(pT140Callback->getWrappedCallback()));
+ return m_pSipSession->setT140Callback(const_cast<T140Callback*>(pT140Callback->getWrappedCallback()));
}
@@ -276,74 +276,73 @@ rtIInviteSession_Implement(rtMsrpSession);
rtMsrpSession::rtMsrpSession(rtSipStack^ pStack, rtIMsrpCallback^ pCallback)
{
- m_pCallback = ref new rtMsrpCallback(pCallback);
- m_pSipSession = new MsrpSession(const_cast<SipStack*>(pStack->getWrappedStack()), const_cast<MsrpCallback*>(m_pCallback->getWrappedCallback()));
+ m_pCallback = ref new rtMsrpCallback(pCallback);
+ m_pSipSession = new MsrpSession(const_cast<SipStack*>(pStack->getWrappedStack()), const_cast<MsrpCallback*>(m_pCallback->getWrappedCallback()));
}
rtMsrpSession::rtMsrpSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new MsrpSession(pStack, pHandle);
+ m_pSipSession = new MsrpSession(pStack, pHandle);
}
rtMsrpSession::~rtMsrpSession()
{
- rtSafeDelete(m_pSipSession);
- rtSafeDelete(m_pCallback);
+ rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pCallback);
}
bool rtMsrpSession::setCallback(rtIMsrpCallback^ pCallback)
{
- rtSafeDelete(m_pCallback);
- if(!pCallback)
- {
- return m_pSipSession->setCallback(tsk_null);
- return true;
- }
- m_pCallback = ref new rtMsrpCallback(pCallback);
- return m_pSipSession->setCallback(const_cast<MsrpCallback*>(m_pCallback->getWrappedCallback()));
+ rtSafeDelete(m_pCallback);
+ if(!pCallback) {
+ return m_pSipSession->setCallback(tsk_null);
+ return true;
+ }
+ m_pCallback = ref new rtMsrpCallback(pCallback);
+ return m_pSipSession->setCallback(const_cast<MsrpCallback*>(m_pCallback->getWrappedCallback()));
}
bool rtMsrpSession::callMsrp(Platform::String^ remoteUriString, rtActionConfig^ config)
{
- return m_pSipSession->callMsrp(rtString::toUtf8(remoteUriString).data(), config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->callMsrp(rtString::toUtf8(remoteUriString).data(), config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtMsrpSession::callMsrp(Platform::String^ remoteUriString)
{
- return callMsrp(remoteUriString, nullptr);
+ return callMsrp(remoteUriString, nullptr);
}
bool rtMsrpSession::callMsrp(rtSipUri^ remoteUri, rtActionConfig^ config)
{
- return m_pSipSession->callMsrp(remoteUri->getWrappedUri(), config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->callMsrp(remoteUri->getWrappedUri(), config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtMsrpSession::callMsrp(rtSipUri^ remoteUri)
{
- return callMsrp(remoteUri, nullptr);
+ return callMsrp(remoteUri, nullptr);
}
#if COM_VISIBLE
bool rtMsrpSession::sendMessage(String^ payload, rtActionConfig^ config)
{
- std::vector<char> _payload = rtString::toUtf8(payload);
- return m_pSipSession->sendMessage((const void*)_payload.data(), _payload.size(), config ? config->getWrappedActionConfig() : tsk_null);
+ std::vector<char> _payload = rtString::toUtf8(payload);
+ return m_pSipSession->sendMessage((const void*)_payload.data(), _payload.size(), config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtMsrpSession::sendMessage(Platform::String^ payload)
{
- return sendMessage(payload, nullptr);
+ return sendMessage(payload, nullptr);
}
#else
bool rtMsrpSession::sendMessage(Platform::IntPtr payload, unsigned len, rtActionConfig^ config)
{
- return m_pSipSession->sendMessage((const void*)payload, len, config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->sendMessage((const void*)payload, len, config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtMsrpSession::sendMessage(Platform::IntPtr payload, unsigned len)
{
- return sendMessage(payload, len, nullptr);
+ return sendMessage(payload, len, nullptr);
}
#endif /* COM_VISIBLE */
@@ -353,61 +352,61 @@ rtISession_Implement(rtMessagingSession);
rtMessagingSession::rtMessagingSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new MessagingSession(pStack, pHandle);
+ m_pSipSession = new MessagingSession(pStack, pHandle);
}
-
+
rtMessagingSession::rtMessagingSession(rtSipStack^ pStack)
{
- m_pSipSession = new MessagingSession(const_cast<SipStack*>(pStack->getWrappedStack()));
+ m_pSipSession = new MessagingSession(const_cast<SipStack*>(pStack->getWrappedStack()));
}
rtMessagingSession::~rtMessagingSession()
{
- rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pSipSession);
}
#if COM_VISIBLE
bool rtMessagingSession::send(String^ payload, rtActionConfig^ config)
{
- std::vector<char>_payload = rtString::toUtf8(payload);
- return m_pSipSession->send((const void*)_payload.data(), _payload.size(), config ? config->getWrappedActionConfig() : tsk_null);
+ std::vector<char>_payload = rtString::toUtf8(payload);
+ return m_pSipSession->send((const void*)_payload.data(), _payload.size(), config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtMessagingSession::send(Platform::String^ payload)
{
- return send(payload, nullptr);
+ return send(payload, nullptr);
}
#else
bool rtMessagingSession::send(IntPtr payload, unsigned len, rtActionConfig^ config)
{
- return m_pSipSession->send((const void*)payload, len, config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->send((const void*)payload, len, config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtMessagingSession::send(IntPtr payload, unsigned len)
{
- return send(payload, len, nullptr);
+ return send(payload, len, nullptr);
}
#endif
bool rtMessagingSession::accept(rtActionConfig^ config)
{
- return m_pSipSession->accept(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->accept(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtMessagingSession::accept()
{
- return accept(nullptr);
+ return accept(nullptr);
}
bool rtMessagingSession::reject(rtActionConfig^ config)
{
- return m_pSipSession->reject(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->reject(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtMessagingSession::reject()
{
- return reject(nullptr);
+ return reject(nullptr);
}
/* ======================== rtInfoSession ========================*/
@@ -415,60 +414,60 @@ rtISession_Implement(rtInfoSession);
rtInfoSession::rtInfoSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new InfoSession(pStack, pHandle);
+ m_pSipSession = new InfoSession(pStack, pHandle);
}
rtInfoSession::rtInfoSession(rtSipStack^ pStack)
{
- m_pSipSession = new InfoSession(const_cast<SipStack*>(pStack->getWrappedStack()));
+ m_pSipSession = new InfoSession(const_cast<SipStack*>(pStack->getWrappedStack()));
}
rtInfoSession::~rtInfoSession()
{
- rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pSipSession);
}
#if COM_VISIBLE
bool rtInfoSession::send(Platform::String^ payload, rtActionConfig^ config)
{
- std::vector<char>_payload = rtString::toUtf8(payload);
- return m_pSipSession->send((const void*)_payload.data(), _payload.size(), config ? config->getWrappedActionConfig() : tsk_null);
+ std::vector<char>_payload = rtString::toUtf8(payload);
+ return m_pSipSession->send((const void*)_payload.data(), _payload.size(), config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtInfoSession::send(Platform::String^ payload)
{
- return send(payload, nullptr);
+ return send(payload, nullptr);
}
#else
bool rtInfoSession::send(IntPtr payload, unsigned len, rtActionConfig^ config)
{
- return m_pSipSession->send((const void*)payload, len, config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->send((const void*)payload, len, config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtInfoSession::send(IntPtr payload, unsigned len)
{
- return send(payload, len, nullptr);
+ return send(payload, len, nullptr);
}
#endif
bool rtInfoSession::accept(rtActionConfig^ config)
{
- return m_pSipSession->accept(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->accept(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtInfoSession::accept()
{
- return accept(nullptr);
+ return accept(nullptr);
}
bool rtInfoSession::reject(rtActionConfig^ config)
{
- return m_pSipSession->reject(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->reject(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtInfoSession::reject()
{
- return reject(nullptr);
+ return reject(nullptr);
}
@@ -478,47 +477,47 @@ rtISession_Implement(rtOptionsSession);
rtOptionsSession::rtOptionsSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new OptionsSession(pStack, pHandle);
+ m_pSipSession = new OptionsSession(pStack, pHandle);
}
rtOptionsSession::rtOptionsSession(rtSipStack^ pStack)
{
- m_pSipSession = new OptionsSession(const_cast<SipStack*>(pStack->getWrappedStack()));
+ m_pSipSession = new OptionsSession(const_cast<SipStack*>(pStack->getWrappedStack()));
}
rtOptionsSession::~rtOptionsSession()
{
- rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pSipSession);
}
bool rtOptionsSession::send(rtActionConfig^ config)
{
- return m_pSipSession->send(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->send(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtOptionsSession::send()
{
- return send(nullptr);
+ return send(nullptr);
}
bool rtOptionsSession::accept(rtActionConfig^ config)
{
- return m_pSipSession->accept(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->accept(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtOptionsSession::accept()
{
- return accept(nullptr);
+ return accept(nullptr);
}
bool rtOptionsSession::reject(rtActionConfig^ config)
{
- return m_pSipSession->reject(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->reject(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtOptionsSession::reject()
{
- return reject(nullptr);
+ return reject(nullptr);
}
@@ -528,49 +527,49 @@ rtISession_Implement(rtPublicationSession);
rtPublicationSession::rtPublicationSession(rtSipStack^ pStack)
{
- m_pSipSession = new PublicationSession(const_cast<SipStack*>(pStack->getWrappedStack()));
+ m_pSipSession = new PublicationSession(const_cast<SipStack*>(pStack->getWrappedStack()));
}
rtPublicationSession::rtPublicationSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new PublicationSession(pStack, pHandle);
+ m_pSipSession = new PublicationSession(pStack, pHandle);
}
rtPublicationSession::~rtPublicationSession()
{
- rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pSipSession);
}
#if COM_VISIBLE
bool rtPublicationSession::publish(String^ payload, rtActionConfig^ config)
{
- std::vector<char>_payload = rtString::toUtf8(payload);
- return m_pSipSession->publish((const void*)_payload.data(), _payload.size(), config ? config->getWrappedActionConfig() : tsk_null);
+ std::vector<char>_payload = rtString::toUtf8(payload);
+ return m_pSipSession->publish((const void*)_payload.data(), _payload.size(), config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtPublicationSession::publish(Platform::String^ payload)
{
- return publish(payload, nullptr);
+ return publish(payload, nullptr);
}
#else
bool rtPublicationSession::publish(Platform::IntPtr payload, unsigned len, rtActionConfig^ config)
{
- return m_pSipSession->publish((const void*)payload, len, config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->publish((const void*)payload, len, config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtPublicationSession::publish(Platform::IntPtr payload, unsigned len)
{
- return publish(payload, len, nullptr);
+ return publish(payload, len, nullptr);
}
#endif
bool rtPublicationSession::unPublish(rtActionConfig^ config)
{
- return m_pSipSession->unPublish(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->unPublish(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtPublicationSession::unPublish()
{
- return unPublish(nullptr);
+ return unPublish(nullptr);
}
@@ -579,57 +578,57 @@ rtISession_Implement(rtRegistrationSession);
rtRegistrationSession::rtRegistrationSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new RegistrationSession(pStack, pHandle);
+ m_pSipSession = new RegistrationSession(pStack, pHandle);
}
rtRegistrationSession::rtRegistrationSession(rtSipStack^ pStack)
{
- m_pSipSession = new RegistrationSession(const_cast<SipStack*>(pStack->getWrappedStack()));
+ m_pSipSession = new RegistrationSession(const_cast<SipStack*>(pStack->getWrappedStack()));
}
rtRegistrationSession::~rtRegistrationSession()
{
- rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pSipSession);
}
bool rtRegistrationSession::register_(rtActionConfig^ config)
{
- return m_pSipSession->register_(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->register_(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtRegistrationSession::register_()
{
- return register_(nullptr);
+ return register_(nullptr);
}
bool rtRegistrationSession::unRegister(rtActionConfig^ config)
{
- return m_pSipSession->unRegister(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->unRegister(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtRegistrationSession::unRegister()
{
- return unRegister(nullptr);
+ return unRegister(nullptr);
}
bool rtRegistrationSession::accept(rtActionConfig^ config)
{
- return m_pSipSession->accept(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->accept(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtRegistrationSession::accept()
{
- return accept(nullptr);
+ return accept(nullptr);
}
bool rtRegistrationSession::reject(rtActionConfig^ config)
{
- return m_pSipSession->reject(config ? config->getWrappedActionConfig() : tsk_null);
+ return m_pSipSession->reject(config ? config->getWrappedActionConfig() : tsk_null);
}
bool rtRegistrationSession::reject()
{
- return reject(nullptr);
+ return reject(nullptr);
}
@@ -638,25 +637,25 @@ rtISession_Implement(rtSubscriptionSession);
rtSubscriptionSession::rtSubscriptionSession(rtSipStack^ pStack)
{
- m_pSipSession = new SubscriptionSession(const_cast<SipStack*>(pStack->getWrappedStack()));
+ m_pSipSession = new SubscriptionSession(const_cast<SipStack*>(pStack->getWrappedStack()));
}
rtSubscriptionSession::rtSubscriptionSession(SipStack* pStack, tsip_ssession_handle_t* pHandle)
{
- m_pSipSession = new SubscriptionSession(pStack, pHandle);
+ m_pSipSession = new SubscriptionSession(pStack, pHandle);
}
rtSubscriptionSession::~rtSubscriptionSession()
{
- rtSafeDelete(m_pSipSession);
+ rtSafeDelete(m_pSipSession);
}
-
+
bool rtSubscriptionSession::subscribe()
{
- return m_pSipSession->subscribe();
+ return m_pSipSession->subscribe();
}
bool rtSubscriptionSession::unSubscribe()
{
- return m_pSipSession->unSubscribe();
+ return m_pSipSession->unSubscribe();
} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_SipStack.cxx b/bindings/winrt/doubango_rt/src/rt_SipStack.cxx
index 753a881..4aa04c6 100755
--- a/bindings/winrt/doubango_rt/src/rt_SipStack.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_SipStack.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -30,360 +30,359 @@ using namespace std;
rtSipStack::rtSipStack(rtISipCallback^ callback, Platform::String^ realmUri, Platform::String^ impiString, Platform::String^ impuUri)
{
- m_pSipCallback = ref new rtSipCallback(callback);
- m_pSipStack = new SipStack(
- const_cast<SipCallback*>(m_pSipCallback->getWrappedCallback()),
- rtString::toUtf8(realmUri).data(),
- rtString::toUtf8(impiString).data(),
- rtString::toUtf8(impuUri).data()
- );
+ m_pSipCallback = ref new rtSipCallback(callback);
+ m_pSipStack = new SipStack(
+ const_cast<SipCallback*>(m_pSipCallback->getWrappedCallback()),
+ rtString::toUtf8(realmUri).data(),
+ rtString::toUtf8(impiString).data(),
+ rtString::toUtf8(impuUri).data()
+ );
}
rtSipStack::~rtSipStack()
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- rtSafeDelete(m_pSipStack);
- rtSafeDelete(m_pSipCallback);
- rtSafeDelete(m_pDebugCallback);
+ rtSafeDelete(m_pSipStack);
+ rtSafeDelete(m_pSipCallback);
+ rtSafeDelete(m_pDebugCallback);
}
bool rtSipStack::start()
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->start();
+ return m_pSipStack->start();
}
bool rtSipStack::setDebugCallback(rtIDDebugCallback^ pCallback)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- m_pSipStack->setDebugCallback(tsk_null);
- rtSafeDelete(m_pDebugCallback);
- if(!pCallback)
- {
- return true;
- }
+ m_pSipStack->setDebugCallback(tsk_null);
+ rtSafeDelete(m_pDebugCallback);
+ if(!pCallback) {
+ return true;
+ }
- m_pDebugCallback = ref new rtDDebugCallback(pCallback);
- return m_pSipStack->setDebugCallback(const_cast<DDebugCallback*>(m_pDebugCallback->getWrappedCallback()));
+ m_pDebugCallback = ref new rtDDebugCallback(pCallback);
+ return m_pSipStack->setDebugCallback(const_cast<DDebugCallback*>(m_pDebugCallback->getWrappedCallback()));
}
bool rtSipStack::setDisplayName(Platform::String^ display_name)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setDisplayName(rtString::toUtf8(display_name).data());
+ return m_pSipStack->setDisplayName(rtString::toUtf8(display_name).data());
}
bool rtSipStack::setRealm(Platform::String^ realm_uri)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setRealm(rtString::toUtf8(realm_uri).data());
+ return m_pSipStack->setRealm(rtString::toUtf8(realm_uri).data());
}
bool rtSipStack::setIMPI(Platform::String^ impi)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setIMPI(rtString::toUtf8(impi).data());
+ return m_pSipStack->setIMPI(rtString::toUtf8(impi).data());
}
bool rtSipStack::setIMPU(Platform::String^ impu_uri)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setIMPU(rtString::toUtf8(impu_uri).data());
+ return m_pSipStack->setIMPU(rtString::toUtf8(impu_uri).data());
}
bool rtSipStack::setPassword(Platform::String^ password)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setPassword(rtString::toUtf8(password).data());
+ return m_pSipStack->setPassword(rtString::toUtf8(password).data());
}
bool rtSipStack::setAMF(Platform::String^ amf)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setAMF(rtString::toUtf8(amf).data());
+ return m_pSipStack->setAMF(rtString::toUtf8(amf).data());
}
bool rtSipStack::setOperatorId(Platform::String^ opid)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setOperatorId(rtString::toUtf8(opid).data());
+ return m_pSipStack->setOperatorId(rtString::toUtf8(opid).data());
}
bool rtSipStack::setProxyCSCF(Platform::String^ fqdn, unsigned short port, Platform::String^ transport, Platform::String^ ipversion)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setProxyCSCF(
- rtString::toUtf8(fqdn).data(),
- port,
- rtString::toUtf8(transport).data(),
- rtString::toUtf8(ipversion).data()
- );
+ return m_pSipStack->setProxyCSCF(
+ rtString::toUtf8(fqdn).data(),
+ port,
+ rtString::toUtf8(transport).data(),
+ rtString::toUtf8(ipversion).data()
+ );
}
bool rtSipStack::setLocalIP(Platform::String^ ip, Platform::String^ transport)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setLocalIP(rtString::toUtf8(ip).data(), rtString::toUtf8(transport).data());
+ return m_pSipStack->setLocalIP(rtString::toUtf8(ip).data(), rtString::toUtf8(transport).data());
}
bool rtSipStack::setLocalIP(Platform::String^ ip)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setLocalIP(rtString::toUtf8(ip).data());
+ return m_pSipStack->setLocalIP(rtString::toUtf8(ip).data());
}
bool rtSipStack::setLocalPort(unsigned short port, Platform::String^ transport)
{
- return m_pSipStack->setLocalPort(port, rtString::toUtf8(transport).data());
+ return m_pSipStack->setLocalPort(port, rtString::toUtf8(transport).data());
}
bool rtSipStack::setLocalPort(unsigned short port)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setLocalPort(port);
+ return m_pSipStack->setLocalPort(port);
}
bool rtSipStack::setEarlyIMS(bool enabled)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setEarlyIMS(enabled);
+ return m_pSipStack->setEarlyIMS(enabled);
}
bool rtSipStack::addHeader(Platform::String^ name, Platform::String^ value)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->addHeader(rtString::toUtf8(name).data(), rtString::toUtf8(value).data());
+ return m_pSipStack->addHeader(rtString::toUtf8(name).data(), rtString::toUtf8(value).data());
}
bool rtSipStack::removeHeader(Platform::String^ name)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->removeHeader(rtString::toUtf8(name).data());
+ return m_pSipStack->removeHeader(rtString::toUtf8(name).data());
}
bool rtSipStack::addDnsServer(Platform::String^ ip)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->removeHeader(rtString::toUtf8(ip).data());
+ return m_pSipStack->removeHeader(rtString::toUtf8(ip).data());
}
bool rtSipStack::setDnsDiscovery(bool enabled)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setDnsDiscovery(enabled);
+ return m_pSipStack->setDnsDiscovery(enabled);
}
bool rtSipStack::setAoR(Platform::String^ ip, int port)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setAoR(rtString::toUtf8(ip).data(), port);
+ return m_pSipStack->setAoR(rtString::toUtf8(ip).data(), port);
}
bool rtSipStack::setSigCompParams(unsigned dms, unsigned sms, unsigned cpb, bool enablePresDict)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setSigCompParams(dms, sms, cpb, enablePresDict);
+ return m_pSipStack->setSigCompParams(dms, sms, cpb, enablePresDict);
}
bool rtSipStack::addSigCompCompartment(Platform::String^ compId)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->addSigCompCompartment(rtString::toUtf8(compId).data());
+ return m_pSipStack->addSigCompCompartment(rtString::toUtf8(compId).data());
}
bool rtSipStack::removeSigCompCompartment(Platform::String^ compId)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->removeSigCompCompartment(rtString::toUtf8(compId).data());
+ return m_pSipStack->removeSigCompCompartment(rtString::toUtf8(compId).data());
}
-
+
bool rtSipStack::setSTUNServer(Platform::String^ ip, unsigned short port)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setSTUNServer(rtString::toUtf8(ip).data(), port);
+ return m_pSipStack->setSTUNServer(rtString::toUtf8(ip).data(), port);
}
bool rtSipStack::setSTUNCred(Platform::String^ login, Platform::String^ password)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setSTUNCred(rtString::toUtf8(login).data(), rtString::toUtf8(password).data());
+ return m_pSipStack->setSTUNCred(rtString::toUtf8(login).data(), rtString::toUtf8(password).data());
}
bool rtSipStack::setTLSSecAgree(bool enabled)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setTLSSecAgree(enabled);
+ return m_pSipStack->setTLSSecAgree(enabled);
}
bool rtSipStack::setSSLCertificates(Platform::String^ privKey, Platform::String^ pubKey, Platform::String^ caKey, bool verify)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setSSLCertificates(rtString::toUtf8(privKey).data(), rtString::toUtf8(pubKey).data(), rtString::toUtf8(caKey).data(), verify);
+ return m_pSipStack->setSSLCertificates(rtString::toUtf8(privKey).data(), rtString::toUtf8(pubKey).data(), rtString::toUtf8(caKey).data(), verify);
}
bool rtSipStack::setSSLCertificates(Platform::String^ privKey, Platform::String^ pubKey, Platform::String^ caKey)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return setSSLCertificates(privKey, pubKey, caKey, false);
+ return setSSLCertificates(privKey, pubKey, caKey, false);
}
bool rtSipStack::setIPSecSecAgree(bool enabled)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setIPSecSecAgree(enabled);
+ return m_pSipStack->setIPSecSecAgree(enabled);
}
bool rtSipStack::setIPSecParameters(Platform::String^ algo, Platform::String^ ealgo, Platform::String^ mode, Platform::String^ proto)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->setIPSecParameters(rtString::toUtf8(algo).data(), rtString::toUtf8(ealgo).data(), rtString::toUtf8(mode).data(), rtString::toUtf8(proto).data());
+ return m_pSipStack->setIPSecParameters(rtString::toUtf8(algo).data(), rtString::toUtf8(ealgo).data(), rtString::toUtf8(mode).data(), rtString::toUtf8(proto).data());
}
-
+
Platform::String^ rtSipStack::dnsENUM(Platform::String^ service, Platform::String^ e164num, Platform::String^ domain)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return rtString::toString(m_pSipStack->dnsENUM(rtString::toUtf8(service).data(), rtString::toUtf8(e164num).data(), rtString::toUtf8(domain).data()));
+ return rtString::toString(m_pSipStack->dnsENUM(rtString::toUtf8(service).data(), rtString::toUtf8(e164num).data(), rtString::toUtf8(domain).data()));
}
#if COM_VISIBLE
rtDnsResult^ rtSipStack::dnsNaptrSrv(String^ domain, String^ service)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- unsigned short _port = 0;
- String^ address = rtString::toString(m_pSipStack->dnsNaptrSrv(rtString::toUtf8(domain).data(), rtString::toUtf8(service).data(), &_port));
- return ref new rtDnsResult(_port, address);
+ unsigned short _port = 0;
+ String^ address = rtString::toString(m_pSipStack->dnsNaptrSrv(rtString::toUtf8(domain).data(), rtString::toUtf8(service).data(), &_port));
+ return ref new rtDnsResult(_port, address);
}
rtDnsResult^ rtSipStack::dnsSrv(String^ service)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- unsigned short _port = 0;
- String^ address = rtString::toString(m_pSipStack->dnsSrv(rtString::toUtf8(service).data(), &_port));
- return ref new rtDnsResult(_port, address);
+ unsigned short _port = 0;
+ String^ address = rtString::toString(m_pSipStack->dnsSrv(rtString::toUtf8(service).data(), &_port));
+ return ref new rtDnsResult(_port, address);
}
String^ rtSipStack::getLocalIP(String^ protocol)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- char* _ip = m_pSipStack->getLocalIPnPort(rtString::toUtf8(protocol).data(), tsk_null);
- String^ ip = rtString::toString(_ip);
- TSK_FREE(_ip);
- return ip;
+ char* _ip = m_pSipStack->getLocalIPnPort(rtString::toUtf8(protocol).data(), tsk_null);
+ String^ ip = rtString::toString(_ip);
+ TSK_FREE(_ip);
+ return ip;
}
uint16 rtSipStack::getLocalPort(String^ protocol)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- uint16 port = 0;
- char* _ip = m_pSipStack->getLocalIPnPort(rtString::toUtf8(protocol).data(), &port);
- TSK_FREE(_ip);
- return port;
+ uint16 port = 0;
+ char* _ip = m_pSipStack->getLocalIPnPort(rtString::toUtf8(protocol).data(), &port);
+ TSK_FREE(_ip);
+ return port;
}
#else
String^ rtSipStack::dnsNaptrSrv(String^ domain, String^ service, IntPtr port)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return rtString::toString(m_pSipStack->dnsNaptrSrv(rtString::toUtf8(domain).data(), rtString::toUtf8(service).data(), ((unsigned short*)(void*)port)));
+ return rtString::toString(m_pSipStack->dnsNaptrSrv(rtString::toUtf8(domain).data(), rtString::toUtf8(service).data(), ((unsigned short*)(void*)port)));
}
String^ rtSipStack::dnsSrv(String^ service, IntPtr port)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return rtString::toString(m_pSipStack->dnsSrv(rtString::toUtf8(service).data(), ((unsigned short*)(void*)port)));
+ return rtString::toString(m_pSipStack->dnsSrv(rtString::toUtf8(service).data(), ((unsigned short*)(void*)port)));
}
Platform::String^ rtSipStack::getLocalIPnPort(String^ protocol, IntPtr port)
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- char* _ip = m_pSipStack->getLocalIPnPort(rtString::toUtf8(protocol).data(), ((unsigned short*)(void*)port));
- String^ ip = rtString::toString();
- TSK_FREE(_ip);
- return ip;
+ char* _ip = m_pSipStack->getLocalIPnPort(rtString::toUtf8(protocol).data(), ((unsigned short*)(void*)port));
+ String^ ip = rtString::toString();
+ TSK_FREE(_ip);
+ return ip;
}
#endif /* COM_VISIBLE */
Platform::String^ rtSipStack::getPreferredIdentity()
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return rtString::toString(m_pSipStack->getPreferredIdentity());
+ return rtString::toString(m_pSipStack->getPreferredIdentity());
}
bool rtSipStack::isValid()
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->isValid();
+ return m_pSipStack->isValid();
}
bool rtSipStack::stop()
{
- std::lock_guard<std::recursive_mutex> lock(mLock);
+ std::lock_guard<std::recursive_mutex> lock(mLock);
- return m_pSipStack->stop();
+ return m_pSipStack->stop();
}
-
+
bool rtSipStack::initialize()
{
- return SipStack::initialize();
+ return SipStack::initialize();
}
bool rtSipStack::deInitialize()
{
- return SipStack::deInitialize();
+ return SipStack::deInitialize();
}
void rtSipStack::setCodecs(enum class rt_tdav_codec_id_t codecs)
{
- return SipStack::setCodecs((tdav_codec_id_t) codecs);
+ return SipStack::setCodecs((tdav_codec_id_t) codecs);
}
bool rtSipStack::setCodecPriority(enum class rt_tdav_codec_id_t codec_id, int priority)
{
- return SipStack::setCodecPriority((tdav_codec_id_t)codec_id, priority);
+ return SipStack::setCodecPriority((tdav_codec_id_t)codec_id, priority);
}
bool rtSipStack::isCodecSupported(enum class rt_tdav_codec_id_t codec_id)
{
- return SipStack::isCodecSupported((tdav_codec_id_t) codec_id);
+ return SipStack::isCodecSupported((tdav_codec_id_t) codec_id);
}
diff --git a/bindings/winrt/doubango_rt/src/rt_SipUri.cxx b/bindings/winrt/doubango_rt/src/rt_SipUri.cxx
index 1398325..94565d4 100755
--- a/bindings/winrt/doubango_rt/src/rt_SipUri.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_SipUri.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -27,24 +27,24 @@ using namespace std;
rtSipUri::rtSipUri(Platform::String^ uriString, Platform::String^ displayName)
{
- m_pSipUri = new SipUri(
- rtString::toUtf8(uriString).data(),
- rtString::toUtf8(displayName).data());
+ m_pSipUri = new SipUri(
+ rtString::toUtf8(uriString).data(),
+ rtString::toUtf8(displayName).data());
}
rtSipUri::rtSipUri(Platform::String^ uriString)
{
- m_pSipUri = new SipUri(rtString::toUtf8(uriString).data());
+ m_pSipUri = new SipUri(rtString::toUtf8(uriString).data());
}
rtSipUri::~rtSipUri()
{
- rtSafeDelete(m_pSipUri);
+ rtSafeDelete(m_pSipUri);
}
bool rtSipUri::isValid(Platform::String^ uri)
{
- return SipUri::isValid(rtString::toUtf8(uri).data());
+ return SipUri::isValid(rtString::toUtf8(uri).data());
}
// MIDL4069: Static members and instance members cannot have the same name on a runtime class. isValid
@@ -55,49 +55,48 @@ bool rtSipUri::isValid_()
bool rtSipUri::isValid()
#endif
{
- return (m_pSipUri && m_pSipUri->isValid());
+ return (m_pSipUri && m_pSipUri->isValid());
}
Platform::String^ rtSipUri::getScheme()
{
- return m_pSipUri ? rtString::toString(m_pSipUri->getScheme()) : nullptr;
+ return m_pSipUri ? rtString::toString(m_pSipUri->getScheme()) : nullptr;
}
Platform::String^ rtSipUri::getHost()
{
- return m_pSipUri ? rtString::toString(m_pSipUri->getHost()) : nullptr;
+ return m_pSipUri ? rtString::toString(m_pSipUri->getHost()) : nullptr;
}
unsigned short rtSipUri::getPort()
{
- return m_pSipUri ? m_pSipUri->getPort() : 0;
+ return m_pSipUri ? m_pSipUri->getPort() : 0;
}
Platform::String^ rtSipUri::getUserName()
{
- return m_pSipUri ? rtString::toString(m_pSipUri->getUserName()) : nullptr;
+ return m_pSipUri ? rtString::toString(m_pSipUri->getUserName()) : nullptr;
}
Platform::String^ rtSipUri::getPassword()
{
- return m_pSipUri ? rtString::toString(m_pSipUri->getPassword()) : nullptr;
+ return m_pSipUri ? rtString::toString(m_pSipUri->getPassword()) : nullptr;
}
Platform::String^ rtSipUri::getDisplayName()
{
- return m_pSipUri ? rtString::toString(m_pSipUri->getDisplayName()) : nullptr;
+ return m_pSipUri ? rtString::toString(m_pSipUri->getDisplayName()) : nullptr;
}
Platform::String^ rtSipUri::getParamValue(Platform::String^ name)
{
- return m_pSipUri ? rtString::toString(m_pSipUri->getParamValue(rtString::toUtf8(name).data())) : nullptr;
+ return m_pSipUri ? rtString::toString(m_pSipUri->getParamValue(rtString::toUtf8(name).data())) : nullptr;
}
void rtSipUri::setDisplayName(Platform::String^ displayName)
{
- if(m_pSipUri)
- {
- m_pSipUri->setDisplayName(rtString::toUtf8(displayName).data());
- }
+ if(m_pSipUri) {
+ m_pSipUri->setDisplayName(rtString::toUtf8(displayName).data());
+ }
}
diff --git a/bindings/winrt/doubango_rt/src/rt_String.cxx b/bindings/winrt/doubango_rt/src/rt_String.cxx
index 7d17f03..9ac6803 100755
--- a/bindings/winrt/doubango_rt/src/rt_String.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_String.cxx
@@ -1,17 +1,17 @@
/*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.
*/
@@ -25,34 +25,28 @@ using namespace std;
vector<char> rtString::toUtf8(String^ str)
{
- if(str != nullptr && !str->IsEmpty())
- {
- int len = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, str->Data(), str->Length(), nullptr, 0, nullptr, nullptr);
- if (len > 0)
- {
- vector<char> vec(len + 1);
- if (WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, str->Data(), str->Length(), vec.data(), len, nullptr, nullptr) == len)
- {
- return std::move(vec);
- }
- }
- }
+ if(str != nullptr && !str->IsEmpty()) {
+ int len = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, str->Data(), str->Length(), nullptr, 0, nullptr, nullptr);
+ if (len > 0) {
+ vector<char> vec(len + 1);
+ if (WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, str->Data(), str->Length(), vec.data(), len, nullptr, nullptr) == len) {
+ return std::move(vec);
+ }
+ }
+ }
return std::move(vector<char>(0));
}
String^ rtString::toString(char const* str)
{
- if(str)
- {
- int len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, nullptr, 0);
- if (len > 0)
- {
- vector<wchar_t> vec(len);
- if (MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, vec.data(), len) == len)
- {
- return ref new String(vec.data());
- }
- }
- }
- return nullptr;
+ if(str) {
+ int len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, nullptr, 0);
+ if (len > 0) {
+ vector<wchar_t> vec(len);
+ if (MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, vec.data(), len) == len) {
+ return ref new String(vec.data());
+ }
+ }
+ }
+ return nullptr;
} \ No newline at end of file
diff --git a/bindings/winrt/doubango_rt/src/rt_Xcap.cxx b/bindings/winrt/doubango_rt/src/rt_Xcap.cxx
index 623cb1f..b510d81 100755
--- a/bindings/winrt/doubango_rt/src/rt_Xcap.cxx
+++ b/bindings/winrt/doubango_rt/src/rt_Xcap.cxx
@@ -1,17 +1,17 @@
/*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.
*/ \ No newline at end of file
OpenPOWER on IntegriCloud