diff options
Diffstat (limited to 'bindings/csharp/SubscriptionSession.cs')
-rw-r--r-- | bindings/csharp/SubscriptionSession.cs | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/bindings/csharp/SubscriptionSession.cs b/bindings/csharp/SubscriptionSession.cs new file mode 100644 index 0000000..a9b2e90 --- /dev/null +++ b/bindings/csharp/SubscriptionSession.cs @@ -0,0 +1,58 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 2.0.9 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +namespace org.doubango.tinyWRAP { + +using System; +using System.Runtime.InteropServices; + +public class SubscriptionSession : SipSession { + private HandleRef swigCPtr; + + internal SubscriptionSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.SubscriptionSession_SWIGUpcast(cPtr), cMemoryOwn) { + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(SubscriptionSession obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~SubscriptionSession() { + Dispose(); + } + + public override void Dispose() { + lock(this) { + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SubscriptionSession(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + GC.SuppressFinalize(this); + base.Dispose(); + } + } + + public SubscriptionSession(SipStack pStack) : this(tinyWRAPPINVOKE.new_SubscriptionSession(SipStack.getCPtr(pStack)), true) { + } + + public bool subscribe() { + bool ret = tinyWRAPPINVOKE.SubscriptionSession_subscribe(swigCPtr); + return ret; + } + + public bool unSubscribe() { + bool ret = tinyWRAPPINVOKE.SubscriptionSession_unSubscribe(swigCPtr); + return ret; + } + +} + +} |