-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfreeswitch_core.h
More file actions
143 lines (130 loc) · 2.33 KB
/
freeswitch_core.h
File metadata and controls
143 lines (130 loc) · 2.33 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#ifndef FREESWITCH_CORE_H
#define FREESWITCH_CORE_H
SWITCH_BEGIN_EXTERN_C
#include <switch.h>
#include <switch_cpp.h>
typedef void (*hangupFunction) (void);
typedef char *(*inputFunction) (void *, switch_input_type_t);
#ifndef SWIG
struct mod_core_globals {
switch_memory_pool_t *pool;
};
typedef struct mod_core_globals mod_core_globals;
extern mod_core_globals core_globals;
#endif
#ifdef _CORE
#define ATTACH_THREADS
#endif
#ifdef WIN32
#define RESULT_FREE(x) CoTaskMemFree(x)
#else
#define RESULT_FREE(x) free(x)
#endif
SWITCH_END_EXTERN_C
#ifdef _CORE
struct switch_core_session {
char foo[];
};
struct apr_pool_t {
char foo[];
};
struct switch_channel {
char foo[];
};
struct apr_thread_t {
char foo[];
};
struct switch_hash {
char foo[];
};
struct apr_thread_mutex_t {
char foo[];
};
struct switch_network_list {
char foo[];
};
struct switch_xml_binding {
char foo[];
};
struct apr_sockaddr_t {
char foo[];
};
struct switch_core_port_allocator {
char foo[];
};
struct switch_media_bug {
char foo[];
};
struct switch_rtp {
char foo[];
};
struct sqlite3_stmt {
char foo[];
};
struct switch_buffer {
char foo[];
};
struct switch_ivr_menu {
char foo[];
};
struct switch_event_node {
char foo[];
};
struct switch_ivr_digit_stream_parser {
char foo[];
};
struct sqlite3 {
char foo[];
};
struct switch_ivr_digit_stream {
char foo[];
};
struct real_pcre {
char foo[];
};
struct HashElem {
char foo[];
};
struct switch_ivr_menu_xml_ctx {
char foo[];
};
struct apr_file_t {
char foo[];
};
struct apr_thread_rwlock_t {
char foo[];
};
struct apr_pollfd_t {
char foo[];
};
struct apr_queue_t {
char foo[];
};
struct apr_socket_t {
char foo[];
};
#ifdef __cplusplus_cli
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::InteropServices;
public ref class FreeSwitchCore {
public:
static Assembly ^ mod_dotnet_core;
static MethodInfo ^ loadMethod;
};
#endif
#endif
class ManagedSession:public CoreSession {
public:
ManagedSession(void);
ManagedSession(char *uuid);
ManagedSession(switch_core_session_t *session);
virtual ~ ManagedSession();
virtual bool begin_allow_threads();
virtual bool end_allow_threads();
virtual void check_hangup_hook();
virtual switch_status_t run_dtmf_callback(void *input, switch_input_type_t itype);
inputFunction dtmfDelegate;
hangupFunction hangupDelegate;
};
#endif