doubango/trunk/bindings/csharp/CallEvent.cs

58 lines
1.7 KiB
C#

/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.39
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
using System;
using System.Runtime.InteropServices;
public class CallEvent : SipEvent {
private HandleRef swigCPtr;
internal CallEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.CallEventUpcast(cPtr), cMemoryOwn) {
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(CallEvent obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~CallEvent() {
Dispose();
}
public override void Dispose() {
lock(this) {
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
swigCMemOwn = false;
tinyWRAPPINVOKE.delete_CallEvent(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
GC.SuppressFinalize(this);
base.Dispose();
}
}
public tsip_invite_event_type_t getType() {
tsip_invite_event_type_t ret = (tsip_invite_event_type_t)tinyWRAPPINVOKE.CallEvent_getType(swigCPtr);
return ret;
}
public CallSession getSession() {
IntPtr cPtr = tinyWRAPPINVOKE.CallEvent_getSession(swigCPtr);
CallSession ret = (cPtr == IntPtr.Zero) ? null : new CallSession(cPtr, false);
return ret;
}
public CallSession takeSessionOwnership() {
IntPtr cPtr = tinyWRAPPINVOKE.CallEvent_takeSessionOwnership(swigCPtr);
CallSession ret = (cPtr == IntPtr.Zero) ? null : new CallSession(cPtr, true);
return ret;
}
}