SipStack.cs 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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 SipStack : SafeObject {
  12. private HandleRef swigCPtr;
  13. internal SipStack(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.SipStack_SWIGUpcast(cPtr), cMemoryOwn) {
  14. swigCPtr = new HandleRef(this, cPtr);
  15. }
  16. internal static HandleRef getCPtr(SipStack obj) {
  17. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  18. }
  19. ~SipStack() {
  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_SipStack(swigCPtr);
  28. }
  29. swigCPtr = new HandleRef(null, IntPtr.Zero);
  30. }
  31. GC.SuppressFinalize(this);
  32. base.Dispose();
  33. }
  34. }
  35. public SipStack(SipCallback pCallback, string realm_uri, string impi_uri, string impu_uri) : this(tinyWRAPPINVOKE.new_SipStack(SipCallback.getCPtr(pCallback), realm_uri, impi_uri, impu_uri), true) {
  36. }
  37. public bool start() {
  38. bool ret = tinyWRAPPINVOKE.SipStack_start(swigCPtr);
  39. return ret;
  40. }
  41. public bool setDebugCallback(DDebugCallback pCallback) {
  42. bool ret = tinyWRAPPINVOKE.SipStack_setDebugCallback(swigCPtr, DDebugCallback.getCPtr(pCallback));
  43. return ret;
  44. }
  45. public bool setDisplayName(string display_name) {
  46. bool ret = tinyWRAPPINVOKE.SipStack_setDisplayName(swigCPtr, display_name);
  47. return ret;
  48. }
  49. public bool setRealm(string realm_uri) {
  50. bool ret = tinyWRAPPINVOKE.SipStack_setRealm(swigCPtr, realm_uri);
  51. return ret;
  52. }
  53. public bool setIMPI(string impi) {
  54. bool ret = tinyWRAPPINVOKE.SipStack_setIMPI(swigCPtr, impi);
  55. return ret;
  56. }
  57. public bool setIMPU(string impu_uri) {
  58. bool ret = tinyWRAPPINVOKE.SipStack_setIMPU(swigCPtr, impu_uri);
  59. return ret;
  60. }
  61. public bool setPassword(string password) {
  62. bool ret = tinyWRAPPINVOKE.SipStack_setPassword(swigCPtr, password);
  63. return ret;
  64. }
  65. public bool setAMF(string amf) {
  66. bool ret = tinyWRAPPINVOKE.SipStack_setAMF(swigCPtr, amf);
  67. return ret;
  68. }
  69. public bool setOperatorId(string opid) {
  70. bool ret = tinyWRAPPINVOKE.SipStack_setOperatorId(swigCPtr, opid);
  71. return ret;
  72. }
  73. public bool setProxyCSCF(string fqdn, ushort port, string transport, string ipversion) {
  74. bool ret = tinyWRAPPINVOKE.SipStack_setProxyCSCF(swigCPtr, fqdn, port, transport, ipversion);
  75. return ret;
  76. }
  77. public bool setLocalIP(string ip, string transport) {
  78. bool ret = tinyWRAPPINVOKE.SipStack_setLocalIP__SWIG_0(swigCPtr, ip, transport);
  79. return ret;
  80. }
  81. public bool setLocalIP(string ip) {
  82. bool ret = tinyWRAPPINVOKE.SipStack_setLocalIP__SWIG_1(swigCPtr, ip);
  83. return ret;
  84. }
  85. public bool setLocalPort(ushort port, string transport) {
  86. bool ret = tinyWRAPPINVOKE.SipStack_setLocalPort__SWIG_0(swigCPtr, port, transport);
  87. return ret;
  88. }
  89. public bool setLocalPort(ushort port) {
  90. bool ret = tinyWRAPPINVOKE.SipStack_setLocalPort__SWIG_1(swigCPtr, port);
  91. return ret;
  92. }
  93. public bool setEarlyIMS(bool enabled) {
  94. bool ret = tinyWRAPPINVOKE.SipStack_setEarlyIMS(swigCPtr, enabled);
  95. return ret;
  96. }
  97. public bool addHeader(string name, string value) {
  98. bool ret = tinyWRAPPINVOKE.SipStack_addHeader(swigCPtr, name, value);
  99. return ret;
  100. }
  101. public bool removeHeader(string name) {
  102. bool ret = tinyWRAPPINVOKE.SipStack_removeHeader(swigCPtr, name);
  103. return ret;
  104. }
  105. public bool addDnsServer(string ip) {
  106. bool ret = tinyWRAPPINVOKE.SipStack_addDnsServer(swigCPtr, ip);
  107. return ret;
  108. }
  109. public bool setDnsDiscovery(bool enabled) {
  110. bool ret = tinyWRAPPINVOKE.SipStack_setDnsDiscovery(swigCPtr, enabled);
  111. return ret;
  112. }
  113. public bool setAoR(string ip, int port) {
  114. bool ret = tinyWRAPPINVOKE.SipStack_setAoR(swigCPtr, ip, port);
  115. return ret;
  116. }
  117. public bool setSigCompParams(uint dms, uint sms, uint cpb, bool enablePresDict) {
  118. bool ret = tinyWRAPPINVOKE.SipStack_setSigCompParams(swigCPtr, dms, sms, cpb, enablePresDict);
  119. return ret;
  120. }
  121. public bool addSigCompCompartment(string compId) {
  122. bool ret = tinyWRAPPINVOKE.SipStack_addSigCompCompartment(swigCPtr, compId);
  123. return ret;
  124. }
  125. public bool removeSigCompCompartment(string compId) {
  126. bool ret = tinyWRAPPINVOKE.SipStack_removeSigCompCompartment(swigCPtr, compId);
  127. return ret;
  128. }
  129. public bool setSTUNEnabledForICE(bool enabled) {
  130. bool ret = tinyWRAPPINVOKE.SipStack_setSTUNEnabledForICE(swigCPtr, enabled);
  131. return ret;
  132. }
  133. public bool setSTUNServer(string hostname, ushort port) {
  134. bool ret = tinyWRAPPINVOKE.SipStack_setSTUNServer(swigCPtr, hostname, port);
  135. return ret;
  136. }
  137. public bool setSTUNCred(string login, string password) {
  138. bool ret = tinyWRAPPINVOKE.SipStack_setSTUNCred(swigCPtr, login, password);
  139. return ret;
  140. }
  141. public bool setSTUNEnabled(bool enabled) {
  142. bool ret = tinyWRAPPINVOKE.SipStack_setSTUNEnabled(swigCPtr, enabled);
  143. return ret;
  144. }
  145. public bool setTLSSecAgree(bool enabled) {
  146. bool ret = tinyWRAPPINVOKE.SipStack_setTLSSecAgree(swigCPtr, enabled);
  147. return ret;
  148. }
  149. public bool setSSLCertificates(string privKey, string pubKey, string caKey, bool verify) {
  150. bool ret = tinyWRAPPINVOKE.SipStack_setSSLCertificates__SWIG_0(swigCPtr, privKey, pubKey, caKey, verify);
  151. return ret;
  152. }
  153. public bool setSSLCertificates(string privKey, string pubKey, string caKey) {
  154. bool ret = tinyWRAPPINVOKE.SipStack_setSSLCertificates__SWIG_1(swigCPtr, privKey, pubKey, caKey);
  155. return ret;
  156. }
  157. public bool setSSLCretificates(string privKey, string pubKey, string caKey, bool verify) {
  158. bool ret = tinyWRAPPINVOKE.SipStack_setSSLCretificates__SWIG_0(swigCPtr, privKey, pubKey, caKey, verify);
  159. return ret;
  160. }
  161. public bool setSSLCretificates(string privKey, string pubKey, string caKey) {
  162. bool ret = tinyWRAPPINVOKE.SipStack_setSSLCretificates__SWIG_1(swigCPtr, privKey, pubKey, caKey);
  163. return ret;
  164. }
  165. public bool setIPSecSecAgree(bool enabled) {
  166. bool ret = tinyWRAPPINVOKE.SipStack_setIPSecSecAgree(swigCPtr, enabled);
  167. return ret;
  168. }
  169. public bool setIPSecParameters(string algo, string ealgo, string mode, string proto) {
  170. bool ret = tinyWRAPPINVOKE.SipStack_setIPSecParameters(swigCPtr, algo, ealgo, mode, proto);
  171. return ret;
  172. }
  173. public string dnsENUM(string service, string e164num, string domain) {
  174. string ret = tinyWRAPPINVOKE.SipStack_dnsENUM(swigCPtr, service, e164num, domain);
  175. return ret;
  176. }
  177. public string dnsNaptrSrv(string domain, string service, out ushort OUTPUT) {
  178. string ret = tinyWRAPPINVOKE.SipStack_dnsNaptrSrv(swigCPtr, domain, service, out OUTPUT);
  179. return ret;
  180. }
  181. public string dnsSrv(string service, out ushort OUTPUT) {
  182. string ret = tinyWRAPPINVOKE.SipStack_dnsSrv(swigCPtr, service, out OUTPUT);
  183. return ret;
  184. }
  185. public bool setMaxFDs(uint max_fds) {
  186. bool ret = tinyWRAPPINVOKE.SipStack_setMaxFDs(swigCPtr, max_fds);
  187. return ret;
  188. }
  189. public string getLocalIPnPort(string protocol, out ushort OUTPUT) {
  190. string ret = tinyWRAPPINVOKE.SipStack_getLocalIPnPort(swigCPtr, protocol, out OUTPUT);
  191. return ret;
  192. }
  193. public string getPreferredIdentity() {
  194. string ret = tinyWRAPPINVOKE.SipStack_getPreferredIdentity(swigCPtr);
  195. return ret;
  196. }
  197. public bool isValid() {
  198. bool ret = tinyWRAPPINVOKE.SipStack_isValid(swigCPtr);
  199. return ret;
  200. }
  201. public bool stop() {
  202. bool ret = tinyWRAPPINVOKE.SipStack_stop(swigCPtr);
  203. return ret;
  204. }
  205. public static bool initialize() {
  206. bool ret = tinyWRAPPINVOKE.SipStack_initialize();
  207. return ret;
  208. }
  209. public static bool deInitialize() {
  210. bool ret = tinyWRAPPINVOKE.SipStack_deInitialize();
  211. return ret;
  212. }
  213. public static void setCodecs(tdav_codec_id_t codecs) {
  214. tinyWRAPPINVOKE.SipStack_setCodecs((int)codecs);
  215. }
  216. public static void setCodecs_2(long codecs) {
  217. tinyWRAPPINVOKE.SipStack_setCodecs_2(codecs);
  218. }
  219. public static bool setCodecPriority(tdav_codec_id_t codec_id, int priority) {
  220. bool ret = tinyWRAPPINVOKE.SipStack_setCodecPriority((int)codec_id, priority);
  221. return ret;
  222. }
  223. public static bool setCodecPriority_2(int codec, int priority) {
  224. bool ret = tinyWRAPPINVOKE.SipStack_setCodecPriority_2(codec, priority);
  225. return ret;
  226. }
  227. public static bool isCodecSupported(tdav_codec_id_t codec_id) {
  228. bool ret = tinyWRAPPINVOKE.SipStack_isCodecSupported((int)codec_id);
  229. return ret;
  230. }
  231. public static bool isIPSecSupported() {
  232. bool ret = tinyWRAPPINVOKE.SipStack_isIPSecSupported();
  233. return ret;
  234. }
  235. }
  236. }