SipSession.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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 SipSession : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal SipSession(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(SipSession obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~SipSession() {
  22. Dispose();
  23. }
  24. public virtual void Dispose() {
  25. lock(this) {
  26. if (swigCPtr.Handle != IntPtr.Zero) {
  27. if (swigCMemOwn) {
  28. swigCMemOwn = false;
  29. tinyWRAPPINVOKE.delete_SipSession(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public SipSession(SipStack stack) : this(tinyWRAPPINVOKE.new_SipSession(SipStack.getCPtr(stack)), true) {
  37. }
  38. public bool haveOwnership() {
  39. bool ret = tinyWRAPPINVOKE.SipSession_haveOwnership(swigCPtr);
  40. return ret;
  41. }
  42. public bool addHeader(string name, string value) {
  43. bool ret = tinyWRAPPINVOKE.SipSession_addHeader(swigCPtr, name, value);
  44. return ret;
  45. }
  46. public bool removeHeader(string name) {
  47. bool ret = tinyWRAPPINVOKE.SipSession_removeHeader(swigCPtr, name);
  48. return ret;
  49. }
  50. public bool addCaps(string name, string value) {
  51. bool ret = tinyWRAPPINVOKE.SipSession_addCaps__SWIG_0(swigCPtr, name, value);
  52. return ret;
  53. }
  54. public bool addCaps(string name) {
  55. bool ret = tinyWRAPPINVOKE.SipSession_addCaps__SWIG_1(swigCPtr, name);
  56. return ret;
  57. }
  58. public bool removeCaps(string name) {
  59. bool ret = tinyWRAPPINVOKE.SipSession_removeCaps(swigCPtr, name);
  60. return ret;
  61. }
  62. public bool setExpires(uint expires) {
  63. bool ret = tinyWRAPPINVOKE.SipSession_setExpires(swigCPtr, expires);
  64. return ret;
  65. }
  66. public bool setFromUri(string fromUriString) {
  67. bool ret = tinyWRAPPINVOKE.SipSession_setFromUri__SWIG_0(swigCPtr, fromUriString);
  68. return ret;
  69. }
  70. public bool setFromUri(SipUri fromUri) {
  71. bool ret = tinyWRAPPINVOKE.SipSession_setFromUri__SWIG_1(swigCPtr, SipUri.getCPtr(fromUri));
  72. return ret;
  73. }
  74. public bool setToUri(string toUriString) {
  75. bool ret = tinyWRAPPINVOKE.SipSession_setToUri__SWIG_0(swigCPtr, toUriString);
  76. return ret;
  77. }
  78. public bool setToUri(SipUri toUri) {
  79. bool ret = tinyWRAPPINVOKE.SipSession_setToUri__SWIG_1(swigCPtr, SipUri.getCPtr(toUri));
  80. return ret;
  81. }
  82. public bool setSilentHangup(bool silent) {
  83. bool ret = tinyWRAPPINVOKE.SipSession_setSilentHangup(swigCPtr, silent);
  84. return ret;
  85. }
  86. public bool addSigCompCompartment(string compId) {
  87. bool ret = tinyWRAPPINVOKE.SipSession_addSigCompCompartment(swigCPtr, compId);
  88. return ret;
  89. }
  90. public bool removeSigCompCompartment() {
  91. bool ret = tinyWRAPPINVOKE.SipSession_removeSigCompCompartment(swigCPtr);
  92. return ret;
  93. }
  94. public uint getId() {
  95. uint ret = tinyWRAPPINVOKE.SipSession_getId(swigCPtr);
  96. return ret;
  97. }
  98. }
  99. }