2008-05-26 03:43:49 +00:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
2008-08-23 02:43:57 +00:00
|
|
|
* Version 1.3.36
|
2008-05-26 03:43:49 +00:00
|
|
|
*
|
|
|
|
* Do not make changes to this file unless you know what you are doing--modify
|
|
|
|
* the SWIG interface file instead.
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
namespace FreeSWITCH.Native {
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
public partial class Event : IDisposable {
|
|
|
|
private HandleRef swigCPtr;
|
|
|
|
protected bool swigCMemOwn;
|
|
|
|
|
|
|
|
internal Event(IntPtr cPtr, bool cMemoryOwn) {
|
|
|
|
swigCMemOwn = cMemoryOwn;
|
|
|
|
swigCPtr = new HandleRef(this, cPtr);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static HandleRef getCPtr(Event obj) {
|
|
|
|
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
|
|
|
}
|
|
|
|
|
|
|
|
~Event() {
|
|
|
|
Dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual void Dispose() {
|
|
|
|
lock(this) {
|
|
|
|
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
|
|
|
|
swigCMemOwn = false;
|
|
|
|
freeswitchPINVOKE.delete_Event(swigCPtr);
|
|
|
|
}
|
|
|
|
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
|
|
|
GC.SuppressFinalize(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public switch_event InternalEvent {
|
|
|
|
set {
|
|
|
|
freeswitchPINVOKE.Event_InternalEvent_set(swigCPtr, switch_event.getCPtr(value));
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
IntPtr cPtr = freeswitchPINVOKE.Event_InternalEvent_get(swigCPtr);
|
|
|
|
switch_event ret = (cPtr == IntPtr.Zero) ? null : new switch_event(cPtr, false);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public string serialized_string {
|
|
|
|
set {
|
|
|
|
freeswitchPINVOKE.Event_serialized_string_set(swigCPtr, value);
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
string ret = freeswitchPINVOKE.Event_serialized_string_get(swigCPtr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public int mine {
|
|
|
|
set {
|
|
|
|
freeswitchPINVOKE.Event_mine_set(swigCPtr, value);
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
int ret = freeswitchPINVOKE.Event_mine_get(swigCPtr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public Event(string type, string subclass_name) : this(freeswitchPINVOKE.new_Event__SWIG_0(type, subclass_name), true) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public Event(switch_event wrap_me, int free_me) : this(freeswitchPINVOKE.new_Event__SWIG_1(switch_event.getCPtr(wrap_me), free_me), true) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public string Serialize(string format) {
|
|
|
|
string ret = freeswitchPINVOKE.Event_Serialize(swigCPtr, format);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool SetPriority(switch_priority_t priority) {
|
|
|
|
bool ret = freeswitchPINVOKE.Event_SetPriority(swigCPtr, (int)priority);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public string GetHeader(string header_name) {
|
|
|
|
string ret = freeswitchPINVOKE.Event_GetHeader(swigCPtr, header_name);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public string GetBody() {
|
|
|
|
string ret = freeswitchPINVOKE.Event_GetBody(swigCPtr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public string GetEventType() {
|
|
|
|
string ret = freeswitchPINVOKE.Event_GetEventType(swigCPtr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool AddBody(string value) {
|
|
|
|
bool ret = freeswitchPINVOKE.Event_AddBody(swigCPtr, value);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool AddHeader(string header_name, string value) {
|
|
|
|
bool ret = freeswitchPINVOKE.Event_AddHeader(swigCPtr, header_name, value);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool DeleteHeader(string header_name) {
|
|
|
|
bool ret = freeswitchPINVOKE.Event_DeleteHeader(swigCPtr, header_name);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool Fire() {
|
|
|
|
bool ret = freeswitchPINVOKE.Event_Fire(swigCPtr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|