CallSession.cs 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.9
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. namespace org.doubango.tinyWRAP {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class CallSession : InviteSession {
  12. private HandleRef swigCPtr;
  13. internal CallSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.CallSession_SWIGUpcast(cPtr), cMemoryOwn) {
  14. swigCPtr = new HandleRef(this, cPtr);
  15. }
  16. internal static HandleRef getCPtr(CallSession obj) {
  17. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  18. }
  19. ~CallSession() {
  20. Dispose();
  21. }
  22. public override void Dispose() {
  23. lock(this) {
  24. if (swigCPtr.Handle != IntPtr.Zero) {
  25. if (swigCMemOwn) {
  26. swigCMemOwn = false;
  27. tinyWRAPPINVOKE.delete_CallSession(swigCPtr);
  28. }
  29. swigCPtr = new HandleRef(null, IntPtr.Zero);
  30. }
  31. GC.SuppressFinalize(this);
  32. base.Dispose();
  33. }
  34. }
  35. public CallSession(SipStack pStack) : this(tinyWRAPPINVOKE.new_CallSession(SipStack.getCPtr(pStack)), true) {
  36. }
  37. public bool callAudio(string remoteUriString, ActionConfig config) {
  38. bool ret = tinyWRAPPINVOKE.CallSession_callAudio__SWIG_0(swigCPtr, remoteUriString, ActionConfig.getCPtr(config));
  39. return ret;
  40. }
  41. public bool callAudio(string remoteUriString) {
  42. bool ret = tinyWRAPPINVOKE.CallSession_callAudio__SWIG_1(swigCPtr, remoteUriString);
  43. return ret;
  44. }
  45. public bool callAudio(SipUri remoteUri, ActionConfig config) {
  46. bool ret = tinyWRAPPINVOKE.CallSession_callAudio__SWIG_2(swigCPtr, SipUri.getCPtr(remoteUri), ActionConfig.getCPtr(config));
  47. return ret;
  48. }
  49. public bool callAudio(SipUri remoteUri) {
  50. bool ret = tinyWRAPPINVOKE.CallSession_callAudio__SWIG_3(swigCPtr, SipUri.getCPtr(remoteUri));
  51. return ret;
  52. }
  53. public bool callAudioVideo(string remoteUriString, ActionConfig config) {
  54. bool ret = tinyWRAPPINVOKE.CallSession_callAudioVideo__SWIG_0(swigCPtr, remoteUriString, ActionConfig.getCPtr(config));
  55. return ret;
  56. }
  57. public bool callAudioVideo(string remoteUriString) {
  58. bool ret = tinyWRAPPINVOKE.CallSession_callAudioVideo__SWIG_1(swigCPtr, remoteUriString);
  59. return ret;
  60. }
  61. public bool callAudioVideo(SipUri remoteUri, ActionConfig config) {
  62. bool ret = tinyWRAPPINVOKE.CallSession_callAudioVideo__SWIG_2(swigCPtr, SipUri.getCPtr(remoteUri), ActionConfig.getCPtr(config));
  63. return ret;
  64. }
  65. public bool callAudioVideo(SipUri remoteUri) {
  66. bool ret = tinyWRAPPINVOKE.CallSession_callAudioVideo__SWIG_3(swigCPtr, SipUri.getCPtr(remoteUri));
  67. return ret;
  68. }
  69. public bool callVideo(string remoteUriString, ActionConfig config) {
  70. bool ret = tinyWRAPPINVOKE.CallSession_callVideo__SWIG_0(swigCPtr, remoteUriString, ActionConfig.getCPtr(config));
  71. return ret;
  72. }
  73. public bool callVideo(string remoteUriString) {
  74. bool ret = tinyWRAPPINVOKE.CallSession_callVideo__SWIG_1(swigCPtr, remoteUriString);
  75. return ret;
  76. }
  77. public bool callVideo(SipUri remoteUri, ActionConfig config) {
  78. bool ret = tinyWRAPPINVOKE.CallSession_callVideo__SWIG_2(swigCPtr, SipUri.getCPtr(remoteUri), ActionConfig.getCPtr(config));
  79. return ret;
  80. }
  81. public bool callVideo(SipUri remoteUri) {
  82. bool ret = tinyWRAPPINVOKE.CallSession_callVideo__SWIG_3(swigCPtr, SipUri.getCPtr(remoteUri));
  83. return ret;
  84. }
  85. public bool call(string remoteUriString, twrap_media_type_t media, ActionConfig config) {
  86. bool ret = tinyWRAPPINVOKE.CallSession_call__SWIG_0(swigCPtr, remoteUriString, (int)media, ActionConfig.getCPtr(config));
  87. return ret;
  88. }
  89. public bool call(string remoteUriString, twrap_media_type_t media) {
  90. bool ret = tinyWRAPPINVOKE.CallSession_call__SWIG_1(swigCPtr, remoteUriString, (int)media);
  91. return ret;
  92. }
  93. public bool call(SipUri remoteUri, twrap_media_type_t media, ActionConfig config) {
  94. bool ret = tinyWRAPPINVOKE.CallSession_call__SWIG_2(swigCPtr, SipUri.getCPtr(remoteUri), (int)media, ActionConfig.getCPtr(config));
  95. return ret;
  96. }
  97. public bool call(SipUri remoteUri, twrap_media_type_t media) {
  98. bool ret = tinyWRAPPINVOKE.CallSession_call__SWIG_3(swigCPtr, SipUri.getCPtr(remoteUri), (int)media);
  99. return ret;
  100. }
  101. public bool setSessionTimer(uint timeout, string refresher) {
  102. bool ret = tinyWRAPPINVOKE.CallSession_setSessionTimer(swigCPtr, timeout, refresher);
  103. return ret;
  104. }
  105. public bool set100rel(bool enabled) {
  106. bool ret = tinyWRAPPINVOKE.CallSession_set100rel(swigCPtr, enabled);
  107. return ret;
  108. }
  109. public bool setRtcp(bool enabled) {
  110. bool ret = tinyWRAPPINVOKE.CallSession_setRtcp(swigCPtr, enabled);
  111. return ret;
  112. }
  113. public bool setRtcpMux(bool enabled) {
  114. bool ret = tinyWRAPPINVOKE.CallSession_setRtcpMux(swigCPtr, enabled);
  115. return ret;
  116. }
  117. public bool setSRtpMode(tmedia_srtp_mode_t mode) {
  118. bool ret = tinyWRAPPINVOKE.CallSession_setSRtpMode(swigCPtr, (int)mode);
  119. return ret;
  120. }
  121. public bool setAvpfMode(tmedia_mode_t mode) {
  122. bool ret = tinyWRAPPINVOKE.CallSession_setAvpfMode(swigCPtr, (int)mode);
  123. return ret;
  124. }
  125. public bool setICE(bool enabled) {
  126. bool ret = tinyWRAPPINVOKE.CallSession_setICE(swigCPtr, enabled);
  127. return ret;
  128. }
  129. public bool setICEStun(bool enabled) {
  130. bool ret = tinyWRAPPINVOKE.CallSession_setICEStun(swigCPtr, enabled);
  131. return ret;
  132. }
  133. public bool setICETurn(bool enabled) {
  134. bool ret = tinyWRAPPINVOKE.CallSession_setICETurn(swigCPtr, enabled);
  135. return ret;
  136. }
  137. public bool setSTUNServer(string hostname, ushort port) {
  138. bool ret = tinyWRAPPINVOKE.CallSession_setSTUNServer(swigCPtr, hostname, port);
  139. return ret;
  140. }
  141. public bool setSTUNCred(string username, string password) {
  142. bool ret = tinyWRAPPINVOKE.CallSession_setSTUNCred(swigCPtr, username, password);
  143. return ret;
  144. }
  145. public bool setVideoFps(int fps) {
  146. bool ret = tinyWRAPPINVOKE.CallSession_setVideoFps(swigCPtr, fps);
  147. return ret;
  148. }
  149. public bool setVideoBandwidthUploadMax(int max) {
  150. bool ret = tinyWRAPPINVOKE.CallSession_setVideoBandwidthUploadMax(swigCPtr, max);
  151. return ret;
  152. }
  153. public bool setVideoBandwidthDownloadMax(int max) {
  154. bool ret = tinyWRAPPINVOKE.CallSession_setVideoBandwidthDownloadMax(swigCPtr, max);
  155. return ret;
  156. }
  157. public bool setVideoPrefSize(tmedia_pref_video_size_t pref_video_size) {
  158. bool ret = tinyWRAPPINVOKE.CallSession_setVideoPrefSize(swigCPtr, (int)pref_video_size);
  159. return ret;
  160. }
  161. public bool setQoS(tmedia_qos_stype_t type, tmedia_qos_strength_t strength) {
  162. bool ret = tinyWRAPPINVOKE.CallSession_setQoS(swigCPtr, (int)type, (int)strength);
  163. return ret;
  164. }
  165. public bool hold(ActionConfig config) {
  166. bool ret = tinyWRAPPINVOKE.CallSession_hold__SWIG_0(swigCPtr, ActionConfig.getCPtr(config));
  167. return ret;
  168. }
  169. public bool hold() {
  170. bool ret = tinyWRAPPINVOKE.CallSession_hold__SWIG_1(swigCPtr);
  171. return ret;
  172. }
  173. public bool resume(ActionConfig config) {
  174. bool ret = tinyWRAPPINVOKE.CallSession_resume__SWIG_0(swigCPtr, ActionConfig.getCPtr(config));
  175. return ret;
  176. }
  177. public bool resume() {
  178. bool ret = tinyWRAPPINVOKE.CallSession_resume__SWIG_1(swigCPtr);
  179. return ret;
  180. }
  181. public bool transfer(string referToUriString, ActionConfig config) {
  182. bool ret = tinyWRAPPINVOKE.CallSession_transfer__SWIG_0(swigCPtr, referToUriString, ActionConfig.getCPtr(config));
  183. return ret;
  184. }
  185. public bool transfer(string referToUriString) {
  186. bool ret = tinyWRAPPINVOKE.CallSession_transfer__SWIG_1(swigCPtr, referToUriString);
  187. return ret;
  188. }
  189. public bool acceptTransfer(ActionConfig config) {
  190. bool ret = tinyWRAPPINVOKE.CallSession_acceptTransfer__SWIG_0(swigCPtr, ActionConfig.getCPtr(config));
  191. return ret;
  192. }
  193. public bool acceptTransfer() {
  194. bool ret = tinyWRAPPINVOKE.CallSession_acceptTransfer__SWIG_1(swigCPtr);
  195. return ret;
  196. }
  197. public bool rejectTransfer(ActionConfig config) {
  198. bool ret = tinyWRAPPINVOKE.CallSession_rejectTransfer__SWIG_0(swigCPtr, ActionConfig.getCPtr(config));
  199. return ret;
  200. }
  201. public bool rejectTransfer() {
  202. bool ret = tinyWRAPPINVOKE.CallSession_rejectTransfer__SWIG_1(swigCPtr);
  203. return ret;
  204. }
  205. public bool sendDTMF(int number) {
  206. bool ret = tinyWRAPPINVOKE.CallSession_sendDTMF(swigCPtr, number);
  207. return ret;
  208. }
  209. public uint getSessionTransferId() {
  210. uint ret = tinyWRAPPINVOKE.CallSession_getSessionTransferId(swigCPtr);
  211. return ret;
  212. }
  213. public bool sendT140Data(tmedia_t140_data_type_t data_type, IntPtr data_ptr, uint data_size) {
  214. bool ret = tinyWRAPPINVOKE.CallSession_sendT140Data__SWIG_0(swigCPtr, (int)data_type, data_ptr, data_size);
  215. return ret;
  216. }
  217. public bool sendT140Data(tmedia_t140_data_type_t data_type, IntPtr data_ptr) {
  218. bool ret = tinyWRAPPINVOKE.CallSession_sendT140Data__SWIG_1(swigCPtr, (int)data_type, data_ptr);
  219. return ret;
  220. }
  221. public bool sendT140Data(tmedia_t140_data_type_t data_type) {
  222. bool ret = tinyWRAPPINVOKE.CallSession_sendT140Data__SWIG_2(swigCPtr, (int)data_type);
  223. return ret;
  224. }
  225. public bool setT140Callback(T140Callback pT140Callback) {
  226. bool ret = tinyWRAPPINVOKE.CallSession_setT140Callback(swigCPtr, T140Callback.getCPtr(pT140Callback));
  227. return ret;
  228. }
  229. }
  230. }