-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathFSEvent.cs
28 lines (25 loc) · 900 Bytes
/
FSEvent.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using FreeSWITCH.Native;
namespace FSClient {
public class FSEvent : EventArgs {
private switch_event evt;
public FSEvent(switch_event evt) {
this.evt = evt;
}
public string get_header(string name) {
return freeswitch.switch_event_get_header_idx(evt, name, -1);
//for (var x = evt.headers; x != null; x = x.next){
// if (name.ToLower() == x.name.ToLower())
// return x.value;
//}
//return null;
}
public string body { get { return evt.body; } }
public int flags { get { return evt.flags; } }
public uint key { get { return evt.key; } }
public string owner { get { return evt.owner; } }
public string subclass_name { get { return evt.subclass_name; } }
public switch_event_types_t event_id { get { return evt.event_id; } }
public switch_event_header first_header { get { return evt.headers; } }
}
}