1#![allow(non_camel_case_types,
3 non_upper_case_globals,
4 non_snake_case)]
5
6use std;
7use std::os::raw::*;
8
9pub fn str_to_ptr(s: &str) -> *mut c_char {
13 unsafe {
14 let res = ::libc::malloc(s.len() + 1) as *mut c_char;
15 std::ptr::copy_nonoverlapping(s.as_ptr(), res as *mut u8, s.len());
16 *res.offset(s.len() as isize + 1) = 0;
17 res
18 }
19}
20
21pub type time_t = c_long;
22
23#[repr(C)]
24#[derive(Copy, Clone)]
25#[derive(Debug)]
26pub struct timeval {
27 pub tv_sec: c_long,
28 pub tv_usec: c_long,
29}
30impl std::default::Default for timeval {
31 fn default() -> Self {
32 unsafe { std::mem::zeroed() }
33 }
34}
35pub enum FILE {}
36
37#[repr(C)]
38#[derive(Copy, Clone)]
39#[derive(Debug)]
40pub struct in6_addr {
41 pub __in6_u: [u32; 4usize],
42}
43impl std::default::Default for in6_addr {
44 fn default() -> Self {
45 unsafe { std::mem::zeroed() }
46 }
47}
48
49#[repr(C)]
50#[derive(Copy, Clone)]
51#[derive(Debug)]
52pub struct cJSON {
53 pub next: *mut cJSON,
54 pub prev: *mut cJSON,
55 pub child: *mut cJSON,
56 pub type_: c_int,
57 pub valuestring: *mut c_char,
58 pub valueint: c_int,
59 pub valuedouble: f64,
60 pub string: *mut c_char,
61}
62impl std::default::Default for cJSON {
63 fn default() -> Self {
64 unsafe { std::mem::zeroed() }
65 }
66}
67#[repr(C)]
68#[derive(Copy, Clone)]
69#[derive(Debug)]
70pub struct cJSON_Hooks {
71 pub malloc_fn: std::option::Option<extern "C" fn(sz: usize) -> *mut c_void>,
72 pub free_fn: std::option::Option<unsafe extern "C" fn(ptr: *mut c_void)>,
73}
74impl std::default::Default for cJSON_Hooks {
75 fn default() -> Self {
76 unsafe { std::mem::zeroed() }
77 }
78}
79#[derive(Copy, Clone)]
80#[repr(u32)]
81#[derive(Debug)]
82pub enum vpx_img_fmt {
83 NONE = 0,
84 RGB24 = 1,
85 RGB32 = 2,
86 RGB565 = 3,
87 RGB555 = 4,
88 UYVY = 5,
89 YUY2 = 6,
90 YVYU = 7,
91 BGR24 = 8,
92 RGB32_LE = 9,
93 ARGB = 10,
94 ARGB_LE = 11,
95 RGB565_LE = 12,
96 RGB555_LE = 13,
97 YV12 = 769,
98 I420 = 258,
99 VPXYV12 = 771,
100 VPXI420 = 260,
101 I422 = 261,
102 I444 = 262,
103 I440 = 263,
104 _444A = 1286,
105 I42016 = 2306,
106 I42216 = 2309,
107 I44416 = 2310,
108 I44016 = 2311,
109}
110#[derive(Copy, Clone)]
111#[repr(u32)]
112#[derive(Debug)]
113pub enum vpx_color_space {
114 UNKNOWN = 0,
115 BT_601 = 1,
116 BT_709 = 2,
117 SMPTE_170 = 3,
118 SMPTE_240 = 4,
119 BT_2020 = 5,
120 RESERVED = 6,
121 SRGB = 7,
122}
123#[derive(Copy, Clone)]
124#[repr(u32)]
125#[derive(Debug)]
126pub enum vpx_color_range {
127 STUDIO_RANGE = 0,
128 FULL_RANGE = 1,
129}
130#[repr(C)]
131#[derive(Copy, Clone)]
132#[derive(Debug)]
133pub struct vpx_image {
134 pub fmt: vpx_img_fmt,
135 pub cs: vpx_color_space,
136 pub range: vpx_color_range,
137 pub w: c_uint,
138 pub h: c_uint,
139 pub bit_depth: c_uint,
140 pub d_w: c_uint,
141 pub d_h: c_uint,
142 pub r_w: c_uint,
143 pub r_h: c_uint,
144 pub x_chroma_shift: c_uint,
145 pub y_chroma_shift: c_uint,
146 pub planes: [*mut c_uchar; 4usize],
147 pub stride: [c_int; 4usize],
148 pub bps: c_int,
149 pub user_priv: *mut c_void,
150 pub img_data: *mut c_uchar,
151 pub img_data_owner: c_int,
152 pub self_allocd: c_int,
153 pub fb_priv: *mut c_void,
154}
155impl std::default::Default for vpx_image {
156 fn default() -> Self {
157 unsafe { std::mem::zeroed() }
158 }
159}
160#[repr(C)]
161#[derive(Copy, Clone)]
162#[derive(Debug)]
163pub struct vpx_image_rect {
164 pub x: c_uint,
165 pub y: c_uint,
166 pub w: c_uint,
167 pub h: c_uint,
168}
169impl std::default::Default for vpx_image_rect {
170 fn default() -> Self {
171 unsafe { std::mem::zeroed() }
172 }
173}
174#[derive(Copy, Clone)]
175#[repr(u32)]
176#[derive(Debug)]
177pub enum pvt_class {
178 PRIMARY = 0,
179 SECONDARY = 1,
180}
181#[derive(Copy, Clone)]
182#[repr(u32)]
183#[derive(Debug)]
184pub enum dtmf_source {
185 UNKNOWN = 0,
186 INBAND_AUDIO = 1,
187 RTP = 2,
188 ENDPOINT = 3,
189 APP = 4,
190}
191#[derive(Copy, Clone)]
192#[repr(u32)]
193#[derive(Debug)]
194pub enum digit_action_target {
195 SELF = 0,
196 PEER = 1,
197 BOTH = 2,
198}
199#[derive(Copy, Clone)]
200#[repr(u32)]
201#[derive(Debug)]
202pub enum dtmf_flag {
203 SKIP_PROCESS = 1,
204 SENSITIVE = 2,
205}
206#[repr(C)]
207#[derive(Copy, Clone)]
208#[derive(Debug)]
209pub struct dtmf {
210 pub digit: c_char,
211 pub duration: u32,
212 pub flags: i32,
213 pub source: dtmf_source,
214}
215impl std::default::Default for dtmf {
216 fn default() -> Self {
217 unsafe { std::mem::zeroed() }
218 }
219}
220#[derive(Copy, Clone)]
221#[repr(u32)]
222#[derive(Debug)]
223pub enum call_direction {
224 INBOUND = 0,
225 OUTBOUND = 1,
226}
227#[derive(Copy, Clone)]
228#[repr(u32)]
229#[derive(Debug)]
230pub enum bind_flag_enum {
231 DIAL_ALEG = 1,
232 EXEC_ALEG = 2,
233 DIAL_BLEG = 4,
234 EXEC_BLEG = 8,
235 EXEC_OPPOSITE = 16,
236 EXEC_SAME = 32,
237 ONCE = 64,
238 EXEC_INLINE = 128,
239}
240pub type bind_flag = u32;
241#[derive(Copy, Clone)]
242#[repr(u32)]
243#[derive(Debug)]
244pub enum dtmf_direction {
245 RECV = 0,
246 SEND = 1,
247}
248#[derive(Copy, Clone)]
249#[repr(u32)]
250#[derive(Debug)]
251pub enum originate_flag_enum {
252 NONE = 0,
253 NOBLOCK = 1,
254 FORKED_DIAL = 2,
255 NO_EFFECTIVE_ANI = 4,
256 NO_EFFECTIVE_ANIII = 8,
257 NO_EFFECTIVE_CID_NUM = 16,
258 NO_EFFECTIVE_CID_NAME = 32,
259 NO_LIMITS = 64,
260}
261pub type originate_flag = u32;
262#[derive(Copy, Clone)]
263#[repr(u32)]
264#[derive(Debug)]
265pub enum port_flag_enum {
266 NONE = 0,
267 ODD = 1,
268 EVEN = 2,
269 ROBUST_TCP = 4,
270 ROBUST_UDP = 8,
271}
272pub type port_flag = u32;
273#[derive(Copy, Clone)]
274#[repr(u32)]
275#[derive(Debug)]
276pub enum eavesdrop_flag_enum {
277 NONE = 0,
278 MUX_READ = 1,
279 MUX_WRITE = 2,
280 DTMF = 4,
281 COPY_DISPLAY = 8,
282 BRIDGE_READ = 16,
283 BRIDGE_WRITE = 32,
284}
285pub type eavesdrop_flag = u32;
286#[derive(Copy, Clone)]
287#[repr(u32)]
288#[derive(Debug)]
289pub enum core_flag_enum {
290 NONE = 0,
291 USE_SQL = 1,
292 NO_NEW_OUTBOUND_SESSIONS = 2,
293 NO_NEW_INBOUND_SESSIONS = 4,
294 NO_NEW_SESSIONS = 6,
295 SHUTTING_DOWN = 8,
296 VG = 16,
297 RESTART = 32,
298 SHUTDOWN_REQUESTED = 64,
299 USE_AUTO_NAT = 128,
300 EARLY_HANGUP = 256,
301 CALIBRATE_CLOCK = 512,
302 USE_HEAVY_TIMING = 1024,
303 USE_CLOCK_RT = 2048,
304 VERBOSE_EVENTS = 4096,
305 USE_WIN32_MONOTONIC = 8192,
306 AUTO_SCHEMAS = 16384,
307 MINIMAL = 32768,
308 USE_NAT_MAPPING = 65536,
309 CLEAR_SQL = 131072,
310 THREADED_SYSTEM_EXEC = 262144,
311 SYNC_CLOCK_REQUESTED = 524288,
312 CORE_NON_SQLITE_DB_REQ = 1048576,
313 DEBUG_SQL = 2097152,
314 API_EXPANSION = 4194304,
315 SESSION_THREAD_POOL = 8388608,
316 DIALPLAN_TIMESTAMPS = 16777216,
317}
318pub type core_flag = u32;
319#[derive(Copy, Clone)]
320#[repr(u32)]
321#[derive(Debug)]
322pub enum module_interface_name {
323 ENDPOINT_INTERFACE = 0,
324 TIMER_INTERFACE = 1,
325 DIALPLAN_INTERFACE = 2,
326 CODEC_INTERFACE = 3,
327 APPLICATION_INTERFACE = 4,
328 API_INTERFACE = 5,
329 FILE_INTERFACE = 6,
330 SPEECH_INTERFACE = 7,
331 DIRECTORY_INTERFACE = 8,
332 CHAT_INTERFACE = 9,
333 SAY_INTERFACE = 10,
334 ASR_INTERFACE = 11,
335 MANAGEMENT_INTERFACE = 12,
336 LIMIT_INTERFACE = 13,
337 CHAT_APPLICATION_INTERFACE = 14,
338 JSON_API_INTERFACE = 15,
339}
340#[derive(Copy, Clone)]
341#[repr(u32)]
342#[derive(Debug)]
343pub enum unicast_flag_enum {
344 NONE = 0,
345 THREAD_RUNNING = 1,
346 READY = 2,
347 NATIVE = 4,
348}
349pub type unicast_flag = u32;
350#[derive(Copy, Clone)]
351#[repr(u32)]
352#[derive(Debug)]
353pub enum switch_bool {
354 FALSE = 0,
355 TRUE = 1,
356}
357#[derive(Copy, Clone)]
358#[repr(u32)]
359#[derive(Debug)]
360pub enum say_method {
361 NA = 0,
362 PRONOUNCED = 1,
363 ITERATED = 2,
364 COUNTED = 3,
365 PRONOUNCED_YEAR = 4,
366}
367#[derive(Copy, Clone)]
368#[repr(u32)]
369#[derive(Debug)]
370pub enum say_type {
371 NUMBER = 0,
372 ITEMS = 1,
373 PERSONS = 2,
374 MESSAGES = 3,
375 CURRENCY = 4,
376 TIME_MEASUREMENT = 5,
377 CURRENT_DATE = 6,
378 CURRENT_TIME = 7,
379 CURRENT_DATE_TIME = 8,
380 TELEPHONE_NUMBER = 9,
381 TELEPHONE_EXTENSION = 10,
382 URL = 11,
383 IP_ADDRESS = 12,
384 EMAIL_ADDRESS = 13,
385 POSTAL_ADDRESS = 14,
386 ACCOUNT_NUMBER = 15,
387 NAME_SPELLED = 16,
388 NAME_PHONETIC = 17,
389 SHORT_DATE_TIME = 18,
390}
391#[derive(Copy, Clone)]
392#[repr(u32)]
393#[derive(Debug)]
394pub enum say_gender {
395 MASCULINE = 0,
396 FEMININE = 1,
397 NEUTER = 2,
398 UTRUM = 3,
399}
400#[derive(Copy, Clone)]
401#[repr(u32)]
402#[derive(Debug)]
403pub enum management_action {
404 NONE = 0,
405 GET = 1,
406 SET = 2,
407}
408#[derive(Copy, Clone)]
409#[repr(u32)]
410#[derive(Debug)]
411pub enum scheduler_flag_enum {
412 NONE = 0,
413 OWN_THREAD = 1,
414 FREE_ARG = 2,
415 NO_DEL = 4,
416}
417pub type scheduler_flag = u32;
418#[derive(Copy, Clone)]
419#[repr(u32)]
420#[derive(Debug)]
421pub enum media_flag_enum {
422 NONE = 0,
423 REBRIDGE = 1,
424 ECHO_ALEG = 2,
425 ECHO_BLEG = 4,
426 FORCE = 8,
427 LOOP = 16,
428 HOLD_BLEG = 32,
429 IMMEDIATE = 64,
430 EXEC_INLINE = 128,
431 PRIORITY = 256,
432 REPLYONLY_A = 512,
433 REPLYONLY_B = 1024,
434}
435pub type media_flag = u32;
436#[derive(Copy, Clone)]
437#[repr(u32)]
438#[derive(Debug)]
439pub enum bitpack_mode {
440 RFC3551 = 0,
441 AAL2 = 1,
442}
443#[derive(Copy, Clone)]
444#[repr(u32)]
445#[derive(Debug)]
446pub enum abc_type {
447 INIT = 0,
448 READ = 1,
449 WRITE = 2,
450 WRITE_REPLACE = 3,
451 READ_REPLACE = 4,
452 READ_PING = 5,
453 TAP_NATIVE_READ = 6,
454 TAP_NATIVE_WRITE = 7,
455 CLOSE = 8,
456 READ_VIDEO_PING = 9,
457 WRITE_VIDEO_PING = 10,
458 STREAM_VIDEO_PING = 11,
459 VIDEO_PATCH = 12,
460}
461#[repr(C)]
462#[derive(Copy, Clone)]
463#[derive(Debug)]
464pub struct directories {
465 pub base_dir: *mut c_char,
466 pub mod_dir: *mut c_char,
467 pub conf_dir: *mut c_char,
468 pub log_dir: *mut c_char,
469 pub run_dir: *mut c_char,
470 pub db_dir: *mut c_char,
471 pub script_dir: *mut c_char,
472 pub temp_dir: *mut c_char,
473 pub htdocs_dir: *mut c_char,
474 pub grammar_dir: *mut c_char,
475 pub storage_dir: *mut c_char,
476 pub cache_dir: *mut c_char,
477 pub recordings_dir: *mut c_char,
478 pub sounds_dir: *mut c_char,
479 pub lib_dir: *mut c_char,
480 pub certs_dir: *mut c_char,
481 pub fonts_dir: *mut c_char,
482 pub images_dir: *mut c_char,
483 pub data_dir: *mut c_char,
484 pub localstate_dir: *mut c_char,
485}
486impl std::default::Default for directories {
487 fn default() -> Self {
488 unsafe { std::mem::zeroed() }
489 }
490}
491#[repr(C)]
492#[derive(Copy, Clone)]
493#[derive(Debug)]
494pub struct filenames {
495 pub conf_name: *mut c_char,
496}
497impl std::default::Default for filenames {
498 fn default() -> Self {
499 unsafe { std::mem::zeroed() }
500 }
501}
502#[derive(Copy, Clone)]
503#[repr(u32)]
504#[derive(Debug)]
505pub enum rw {
506 READ = 0,
507 WRITE = 1,
508}
509#[derive(Copy, Clone)]
510#[repr(u32)]
511#[derive(Debug)]
512pub enum caller_profile_flag_enum {
513 NONE = 0,
514 SCREEN = 1,
515 HIDE_NAME = 2,
516 HIDE_NUMBER = 4,
517}
518pub type caller_profile_flag = u32;
519#[derive(Copy, Clone)]
520#[repr(u32)]
521#[derive(Debug)]
522pub enum audio_col {
523 STR_TITLE = 1,
524 STR_COPYRIGHT = 2,
525 STR_SOFTWARE = 3,
526 STR_ARTIST = 4,
527 STR_COMMENT = 5,
528 STR_DATE = 6,
529}
530pub const XML_SECTION_MAX: xml_section_enum = xml_section_enum::CHANNELS;
531#[derive(Copy, Clone)]
532#[repr(u32)]
533#[derive(Debug)]
534pub enum xml_section_enum {
535 RESULT = 0,
536 CONFIG = 1,
537 DIRECTORY = 2,
538 DIALPLAN = 4,
539 LANGUAGES = 8,
540 CHATPLAN = 16,
541 CHANNELS = 32,
542}
543pub type xml_section = u32;
544#[derive(Copy, Clone)]
545#[repr(u32)]
546#[derive(Debug)]
547pub enum vad_flag_enum {
548 TALKING = 1,
549 EVENTS_TALK = 2,
550 EVENTS_NOTALK = 4,
551 CNG = 8,
552}
553pub type vad_flag = u32;
554#[repr(C)]
555#[derive(Copy, Clone)]
556#[derive(Debug)]
557pub struct error_period {
558 pub start: i64,
559 pub stop: i64,
560 pub next: *mut error_period,
561}
562impl std::default::Default for error_period {
563 fn default() -> Self {
564 unsafe { std::mem::zeroed() }
565 }
566}
567
568#[repr(C)]
569#[derive(Copy)]
570pub struct rtp_numbers {
571 pub raw_bytes: usize,
572 pub media_bytes: usize,
573 pub packet_count: usize,
574 pub period_packet_count: usize,
575 pub media_packet_count: usize,
576 pub skip_packet_count: usize,
577 pub jb_packet_count: usize,
578 pub dtmf_packet_count: usize,
579 pub cng_packet_count: usize,
580 pub flush_packet_count: usize,
581 pub largest_jb_size: usize,
582 pub last_proc_time: i64,
583 pub jitter_n: i64,
584 pub jitter_add: i64,
585 pub jitter_addsq: i64,
586 pub variance: f64,
587 pub min_variance: f64,
588 pub max_variance: f64,
589 pub std_deviation: f64,
590 pub lossrate: f64,
591 pub burstrate: f64,
592 pub mean_interval: f64,
593 pub loss: [c_int; 1024usize],
594 pub last_loss: c_int,
595 pub recved: c_int,
596 pub last_processed_seq: c_int,
597 pub flaws: usize,
598 pub last_flaw: usize,
599 pub R: f64,
600 pub mos: f64,
601 pub error_log: *mut error_period,
602}
603impl std::clone::Clone for rtp_numbers {
604 fn clone(&self) -> Self {
605 *self
606 }
607}
608impl std::default::Default for rtp_numbers {
609 fn default() -> Self {
610 unsafe { std::mem::zeroed() }
611 }
612}
613#[repr(C)]
614#[derive(Copy, Clone)]
615#[derive(Debug)]
616pub struct rtcp_numbers {
617 pub packet_count: u32,
618 pub octet_count: u32,
619 pub peer_ssrc: u32,
620 pub last_rpt_ts: u32,
621 pub ssrc: u32,
622 pub csrc: u32,
623 pub last_pkt_tsdiff: u32,
624 pub inter_jitter: f64,
625 pub last_rpt_ext_seq: u32,
626 pub last_rpt_cycle: u16,
627 pub period_pkt_count: u16,
628 pub pkt_count: u16,
629 pub sent_pkt_count: u16,
630 pub rtcp_rtp_count: u32,
631 pub high_ext_seq_recv: u32,
632 pub cycle: u16,
633 pub bad_seq: u32,
634 pub base_seq: u16,
635 pub cum_lost: u32,
636 pub last_recv_lsr_local: u32,
637 pub last_recv_lsr_peer: u32,
638 pub init: u32,
639}
640impl std::default::Default for rtcp_numbers {
641 fn default() -> Self {
642 unsafe { std::mem::zeroed() }
643 }
644}
645#[repr(C)]
646#[derive(Copy, Clone)]
647pub struct rtp_stats {
648 pub inbound: rtp_numbers,
649 pub outbound: rtp_numbers,
650 pub rtcp: rtcp_numbers,
651 pub read_count: u32,
652}
653impl std::default::Default for rtp_stats {
654 fn default() -> Self {
655 unsafe { std::mem::zeroed() }
656 }
657}
658#[derive(Copy, Clone)]
659#[repr(u32)]
660#[derive(Debug)]
661pub enum rtp_flush {
662 ONCE = 0,
663 STICK = 1,
664 UNSTICK = 2,
665}
666#[derive(Copy, Clone)]
667#[repr(u32)]
668#[derive(Debug)]
669pub enum rtp_flag {
670 NOBLOCK = 0,
671 DTMF_ON = 1,
672 IO = 2,
673 USE_TIMER = 3,
674 RTCP_PASSTHRU = 4,
675 SECURE_SEND = 5,
676 SECURE_RECV = 6,
677 AUTOADJ = 7,
678 RAW_WRITE = 8,
679 GOOGLEHACK = 9,
680 VAD = 10,
681 BREAK = 11,
682 UDPTL = 12,
683 DATAWAIT = 13,
684 BYTESWAP = 14,
685 PASS_RFC2833 = 15,
686 AUTO_CNG = 16,
687 SECURE_SEND_RESET = 17,
688 SECURE_RECV_RESET = 18,
689 PROXY_MEDIA = 19,
690 SHUTDOWN = 20,
691 FLUSH = 21,
692 AUTOFLUSH = 22,
693 STICKY_FLUSH = 23,
694 ZRTP_FLAG_SECURE_SEND = 24,
695 ZRTP_FLAG_SECURE_RECV = 25,
696 ZRTP_FLAG_SECURE_MITM_SEND = 26,
697 ZRTP_FLAG_SECURE_MITM_RECV = 27,
698 DEBUG_RTP_READ = 28,
699 DEBUG_RTP_WRITE = 29,
700 VIDEO = 30,
701 ENABLE_RTCP = 31,
702 RTCP_MUX = 32,
703 KILL_JB = 33,
704 VIDEO_BREAK = 34,
705 PAUSE = 35,
706 FIR = 36,
707 PLI = 37,
708 RESET = 38,
709 MUTE = 39,
710 NACK = 40,
711 TMMBR = 41,
712 GEN_TS_DELTA = 42,
713 INVALID = 43,
714}
715#[derive(Copy, Clone)]
716#[repr(u32)]
717#[derive(Debug)]
718pub enum rtp_bug_flag {
719 NONE = 0,
720 CISCO_SKIP_MARK_BIT_2833 = 1,
721 SONUS_SEND_INVALID_TIMESTAMP_2833 = 2,
722 IGNORE_MARK_BIT = 4,
723 SEND_LINEAR_TIMESTAMPS = 8,
724 START_SEQ_AT_ZERO = 16,
725 NEVER_SEND_MARKER = 32,
726 IGNORE_DTMF_DURATION = 64,
727 ACCEPT_ANY_PACKETS = 128,
728 GEN_ONE_GEN_ALL = 256,
729 CHANGE_SSRC_ON_MARKER = 512,
730 FLUSH_JB_ON_DTMF = 1024,
731 ACCEPT_ANY_PAYLOAD = 2048,
732 ALWAYS_AUTO_ADJUST = 4096,
733}
734#[repr(C)]
735#[derive(Copy, Clone)]
736#[derive(Debug)]
737pub struct rtp_hdr {
738 pub _bindgen_bitfield_1_: c_uint,
739 pub _bindgen_bitfield_2_: c_uint,
740 pub _bindgen_bitfield_3_: c_uint,
741}
742impl std::default::Default for rtp_hdr {
743 fn default() -> Self {
744 unsafe { std::mem::zeroed() }
745 }
746}
747#[repr(C)]
748#[derive(Copy, Clone)]
749#[derive(Debug)]
750pub struct rtp_hdr_ext {
751 pub _bindgen_bitfield_1_: c_uint,
752}
753impl std::default::Default for rtp_hdr_ext {
754 fn default() -> Self {
755 unsafe { std::mem::zeroed() }
756 }
757}
758#[repr(C)]
759#[derive(Copy, Clone)]
760#[derive(Debug)]
761pub struct rtcp_hdr {
762 pub _bindgen_bitfield_1_: c_uint,
763}
764impl std::default::Default for rtcp_hdr {
765 fn default() -> Self {
766 unsafe { std::mem::zeroed() }
767 }
768}
769#[repr(C)]
770#[derive(Copy, Clone)]
771#[derive(Debug)]
772pub struct audio_buffer_header {
773 pub ts: u32,
774 pub len: u32,
775}
776impl std::default::Default for audio_buffer_header {
777 fn default() -> Self {
778 unsafe { std::mem::zeroed() }
779 }
780}
781#[derive(Copy, Clone)]
782#[repr(u32)]
783#[derive(Debug)]
784pub enum priority {
785 NORMAL = 0,
786 LOW = 1,
787 HIGH = 2,
788}
789#[derive(Copy, Clone)]
790#[repr(u32)]
791#[derive(Debug)]
792pub enum ivr_option_enum {
793 NONE = 0,
794 ASYNC = 1,
795 FILE = 2,
796}
797pub type ivr_option = u32;
798#[derive(Copy, Clone)]
799#[repr(u32)]
800#[derive(Debug)]
801pub enum core_session_message_types {
802 REDIRECT_AUDIO = 0,
803 TRANSMIT_TEXT = 1,
804 INDICATE_ANSWER = 2,
805 INDICATE_PROGRESS = 3,
806 INDICATE_BRIDGE = 4,
807 INDICATE_UNBRIDGE = 5,
808 INDICATE_TRANSFER = 6,
809 INDICATE_RINGING = 7,
810 INDICATE_ALERTING = 8,
811 INDICATE_MEDIA = 9,
812 INDICATE_3P_MEDIA = 10,
813 INDICATE_NOMEDIA = 11,
814 INDICATE_3P_NOMEDIA = 12,
815 INDICATE_HOLD = 13,
816 INDICATE_UNHOLD = 14,
817 INDICATE_REDIRECT = 15,
818 INDICATE_RESPOND = 16,
819 INDICATE_BROADCAST = 17,
820 INDICATE_MEDIA_REDIRECT = 18,
821 INDICATE_DEFLECT = 19,
822 INDICATE_VIDEO_REFRESH_REQ = 20,
823 INDICATE_DISPLAY = 21,
824 INDICATE_TRANSCODING_NECESSARY = 22,
825 INDICATE_AUDIO_SYNC = 23,
826 INDICATE_VIDEO_SYNC = 24,
827 INDICATE_REQUEST_IMAGE_MEDIA = 25,
828 INDICATE_UUID_CHANGE = 26,
829 INDICATE_SIMPLIFY = 27,
830 INDICATE_DEBUG_MEDIA = 28,
831 INDICATE_PROXY_MEDIA = 29,
832 INDICATE_APPLICATION_EXEC = 30,
833 INDICATE_APPLICATION_EXEC_COMPLETE = 31,
834 INDICATE_PHONE_EVENT = 32,
835 INDICATE_T38_DESCRIPTION = 33,
836 INDICATE_UDPTL_MODE = 34,
837 INDICATE_CLEAR_PROGRESS = 35,
838 INDICATE_JITTER_BUFFER = 36,
839 INDICATE_RECOVERY_REFRESH = 37,
840 INDICATE_SIGNAL_DATA = 38,
841 INDICATE_MESSAGE = 39,
842 INDICATE_INFO = 40,
843 INDICATE_AUDIO_DATA = 41,
844 INDICATE_BLIND_TRANSFER_RESPONSE = 42,
845 INDICATE_STUN_ERROR = 43,
846 INDICATE_MEDIA_RENEG = 44,
847 INDICATE_KEEPALIVE = 45,
848 INDICATE_HARD_MUTE = 46,
849 INDICATE_BITRATE_REQ = 47,
850 INDICATE_BITRATE_ACK = 48,
851 INDICATE_CODEC_DEBUG_REQ = 49,
852 INDICATE_CODEC_SPECIFIC_REQ = 50,
853 REFER_EVENT = 51,
854 ANSWER_EVENT = 52,
855 PROGRESS_EVENT = 53,
856 RING_EVENT = 54,
857 RESAMPLE_EVENT = 55,
858 HEARTBEAT_EVENT = 56,
859 INVALID = 57,
860}
861#[repr(C)]
862#[derive(Copy, Clone)]
863#[derive(Debug)]
864pub struct t38_options {
865 pub T38FaxVersion: u16,
866 pub T38MaxBitRate: u32,
867 pub T38FaxFillBitRemoval: switch_bool,
868 pub T38FaxTranscodingMMR: switch_bool,
869 pub T38FaxTranscodingJBIG: switch_bool,
870 pub T38FaxRateManagement: *const c_char,
871 pub T38FaxMaxBuffer: u32,
872 pub T38FaxMaxDatagram: u32,
873 pub T38FaxUdpEC: *const c_char,
874 pub T38VendorInfo: *const c_char,
875 pub remote_ip: *const c_char,
876 pub remote_port: u16,
877 pub local_ip: *const c_char,
878 pub local_port: u16,
879 pub sdp_o_line: *const c_char,
880}
881impl std::default::Default for t38_options {
882 fn default() -> Self {
883 unsafe { std::mem::zeroed() }
884 }
885}
886#[derive(Copy, Clone)]
887#[repr(u32)]
888#[derive(Debug)]
889pub enum stack {
890 BOTTOM = 1,
891 TOP = 2,
892 NODUP = 4,
893 UNSHIFT = 8,
894 PUSH = 16,
895}
896#[derive(Copy, Clone)]
897#[repr(u32)]
898#[derive(Debug)]
899pub enum status {
900 SUCCESS = 0,
901 FALSE = 1,
902 TIMEOUT = 2,
903 RESTART = 3,
904 INTR = 4,
905 NOTIMPL = 5,
906 MEMERR = 6,
907 NOOP = 7,
908 RESAMPLE = 8,
909 GENERR = 9,
910 INUSE = 10,
911 BREAK = 11,
912 SOCKERR = 12,
913 MORE_DATA = 13,
914 NOTFOUND = 14,
915 UNLOAD = 15,
916 NOUNLOAD = 16,
917 IGNORE = 17,
918 TOO_SMALL = 18,
919 FOUND = 19,
920 CONTINUE = 20,
921 TERM = 21,
922 NOT_INITALIZED = 22,
923 TOO_LATE = 23,
924 XBREAK = 35,
925 WINBREAK = 730035,
926}
927#[derive(Copy, Clone)]
928#[repr(u32)]
929#[derive(Debug)]
930pub enum log_level {
931 DEBUG10 = 110,
932 DEBUG9 = 109,
933 DEBUG8 = 108,
934 DEBUG7 = 107,
935 DEBUG6 = 106,
936 DEBUG5 = 105,
937 DEBUG4 = 104,
938 DEBUG3 = 103,
939 DEBUG2 = 102,
940 DEBUG1 = 101,
941 DEBUG = 7,
942 INFO = 6,
943 NOTICE = 5,
944 WARNING = 4,
945 ERROR = 3,
946 CRIT = 2,
947 ALERT = 1,
948 CONSOLE = 0,
949 INVALID = 64,
950 UNINIT = 1000,
951}
952#[derive(Copy, Clone)]
953#[repr(u32)]
954#[derive(Debug)]
955pub enum text_channel {
956 ID_LOG = 0,
957 ID_LOG_CLEAN = 1,
958 ID_EVENT = 2,
959 ID_SESSION = 3,
960}
961#[derive(Copy, Clone)]
962#[repr(u32)]
963#[derive(Debug)]
964pub enum core_session_message_flag_enum {
965 DYNAMIC = 1,
966 FREE_STRING_REPLY = 2,
967 FREE_POINTER_REPLY = 4,
968}
969pub type core_session_message_flag = u32;
970#[derive(Copy, Clone)]
971#[repr(u32)]
972#[derive(Debug)]
973pub enum channel_callstate {
974 DOWN = 0,
975 DIALING = 1,
976 RINGING = 2,
977 EARLY = 3,
978 ACTIVE = 4,
979 HELD = 5,
980 RING_WAIT = 6,
981 HANGUP = 7,
982 UNHELD = 8,
983}
984#[derive(Copy, Clone)]
985#[repr(u32)]
986#[derive(Debug)]
987pub enum device_state {
988 DOWN = 0,
989 RINGING = 1,
990 ACTIVE = 2,
991 ACTIVE_MULTI = 3,
992 HELD = 4,
993 UNHELD = 5,
994 HANGUP = 6,
995}
996#[derive(Copy, Clone)]
997#[repr(u32)]
998#[derive(Debug)]
999pub enum channel_state {
1000 NEW = 0,
1001 INIT = 1,
1002 ROUTING = 2,
1003 SOFT_EXECUTE = 3,
1004 EXECUTE = 4,
1005 EXCHANGE_MEDIA = 5,
1006 PARK = 6,
1007 CONSUME_MEDIA = 7,
1008 HIBERNATE = 8,
1009 RESET = 9,
1010 HANGUP = 10,
1011 REPORTING = 11,
1012 DESTROY = 12,
1013 NONE = 13,
1014}
1015#[derive(Copy, Clone)]
1016#[repr(u32)]
1017#[derive(Debug)]
1018pub enum ring_ready {
1019 NONE = 0,
1020 RINGING = 1,
1021 QUEUED = 2,
1022}
1023#[derive(Copy, Clone)]
1024#[repr(u32)]
1025#[derive(Debug)]
1026pub enum channel_cap {
1027 MEDIA_ACK = 1,
1028 BYPASS_MEDIA = 2,
1029 PROXY_MEDIA = 3,
1030 JITTERBUFFER = 4,
1031 FS_RTP = 5,
1032 QUEUEABLE_DTMF_DELAY = 6,
1033 FLAG_MAX = 7,
1034}
1035#[derive(Copy, Clone)]
1036#[repr(u32)]
1037#[derive(Debug)]
1038pub enum channel_flag {
1039 ANSWERED = 1,
1040 OUTBOUND = 2,
1041 EARLY_MEDIA = 3,
1042 BRIDGE_ORIGINATOR = 4,
1043 UUID_BRIDGE_ORIGINATOR = 5,
1044 TRANSFER = 6,
1045 ACCEPT_CNG = 7,
1046 REDIRECT = 8,
1047 BRIDGED = 9,
1048 HOLD = 10,
1049 SERVICE = 11,
1050 TAGGED = 12,
1051 WINNER = 13,
1052 CONTROLLED = 14,
1053 PROXY_MODE = 15,
1054 PROXY_OFF = 16,
1055 SUSPEND = 17,
1056 EVENT_PARSE = 18,
1057 GEN_RINGBACK = 19,
1058 RING_READY = 20,
1059 BREAK = 21,
1060 BROADCAST = 22,
1061 UNICAST = 23,
1062 VIDEO = 24,
1063 EVENT_LOCK = 25,
1064 EVENT_LOCK_PRI = 26,
1065 RESET = 27,
1066 ORIGINATING = 28,
1067 STOP_BROADCAST = 29,
1068 PROXY_MEDIA = 30,
1069 INNER_BRIDGE = 31,
1070 REQ_MEDIA = 32,
1071 VERBOSE_EVENTS = 33,
1072 PAUSE_BUGS = 34,
1073 DIVERT_EVENTS = 35,
1074 BLOCK_STATE = 36,
1075 FS_RTP = 37,
1076 REPORTING = 38,
1077 PARK = 39,
1078 TIMESTAMP_SET = 40,
1079 ORIGINATOR = 41,
1080 XFER_ZOMBIE = 42,
1081 MEDIA_ACK = 43,
1082 THREAD_SLEEPING = 44,
1083 DISABLE_RINGBACK = 45,
1084 NOT_READY = 46,
1085 SIGNAL_BRIDGE_TTL = 47,
1086 MEDIA_BRIDGE_TTL = 48,
1087 BYPASS_MEDIA_AFTER_BRIDGE = 49,
1088 LEG_HOLDING = 50,
1089 BROADCAST_DROP_MEDIA = 51,
1090 EARLY_HANGUP = 52,
1091 MEDIA_SET = 53,
1092 CONSUME_ON_ORIGINATE = 54,
1093 PASSTHRU_PTIME_MISMATCH = 55,
1094 BRIDGE_NOWRITE = 56,
1095 RECOVERED = 57,
1096 JITTERBUFFER = 58,
1097 JITTERBUFFER_PLC = 59,
1098 DIALPLAN = 60,
1099 BLEG = 61,
1100 BLOCK_BROADCAST_UNTIL_MEDIA = 62,
1101 CNG_PLC = 63,
1102 ATTENDED_TRANSFER = 64,
1103 LAZY_ATTENDED_TRANSFER = 65,
1104 SIGNAL_DATA = 66,
1105 SIMPLIFY = 67,
1106 ZOMBIE_EXEC = 68,
1107 INTERCEPT = 69,
1108 INTERCEPTED = 70,
1109 VIDEO_REFRESH_REQ = 71,
1110 SERVICE_AUDIO = 72,
1111 SERVICE_VIDEO = 73,
1112 ZRTP_PASSTHRU_REQ = 74,
1113 ZRTP_PASSTHRU = 75,
1114 ZRTP_HASH = 76,
1115 CHANNEL_SWAP = 77,
1116 DEVICE_LEG = 78,
1117 FINAL_DEVICE_LEG = 79,
1118 PICKUP = 80,
1119 CONFIRM_BLIND_TRANSFER = 81,
1120 NO_PRESENCE = 82,
1121 CONFERENCE = 83,
1122 CONFERENCE_ADV = 84,
1123 RECOVERING = 85,
1124 RECOVERING_BRIDGE = 86,
1125 TRACKED = 87,
1126 TRACKABLE = 88,
1127 NO_CDR = 89,
1128 EARLY_OK = 90,
1129 MEDIA_TRANS = 91,
1130 HOLD_ON_BRIDGE = 92,
1131 SECURE = 93,
1132 LIBERAL_DTMF = 94,
1133 SLA_BARGE = 95,
1134 SLA_BARGING = 96,
1135 PROTO_HOLD = 97,
1136 HOLD_LOCK = 98,
1137 VIDEO_POSSIBLE = 99,
1138 NOTIMER_DURING_BRIDGE = 100,
1139 PASS_RFC2833 = 101,
1140 T38_PASSTHRU = 102,
1141 DROP_DTMF = 103,
1142 REINVITE = 104,
1143 AUTOFLUSH_DURING_BRIDGE = 105,
1144 RTP_NOTIMER_DURING_BRIDGE = 106,
1145 AVPF = 107,
1146 AVPF_MOZ = 108,
1147 ICE = 109,
1148 DTLS = 110,
1149 VERBOSE_SDP = 111,
1150 DTLS_OK = 112,
1151 _3PCC = 113,
1152 VIDEO_PASSIVE = 114,
1153 NOVIDEO = 115,
1154 VIDEO_BITRATE_UNMANAGABLE = 116,
1155 VIDEO_ECHO = 117,
1156 VIDEO_BLANK = 118,
1157 VIDEO_WRITING = 119,
1158 SLA_INTERCEPT = 120,
1159 VIDEO_BREAK = 121,
1160 AUDIO_PAUSE = 122,
1161 VIDEO_PAUSE_READ = 123,
1162 VIDEO_PAUSE_WRITE = 124,
1163 BYPASS_MEDIA_AFTER_HOLD = 125,
1164 HANGUP_HELD = 126,
1165 CONFERENCE_RESET_MEDIA = 127,
1166 VIDEO_DECODED_READ = 128,
1167 VIDEO_DEBUG_READ = 129,
1168 VIDEO_DEBUG_WRITE = 130,
1169 VIDEO_ONLY = 131,
1170 VIDEO_READY = 132,
1171 VIDEO_MIRROR_INPUT = 133,
1172 VIDEO_READ_FILE_ATTACHED = 134,
1173 VIDEO_WRITE_FILE_ATTACHED = 135,
1174 _3P_MEDIA_REQUESTED = 136,
1175 _3P_NOMEDIA_REQUESTED = 137,
1176 _3P_NOMEDIA_REQUESTED_BLEG = 138,
1177 VIDEO_SDP_RECVD = 139,
1178 FLAG_MAX = 140,
1179}
1180#[repr(C)]
1181#[derive(Copy, Clone)]
1182#[derive(Debug)]
1183pub struct vid_params {
1184 pub width: u32,
1185 pub height: u32,
1186 pub fps: u32,
1187}
1188impl std::default::Default for vid_params {
1189 fn default() -> Self {
1190 unsafe { std::mem::zeroed() }
1191 }
1192}
1193#[derive(Copy, Clone)]
1194#[repr(u32)]
1195#[derive(Debug)]
1196pub enum channel_app_flag {
1197 TAGGED = 1,
1198 T38 = 2,
1199 T38_REQ = 4,
1200 T38_FAIL = 8,
1201 T38_NEGOTIATED = 16,
1202}
1203#[derive(Copy, Clone)]
1204#[repr(u32)]
1205#[derive(Debug)]
1206pub enum frame_flag_enum {
1207 NONE = 0,
1208 CNG = 1,
1209 RAW_RTP = 2,
1210 RTP_HEADER = 4,
1211 PLC = 8,
1212 RFC2833 = 16,
1213 PROXY_PACKET = 32,
1214 DYNAMIC = 64,
1215 ZRTP = 128,
1216 UDPTL_PACKET = 256,
1217 NOT_AUDIO = 512,
1218 RTCP = 1024,
1219 MARKER = 2048,
1220 WAIT_KEY_FRAME = 4096,
1221 RAW_RTP_PARSE_FRAME = 8192,
1222 PICTURE_RESET = 16384,
1223 SAME_IMAGE = 32768,
1224 USE_VIDEO_TIMESTAMP = 65536,
1225 ENCODED = 131072,
1226}
1227pub type frame_flag = u32;
1228#[derive(Copy, Clone)]
1229#[repr(u32)]
1230#[derive(Debug)]
1231pub enum application_flag_enum {
1232 NONE = 0,
1233 SUPPORT_NOMEDIA = 1,
1234 ROUTING_EXEC = 2,
1235 MEDIA_TAP = 4,
1236 ZOMBIE_EXEC = 8,
1237 NO_LOOPBACK = 16,
1238}
1239pub type application_flag = u32;
1240#[derive(Copy, Clone)]
1241#[repr(u32)]
1242#[derive(Debug)]
1243pub enum chat_application_flag_enum {
1244 NONE = 0,
1245}
1246pub type chat_application_flag = u32;
1247#[derive(Copy, Clone)]
1248#[repr(u32)]
1249#[derive(Debug)]
1250pub enum signal {
1251 NONE = 0,
1252 KILL = 1,
1253 XFER = 2,
1254 BREAK = 3,
1255}
1256#[derive(Copy, Clone)]
1257#[repr(u32)]
1258#[derive(Debug)]
1259pub enum codec_flag_enum {
1260 ENCODE = 1,
1261 DECODE = 2,
1262 SILENCE_START = 4,
1263 SILENCE_STOP = 8,
1264 SILENCE = 16,
1265 FREE_POOL = 32,
1266 AAL2 = 64,
1267 PASSTHROUGH = 128,
1268 READY = 256,
1269 HAS_PLC = 32768,
1270 VIDEO_PATCHING = 65536,
1271}
1272pub type codec_flag = u32;
1273#[derive(Copy, Clone)]
1274#[repr(u32)]
1275#[derive(Debug)]
1276pub enum speech_flag_enum {
1277 NONE = 0,
1278 HASTEXT = 1,
1279 PEEK = 2,
1280 FREE_POOL = 4,
1281 BLOCKING = 8,
1282 PAUSE = 16,
1283 OPEN = 32,
1284 DONE = 64,
1285}
1286pub type speech_flag = u32;
1287#[derive(Copy, Clone)]
1288#[repr(u32)]
1289#[derive(Debug)]
1290pub enum asr_flag_enum {
1291 NONE = 0,
1292 DATA = 1,
1293 FREE_POOL = 2,
1294 CLOSED = 4,
1295 FIRE_EVENTS = 8,
1296 AUTO_RESUME = 16,
1297}
1298pub type asr_flag = u32;
1299#[derive(Copy, Clone)]
1300#[repr(u32)]
1301#[derive(Debug)]
1302pub enum directory_flag_enum {
1303 FREE_POOL = 1,
1304}
1305pub type directory_flag = u32;
1306#[derive(Copy, Clone)]
1307#[repr(u32)]
1308#[derive(Debug)]
1309pub enum codec_type {
1310 AUDIO = 0,
1311 VIDEO = 1,
1312 T38 = 2,
1313 APP = 3,
1314}
1315#[derive(Copy, Clone)]
1316#[repr(u32)]
1317#[derive(Debug)]
1318pub enum media_type {
1319 AUDIO = 0,
1320 VIDEO = 1,
1321}
1322#[derive(Copy, Clone)]
1323#[repr(u32)]
1324#[derive(Debug)]
1325pub enum switch_timer_flag_enum {
1326 FREE_POOL = 1,
1327}
1328pub type switch_timer_flag = u32;
1329#[derive(Copy, Clone)]
1330#[repr(u32)]
1331#[derive(Debug)]
1332pub enum media_bug_flag_enum {
1333 BOTH = 0,
1334 READ_STREAM = 1,
1335 WRITE_STREAM = 2,
1336 WRITE_REPLACE = 4,
1337 READ_REPLACE = 8,
1338 READ_PING = 16,
1339 STEREO = 32,
1340 ANSWER_REQ = 64,
1341 BRIDGE_REQ = 128,
1342 THREAD_LOCK = 256,
1343 PRUNE = 512,
1344 NO_PAUSE = 1024,
1345 STEREO_SWAP = 2048,
1346 LOCK = 4096,
1347 TAP_NATIVE_READ = 8192,
1348 TAP_NATIVE_WRITE = 16384,
1349 ONE_ONLY = 32768,
1350 MASK = 65536,
1351 READ_VIDEO_PING = 131072,
1352 WRITE_VIDEO_PING = 262144,
1353 READ_VIDEO_STREAM = 524288,
1354 WRITE_VIDEO_STREAM = 1048576,
1355 VIDEO_PATCH = 2097152,
1356 SPY_VIDEO_STREAM = 4194304,
1357 SPY_VIDEO_STREAM_BLEG = 8388608,
1358 READ_VIDEO_PATCH = 16777216,
1359}
1360pub type media_bug_flag = u32;
1361#[derive(Copy, Clone)]
1362#[repr(u32)]
1363#[derive(Debug)]
1364pub enum file_flag_enum {
1365 FLAG_READ = 1,
1366 FLAG_WRITE = 2,
1367 FLAG_FREE_POOL = 4,
1368 DATA_SHORT = 8,
1369 DATA_INT = 16,
1370 DATA_FLOAT = 32,
1371 DATA_DOUBLE = 64,
1372 DATA_RAW = 128,
1373 PAUSE = 256,
1374 NATIVE = 512,
1375 SEEK = 1024,
1376 OPEN = 2048,
1377 CALLBACK = 4096,
1378 DONE = 8192,
1379 BUFFER_DONE = 16384,
1380 WRITE_APPEND = 32768,
1381 WRITE_OVER = 65536,
1382 NOMUX = 131072,
1383 BREAK_ON_CHANGE = 262144,
1384 FLAG_VIDEO = 524288,
1385 FLAG_VIDEO_EOF = 1048576,
1386}
1387pub type file_flag = u32;
1388#[derive(Copy, Clone)]
1389#[repr(u32)]
1390#[derive(Debug)]
1391pub enum io_flag_enum {
1392 NONE = 0,
1393 NOBLOCK = 1,
1394 SINGLE_READ = 2,
1395 FORCE = 4,
1396}
1397pub type io_flag = u32;
1398#[derive(Copy, Clone)]
1399#[repr(u32)]
1400#[derive(Debug)]
1401pub enum event_types {
1402 CUSTOM = 0,
1403 CLONE = 1,
1404 CHANNEL_CREATE = 2,
1405 CHANNEL_DESTROY = 3,
1406 CHANNEL_STATE = 4,
1407 CHANNEL_CALLSTATE = 5,
1408 CHANNEL_ANSWER = 6,
1409 CHANNEL_HANGUP = 7,
1410 CHANNEL_HANGUP_COMPLETE = 8,
1411 CHANNEL_EXECUTE = 9,
1412 CHANNEL_EXECUTE_COMPLETE = 10,
1413 CHANNEL_HOLD = 11,
1414 CHANNEL_UNHOLD = 12,
1415 CHANNEL_BRIDGE = 13,
1416 CHANNEL_UNBRIDGE = 14,
1417 CHANNEL_PROGRESS = 15,
1418 CHANNEL_PROGRESS_MEDIA = 16,
1419 CHANNEL_OUTGOING = 17,
1420 CHANNEL_PARK = 18,
1421 CHANNEL_UNPARK = 19,
1422 CHANNEL_APPLICATION = 20,
1423 CHANNEL_ORIGINATE = 21,
1424 CHANNEL_UUID = 22,
1425 API = 23,
1426 LOG = 24,
1427 INBOUND_CHAN = 25,
1428 OUTBOUND_CHAN = 26,
1429 STARTUP = 27,
1430 SHUTDOWN = 28,
1431 PUBLISH = 29,
1432 UNPUBLISH = 30,
1433 TALK = 31,
1434 NOTALK = 32,
1435 SESSION_CRASH = 33,
1436 MODULE_LOAD = 34,
1437 MODULE_UNLOAD = 35,
1438 DTMF = 36,
1439 MESSAGE = 37,
1440 PRESENCE_IN = 38,
1441 NOTIFY_IN = 39,
1442 PRESENCE_OUT = 40,
1443 PRESENCE_PROBE = 41,
1444 MESSAGE_WAITING = 42,
1445 MESSAGE_QUERY = 43,
1446 ROSTER = 44,
1447 CODEC = 45,
1448 BACKGROUND_JOB = 46,
1449 DETECTED_SPEECH = 47,
1450 DETECTED_TONE = 48,
1451 PRIVATE_COMMAND = 49,
1452 HEARTBEAT = 50,
1453 TRAP = 51,
1454 ADD_SCHEDULE = 52,
1455 DEL_SCHEDULE = 53,
1456 EXE_SCHEDULE = 54,
1457 RE_SCHEDULE = 55,
1458 RELOADXML = 56,
1459 NOTIFY = 57,
1460 PHONE_FEATURE = 58,
1461 PHONE_FEATURE_SUBSCRIBE = 59,
1462 SEND_MESSAGE = 60,
1463 RECV_MESSAGE = 61,
1464 REQUEST_PARAMS = 62,
1465 CHANNEL_DATA = 63,
1466 GENERAL = 64,
1467 COMMAND = 65,
1468 SESSION_HEARTBEAT = 66,
1469 CLIENT_DISCONNECTED = 67,
1470 SERVER_DISCONNECTED = 68,
1471 SEND_INFO = 69,
1472 RECV_INFO = 70,
1473 RECV_RTCP_MESSAGE = 71,
1474 CALL_SECURE = 72,
1475 NAT = 73,
1476 RECORD_START = 74,
1477 RECORD_STOP = 75,
1478 PLAYBACK_START = 76,
1479 PLAYBACK_STOP = 77,
1480 CALL_UPDATE = 78,
1481 FAILURE = 79,
1482 SOCKET_DATA = 80,
1483 MEDIA_BUG_START = 81,
1484 MEDIA_BUG_STOP = 82,
1485 CONFERENCE_DATA_QUERY = 83,
1486 CONFERENCE_DATA = 84,
1487 CALL_SETUP_REQ = 85,
1488 CALL_SETUP_RESULT = 86,
1489 CALL_DETAIL = 87,
1490 DEVICE_STATE = 88,
1491 ALL = 89,
1492}
1493#[derive(Copy, Clone)]
1494#[repr(u32)]
1495#[derive(Debug)]
1496pub enum input_type {
1497 INPUT_TYPE_DTMF = 0,
1498 INPUT_TYPE_EVENT = 1,
1499}
1500#[derive(Copy, Clone)]
1501#[repr(u32)]
1502#[derive(Debug)]
1503pub enum call_cause {
1504 NONE = 0,
1505 UNALLOCATED_NUMBER = 1,
1506 NO_ROUTE_TRANSIT_NET = 2,
1507 NO_ROUTE_DESTINATION = 3,
1508 CHANNEL_UNACCEPTABLE = 6,
1509 CALL_AWARDED_DELIVERED = 7,
1510 NORMAL_CLEARING = 16,
1511 USER_BUSY = 17,
1512 NO_USER_RESPONSE = 18,
1513 NO_ANSWER = 19,
1514 SUBSCRIBER_ABSENT = 20,
1515 CALL_REJECTED = 21,
1516 NUMBER_CHANGED = 22,
1517 REDIRECTION_TO_NEW_DESTINATION = 23,
1518 EXCHANGE_ROUTING_ERROR = 25,
1519 DESTINATION_OUT_OF_ORDER = 27,
1520 INVALID_NUMBER_FORMAT = 28,
1521 FACILITY_REJECTED = 29,
1522 RESPONSE_TO_STATUS_ENQUIRY = 30,
1523 NORMAL_UNSPECIFIED = 31,
1524 NORMAL_CIRCUIT_CONGESTION = 34,
1525 NETWORK_OUT_OF_ORDER = 38,
1526 NORMAL_TEMPORARY_FAILURE = 41,
1527 CONGESTION = 42,
1528 ACCESS_INFO_DISCARDED = 43,
1529 REQUESTED_CHAN_UNAVAIL = 44,
1530 PRE_EMPTED = 45,
1531 FACILITY_NOT_SUBSCRIBED = 50,
1532 OUTGOING_CALL_BARRED = 52,
1533 INCOMING_CALL_BARRED = 54,
1534 BEARERCAPABILITY_NOTAUTH = 57,
1535 BEARERCAPABILITY_NOTAVAIL = 58,
1536 SERVICE_UNAVAILABLE = 63,
1537 BEARERCAPABILITY_NOTIMPL = 65,
1538 CHAN_NOT_IMPLEMENTED = 66,
1539 FACILITY_NOT_IMPLEMENTED = 69,
1540 SERVICE_NOT_IMPLEMENTED = 79,
1541 INVALID_CALL_REFERENCE = 81,
1542 INCOMPATIBLE_DESTINATION = 88,
1543 INVALID_MSG_UNSPECIFIED = 95,
1544 MANDATORY_IE_MISSING = 96,
1545 MESSAGE_TYPE_NONEXIST = 97,
1546 WRONG_MESSAGE = 98,
1547 IE_NONEXIST = 99,
1548 INVALID_IE_CONTENTS = 100,
1549 WRONG_CALL_STATE = 101,
1550 RECOVERY_ON_TIMER_EXPIRE = 102,
1551 MANDATORY_IE_LENGTH_ERROR = 103,
1552 PROTOCOL_ERROR = 111,
1553 INTERWORKING = 127,
1554 SUCCESS = 142,
1555 ORIGINATOR_CANCEL = 487,
1556 CRASH = 500,
1557 SYSTEM_SHUTDOWN = 501,
1558 LOSE_RACE = 502,
1559 MANAGER_REQUEST = 503,
1560 BLIND_TRANSFER = 600,
1561 ATTENDED_TRANSFER = 601,
1562 ALLOTTED_TIMEOUT = 602,
1563 USER_CHALLENGE = 603,
1564 MEDIA_TIMEOUT = 604,
1565 PICKED_OFF = 605,
1566 USER_NOT_REGISTERED = 606,
1567 PROGRESS_TIMEOUT = 607,
1568 INVALID_GATEWAY = 608,
1569 GATEWAY_DOWN = 609,
1570 INVALID_URL = 610,
1571 INVALID_PROFILE = 611,
1572 NO_PICKUP = 612,
1573 SRTP_READ_ERROR = 613,
1574}
1575#[derive(Copy, Clone)]
1576#[repr(u32)]
1577#[derive(Debug)]
1578pub enum session_ctl {
1579 PAUSE_INBOUND = 0,
1580 PAUSE_OUTBOUND = 1,
1581 PAUSE_ALL = 2,
1582 HUPALL = 3,
1583 SHUTDOWN = 4,
1584 CHECK_RUNNING = 5,
1585 LOGLEVEL = 6,
1586 SPS = 7,
1587 LAST_SPS = 8,
1588 RECLAIM = 9,
1589 MAX_SESSIONS = 10,
1590 SYNC_CLOCK = 11,
1591 MAX_DTMF_DURATION = 12,
1592 MIN_DTMF_DURATION = 13,
1593 DEFAULT_DTMF_DURATION = 14,
1594 SHUTDOWN_ELEGANT = 15,
1595 SHUTDOWN_ASAP = 16,
1596 CANCEL_SHUTDOWN = 17,
1597 SEND_SIGHUP = 18,
1598 DEBUG_LEVEL = 19,
1599 FLUSH_DB_HANDLES = 20,
1600 SHUTDOWN_NOW = 21,
1601 REINCARNATE_NOW = 22,
1602 CALIBRATE_CLOCK = 23,
1603 SAVE_HISTORY = 24,
1604 CRASH = 25,
1605 MIN_IDLE_CPU = 26,
1606 VERBOSE_EVENTS = 27,
1607 SHUTDOWN_CHECK = 28,
1608 PAUSE_INBOUND_CHECK = 29,
1609 PAUSE_OUTBOUND_CHECK = 30,
1610 PAUSE_CHECK = 31,
1611 READY_CHECK = 32,
1612 THREADED_SYSTEM_EXEC = 33,
1613 SYNC_CLOCK_WHEN_IDLE = 34,
1614 DEBUG_SQL = 35,
1615 SQL = 36,
1616 API_EXPANSION = 37,
1617 RECOVER = 38,
1618 SPS_PEAK = 39,
1619 SPS_PEAK_FIVEMIN = 40,
1620 SESSIONS_PEAK = 41,
1621 SESSIONS_PEAK_FIVEMIN = 42,
1622}
1623#[derive(Copy, Clone)]
1624#[repr(u32)]
1625#[derive(Debug)]
1626pub enum state_handler_flag {
1627 STICKY = 1,
1628}
1629pub type os_socket = c_int;
1630pub enum apr_pool { }
1631pub type memory_pool = apr_pool;
1632pub type port = u16;
1633pub type payload = u8;
1634pub enum rtp { }
1635pub enum rtcp { }
1636pub enum event_subclass { }
1637pub enum event_node { }
1638pub enum loadable_module { }
1639pub enum channel { }
1640pub enum sql_queue_manager { }
1641pub enum core_session { }
1642pub enum buffer { }
1643pub enum odbc_handle { }
1644pub enum pgsql_handle { }
1645pub enum pgsql_result { }
1646pub enum core_port_allocator { }
1647pub enum media_bug { }
1648pub type hashtable_destructor = std::option::Option<unsafe extern "C" fn(ptr: *mut c_void)>;
1649#[repr(C)]
1650#[derive(Copy, Clone)]
1651#[derive(Debug)]
1652pub struct console_callback_match_node {
1653 pub val: *mut c_char,
1654 pub next: *mut console_callback_match_node,
1655}
1656impl std::default::Default for console_callback_match_node {
1657 fn default() -> Self {
1658 unsafe { std::mem::zeroed() }
1659 }
1660}
1661#[repr(C)]
1662#[derive(Copy, Clone)]
1663#[derive(Debug)]
1664pub struct console_callback_match {
1665 pub head: *mut console_callback_match_node,
1666 pub end: *mut console_callback_match_node,
1667 pub count: c_int,
1668 pub dynamic: c_int,
1669}
1670impl std::default::Default for console_callback_match {
1671 fn default() -> Self {
1672 unsafe { std::mem::zeroed() }
1673 }
1674}
1675pub type media_bug_exec_cb = std::option::Option<unsafe extern "C" fn(bug: *mut media_bug,
1676 user_data: *mut c_void)>;
1677pub type core_video_thread_callback_func =
1678 std::option::Option<unsafe extern "C" fn(session: *mut core_session,
1679 frame: *mut frame,
1680 user_data: *mut c_void)
1681 -> status>;
1682pub type cap_callback = std::option::Option<unsafe extern "C" fn(var: *const c_char,
1683 val: *const c_char,
1684 user_data: *mut c_void)>;
1685pub type console_complete_callback =
1686 std::option::Option<unsafe extern "C" fn(arg1: *const c_char,
1687 arg2: *const c_char,
1688 matches: *mut *mut console_callback_match)
1689 -> status>;
1690pub type media_bug_callback = std::option::Option<unsafe extern "C" fn(arg1: *mut media_bug,
1691 arg2: *mut c_void,
1692 arg3: abc_type)
1693 -> switch_bool>;
1694pub type tone_detect_callback = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
1695 arg2: *const c_char,
1696 arg3: *const c_char)
1697 -> switch_bool>;
1698pub enum xml_binding { }
1699pub type video_function = std::option::Option<unsafe extern "C" fn(session: *mut core_session,
1700 user_data: *mut c_void)>;
1701pub type core_codec_encode_func =
1702 std::option::Option<unsafe extern "C" fn(codec: *mut codec,
1703 other_codec: *mut codec,
1704 decoded_data: *mut c_void,
1705 decoded_data_len: u32,
1706 decoded_rate: u32,
1707 encoded_data: *mut c_void,
1708 encoded_data_len: *mut u32,
1709 encoded_rate: *mut u32,
1710 flag: *mut c_uint)
1711 -> status>;
1712pub type core_codec_decode_func =
1713 std::option::Option<unsafe extern "C" fn(codec: *mut codec,
1714 other_codec: *mut codec,
1715 encoded_data: *mut c_void,
1716 encoded_data_len: u32,
1717 encoded_rate: u32,
1718 decoded_data: *mut c_void,
1719 decoded_data_len: *mut u32,
1720 decoded_rate: *mut u32,
1721 flag: *mut c_uint)
1722 -> status>;
1723pub type core_codec_video_encode_func =
1724 std::option::Option<unsafe extern "C" fn(codec: *mut codec, frame: *mut frame) -> status>;
1725pub type core_codec_video_decode_func =
1726 std::option::Option<unsafe extern "C" fn(codec: *mut codec, frame: *mut frame) -> status>;
1727#[derive(Copy, Clone)]
1728#[repr(u32)]
1729#[derive(Debug)]
1730pub enum codec_control_command {
1731 SCC_VIDEO_GEN_KEYFRAME = 0,
1732 SCC_VIDEO_BANDWIDTH = 1,
1733 SCC_VIDEO_RESET = 2,
1734 SCC_AUDIO_PACKET_LOSS = 3,
1735 SCC_DEBUG = 4,
1736 SCC_CODEC_SPECIFIC = 5,
1737}
1738#[derive(Copy, Clone)]
1739#[repr(u32)]
1740#[derive(Debug)]
1741pub enum codec_control_type {
1742 SCCT_NONE = 0,
1743 SCCT_STRING = 1,
1744 SCCT_INT = 2,
1745}
1746#[derive(Copy, Clone)]
1747#[repr(u32)]
1748#[derive(Debug)]
1749pub enum io_type {
1750 IO_READ = 0,
1751 IO_WRITE = 1,
1752}
1753pub type core_codec_control_func =
1754 std::option::Option<unsafe extern "C" fn(codec: *mut codec,
1755 cmd: codec_control_command,
1756 ctype: codec_control_type,
1757 cmd_data: *mut c_void,
1758 atype: codec_control_type,
1759 cmd_arg: *mut c_void,
1760 rtype: *mut codec_control_type,
1761 ret_data: *mut *mut c_void)
1762 -> status>;
1763pub type core_codec_init_func =
1764 std::option::Option<unsafe extern "C" fn(arg1: *mut codec,
1765 arg2: codec_flag,
1766 codec_settings: *const codec_settings)
1767 -> status>;
1768pub type core_codec_fmtp_parse_func =
1769 std::option::Option<unsafe extern "C" fn(fmtp: *const c_char, codec_fmtp: *mut codec_fmtp)
1770 -> status>;
1771pub type core_codec_destroy_func = std::option::Option<unsafe extern "C" fn(arg1: *mut codec)
1772 -> status>;
1773pub type chat_application_function = std::option::Option<unsafe extern "C" fn(arg1: *mut event,
1774 arg2: *const c_char)
1775 -> status>;
1776pub type application_function = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
1777 arg2: *const c_char)>;
1778pub type core_recover_callback =
1779 std::option::Option<unsafe extern "C" fn(session: *mut core_session) -> c_int>;
1780pub type event_callback = std::option::Option<unsafe extern "C" fn(arg1: *mut event)>;
1781pub type dialplan_hunt_function =
1782 std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
1783 arg2: *mut c_void,
1784 arg3: *mut caller_profile)
1785 -> *mut caller_extension>;
1786pub type hash_delete_callback = std::option::Option<unsafe extern "C" fn(key: *const c_void,
1787 val: *const c_void,
1788 pData: *mut c_void)
1789 -> switch_bool>;
1790pub type scheduler_func = std::option::Option<unsafe extern "C" fn(task: *mut scheduler_task)>;
1791pub type state_handler = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session) -> status>;
1792pub type stream_handle_read_function =
1793 std::option::Option<unsafe extern "C" fn(handle: *mut stream_handle, len: *mut c_int) -> *mut u8>;
1794pub type stream_handle_write_function =
1795 std::option::Option<unsafe extern "C" fn(handle: *mut stream_handle, fmt: *const c_char, ...)
1796 -> status>;
1797pub type stream_handle_raw_write_function =
1798 std::option::Option<unsafe extern "C" fn(handle: *mut stream_handle,
1799 data: *mut u8,
1800 datalen: usize)
1801 -> status>;
1802pub type api_function = std::option::Option<unsafe extern "C" fn(cmd: *const c_char,
1803 session: *mut core_session,
1804 stream: *mut stream_handle)
1805 -> status>;
1806pub type json_api_function = std::option::Option<unsafe extern "C" fn(json: *const cJSON,
1807 session: *mut core_session,
1808 json_reply: *mut *mut cJSON)
1809 -> status>;
1810pub type input_callback_function =
1811 std::option::Option<unsafe extern "C" fn(session: *mut core_session,
1812 input: *mut c_void,
1813 input_type: input_type,
1814 buf: *mut c_void,
1815 buflen: c_uint)
1816 -> status>;
1817pub type read_frame_callback_function =
1818 std::option::Option<unsafe extern "C" fn(session: *mut core_session,
1819 frame: *mut frame,
1820 user_data: *mut c_void)
1821 -> status>;
1822#[derive(Copy, Clone)]
1823#[repr(u32)]
1824#[derive(Debug)]
1825pub enum dm_match_type {
1826 POSITIVE = 0,
1827 NEGATIVE = 1,
1828}
1829pub enum ivr_dmachine { }
1830#[repr(C)]
1831#[derive(Copy, Clone)]
1832#[derive(Debug)]
1833pub struct ivr_dmachine_match {
1834 pub dmachine: *mut ivr_dmachine,
1835 pub match_digits: *const c_char,
1836 pub match_key: i32,
1837 pub type_: dm_match_type,
1838 pub user_data: *mut c_void,
1839}
1840impl std::default::Default for ivr_dmachine_match {
1841 fn default() -> Self {
1842 unsafe { std::mem::zeroed() }
1843 }
1844}
1845pub type ivr_dmachine_callback =
1846 std::option::Option<unsafe extern "C" fn(match_: *mut ivr_dmachine_match) -> status>;
1847#[repr(C)]
1848#[derive(Copy, Clone)]
1849#[derive(Debug)]
1850pub struct input_args {
1851 pub input_callback: input_callback_function,
1852 pub buf: *mut c_void,
1853 pub buflen: u32,
1854 pub read_frame_callback: read_frame_callback_function,
1855 pub user_data: *mut c_void,
1856 pub dmachine: *mut ivr_dmachine,
1857 pub loops: c_int,
1858}
1859impl std::default::Default for input_args {
1860 fn default() -> Self {
1861 unsafe { std::mem::zeroed() }
1862 }
1863}
1864#[repr(C)]
1865#[derive(Copy, Clone)]
1866#[derive(Debug)]
1867pub struct say_args {
1868 pub type_: say_type,
1869 pub method: say_method,
1870 pub gender: say_gender,
1871 pub ext: *const c_char,
1872}
1873impl std::default::Default for say_args {
1874 fn default() -> Self {
1875 unsafe { std::mem::zeroed() }
1876 }
1877}
1878pub type say_callback = std::option::Option<unsafe extern "C" fn(session: *mut core_session,
1879 tosay: *mut c_char,
1880 say_args: *mut say_args,
1881 args: *mut input_args)
1882 -> status>;
1883pub type say_string_callback =
1884 std::option::Option<unsafe extern "C" fn(session: *mut core_session,
1885 tosay: *mut c_char,
1886 say_args: *mut say_args,
1887 rstr: *mut *mut c_char)
1888 -> status>;
1889pub enum say_file_handle { }
1890pub type new_say_callback = std::option::Option<unsafe extern "C" fn(sh: *mut say_file_handle,
1891 tosay: *mut c_char,
1892 say_args: *mut say_args)
1893 -> status>;
1894pub type xml_t = *mut xml;
1895pub type xml_open_root_function =
1896 std::option::Option<unsafe extern "C" fn(reload: u8,
1897 err: *mut *const c_char,
1898 user_data: *mut c_void)
1899 -> xml_t>;
1900pub type xml_search_function = std::option::Option<unsafe extern "C" fn(section: *const c_char,
1901 tag_name: *const c_char,
1902 key_name: *const c_char,
1903 key_value: *const c_char,
1904 params: *mut event,
1905 user_data: *mut c_void)
1906 -> xml_t>;
1907pub enum hashtable { }
1908pub enum hashtable_iterator { }
1909pub type hash = hashtable;
1910pub type inthash = hashtable;
1911pub type hash_index = hashtable_iterator;
1912pub enum network_list { }
1913pub type module_load =
1914 std::option::Option<unsafe extern "C" fn(module_interface:
1915 *mut *mut loadable_module_interface,
1916 pool:
1917 *mut memory_pool)
1918 -> status>;
1919pub type module_runtime = std::option::Option<extern "C" fn() -> status>;
1920pub type module_shutdown = std::option::Option<extern "C" fn() -> status>;
1921#[derive(Copy, Clone)]
1922#[repr(u32)]
1923#[derive(Debug)]
1924pub enum thread_priority {
1925 LOW = 1,
1926 NORMAL = 10,
1927 IMPORTANT = 50,
1928 REALTIME = 99,
1929}
1930#[derive(Copy, Clone)]
1931#[repr(u32)]
1932#[derive(Debug)]
1933pub enum module_flag_enum {
1934 NONE = 0,
1935 GLOBAL_SYMBOLS = 1,
1936}
1937pub type module_flag = u32;
1938#[repr(C)]
1939#[derive(Copy, Clone)]
1940#[derive(Debug)]
1941pub struct loadable_module_function_table {
1942 pub api_version: c_int,
1943 pub load: module_load,
1944 pub shutdown: module_shutdown,
1945 pub runtime: module_runtime,
1946 pub flags: module_flag,
1947}
1948impl std::default::Default for loadable_module_function_table {
1949 fn default() -> Self {
1950 unsafe { std::mem::zeroed() }
1951 }
1952}
1953pub type modulename_callback_func =
1954 std::option::Option<unsafe extern "C" fn(user_data: *mut c_void, module_name: *const c_char)
1955 -> c_int>;
1956pub enum ivr_digit_stream_parser { }
1957pub enum media_handle { }
1958pub type event_channel_id = u32;
1959pub type event_channel_func =
1960 std::option::Option<unsafe extern "C" fn(event_channel: *const c_char,
1961 json: *mut cJSON,
1962 key: *const c_char,
1963 id: event_channel_id)>;
1964pub enum live_array { }
1965#[derive(Copy, Clone)]
1966#[repr(u32)]
1967#[derive(Debug)]
1968pub enum sdp_type {
1969 REQUEST = 0,
1970 RESPONSE = 1,
1971}
1972#[derive(Copy, Clone)]
1973#[repr(u32)]
1974#[derive(Debug)]
1975pub enum rtp_crypto_key_type {
1976 AEAD_AES_256_GCM_8 = 0,
1977 AEAD_AES_128_GCM_8 = 1,
1978 AES_CM_256_HMAC_SHA1_80 = 2,
1979 AES_CM_192_HMAC_SHA1_80 = 3,
1980 AES_CM_128_HMAC_SHA1_80 = 4,
1981 AES_CM_256_HMAC_SHA1_32 = 5,
1982 AES_CM_192_HMAC_SHA1_32 = 6,
1983 AES_CM_128_HMAC_SHA1_32 = 7,
1984 AES_CM_128_NULL_AUTH = 8,
1985 CRYPTO_INVALID = 9,
1986}
1987#[repr(C)]
1988#[derive(Copy, Clone)]
1989#[derive(Debug)]
1990pub struct payload_map {
1991 pub type_: media_type,
1992 pub sdp_type: sdp_type,
1993 pub ptime: u32,
1994 pub rate: u32,
1995 pub allocated: u8,
1996 pub negotiated: u8,
1997 pub current: u8,
1998 pub hash: c_ulong,
1999 pub rm_encoding: *mut c_char,
2000 pub iananame: *mut c_char,
2001 pub modname: *mut c_char,
2002 pub pt: payload,
2003 pub rm_rate: c_ulong,
2004 pub adv_rm_rate: c_ulong,
2005 pub codec_ms: u32,
2006 pub bitrate: u32,
2007 pub rm_fmtp: *mut c_char,
2008 pub agreed_pt: payload,
2009 pub recv_pt: payload,
2010 pub fmtp_out: *mut c_char,
2011 pub remote_sdp_ip: *mut c_char,
2012 pub remote_sdp_port: port,
2013 pub channels: c_int,
2014 pub adv_channels: c_int,
2015 pub next: *mut payload_map,
2016}
2017impl std::default::Default for payload_map {
2018 fn default() -> Self {
2019 unsafe { std::mem::zeroed() }
2020 }
2021}
2022#[derive(Copy, Clone)]
2023#[repr(u32)]
2024#[derive(Debug)]
2025pub enum media_flow {
2026 SENDRECV = 0,
2027 SENDONLY = 1,
2028 RECVONLY = 2,
2029 INACTIVE = 3,
2030 DISABLED = 4,
2031}
2032#[derive(Copy, Clone)]
2033#[repr(u32)]
2034#[derive(Debug)]
2035pub enum core_media_ice_type {
2036 GOOGLE_JINGLE = 1,
2037 VANILLA = 2,
2038 CONTROLLED = 4,
2039}
2040#[derive(Copy, Clone)]
2041#[repr(u32)]
2042#[derive(Debug)]
2043pub enum poll {
2044 READ = 1,
2045 WRITE = 2,
2046 ERROR = 4,
2047 HUP = 8,
2048 RDNORM = 16,
2049 RDBAND = 32,
2050 PRI = 64,
2051 INVALID = 128,
2052}
2053#[repr(C)]
2054#[derive(Copy, Clone)]
2055#[derive(Debug)]
2056pub struct waitlist {
2057 pub sock: os_socket,
2058 pub events: u32,
2059 pub revents: u32,
2060}
2061impl std::default::Default for waitlist {
2062 fn default() -> Self {
2063 unsafe { std::mem::zeroed() }
2064 }
2065}
2066pub enum jb { }
2067pub enum img_txt_handle { }
2068pub enum frame_buffer { }
2069#[derive(Copy, Clone)]
2070#[repr(u32)]
2071#[derive(Debug)]
2072pub enum video_read_flag {
2073 BLOCK = 1,
2074 FLUSH = 2,
2075 CHECK = 4,
2076}
2077#[derive(Copy, Clone)]
2078#[repr(u32)]
2079#[derive(Debug)]
2080pub enum vid_spy_fmt {
2081 LOWER_RIGHT_SMALL = 0,
2082 LOWER_RIGHT_LARGE = 1,
2083 DUAL_CROP = 2,
2084}
2085#[derive(Copy, Clone)]
2086#[repr(u32)]
2087#[derive(Debug)]
2088pub enum file_command {
2089 FLUSH_AUDIO = 0,
2090 PAUSE_READ = 1,
2091}
2092pub type thread_id = c_ulong;
2093pub type interval_time_t = i64;
2094#[repr(C)]
2095#[derive(Copy, Clone)]
2096#[derive(Debug)]
2097pub struct time_exp {
2098 pub tm_usec: i32,
2099 pub tm_sec: i32,
2100 pub tm_min: i32,
2101 pub tm_hour: i32,
2102 pub tm_mday: i32,
2103 pub tm_mon: i32,
2104 pub tm_year: i32,
2105 pub tm_wday: i32,
2106 pub tm_yday: i32,
2107 pub tm_isdst: i32,
2108 pub tm_gmtoff: i32,
2109}
2110impl std::default::Default for time_exp {
2111 fn default() -> Self {
2112 unsafe { std::mem::zeroed() }
2113 }
2114}
2115pub enum apr_thread_mutex { }
2116pub type mutex = apr_thread_mutex;
2117pub enum apr_thread_rwlock { }
2118pub type thread_rwlock = apr_thread_rwlock;
2119pub enum apr_thread_cond { }
2120pub type thread_cond = apr_thread_cond;
2121#[repr(C)]
2122#[derive(Copy, Clone)]
2123#[derive(Debug)]
2124pub struct uuid {
2125 pub data: [c_uchar; 16usize],
2126}
2127impl std::default::Default for uuid {
2128 fn default() -> Self {
2129 unsafe { std::mem::zeroed() }
2130 }
2131}
2132pub enum apr_queue { }
2133pub type queue = apr_queue;
2134pub enum apr_file { }
2135pub type file = apr_file;
2136pub type fileperms = i32;
2137pub type seek_where = c_int;
2138pub enum dir { }
2139#[repr(C)]
2140#[derive(Copy, Clone)]
2141#[derive(Debug)]
2142pub struct array_header {
2143 pub pool: *mut memory_pool,
2144 pub elt_size: c_int,
2145 pub nelts: c_int,
2146 pub nalloc: c_int,
2147 pub elts: *mut c_char,
2148}
2149impl std::default::Default for array_header {
2150 fn default() -> Self {
2151 unsafe { std::mem::zeroed() }
2152 }
2153}
2154pub enum apr_thread { }
2155pub type thread = apr_thread;
2156pub enum apr_threadattr { }
2157pub type threadattr = apr_threadattr;
2158pub type thread_start = std::option::Option<unsafe extern "C" fn(arg1: *mut thread,
2159 arg2: *mut c_void)
2160 -> *mut c_void>;
2161pub enum apr_socket { }
2162pub type socket = apr_socket;
2163pub enum sockaddr {}
2164#[derive(Copy, Clone)]
2165#[repr(u32)]
2166#[derive(Debug)]
2167pub enum shutdown_how_e {
2168 READ = 0,
2169 WRITE = 1,
2170 READWRITE = 2,
2171}
2172#[derive(Copy, Clone)]
2173#[repr(u32)]
2174#[derive(Debug)]
2175pub enum pollset_type {
2176 NO_DESC = 0,
2177 SOCKET = 1,
2178 FILE = 2,
2179 LASTDESC = 3,
2180}
2181#[repr(C)]
2182#[derive(Copy, Clone)]
2183#[derive(Debug)]
2184pub struct descriptor {
2185 pub _bindgen_data_: [u64; 1usize],
2186}
2187impl descriptor {
2188 pub unsafe fn f(&mut self) -> *mut *mut file {
2189 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
2190 std::mem::transmute(raw.offset(0))
2191 }
2192 pub unsafe fn s(&mut self) -> *mut *mut socket {
2193 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
2194 std::mem::transmute(raw.offset(0))
2195 }
2196}
2197impl std::default::Default for descriptor {
2198 fn default() -> Self {
2199 unsafe { std::mem::zeroed() }
2200 }
2201}
2202#[repr(C)]
2203#[derive(Copy, Clone)]
2204#[derive(Debug)]
2205pub struct pollfd {
2206 pub p: *mut memory_pool,
2207 pub desc_type: pollset_type,
2208 pub reqevents: i16,
2209 pub rtnevents: i16,
2210 pub desc: descriptor,
2211 pub client_data: *mut c_void,
2212}
2213impl std::default::Default for pollfd {
2214 fn default() -> Self {
2215 unsafe { std::mem::zeroed() }
2216 }
2217}
2218pub enum apr_pollset { }
2219pub type pollset = apr_pollset;
2220pub enum sqlite3 { }
2221pub type core_db = sqlite3;
2222pub enum sqlite3_stmt { }
2223pub type core_db_stmt = sqlite3_stmt;
2224pub type core_db_callback_func =
2225 std::option::Option<unsafe extern "C" fn(pArg: *mut c_void,
2226 argc: c_int,
2227 argv: *mut *mut c_char,
2228 columnNames: *mut *mut c_char)
2229 -> c_int>;
2230pub type core_db_err_callback_func =
2231 std::option::Option<unsafe extern "C" fn(pArg: *mut c_void, errmsg: *const c_char) -> c_int>;
2232pub type core_db_destructor_type = std::option::Option<unsafe extern "C" fn(arg1: *mut c_void)>;
2233pub type dso_func = std::option::Option<extern "C" fn() -> c_int>;
2234pub type dso_lib = *mut c_void;
2235pub type dso_data = *mut c_void;
2236pub enum real_pcre { }
2237pub type regex = real_pcre;
2238#[repr(C)]
2239#[derive(Copy, Clone)]
2240#[derive(Debug)]
2241pub struct core_time_duration {
2242 pub mms: u32,
2243 pub ms: u32,
2244 pub sec: u32,
2245 pub min: u32,
2246 pub hr: u32,
2247 pub day: u32,
2248 pub yr: u32,
2249}
2250impl std::default::Default for core_time_duration {
2251 fn default() -> Self {
2252 unsafe { std::mem::zeroed() }
2253 }
2254}
2255#[repr(C)]
2256#[derive(Copy, Clone)]
2257#[derive(Debug)]
2258pub struct app_log {
2259 pub app: *mut c_char,
2260 pub arg: *mut c_char,
2261 pub stamp: time_t,
2262 pub next: *mut app_log,
2263}
2264impl std::default::Default for app_log {
2265 fn default() -> Self {
2266 unsafe { std::mem::zeroed() }
2267 }
2268}
2269#[repr(C)]
2270#[derive(Copy, Clone)]
2271#[derive(Debug)]
2272pub struct thread_data {
2273 pub func: thread_start,
2274 pub obj: *mut c_void,
2275 pub alloc: c_int,
2276 pub pool: *mut memory_pool,
2277}
2278impl std::default::Default for thread_data {
2279 fn default() -> Self {
2280 unsafe { std::mem::zeroed() }
2281 }
2282}
2283#[repr(C)]
2284#[derive(Copy, Clone)]
2285#[derive(Debug)]
2286pub struct hold_record {
2287 pub on: time_t,
2288 pub off: time_t,
2289 pub uuid: *mut c_char,
2290 pub next: *mut hold_record,
2291}
2292impl std::default::Default for hold_record {
2293 fn default() -> Self {
2294 unsafe { std::mem::zeroed() }
2295 }
2296}
2297#[repr(C)]
2298#[derive(Copy, Clone)]
2299#[derive(Debug)]
2300pub struct device_uuid_node {
2301 pub uuid: *mut c_char,
2302 pub xml_cdr: xml_t,
2303 pub event: *mut event,
2304 pub callstate: channel_callstate,
2305 pub hold_record: *mut hold_record,
2306 pub hup_profile: *mut caller_profile,
2307 pub direction: call_direction,
2308 pub parent: *mut device_record,
2309 pub next: *mut device_uuid_node,
2310}
2311impl std::default::Default for device_uuid_node {
2312 fn default() -> Self {
2313 unsafe { std::mem::zeroed() }
2314 }
2315}
2316#[repr(C)]
2317#[derive(Copy, Clone)]
2318#[derive(Debug)]
2319pub struct device_stats {
2320 pub total: u32,
2321 pub total_in: u32,
2322 pub total_out: u32,
2323 pub offhook: u32,
2324 pub offhook_in: u32,
2325 pub offhook_out: u32,
2326 pub active: u32,
2327 pub active_in: u32,
2328 pub active_out: u32,
2329 pub held: u32,
2330 pub held_in: u32,
2331 pub held_out: u32,
2332 pub unheld: u32,
2333 pub unheld_in: u32,
2334 pub unheld_out: u32,
2335 pub hup: u32,
2336 pub hup_in: u32,
2337 pub hup_out: u32,
2338 pub ringing: u32,
2339 pub ringing_in: u32,
2340 pub ringing_out: u32,
2341 pub early: u32,
2342 pub early_in: u32,
2343 pub early_out: u32,
2344 pub ring_wait: u32,
2345}
2346impl std::default::Default for device_stats {
2347 fn default() -> Self {
2348 unsafe { std::mem::zeroed() }
2349 }
2350}
2351#[repr(C)]
2352#[derive(Copy, Clone)]
2353#[derive(Debug)]
2354pub struct device_record {
2355 pub device_id: *mut c_char,
2356 pub uuid: *mut c_char,
2357 pub refs: c_int,
2358 pub stats: device_stats,
2359 pub last_stats: device_stats,
2360 pub state: device_state,
2361 pub last_state: device_state,
2362 pub active_start: time_t,
2363 pub active_stop: time_t,
2364 pub last_call_time: time_t,
2365 pub ring_start: time_t,
2366 pub ring_stop: time_t,
2367 pub hold_start: time_t,
2368 pub hold_stop: time_t,
2369 pub call_start: time_t,
2370 pub uuid_list: *mut device_uuid_node,
2371 pub uuid_tail: *mut device_uuid_node,
2372 pub mutex: *mut mutex,
2373 pub pool: *mut memory_pool,
2374 pub user_data: *mut c_void,
2375}
2376impl std::default::Default for device_record {
2377 fn default() -> Self {
2378 unsafe { std::mem::zeroed() }
2379 }
2380}
2381pub type device_state_function =
2382 std::option::Option<unsafe extern "C" fn(session: *mut core_session,
2383 callstate: channel_callstate,
2384 drec: *mut device_record)>;
2385#[repr(C)]
2386#[derive(Copy)]
2387pub struct dtls_fp_s {
2388 pub len: u32,
2389 pub data: [u8; 65usize],
2390 pub type_: *mut c_char,
2391 pub str: [c_char; 192usize],
2392}
2393impl std::clone::Clone for dtls_fp_s {
2394 fn clone(&self) -> Self {
2395 *self
2396 }
2397}
2398impl std::default::Default for dtls_fp_s {
2399 fn default() -> Self {
2400 unsafe { std::mem::zeroed() }
2401 }
2402}
2403pub type dtls_fingerprint = dtls_fp_s;
2404#[derive(Copy, Clone)]
2405#[repr(u32)]
2406#[derive(Debug)]
2407pub enum dtls_type {
2408 DTLS_TYPE_CLIENT = 1,
2409 DTLS_TYPE_SERVER = 2,
2410 DTLS_TYPE_RTP = 4,
2411 DTLS_TYPE_RTCP = 8,
2412}
2413#[derive(Copy, Clone)]
2414#[repr(u32)]
2415#[derive(Debug)]
2416pub enum dtls_state {
2417 DS_OFF = 0,
2418 DS_HANDSHAKE = 1,
2419 DS_SETUP = 2,
2420 DS_READY = 3,
2421 DS_FAIL = 4,
2422 DS_INVALID = 5,
2423}
2424#[repr(C)]
2425#[derive(Copy, Clone)]
2426#[derive(Debug)]
2427pub struct core_session_message {
2428 pub from: *mut c_char,
2429 pub message_id: core_session_message_types,
2430 pub numeric_arg: c_int,
2431 pub string_arg: *const c_char,
2432 pub string_arg_size: usize,
2433 pub pointer_arg: *mut c_void,
2434 pub pointer_arg_size: usize,
2435 pub numeric_reply: c_int,
2436 pub string_reply: *mut c_char,
2437 pub string_reply_size: usize,
2438 pub pointer_reply: *mut c_void,
2439 pub pointer_reply_size: usize,
2440 pub flags: core_session_message_flag,
2441 pub _file: *const c_char,
2442 pub _func: *const c_char,
2443 pub _line: c_int,
2444 pub string_array_arg: [*const c_char; 10usize],
2445 pub delivery_time: time_t,
2446}
2447impl std::default::Default for core_session_message {
2448 fn default() -> Self {
2449 unsafe { std::mem::zeroed() }
2450 }
2451}
2452#[repr(C)]
2453#[derive(Copy)]
2454pub struct core_thread_session {
2455 pub running: c_int,
2456 pub mutex: *mut mutex,
2457 pub objs: [*mut c_void; 128usize],
2458 pub input_callback: input_callback_function,
2459 pub pool: *mut memory_pool,
2460}
2461impl std::clone::Clone for core_thread_session {
2462 fn clone(&self) -> Self {
2463 *self
2464 }
2465}
2466impl std::default::Default for core_thread_session {
2467 fn default() -> Self {
2468 unsafe { std::mem::zeroed() }
2469 }
2470}
2471pub enum core_runtime { }
2472#[derive(Copy, Clone)]
2473#[repr(u32)]
2474#[derive(Debug)]
2475pub enum hup_type {
2476 NONE = 0,
2477 UNANSWERED = 1,
2478 ANSWERED = 2,
2479}
2480pub type core_db_event_callback_func = std::option::Option<unsafe extern "C" fn(pArg: *mut c_void,
2481 event: *mut event)
2482 -> c_int>;
2483#[derive(Copy, Clone)]
2484#[repr(u32)]
2485#[derive(Debug)]
2486pub enum cache_db_flag {
2487 INUSE = 1,
2488 PRUNE = 2,
2489}
2490#[derive(Copy, Clone)]
2491#[repr(u32)]
2492#[derive(Debug)]
2493pub enum cache_db_handle_type {
2494 CORE_DB = 0,
2495 ODBC = 1,
2496 PGSQL = 2,
2497}
2498#[repr(C)]
2499#[derive(Copy, Clone)]
2500#[derive(Debug)]
2501pub struct cache_db_native_handle {
2502 pub _bindgen_data_: [u64; 1usize],
2503}
2504impl cache_db_native_handle {
2505 pub unsafe fn core_db_dbh(&mut self) -> *mut *mut core_db {
2506 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
2507 std::mem::transmute(raw.offset(0))
2508 }
2509 pub unsafe fn odbc_dbh(&mut self) -> *mut *mut odbc_handle {
2510 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
2511 std::mem::transmute(raw.offset(0))
2512 }
2513 pub unsafe fn pgsql_dbh(&mut self) -> *mut *mut pgsql_handle {
2514 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
2515 std::mem::transmute(raw.offset(0))
2516 }
2517}
2518impl std::default::Default for cache_db_native_handle {
2519 fn default() -> Self {
2520 unsafe { std::mem::zeroed() }
2521 }
2522}
2523#[repr(C)]
2524#[derive(Copy, Clone)]
2525#[derive(Debug)]
2526pub struct cache_db_core_db_options {
2527 pub db_path: *mut c_char,
2528}
2529impl std::default::Default for cache_db_core_db_options {
2530 fn default() -> Self {
2531 unsafe { std::mem::zeroed() }
2532 }
2533}
2534#[repr(C)]
2535#[derive(Copy, Clone)]
2536#[derive(Debug)]
2537pub struct cache_db_odbc_options {
2538 pub dsn: *mut c_char,
2539 pub user: *mut c_char,
2540 pub pass: *mut c_char,
2541}
2542impl std::default::Default for cache_db_odbc_options {
2543 fn default() -> Self {
2544 unsafe { std::mem::zeroed() }
2545 }
2546}
2547#[repr(C)]
2548#[derive(Copy, Clone)]
2549#[derive(Debug)]
2550pub struct cache_db_pgsql_options {
2551 pub dsn: *mut c_char,
2552}
2553impl std::default::Default for cache_db_pgsql_options {
2554 fn default() -> Self {
2555 unsafe { std::mem::zeroed() }
2556 }
2557}
2558#[repr(C)]
2559#[derive(Copy, Clone)]
2560#[derive(Debug)]
2561pub struct cache_db_connection_options {
2562 pub _bindgen_data_: [u64; 3usize],
2563}
2564impl cache_db_connection_options {
2565 pub unsafe fn core_db_options(&mut self) -> *mut cache_db_core_db_options {
2566 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
2567 std::mem::transmute(raw.offset(0))
2568 }
2569 pub unsafe fn odbc_options(&mut self) -> *mut cache_db_odbc_options {
2570 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
2571 std::mem::transmute(raw.offset(0))
2572 }
2573 pub unsafe fn pgsql_options(&mut self) -> *mut cache_db_pgsql_options {
2574 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
2575 std::mem::transmute(raw.offset(0))
2576 }
2577}
2578impl std::default::Default for cache_db_connection_options {
2579 fn default() -> Self {
2580 unsafe { std::mem::zeroed() }
2581 }
2582}
2583pub enum cache_db_handle { }
2584#[repr(C)]
2585#[derive(Copy)]
2586pub struct log_node {
2587 pub data: *mut c_char,
2588 pub file: [c_char; 80usize],
2589 pub line: u32,
2590 pub func: [c_char; 80usize],
2591 pub level: log_level,
2592 pub timestamp: time_t,
2593 pub content: *mut c_char,
2594 pub userdata: *mut c_char,
2595 pub channel: text_channel,
2596 pub slevel: log_level,
2597}
2598impl std::clone::Clone for log_node {
2599 fn clone(&self) -> Self {
2600 *self
2601 }
2602}
2603impl std::default::Default for log_node {
2604 fn default() -> Self {
2605 unsafe { std::mem::zeroed() }
2606 }
2607}
2608pub type log_function = std::option::Option<unsafe extern "C" fn(node: *const log_node,
2609 level: log_level)
2610 -> status>;
2611#[repr(C)]
2612#[derive(Copy, Clone)]
2613#[derive(Debug)]
2614pub struct audio_resampler {
2615 pub resampler: *mut c_void,
2616 pub from_rate: c_int,
2617 pub to_rate: c_int,
2618 pub factor: f64,
2619 pub rfactor: f64,
2620 pub to: *mut i16,
2621 pub to_len: u32,
2622 pub to_size: u32,
2623 pub channels: c_int,
2624}
2625impl std::default::Default for audio_resampler {
2626 fn default() -> Self {
2627 unsafe { std::mem::zeroed() }
2628 }
2629}
2630#[derive(Copy, Clone)]
2631#[repr(u32)]
2632#[derive(Debug)]
2633pub enum state_handler_name {
2634 ON_INIT = 0,
2635 ON_ROUTING = 1,
2636 ON_EXECUTE = 2,
2637 ON_HANGUP = 3,
2638 ON_EXCHANGE_MEDIA = 4,
2639 ON_SOFT_EXECUTE = 5,
2640 ON_CONSUME_MEDIA = 6,
2641 ON_HIBERNATE = 7,
2642 ON_RESET = 8,
2643 ON_PARK = 9,
2644 ON_REPORTING = 10,
2645 ON_DESTROY = 11,
2646}
2647#[repr(C)]
2648#[derive(Copy, Clone)]
2649#[derive(Debug)]
2650pub struct state_handler_table {
2651 pub on_init: state_handler,
2652 pub on_routing: state_handler,
2653 pub on_execute: state_handler,
2654 pub on_hangup: state_handler,
2655 pub on_exchange_media: state_handler,
2656 pub on_soft_execute: state_handler,
2657 pub on_consume_media: state_handler,
2658 pub on_hibernate: state_handler,
2659 pub on_reset: state_handler,
2660 pub on_park: state_handler,
2661 pub on_reporting: state_handler,
2662 pub on_destroy: state_handler,
2663 pub flags: c_int,
2664 pub padding: [*mut c_void; 10usize],
2665}
2666impl std::default::Default for state_handler_table {
2667 fn default() -> Self {
2668 unsafe { std::mem::zeroed() }
2669 }
2670}
2671#[repr(C)]
2672pub struct stream_handle {
2673 pub read_function: stream_handle_read_function,
2674 pub write_function: stream_handle_write_function,
2675 pub raw_write_function: stream_handle_raw_write_function,
2676 pub data: *mut c_void,
2677 pub end: *mut c_void,
2678 pub data_size: usize,
2679 pub data_len: usize,
2680 pub alloc_len: usize,
2681 pub alloc_chunk: usize,
2682 pub param_event: *mut event,
2683}
2684impl std::default::Default for stream_handle {
2685 fn default() -> Self {
2686 unsafe { std::mem::zeroed() }
2687 }
2688}
2689pub type io_outgoing_channel =
2690 std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2691 arg2: *mut event,
2692 arg3: *mut caller_profile,
2693 arg4: *mut *mut core_session,
2694 arg5: *mut *mut memory_pool,
2695 arg6: originate_flag,
2696 arg7: *mut call_cause)
2697 -> call_cause>;
2698pub type io_read_frame = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2699 arg2: *mut *mut frame,
2700 arg3: io_flag,
2701 arg4: c_int)
2702 -> status>;
2703pub type io_write_frame = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2704 arg2: *mut frame,
2705 arg3: io_flag,
2706 arg4: c_int)
2707 -> status>;
2708pub type io_kill_channel = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2709 arg2: c_int)
2710 -> status>;
2711pub type io_send_dtmf = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2712 arg2: *const dtmf)
2713 -> status>;
2714pub type io_receive_message =
2715 std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2716 arg2: *mut core_session_message)
2717 -> status>;
2718pub type io_receive_event = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2719 arg2: *mut event)
2720 -> status>;
2721pub type io_state_change = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session)
2722 -> status>;
2723pub type io_state_run = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session) -> status>;
2724pub type io_read_video_frame = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2725 arg2: *mut *mut frame,
2726 arg3: io_flag,
2727 arg4: c_int)
2728 -> status>;
2729pub type io_write_video_frame = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2730 arg2: *mut frame,
2731 arg3: io_flag,
2732 arg4: c_int)
2733 -> status>;
2734pub type io_get_jb = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
2735 arg2: media_type)
2736 -> *mut jb>;
2737#[derive(Copy, Clone)]
2738#[repr(u32)]
2739#[derive(Debug)]
2740pub enum io_routine_name {
2741 OUTGOING_CHANNEL = 0,
2742 READ_FRAME = 1,
2743 WRITE_FRAME = 2,
2744 KILL_CHANNEL = 3,
2745 SEND_DTMF = 4,
2746 RECEIVE_MESSAGE = 5,
2747 RECEIVE_EVENT = 6,
2748 STATE_CHANGE = 7,
2749 READ_VIDEO_FRAME = 8,
2750 WRITE_VIDEO_FRAME = 9,
2751 GET_JB = 10,
2752}
2753#[repr(C)]
2754#[derive(Copy, Clone)]
2755#[derive(Debug)]
2756pub struct io_routines {
2757 pub outgoing_channel: io_outgoing_channel,
2758 pub read_frame: io_read_frame,
2759 pub write_frame: io_write_frame,
2760 pub kill_channel: io_kill_channel,
2761 pub send_dtmf: io_send_dtmf,
2762 pub receive_message: io_receive_message,
2763 pub receive_event: io_receive_event,
2764 pub state_change: io_state_change,
2765 pub read_video_frame: io_read_video_frame,
2766 pub write_video_frame: io_write_video_frame,
2767 pub state_run: io_state_run,
2768 pub get_jb: io_get_jb,
2769 pub padding: [*mut c_void; 10usize],
2770}
2771impl std::default::Default for io_routines {
2772 fn default() -> Self {
2773 unsafe { std::mem::zeroed() }
2774 }
2775}
2776#[repr(C)]
2777#[derive(Copy, Clone)]
2778#[derive(Debug)]
2779pub struct endpoint_interface {
2780 pub interface_name: *const c_char,
2781 pub io_routines: *mut io_routines,
2782 pub state_handler: *mut state_handler_table,
2783 pub private_info: *mut c_void,
2784 pub rwlock: *mut thread_rwlock,
2785 pub refs: c_int,
2786 pub reflock: *mut mutex,
2787 pub parent: *mut loadable_module_interface,
2788 pub next: *mut endpoint_interface,
2789 pub recover_callback: core_recover_callback,
2790}
2791impl std::default::Default for endpoint_interface {
2792 fn default() -> Self {
2793 unsafe { std::mem::zeroed() }
2794 }
2795}
2796#[repr(C)]
2797#[derive(Copy, Clone)]
2798#[derive(Debug)]
2799pub struct timer {
2800 pub interval: c_int,
2801 pub flags: u32,
2802 pub samples: c_uint,
2803 pub samplecount: u32,
2804 pub timer_interface: *mut timer_interface,
2805 pub memory_pool: *mut memory_pool,
2806 pub private_info: *mut c_void,
2807 pub diff: usize,
2808 pub start: time_t,
2809 pub tick: u64,
2810}
2811impl std::default::Default for timer {
2812 fn default() -> Self {
2813 unsafe { std::mem::zeroed() }
2814 }
2815}
2816#[derive(Copy, Clone)]
2817#[repr(u32)]
2818#[derive(Debug)]
2819pub enum timer_func_name {
2820 TIMER_INIT = 0,
2821 TIMER_NEXT = 1,
2822 TIMER_STEP = 2,
2823 TIMER_SYNC = 3,
2824 TIMER_CHECK = 4,
2825 TIMER_DESTROY = 5,
2826}
2827#[repr(C)]
2828#[derive(Copy, Clone)]
2829#[derive(Debug)]
2830pub struct timer_interface {
2831 pub interface_name: *const c_char,
2832 pub timer_init: std::option::Option<unsafe extern "C" fn(arg1: *mut timer) -> status>,
2833 pub timer_next: std::option::Option<unsafe extern "C" fn(arg1: *mut timer) -> status>,
2834 pub timer_step: std::option::Option<unsafe extern "C" fn(arg1: *mut timer) -> status>,
2835 pub timer_sync: std::option::Option<unsafe extern "C" fn(arg1: *mut timer) -> status>,
2836 pub timer_check: std::option::Option<unsafe extern "C" fn(arg1: *mut timer, arg2: switch_bool)
2837 -> status>,
2838 pub timer_destroy: std::option::Option<unsafe extern "C" fn(arg1: *mut timer) -> status>,
2839 pub rwlock: *mut thread_rwlock,
2840 pub refs: c_int,
2841 pub reflock: *mut mutex,
2842 pub parent: *mut loadable_module_interface,
2843 pub next: *mut timer_interface,
2844}
2845impl std::default::Default for timer_interface {
2846 fn default() -> Self {
2847 unsafe { std::mem::zeroed() }
2848 }
2849}
2850#[repr(C)]
2851#[derive(Copy, Clone)]
2852#[derive(Debug)]
2853pub struct dialplan_interface {
2854 pub interface_name: *const c_char,
2855 pub hunt_function: dialplan_hunt_function,
2856 pub rwlock: *mut thread_rwlock,
2857 pub refs: c_int,
2858 pub reflock: *mut mutex,
2859 pub parent: *mut loadable_module_interface,
2860 pub next: *mut dialplan_interface,
2861}
2862impl std::default::Default for dialplan_interface {
2863 fn default() -> Self {
2864 unsafe { std::mem::zeroed() }
2865 }
2866}
2867#[repr(C)]
2868#[derive(Copy, Clone)]
2869#[derive(Debug)]
2870pub struct file_interface {
2871 pub interface_name: *const c_char,
2872 pub file_open: std::option::Option<unsafe extern "C" fn(arg1: *mut file_handle,
2873 file_path: *const c_char)
2874 -> status>,
2875 pub file_close: std::option::Option<unsafe extern "C" fn(arg1: *mut file_handle) -> status>,
2876 pub file_truncate: std::option::Option<unsafe extern "C" fn(arg1: *mut file_handle,
2877 offset: i64)
2878 -> status>,
2879 pub file_read: std::option::Option<unsafe extern "C" fn(arg1: *mut file_handle,
2880 data: *mut c_void,
2881 len: *mut usize)
2882 -> status>,
2883 pub file_write: std::option::Option<unsafe extern "C" fn(arg1: *mut file_handle,
2884 data: *mut c_void,
2885 len: *mut usize)
2886 -> status>,
2887 pub file_read_video: std::option::Option<unsafe extern "C" fn(arg1: *mut file_handle,
2888 frame: *mut frame,
2889 flags: video_read_flag)
2890 -> status>,
2891 pub file_write_video: std::option::Option<unsafe extern "C" fn(arg1: *mut file_handle,
2892 frame: *mut frame)
2893 -> status>,
2894 pub file_seek: std::option::Option<unsafe extern "C" fn(arg1: *mut file_handle,
2895 cur_pos: *mut c_uint,
2896 samples: i64,
2897 whence: c_int)
2898 -> status>,
2899 pub file_set_string: std::option::Option<unsafe extern "C" fn(fh: *mut file_handle,
2900 col: audio_col,
2901 string: *const c_char)
2902 -> status>,
2903 pub file_get_string: std::option::Option<unsafe extern "C" fn(fh: *mut file_handle,
2904 col: audio_col,
2905 string: *mut *const c_char)
2906 -> status>,
2907 pub file_command: std::option::Option<unsafe extern "C" fn(fh: *mut file_handle,
2908 command: file_command)
2909 -> status>,
2910 pub extens: *mut *mut c_char,
2911 pub rwlock: *mut thread_rwlock,
2912 pub refs: c_int,
2913 pub reflock: *mut mutex,
2914 pub parent: *mut loadable_module_interface,
2915 pub next: *mut file_interface,
2916}
2917impl std::default::Default for file_interface {
2918 fn default() -> Self {
2919 unsafe { std::mem::zeroed() }
2920 }
2921}
2922pub const VIDEO_ENCODE_SPEED_FAST: video_encode_speed = video_encode_speed::DEFAULT;
2923#[derive(Copy, Clone)]
2924#[repr(u32)]
2925#[derive(Debug)]
2926pub enum video_encode_speed {
2927 DEFAULT = 0,
2928 MEDIUM = 1,
2929 SLOW = 2,
2930}
2931#[derive(Copy, Clone)]
2932#[repr(u32)]
2933#[derive(Debug)]
2934pub enum video_profile {
2935 BASELINE = 0,
2936 MAIN = 1,
2937 HIGH = 2,
2938}
2939#[repr(C)]
2940#[derive(Copy, Clone)]
2941#[derive(Debug)]
2942pub struct mm {
2943 pub samplerate: c_int,
2944 pub channels: c_int,
2945 pub keyint: c_int,
2946 pub ab: c_int,
2947 pub vb: c_int,
2948 pub vw: c_int,
2949 pub vh: c_int,
2950 pub fps: f32,
2951 pub source_fps: f32,
2952 pub vbuf: c_int,
2953 pub vprofile: video_profile,
2954 pub vencspd: video_encode_speed,
2955 pub try_hardware_encoder: u8,
2956}
2957impl std::default::Default for mm {
2958 fn default() -> Self {
2959 unsafe { std::mem::zeroed() }
2960 }
2961}
2962#[repr(C)]
2963#[derive(Copy, Clone)]
2964#[derive(Debug)]
2965pub struct file_handle {
2966 pub file_interface: *mut file_interface,
2967 pub flags: u32,
2968 pub fd: *mut file,
2969 pub samples: c_uint,
2970 pub samplerate: u32,
2971 pub native_rate: u32,
2972 pub channels: u32,
2973 pub real_channels: u32,
2974 pub format: c_uint,
2975 pub sections: c_uint,
2976 pub seekable: c_int,
2977 pub sample_count: usize,
2978 pub speed: c_int,
2979 pub memory_pool: *mut memory_pool,
2980 pub prebuf: u32,
2981 pub interval: u32,
2982 pub private_info: *mut c_void,
2983 pub handler: *mut c_char,
2984 pub pos: i64,
2985 pub audio_buffer: *mut buffer,
2986 pub sp_audio_buffer: *mut buffer,
2987 pub thresh: u32,
2988 pub silence_hits: u32,
2989 pub offset_pos: u32,
2990 pub samples_in: usize,
2991 pub samples_out: usize,
2992 pub vol: i32,
2993 pub resampler: *mut audio_resampler,
2994 pub buffer: *mut buffer,
2995 pub dbuf: *mut u8,
2996 pub dbuflen: usize,
2997 pub pre_buffer: *mut buffer,
2998 pub pre_buffer_data: *mut c_uchar,
2999 pub pre_buffer_datalen: usize,
3000 pub file: *const c_char,
3001 pub func: *const c_char,
3002 pub line: c_int,
3003 pub file_path: *mut c_char,
3004 pub spool_path: *mut c_char,
3005 pub prefix: *const c_char,
3006 pub max_samples: c_int,
3007 pub params: *mut event,
3008 pub cur_channels: u32,
3009 pub cur_samplerate: u32,
3010 pub stream_name: *mut c_char,
3011 pub modname: *mut c_char,
3012 pub mm: mm,
3013 pub flag_mutex: *mut mutex,
3014 pub duration: i64,
3015 pub vpos: i64,
3016}
3017impl std::default::Default for file_handle {
3018 fn default() -> Self {
3019 unsafe { std::mem::zeroed() }
3020 }
3021}
3022#[repr(C)]
3023#[derive(Copy, Clone)]
3024#[derive(Debug)]
3025pub struct asr_interface {
3026 pub interface_name: *const c_char,
3027 pub asr_open: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3028 codec: *const c_char,
3029 rate: c_int,
3030 dest: *const c_char,
3031 flags: *mut asr_flag)
3032 -> status>,
3033 pub asr_load_grammar: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3034 grammar: *const c_char,
3035 name: *const c_char)
3036 -> status>,
3037 pub asr_unload_grammar: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3038 name: *const c_char)
3039 -> status>,
3040 pub asr_close: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3041 flags: *mut asr_flag)
3042 -> status>,
3043 pub asr_feed: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3044 data: *mut c_void,
3045 len: c_uint,
3046 flags: *mut asr_flag)
3047 -> status>,
3048 pub asr_resume: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle) -> status>,
3049 pub asr_pause: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle) -> status>,
3050 pub asr_check_results: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3051 flags: *mut asr_flag)
3052 -> status>,
3053 pub asr_get_results: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3054 xmlstr: *mut *mut c_char,
3055 flags: *mut asr_flag)
3056 -> status>,
3057 pub asr_get_result_headers: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3058 headers: *mut *mut event,
3059 flags: *mut asr_flag)
3060 -> status>,
3061 pub asr_start_input_timers: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle)
3062 -> status>,
3063 pub asr_text_param: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3064 param: *mut c_char,
3065 val: *const c_char)>,
3066 pub asr_numeric_param: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3067 param: *mut c_char,
3068 val: c_int)>,
3069 pub asr_float_param: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3070 param: *mut c_char,
3071 val: f64)>,
3072 pub rwlock: *mut thread_rwlock,
3073 pub refs: c_int,
3074 pub reflock: *mut mutex,
3075 pub parent: *mut loadable_module_interface,
3076 pub next: *mut asr_interface,
3077 pub asr_enable_grammar: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3078 name: *const c_char)
3079 -> status>,
3080 pub asr_disable_grammar: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3081 name: *const c_char)
3082 -> status>,
3083 pub asr_disable_all_grammars: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle)
3084 -> status>,
3085 pub asr_feed_dtmf: std::option::Option<unsafe extern "C" fn(ah: *mut asr_handle,
3086 dtmf: *const dtmf,
3087 flags: *mut asr_flag)
3088 -> status>,
3089}
3090impl std::default::Default for asr_interface {
3091 fn default() -> Self {
3092 unsafe { std::mem::zeroed() }
3093 }
3094}
3095#[repr(C)]
3096#[derive(Copy, Clone)]
3097#[derive(Debug)]
3098pub struct asr_handle {
3099 pub asr_interface: *mut asr_interface,
3100 pub flags: u32,
3101 pub name: *mut c_char,
3102 pub codec: *mut c_char,
3103 pub rate: u32,
3104 pub grammar: *mut c_char,
3105 pub param: *mut c_char,
3106 pub memory_pool: *mut memory_pool,
3107 pub buffer: *mut buffer,
3108 pub dbuf: *mut u8,
3109 pub dbuflen: usize,
3110 pub resampler: *mut audio_resampler,
3111 pub samplerate: u32,
3112 pub native_rate: u32,
3113 pub private_info: *mut c_void,
3114}
3115impl std::default::Default for asr_handle {
3116 fn default() -> Self {
3117 unsafe { std::mem::zeroed() }
3118 }
3119}
3120#[repr(C)]
3121#[derive(Copy, Clone)]
3122#[derive(Debug)]
3123pub struct speech_interface {
3124 pub interface_name: *const c_char,
3125 pub speech_open: std::option::Option<unsafe extern "C" fn(sh: *mut speech_handle,
3126 voice_name: *const c_char,
3127 rate: c_int,
3128 channels: c_int,
3129 flags: *mut speech_flag)
3130 -> status>,
3131 pub speech_close: std::option::Option<unsafe extern "C" fn(arg1: *mut speech_handle,
3132 flags: *mut speech_flag)
3133 -> status>,
3134 pub speech_feed_tts: std::option::Option<unsafe extern "C" fn(sh: *mut speech_handle,
3135 text: *mut c_char,
3136 flags: *mut speech_flag)
3137 -> status>,
3138 pub speech_read_tts: std::option::Option<unsafe extern "C" fn(sh: *mut speech_handle,
3139 data: *mut c_void,
3140 datalen: *mut usize,
3141 flags: *mut speech_flag)
3142 -> status>,
3143 pub speech_flush_tts: std::option::Option<unsafe extern "C" fn(sh: *mut speech_handle)>,
3144 pub speech_text_param_tts: std::option::Option<unsafe extern "C" fn(sh: *mut speech_handle,
3145 param: *mut c_char,
3146 val: *const c_char)>,
3147 pub speech_numeric_param_tts: std::option::Option<unsafe extern "C" fn(sh: *mut speech_handle,
3148 param: *mut c_char,
3149 val: c_int)>,
3150 pub speech_float_param_tts: std::option::Option<unsafe extern "C" fn(sh: *mut speech_handle,
3151 param: *mut c_char,
3152 val: f64)>,
3153 pub rwlock: *mut thread_rwlock,
3154 pub refs: c_int,
3155 pub reflock: *mut mutex,
3156 pub parent: *mut loadable_module_interface,
3157 pub next: *mut speech_interface,
3158}
3159impl std::default::Default for speech_interface {
3160 fn default() -> Self {
3161 unsafe { std::mem::zeroed() }
3162 }
3163}
3164#[repr(C)]
3165#[derive(Copy)]
3166pub struct speech_handle {
3167 pub speech_interface: *mut speech_interface,
3168 pub flags: u32,
3169 pub name: *mut c_char,
3170 pub rate: u32,
3171 pub speed: u32,
3172 pub samples: u32,
3173 pub channels: u32,
3174 pub real_channels: u32,
3175 pub voice: [c_char; 80usize],
3176 pub engine: *mut c_char,
3177 pub param: *mut c_char,
3178 pub memory_pool: *mut memory_pool,
3179 pub resampler: *mut audio_resampler,
3180 pub buffer: *mut buffer,
3181 pub dbuf: *mut u8,
3182 pub dbuflen: usize,
3183 pub samplerate: u32,
3184 pub native_rate: u32,
3185 pub private_info: *mut c_void,
3186}
3187impl std::clone::Clone for speech_handle {
3188 fn clone(&self) -> Self {
3189 *self
3190 }
3191}
3192impl std::default::Default for speech_handle {
3193 fn default() -> Self {
3194 unsafe { std::mem::zeroed() }
3195 }
3196}
3197#[repr(C)]
3198#[derive(Copy, Clone)]
3199#[derive(Debug)]
3200pub struct say_interface {
3201 pub interface_name: *const c_char,
3202 pub say_function: say_callback,
3203 pub say_string_function: say_string_callback,
3204 pub rwlock: *mut thread_rwlock,
3205 pub refs: c_int,
3206 pub reflock: *mut mutex,
3207 pub parent: *mut loadable_module_interface,
3208 pub next: *mut say_interface,
3209}
3210impl std::default::Default for say_interface {
3211 fn default() -> Self {
3212 unsafe { std::mem::zeroed() }
3213 }
3214}
3215#[repr(C)]
3216#[derive(Copy, Clone)]
3217#[derive(Debug)]
3218pub struct chat_interface {
3219 pub interface_name: *const c_char,
3220 pub chat_send: std::option::Option<unsafe extern "C" fn(message_event: *mut event) -> status>,
3221 pub rwlock: *mut thread_rwlock,
3222 pub refs: c_int,
3223 pub reflock: *mut mutex,
3224 pub parent: *mut loadable_module_interface,
3225 pub next: *mut chat_interface,
3226}
3227impl std::default::Default for chat_interface {
3228 fn default() -> Self {
3229 unsafe { std::mem::zeroed() }
3230 }
3231}
3232#[repr(C)]
3233#[derive(Copy, Clone)]
3234#[derive(Debug)]
3235pub struct management_interface {
3236 pub relative_oid: *const c_char,
3237 pub management_function: std::option::Option<unsafe extern "C" fn(relative_oid: *mut c_char,
3238 action: management_action,
3239 data: *mut c_char,
3240 datalen: usize)
3241 -> status>,
3242 pub rwlock: *mut thread_rwlock,
3243 pub refs: c_int,
3244 pub reflock: *mut mutex,
3245 pub parent: *mut loadable_module_interface,
3246 pub next: *mut management_interface,
3247}
3248impl std::default::Default for management_interface {
3249 fn default() -> Self {
3250 unsafe { std::mem::zeroed() }
3251 }
3252}
3253#[repr(C)]
3254#[derive(Copy, Clone)]
3255#[derive(Debug)]
3256pub struct limit_interface {
3257 pub interface_name: *const c_char,
3258 pub incr: std::option::Option<unsafe extern "C" fn(session: *mut core_session,
3259 realm: *const c_char,
3260 resource: *const c_char,
3261 max: c_int,
3262 interval: c_int)
3263 -> status>,
3264 pub release: std::option::Option<unsafe extern "C" fn(session: *mut core_session,
3265 realm: *const c_char,
3266 resource: *const c_char)
3267 -> status>,
3268 pub usage: std::option::Option<unsafe extern "C" fn(realm: *const c_char,
3269 resource: *const c_char,
3270 rcount: *mut u32)
3271 -> c_int>,
3272 pub reset: std::option::Option<extern "C" fn() -> status>,
3273 pub status: std::option::Option<extern "C" fn() -> *mut c_char>,
3274 pub interval_reset: std::option::Option<unsafe extern "C" fn(realm: *const c_char,
3275 resource: *const c_char)
3276 -> status>,
3277 pub rwlock: *mut thread_rwlock,
3278 pub refs: c_int,
3279 pub reflock: *mut mutex,
3280 pub parent: *mut loadable_module_interface,
3281 pub next: *mut limit_interface,
3282}
3283impl std::default::Default for limit_interface {
3284 fn default() -> Self {
3285 unsafe { std::mem::zeroed() }
3286 }
3287}
3288#[repr(C)]
3289#[derive(Copy, Clone)]
3290#[derive(Debug)]
3291pub struct directory_interface {
3292 pub interface_name: *const c_char,
3293 pub directory_open: std::option::Option<unsafe extern "C" fn(dh: *mut directory_handle,
3294 source: *mut c_char,
3295 dsn: *mut c_char,
3296 passwd: *mut c_char)
3297 -> status>,
3298 pub directory_close: std::option::Option<unsafe extern "C" fn(dh: *mut directory_handle)
3299 -> status>,
3300 pub directory_query: std::option::Option<unsafe extern "C" fn(dh: *mut directory_handle,
3301 base: *mut c_char,
3302 query: *mut c_char)
3303 -> status>,
3304 pub directory_next: std::option::Option<unsafe extern "C" fn(dh: *mut directory_handle)
3305 -> status>,
3306 pub directory_next_pair: std::option::Option<unsafe extern "C" fn(dh: *mut directory_handle,
3307 var: *mut *mut c_char,
3308 val: *mut *mut c_char)
3309 -> status>,
3310 pub rwlock: *mut thread_rwlock,
3311 pub refs: c_int,
3312 pub reflock: *mut mutex,
3313 pub parent: *mut loadable_module_interface,
3314 pub next: *mut directory_interface,
3315}
3316impl std::default::Default for directory_interface {
3317 fn default() -> Self {
3318 unsafe { std::mem::zeroed() }
3319 }
3320}
3321#[repr(C)]
3322#[derive(Copy, Clone)]
3323#[derive(Debug)]
3324pub struct directory_handle {
3325 pub directory_interface: *mut directory_interface,
3326 pub flags: u32,
3327 pub memory_pool: *mut memory_pool,
3328 pub private_info: *mut c_void,
3329}
3330impl std::default::Default for directory_handle {
3331 fn default() -> Self {
3332 unsafe { std::mem::zeroed() }
3333 }
3334}
3335#[repr(C)]
3336#[derive(Copy, Clone)]
3337#[derive(Debug)]
3338pub struct audio_codec_settings {
3339 pub unused: c_int,
3340}
3341impl std::default::Default for audio_codec_settings {
3342 fn default() -> Self {
3343 unsafe { std::mem::zeroed() }
3344 }
3345}
3346#[repr(C)]
3347#[derive(Copy, Clone)]
3348#[derive(Debug)]
3349pub struct video_codec_settings {
3350 pub bandwidth: u32,
3351 pub width: i32,
3352 pub height: i32,
3353 pub try_hardware_encoder: u8,
3354}
3355impl std::default::Default for video_codec_settings {
3356 fn default() -> Self {
3357 unsafe { std::mem::zeroed() }
3358 }
3359}
3360#[repr(C)]
3361#[derive(Copy, Clone)]
3362#[derive(Debug)]
3363pub struct codec_settings {
3364 pub _bindgen_data_: [u32; 4usize],
3365}
3366impl codec_settings {
3367 pub unsafe fn audio(&mut self) -> *mut audio_codec_settings {
3368 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
3369 std::mem::transmute(raw.offset(0))
3370 }
3371 pub unsafe fn video(&mut self) -> *mut video_codec_settings {
3372 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
3373 std::mem::transmute(raw.offset(0))
3374 }
3375}
3376impl std::default::Default for codec_settings {
3377 fn default() -> Self {
3378 unsafe { std::mem::zeroed() }
3379 }
3380}
3381#[repr(C)]
3382#[derive(Copy, Clone)]
3383#[derive(Debug)]
3384pub struct codec_fmtp {
3385 pub actual_samples_per_second: u32,
3386 pub bits_per_second: c_int,
3387 pub microseconds_per_packet: c_int,
3388 pub stereo: c_int,
3389 pub private_info: *mut c_void,
3390}
3391impl std::default::Default for codec_fmtp {
3392 fn default() -> Self {
3393 unsafe { std::mem::zeroed() }
3394 }
3395}
3396#[repr(C)]
3397#[derive(Copy, Clone)]
3398#[derive(Debug)]
3399pub struct picture {
3400 pub width: u32,
3401 pub height: u32,
3402 pub planes: [*mut u8; 4usize],
3403 pub stride: [u32; 4usize],
3404}
3405impl std::default::Default for picture {
3406 fn default() -> Self {
3407 unsafe { std::mem::zeroed() }
3408 }
3409}
3410#[repr(C)]
3411#[derive(Copy, Clone)]
3412#[derive(Debug)]
3413pub struct codec {
3414 pub codec_interface: *mut codec_interface,
3415 pub implementation: *const codec_implementation,
3416 pub fmtp_in: *mut c_char,
3417 pub fmtp_out: *mut c_char,
3418 pub flags: u32,
3419 pub memory_pool: *mut memory_pool,
3420 pub private_info: *mut c_void,
3421 pub agreed_pt: payload,
3422 pub mutex: *mut mutex,
3423 pub next: *mut codec,
3424 pub session: *mut core_session,
3425 pub cur_frame: *mut frame,
3426}
3427impl std::default::Default for codec {
3428 fn default() -> Self {
3429 unsafe { std::mem::zeroed() }
3430 }
3431}
3432#[repr(C)]
3433#[derive(Copy, Clone)]
3434#[derive(Debug)]
3435pub struct codec_implementation {
3436 pub codec_type: codec_type,
3437 pub ianacode: payload,
3438 pub iananame: *mut c_char,
3439 pub fmtp: *mut c_char,
3440 pub samples_per_second: u32,
3441 pub actual_samples_per_second: u32,
3442 pub bits_per_second: c_int,
3443 pub microseconds_per_packet: c_int,
3444 pub samples_per_packet: u32,
3445 pub decoded_bytes_per_packet: u32,
3446 pub encoded_bytes_per_packet: u32,
3447 pub number_of_channels: u8,
3448 pub codec_frames_per_packet: c_int,
3449 pub init: core_codec_init_func,
3450 pub encode: core_codec_encode_func,
3451 pub decode: core_codec_decode_func,
3452 pub encode_video: core_codec_video_encode_func,
3453 pub decode_video: core_codec_video_decode_func,
3454 pub codec_control: core_codec_control_func,
3455 pub destroy: core_codec_destroy_func,
3456 pub codec_id: u32,
3457 pub impl_id: u32,
3458 pub modname: *mut c_char,
3459 pub next: *mut codec_implementation,
3460}
3461impl std::default::Default for codec_implementation {
3462 fn default() -> Self {
3463 unsafe { std::mem::zeroed() }
3464 }
3465}
3466#[repr(C)]
3467#[derive(Copy, Clone)]
3468#[derive(Debug)]
3469pub struct codec_interface {
3470 pub interface_name: *const c_char,
3471 pub implementations: *mut codec_implementation,
3472 pub parse_fmtp: core_codec_fmtp_parse_func,
3473 pub codec_id: u32,
3474 pub rwlock: *mut thread_rwlock,
3475 pub refs: c_int,
3476 pub reflock: *mut mutex,
3477 pub modname: *mut c_char,
3478 pub parent: *mut loadable_module_interface,
3479 pub next: *mut codec_interface,
3480}
3481impl std::default::Default for codec_interface {
3482 fn default() -> Self {
3483 unsafe { std::mem::zeroed() }
3484 }
3485}
3486#[repr(C)]
3487#[derive(Copy, Clone)]
3488#[derive(Debug)]
3489pub struct application_interface {
3490 pub interface_name: *const c_char,
3491 pub application_function: application_function,
3492 pub long_desc: *const c_char,
3493 pub short_desc: *const c_char,
3494 pub syntax: *const c_char,
3495 pub flags: u32,
3496 pub rwlock: *mut thread_rwlock,
3497 pub refs: c_int,
3498 pub reflock: *mut mutex,
3499 pub parent: *mut loadable_module_interface,
3500 pub next: *mut application_interface,
3501}
3502impl std::default::Default for application_interface {
3503 fn default() -> Self {
3504 unsafe { std::mem::zeroed() }
3505 }
3506}
3507#[repr(C)]
3508#[derive(Copy, Clone)]
3509#[derive(Debug)]
3510pub struct chat_application_interface {
3511 pub interface_name: *const c_char,
3512 pub chat_application_function: chat_application_function,
3513 pub long_desc: *const c_char,
3514 pub short_desc: *const c_char,
3515 pub syntax: *const c_char,
3516 pub flags: u32,
3517 pub rwlock: *mut thread_rwlock,
3518 pub refs: c_int,
3519 pub reflock: *mut mutex,
3520 pub parent: *mut loadable_module_interface,
3521 pub next: *mut chat_application_interface,
3522}
3523impl std::default::Default for chat_application_interface {
3524 fn default() -> Self {
3525 unsafe { std::mem::zeroed() }
3526 }
3527}
3528#[repr(C)]
3529#[derive(Copy, Clone)]
3530#[derive(Debug)]
3531pub struct api_interface {
3532 pub interface_name: *const c_char,
3533 pub desc: *const c_char,
3534 pub function: api_function,
3535 pub syntax: *const c_char,
3536 pub rwlock: *mut thread_rwlock,
3537 pub refs: c_int,
3538 pub reflock: *mut mutex,
3539 pub parent: *mut loadable_module_interface,
3540 pub next: *mut api_interface,
3541}
3542impl std::default::Default for api_interface {
3543 fn default() -> Self {
3544 unsafe { std::mem::zeroed() }
3545 }
3546}
3547#[repr(C)]
3548#[derive(Copy, Clone)]
3549#[derive(Debug)]
3550pub struct json_api_interface {
3551 pub interface_name: *const c_char,
3552 pub desc: *const c_char,
3553 pub function: json_api_function,
3554 pub syntax: *const c_char,
3555 pub rwlock: *mut thread_rwlock,
3556 pub refs: c_int,
3557 pub reflock: *mut mutex,
3558 pub parent: *mut loadable_module_interface,
3559 pub next: *mut json_api_interface,
3560}
3561impl std::default::Default for json_api_interface {
3562 fn default() -> Self {
3563 unsafe { std::mem::zeroed() }
3564 }
3565}
3566#[repr(C)]
3567#[derive(Copy, Clone)]
3568#[derive(Debug)]
3569pub struct frame {
3570 pub codec: *mut codec,
3571 pub source: *const c_char,
3572 pub packet: *mut c_void,
3573 pub packetlen: u32,
3574 pub extra_data: *mut c_void,
3575 pub data: *mut c_void,
3576 pub datalen: u32,
3577 pub buflen: u32,
3578 pub samples: u32,
3579 pub rate: u32,
3580 pub channels: u32,
3581 pub payload: payload,
3582 pub timestamp: u32,
3583 pub seq: u16,
3584 pub ssrc: u32,
3585 pub m: switch_bool,
3586 pub flags: frame_flag,
3587 pub user_data: *mut c_void,
3588 pub pmap: *mut payload_map,
3589 pub img: *mut vpx_image,
3590}
3591impl std::default::Default for frame {
3592 fn default() -> Self {
3593 unsafe { std::mem::zeroed() }
3594 }
3595}
3596#[repr(C)]
3597#[derive(Copy)]
3598pub struct slin_data {
3599 pub session: *mut core_session,
3600 pub write_frame: frame,
3601 pub codec: codec,
3602 pub frame_data: [c_char; 8192usize],
3603}
3604impl std::clone::Clone for slin_data {
3605 fn clone(&self) -> Self {
3606 *self
3607 }
3608}
3609impl std::default::Default for slin_data {
3610 fn default() -> Self {
3611 unsafe { std::mem::zeroed() }
3612 }
3613}
3614#[repr(C)]
3615#[derive(Copy, Clone)]
3616#[derive(Debug)]
3617pub struct loadable_module_interface {
3618 pub module_name: *const c_char,
3619 pub endpoint_interface: *mut endpoint_interface,
3620 pub timer_interface: *mut timer_interface,
3621 pub dialplan_interface: *mut dialplan_interface,
3622 pub codec_interface: *mut codec_interface,
3623 pub application_interface: *mut application_interface,
3624 pub chat_application_interface: *mut chat_application_interface,
3625 pub api_interface: *mut api_interface,
3626 pub json_api_interface: *mut json_api_interface,
3627 pub file_interface: *mut file_interface,
3628 pub speech_interface: *mut speech_interface,
3629 pub directory_interface: *mut directory_interface,
3630 pub chat_interface: *mut chat_interface,
3631 pub say_interface: *mut say_interface,
3632 pub asr_interface: *mut asr_interface,
3633 pub management_interface: *mut management_interface,
3634 pub limit_interface: *mut limit_interface,
3635 pub rwlock: *mut thread_rwlock,
3636 pub refs: c_int,
3637 pub pool: *mut memory_pool,
3638}
3639impl std::default::Default for loadable_module_interface {
3640 fn default() -> Self {
3641 unsafe { std::mem::zeroed() }
3642 }
3643}
3644#[derive(Copy, Clone)]
3645#[repr(i32)]
3646#[derive(Debug)]
3647pub enum _LIB_VERSION_TYPE {
3648 IEEE_ = -1,
3649 SVID_ = 0,
3650 XOPEN_ = 1,
3651 POSIX_ = 2,
3652 ISOC_ = 3,
3653}
3654#[repr(C)]
3655#[derive(Copy, Clone)]
3656#[derive(Debug)]
3657pub struct ip {
3658 pub _bindgen_data_: [u32; 4usize],
3659}
3660impl ip {
3661 pub unsafe fn v4(&mut self) -> *mut u32 {
3662 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
3663 std::mem::transmute(raw.offset(0))
3664 }
3665 pub unsafe fn v6(&mut self) -> *mut in6_addr {
3666 let raw: *mut u8 = std::mem::transmute(&self._bindgen_data_);
3667 std::mem::transmute(raw.offset(0))
3668 }
3669}
3670impl std::default::Default for ip {
3671 fn default() -> Self {
3672 unsafe { std::mem::zeroed() }
3673 }
3674}
3675#[derive(Copy, Clone)]
3676#[repr(u32)]
3677#[derive(Debug)]
3678pub enum uri_flags {
3679 NUMERIC_HOST = 1,
3680 NUMERIC_PORT = 2,
3681 NO_SCOPE = 4,
3682}
3683#[repr(C)]
3684#[derive(Copy, Clone)]
3685#[derive(Debug)]
3686pub struct http_request {
3687 pub method: *const c_char,
3688 pub uri: *const c_char,
3689 pub qs: *const c_char,
3690 pub host: *const c_char,
3691 pub port: port,
3692 pub from: *const c_char,
3693 pub user_agent: *const c_char,
3694 pub referer: *const c_char,
3695 pub user: *const c_char,
3696 pub keepalive: switch_bool,
3697 pub content_type: *const c_char,
3698 pub content_length: usize,
3699 pub bytes_header: usize,
3700 pub bytes_read: usize,
3701 pub bytes_buffered: usize,
3702 pub headers: *mut event,
3703 pub user_data: *mut c_void,
3704 pub _buffer: *mut c_char,
3705 pub _destroy_headers: switch_bool,
3706}
3707impl std::default::Default for http_request {
3708 fn default() -> Self {
3709 unsafe { std::mem::zeroed() }
3710 }
3711}
3712#[repr(C)]
3713#[derive(Copy, Clone)]
3714#[derive(Debug)]
3715pub struct cputime {
3716 pub userms: i64,
3717 pub kernelms: i64,
3718}
3719impl std::default::Default for cputime {
3720 fn default() -> Self {
3721 unsafe { std::mem::zeroed() }
3722 }
3723}
3724#[repr(C)]
3725#[derive(Copy, Clone)]
3726#[derive(Debug)]
3727pub struct profile_node {
3728 pub var: *mut c_char,
3729 pub val: *mut c_char,
3730 pub next: *mut profile_node,
3731}
3732impl std::default::Default for profile_node {
3733 fn default() -> Self {
3734 unsafe { std::mem::zeroed() }
3735 }
3736}
3737#[repr(C)]
3738#[derive(Copy, Clone)]
3739#[derive(Debug)]
3740pub struct caller_profile {
3741 pub username: *const c_char,
3742 pub dialplan: *const c_char,
3743 pub caller_id_name: *const c_char,
3744 pub caller_id_number: *const c_char,
3745 pub orig_caller_id_name: *const c_char,
3746 pub orig_caller_id_number: *const c_char,
3747 pub callee_id_name: *const c_char,
3748 pub callee_id_number: *const c_char,
3749 pub caller_ton: u8,
3750 pub caller_numplan: u8,
3751 pub network_addr: *const c_char,
3752 pub ani: *const c_char,
3753 pub ani_ton: u8,
3754 pub ani_numplan: u8,
3755 pub aniii: *const c_char,
3756 pub rdnis: *const c_char,
3757 pub rdnis_ton: u8,
3758 pub rdnis_numplan: u8,
3759 pub destination_number: *mut c_char,
3760 pub destination_number_ton: u8,
3761 pub destination_number_numplan: u8,
3762 pub source: *const c_char,
3763 pub chan_name: *mut c_char,
3764 pub uuid: *mut c_char,
3765 pub context: *const c_char,
3766 pub profile_index: *const c_char,
3767 pub flags: caller_profile_flag,
3768 pub originator_caller_profile: *mut caller_profile,
3769 pub originatee_caller_profile: *mut caller_profile,
3770 pub origination_caller_profile: *mut caller_profile,
3771 pub hunt_caller_profile: *mut caller_profile,
3772 pub times: *mut channel_timetable,
3773 pub old_times: *mut channel_timetable,
3774 pub caller_extension: *mut caller_extension,
3775 pub pool: *mut memory_pool,
3776 pub next: *mut caller_profile,
3777 pub direction: call_direction,
3778 pub logical_direction: call_direction,
3779 pub soft: *mut profile_node,
3780 pub uuid_str: *mut c_char,
3781 pub clone_of: *mut c_char,
3782 pub transfer_source: *mut c_char,
3783}
3784impl std::default::Default for caller_profile {
3785 fn default() -> Self {
3786 unsafe { std::mem::zeroed() }
3787 }
3788}
3789#[repr(C)]
3790#[derive(Copy, Clone)]
3791#[derive(Debug)]
3792pub struct caller_application {
3793 pub application_name: *mut c_char,
3794 pub application_data: *mut c_char,
3795 pub application_function: application_function,
3796 pub next: *mut caller_application,
3797}
3798impl std::default::Default for caller_application {
3799 fn default() -> Self {
3800 unsafe { std::mem::zeroed() }
3801 }
3802}
3803#[repr(C)]
3804#[derive(Copy, Clone)]
3805#[derive(Debug)]
3806pub struct caller_extension {
3807 pub extension_name: *mut c_char,
3808 pub extension_number: *mut c_char,
3809 pub current_application: *mut caller_application,
3810 pub last_application: *mut caller_application,
3811 pub applications: *mut caller_application,
3812 pub children: *mut caller_profile,
3813 pub next: *mut caller_extension,
3814}
3815impl std::default::Default for caller_extension {
3816 fn default() -> Self {
3817 unsafe { std::mem::zeroed() }
3818 }
3819}
3820#[repr(C)]
3821#[derive(Copy, Clone)]
3822#[derive(Debug)]
3823pub struct rtcp_report_block_frame {
3824 pub ssrc: u32,
3825 pub fraction: u8,
3826 pub lost: u32,
3827 pub highest_sequence_number_received: u32,
3828 pub jitter: u32,
3829 pub lsr: u32,
3830 pub dlsr: u32,
3831 pub loss_avg: u32,
3832 pub rtt_avg: f64,
3833}
3834impl std::default::Default for rtcp_report_block_frame {
3835 fn default() -> Self {
3836 unsafe { std::mem::zeroed() }
3837 }
3838}
3839#[repr(C)]
3840#[derive(Copy, Clone)]
3841#[derive(Debug)]
3842pub struct rtcp_frame {
3843 pub report_count: u16,
3844 pub packet_type: u16,
3845 pub ssrc: u32,
3846 pub ntp_msw: u32,
3847 pub ntp_lsw: u32,
3848 pub timestamp: u32,
3849 pub packet_count: u32,
3850 pub octect_count: u32,
3851 pub nb_reports: u32,
3852 pub reports: [rtcp_report_block_frame; 5usize],
3853}
3854impl std::default::Default for rtcp_frame {
3855 fn default() -> Self {
3856 unsafe { std::mem::zeroed() }
3857 }
3858}
3859#[repr(C)]
3860#[derive(Copy, Clone)]
3861#[derive(Debug)]
3862pub struct channel_timetable {
3863 pub profile_created: time_t,
3864 pub created: time_t,
3865 pub answered: time_t,
3866 pub progress: time_t,
3867 pub progress_media: time_t,
3868 pub hungup: time_t,
3869 pub transferred: time_t,
3870 pub resurrected: time_t,
3871 pub bridged: time_t,
3872 pub last_hold: time_t,
3873 pub hold_accum: time_t,
3874 pub next: *mut channel_timetable,
3875}
3876impl std::default::Default for channel_timetable {
3877 fn default() -> Self {
3878 unsafe { std::mem::zeroed() }
3879 }
3880}
3881#[repr(C)]
3882#[derive(Copy, Clone)]
3883#[derive(Debug)]
3884pub struct event_header {
3885 pub name: *mut c_char,
3886 pub value: *mut c_char,
3887 pub array: *mut *mut c_char,
3888 pub idx: c_int,
3889 pub hash: c_ulong,
3890 pub next: *mut event_header,
3891}
3892impl std::default::Default for event_header {
3893 fn default() -> Self {
3894 unsafe { std::mem::zeroed() }
3895 }
3896}
3897#[repr(C)]
3898#[derive(Copy, Clone)]
3899#[derive(Debug)]
3900pub struct event {
3901 pub event_id: event_types,
3902 pub priority: priority,
3903 pub owner: *mut c_char,
3904 pub subclass_name: *mut c_char,
3905 pub headers: *mut event_header,
3906 pub last_header: *mut event_header,
3907 pub body: *mut c_char,
3908 pub bind_user_data: *mut c_void,
3909 pub event_user_data: *mut c_void,
3910 pub key: c_ulong,
3911 pub next: *mut event,
3912 pub flags: c_int,
3913}
3914impl std::default::Default for event {
3915 fn default() -> Self {
3916 unsafe { std::mem::zeroed() }
3917 }
3918}
3919#[repr(C)]
3920#[derive(Copy, Clone)]
3921#[derive(Debug)]
3922pub struct serial_event {
3923 pub event_id: c_int,
3924 pub priority: c_int,
3925 pub flags: c_int,
3926 pub owner: *mut c_char,
3927 pub subclass_name: *mut c_char,
3928 pub body: *mut c_char,
3929}
3930impl std::default::Default for serial_event {
3931 fn default() -> Self {
3932 unsafe { std::mem::zeroed() }
3933 }
3934}
3935#[repr(C)]
3936#[derive(Copy, Clone)]
3937#[derive(Debug)]
3938pub struct serial_event_header {
3939 pub name: *mut c_char,
3940 pub value: *mut c_char,
3941}
3942impl std::default::Default for serial_event_header {
3943 fn default() -> Self {
3944 unsafe { std::mem::zeroed() }
3945 }
3946}
3947#[derive(Copy, Clone)]
3948#[repr(u32)]
3949#[derive(Debug)]
3950pub enum event_flag {
3951 EF_UNIQ_HEADERS = 1,
3952 EF_NO_CHAT_EXEC = 2,
3953 EF_DEFAULT_ALLOW = 4,
3954}
3955pub type live_array_command_handler =
3956 std::option::Option<unsafe extern "C" fn(la: *mut live_array,
3957 cmd: *const c_char,
3958 sessid: *const c_char,
3959 jla: *mut cJSON,
3960 user_data: *mut c_void)>;
3961#[derive(Copy, Clone)]
3962#[repr(u32)]
3963#[derive(Debug)]
3964pub enum img_position {
3965 POS_LEFT_TOP = 0,
3966 POS_LEFT_MID = 1,
3967 POS_LEFT_BOT = 2,
3968 POS_CENTER_TOP = 3,
3969 POS_CENTER_MID = 4,
3970 POS_CENTER_BOT = 5,
3971 POS_RIGHT_TOP = 6,
3972 POS_RIGHT_MID = 7,
3973 POS_RIGHT_BOT = 8,
3974 POS_NONE = 9,
3975}
3976#[derive(Copy, Clone)]
3977#[repr(u32)]
3978#[derive(Debug)]
3979pub enum img_fit {
3980 FIT_SIZE = 0,
3981 FIT_SCALE = 1,
3982 FIT_SIZE_AND_SCALE = 2,
3983 FIT_NONE = 3,
3984}
3985#[repr(C)]
3986#[derive(Copy, Clone)]
3987#[derive(Debug)]
3988pub struct yuv_color {
3989 pub y: u8,
3990 pub u: u8,
3991 pub v: u8,
3992}
3993impl std::default::Default for yuv_color {
3994 fn default() -> Self {
3995 unsafe { std::mem::zeroed() }
3996 }
3997}
3998#[repr(C)]
3999#[derive(Copy, Clone)]
4000#[derive(Debug)]
4001pub struct rgb_color {
4002 pub a: u8,
4003 pub r: u8,
4004 pub g: u8,
4005 pub b: u8,
4006}
4007impl std::default::Default for rgb_color {
4008 fn default() -> Self {
4009 unsafe { std::mem::zeroed() }
4010 }
4011}
4012#[repr(C)]
4013#[derive(Copy, Clone)]
4014#[derive(Debug)]
4015pub struct image_rect {
4016 pub x: c_uint,
4017 pub y: c_uint,
4018 pub w: c_uint,
4019 pub h: c_uint,
4020}
4021impl std::default::Default for image_rect {
4022 fn default() -> Self {
4023 unsafe { std::mem::zeroed() }
4024 }
4025}
4026#[derive(Copy, Clone)]
4027#[repr(u32)]
4028#[derive(Debug)]
4029pub enum convert_fmt {
4030 YUYV = 0,
4031}
4032pub enum png_opaque { }
4033#[repr(C)]
4034#[derive(Copy, Clone)]
4035#[derive(Debug)]
4036pub struct png {
4037 pub pvt: *mut png_opaque,
4038 pub w: c_int,
4039 pub h: c_int,
4040}
4041impl std::default::Default for png {
4042 fn default() -> Self {
4043 unsafe { std::mem::zeroed() }
4044 }
4045}
4046#[derive(Copy, Clone)]
4047#[repr(u32)]
4048#[derive(Debug)]
4049pub enum image_rotation_mode {
4050 SRM_NONE = 0,
4051 SRM_90 = 90,
4052 SRM_180 = 180,
4053 SRM_270 = 270,
4054}
4055#[repr(C)]
4056#[derive(Copy)]
4057pub struct unicast_conninfo {
4058 pub session: *mut core_session,
4059 pub read_codec: codec,
4060 pub write_frame: frame,
4061 pub write_frame_data: [u8; 8192usize],
4062 pub socket: *mut socket,
4063 pub local_ip: *mut c_char,
4064 pub local_port: port,
4065 pub remote_ip: *mut c_char,
4066 pub remote_port: port,
4067 pub local_addr: *mut sockaddr,
4068 pub remote_addr: *mut sockaddr,
4069 pub flag_mutex: *mut mutex,
4070 pub flags: i32,
4071 pub type_: c_int,
4072 pub transport: c_int,
4073 pub stream_id: c_int,
4074 pub thread: *mut thread,
4075}
4076impl std::clone::Clone for unicast_conninfo {
4077 fn clone(&self) -> Self {
4078 *self
4079 }
4080}
4081impl std::default::Default for unicast_conninfo {
4082 fn default() -> Self {
4083 unsafe { std::mem::zeroed() }
4084 }
4085}
4086pub enum ivr_digit_stream { }
4087#[derive(Copy, Clone)]
4088#[repr(u32)]
4089#[derive(Debug)]
4090pub enum ivr_menu_flags {
4091 FALLTOMAIN = 1,
4092 FREEPOOL = 2,
4093 STACK = 4,
4094}
4095#[derive(Copy, Clone)]
4096#[repr(u32)]
4097#[derive(Debug)]
4098pub enum ivr_action {
4099 DIE = 0,
4100 EXECMENU = 1,
4101 EXECAPP = 2,
4102 PLAYSOUND = 3,
4103 BACK = 4,
4104 TOMAIN = 5,
4105 NOOP = 6,
4106}
4107pub enum ivr_menu { }
4108pub type ivr_menu_action_function = unsafe extern "C" fn(arg1: *mut ivr_menu,
4109 arg2: *mut c_char,
4110 arg3: *mut c_char,
4111 arg4: usize,
4112 arg5: *mut c_void)
4113 -> ivr_action;
4114pub enum ivr_menu_action { }
4115pub enum ivr_menu_xml_ctx { }
4116#[repr(C)]
4117#[derive(Copy)]
4118pub struct rtp_packet {
4119 pub header: rtp_hdr,
4120 pub body: [c_char; 16396usize],
4121}
4122impl std::clone::Clone for rtp_packet {
4123 fn clone(&self) -> Self {
4124 *self
4125 }
4126}
4127impl std::default::Default for rtp_packet {
4128 fn default() -> Self {
4129 unsafe { std::mem::zeroed() }
4130 }
4131}
4132#[derive(Copy, Clone)]
4133#[repr(u32)]
4134#[derive(Debug)]
4135pub enum rtp_crypto_direction {
4136 SEND = 0,
4137 RECV = 1,
4138 SEND_RTCP = 2,
4139 RECV_RTCP = 3,
4140 MAX = 4,
4141}
4142#[repr(C)]
4143#[derive(Copy, Clone)]
4144#[derive(Debug)]
4145pub struct srtp_crypto_suite {
4146 pub name: *mut c_char,
4147 pub type_: rtp_crypto_key_type,
4148 pub keylen: c_int,
4149}
4150impl std::default::Default for srtp_crypto_suite {
4151 fn default() -> Self {
4152 unsafe { std::mem::zeroed() }
4153 }
4154}
4155#[repr(C)]
4156#[derive(Copy)]
4157pub struct rtp_crypto_key {
4158 pub index: u32,
4159 pub type_: rtp_crypto_key_type,
4160 pub key: [c_uchar; 64usize],
4161 pub keylen: usize,
4162 pub next: *mut rtp_crypto_key,
4163}
4164impl std::clone::Clone for rtp_crypto_key {
4165 fn clone(&self) -> Self {
4166 *self
4167 }
4168}
4169impl std::default::Default for rtp_crypto_key {
4170 fn default() -> Self {
4171 unsafe { std::mem::zeroed() }
4172 }
4173}
4174#[derive(Copy, Clone)]
4175#[repr(u32)]
4176#[derive(Debug)]
4177pub enum ice_proto {
4178 RTP = 0,
4179 RTCP = 1,
4180}
4181#[repr(C)]
4182#[derive(Copy, Clone)]
4183#[derive(Debug)]
4184pub struct icand {
4185 pub foundation: *mut c_char,
4186 pub component_id: c_int,
4187 pub transport: *mut c_char,
4188 pub priority: u32,
4189 pub con_addr: *mut c_char,
4190 pub con_port: port,
4191 pub cand_type: *mut c_char,
4192 pub raddr: *mut c_char,
4193 pub rport: port,
4194 pub generation: *mut c_char,
4195 pub ready: u8,
4196}
4197impl std::default::Default for icand {
4198 fn default() -> Self {
4199 unsafe { std::mem::zeroed() }
4200 }
4201}
4202#[repr(C)]
4203#[derive(Copy)]
4204pub struct ice {
4205 pub cands: [[icand; 2usize]; 50usize],
4206 pub cand_idx: [c_int; 2usize],
4207 pub chosen: [c_int; 2usize],
4208 pub is_chosen: [c_int; 2usize],
4209 pub ufrag: *mut c_char,
4210 pub pwd: *mut c_char,
4211 pub options: *mut c_char,
4212}
4213impl std::clone::Clone for ice {
4214 fn clone(&self) -> Self {
4215 *self
4216 }
4217}
4218impl std::default::Default for ice {
4219 fn default() -> Self {
4220 unsafe { std::mem::zeroed() }
4221 }
4222}
4223#[derive(Copy, Clone)]
4224#[repr(u32)]
4225#[derive(Debug)]
4226pub enum rtcp_pt {
4227 IJ = 195,
4228 SR = 200,
4229 RR = 201,
4230 SDES = 202,
4231 BYE = 203,
4232 APP = 204,
4233 RTPFB = 205,
4234 PSFB = 206,
4235 XR = 207,
4236 AVB = 208,
4237 RSI = 209,
4238 TOKEN = 210,
4239 IDMS = 211,
4240 LAST = 255,
4241}
4242#[derive(Copy, Clone)]
4243#[repr(u32)]
4244#[derive(Debug)]
4245pub enum rtcp_sdes {
4246 END = 0,
4247 CNAME = 1,
4248 NAME = 2,
4249 EMAIL = 3,
4250 PHONE = 4,
4251 LOC = 5,
4252 TOOL = 6,
4253 NOTE = 7,
4254 PRIV = 8,
4255 H323 = 9,
4256 APSI = 10,
4257}
4258#[derive(Copy, Clone)]
4259#[repr(u32)]
4260#[derive(Debug)]
4261pub enum rtcp_rtpfb {
4262 NACK = 1,
4263 TMMBR = 3,
4264 TMMBN = 4,
4265 SR_REQ = 5,
4266 RAMS = 6,
4267 TLLEI = 7,
4268 ECN_FB = 8,
4269}
4270#[derive(Copy, Clone)]
4271#[repr(u32)]
4272#[derive(Debug)]
4273pub enum rtcp_psfb {
4274 PLI = 1,
4275 SLI = 2,
4276 RPSI = 3,
4277 FIR = 4,
4278 TSTR = 5,
4279 TSTN = 6,
4280 VBCM = 7,
4281 PSLEI = 8,
4282 AFB = 15,
4283}
4284pub type rtp_invalid_handler = std::option::Option<unsafe extern "C" fn(rtp_session: *mut rtp,
4285 sock: *mut socket,
4286 data: *mut c_void,
4287 datalen: usize,
4288 from_addr: *mut sockaddr)>;
4289#[derive(Copy, Clone)]
4290#[repr(u32)]
4291#[derive(Debug)]
4292pub enum xml_flag {
4293 XML_ROOT = 1,
4294 XML_NAMEM = 2,
4295 XML_TXTM = 4,
4296 XML_DUP = 8,
4297}
4298#[repr(C)]
4299#[derive(Copy, Clone)]
4300#[derive(Debug)]
4301pub struct xml {
4302 pub name: *mut c_char,
4303 pub attr: *mut *mut c_char,
4304 pub txt: *mut c_char,
4305 pub free_path: *mut c_char,
4306 pub off: usize,
4307 pub next: xml_t,
4308 pub sibling: xml_t,
4309 pub ordered: xml_t,
4310 pub child: xml_t,
4311 pub parent: xml_t,
4312 pub flags: u32,
4313 pub is_xml_root: switch_bool,
4314 pub refs: u32,
4315}
4316impl std::default::Default for xml {
4317 fn default() -> Self {
4318 unsafe { std::mem::zeroed() }
4319 }
4320}
4321#[derive(Copy, Clone)]
4322#[repr(u32)]
4323#[derive(Debug)]
4324pub enum xml_config_type {
4325 INT = 0,
4326 ATOMIC = 1,
4327 STRING = 2,
4328 SWITCH_BOOL = 3,
4329 CUSTOM = 4,
4330 ENUM = 5,
4331 FLAG = 6,
4332 FLAGARRAY = 7,
4333 LAST = 8,
4334}
4335#[repr(C)]
4336#[derive(Copy, Clone)]
4337#[derive(Debug)]
4338pub struct xml_config_enum_item {
4339 pub key: *mut c_char,
4340 pub value: c_int,
4341}
4342impl std::default::Default for xml_config_enum_item {
4343 fn default() -> Self {
4344 unsafe { std::mem::zeroed() }
4345 }
4346}
4347#[repr(C)]
4348#[derive(Copy, Clone)]
4349#[derive(Debug)]
4350pub struct xml_config_string_options {
4351 pub pool: *mut memory_pool,
4352 pub length: usize,
4353 pub validation_regex: *mut c_char,
4354}
4355impl std::default::Default for xml_config_string_options {
4356 fn default() -> Self {
4357 unsafe { std::mem::zeroed() }
4358 }
4359}
4360#[repr(C)]
4361#[derive(Copy, Clone)]
4362#[derive(Debug)]
4363pub struct xml_config_int_options {
4364 pub enforce_min: switch_bool,
4365 pub min: c_int,
4366 pub enforce_max: switch_bool,
4367 pub max: c_int,
4368}
4369impl std::default::Default for xml_config_int_options {
4370 fn default() -> Self {
4371 unsafe { std::mem::zeroed() }
4372 }
4373}
4374#[repr(C)]
4375#[derive(Copy, Clone)]
4376#[derive(Debug)]
4377pub struct xml_config_atomic_options {
4378 pub enforce_min: switch_bool,
4379 pub min: u32,
4380 pub enforce_max: switch_bool,
4381 pub max: u32,
4382}
4383impl std::default::Default for xml_config_atomic_options {
4384 fn default() -> Self {
4385 unsafe { std::mem::zeroed() }
4386 }
4387}
4388#[derive(Copy, Clone)]
4389#[repr(u32)]
4390#[derive(Debug)]
4391pub enum config_callback_type {
4392 LOAD = 0,
4393 RELOAD = 1,
4394 SHUTDOWN = 2,
4395}
4396#[derive(Copy, Clone)]
4397#[repr(u32)]
4398#[derive(Debug)]
4399pub enum config_flags {
4400 RELOADABLE = 1,
4401 REQUIRED = 2,
4402}
4403pub type xml_config_callback =
4404 std::option::Option<unsafe extern "C" fn(item: *mut xml_config_item,
4405 newvalue: *const c_char,
4406 callback_type: config_callback_type,
4407 changed: switch_bool)
4408 -> status>;
4409#[repr(C)]
4410#[derive(Copy, Clone)]
4411#[derive(Debug)]
4412pub struct xml_config_item {
4413 pub key: *const c_char,
4414 pub type_: xml_config_type,
4415 pub flags: c_int,
4416 pub ptr: *mut c_void,
4417 pub defaultvalue: *const c_void,
4418 pub data: *mut c_void,
4419 pub function: xml_config_callback,
4420 pub syntax: *const c_char,
4421 pub helptext: *const c_char,
4422}
4423impl std::default::Default for xml_config_item {
4424 fn default() -> Self {
4425 unsafe { std::mem::zeroed() }
4426 }
4427}
4428pub type outgoing_channel_hook =
4429 std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4430 arg2: *mut event,
4431 arg3: *mut caller_profile,
4432 arg4: *mut core_session,
4433 arg5: originate_flag)
4434 -> status>;
4435pub type receive_message_hook =
4436 std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4437 arg2: *mut core_session_message)
4438 -> status>;
4439pub type receive_event_hook = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4440 arg2: *mut event)
4441 -> status>;
4442pub type read_frame_hook = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4443 arg2: *mut *mut frame,
4444 arg3: io_flag,
4445 arg4: c_int)
4446 -> status>;
4447pub type video_read_frame_hook = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4448 arg2: *mut *mut frame,
4449 arg3: io_flag,
4450 arg4: c_int)
4451 -> status>;
4452pub type write_frame_hook = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4453 arg2: *mut frame,
4454 arg3: io_flag,
4455 arg4: c_int)
4456 -> status>;
4457pub type video_write_frame_hook =
4458 std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4459 arg2: *mut frame,
4460 arg3: io_flag,
4461 arg4: c_int)
4462 -> status>;
4463pub type kill_channel_hook = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4464 arg2: c_int)
4465 -> status>;
4466pub type send_dtmf_hook = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4467 arg2: *const dtmf,
4468 direction: dtmf_direction)
4469 -> status>;
4470pub type recv_dtmf_hook = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session,
4471 arg2: *const dtmf,
4472 direction: dtmf_direction)
4473 -> status>;
4474pub type state_change_hook = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session)
4475 -> status>;
4476pub type state_run_hook = std::option::Option<unsafe extern "C" fn(arg1: *mut core_session)
4477 -> status>;
4478#[repr(C)]
4479#[derive(Copy, Clone)]
4480#[derive(Debug)]
4481pub struct io_event_hook_outgoing_channel {
4482 pub outgoing_channel: outgoing_channel_hook,
4483 pub next: *mut io_event_hook_outgoing_channel,
4484}
4485impl std::default::Default for io_event_hook_outgoing_channel {
4486 fn default() -> Self {
4487 unsafe { std::mem::zeroed() }
4488 }
4489}
4490#[repr(C)]
4491#[derive(Copy, Clone)]
4492#[derive(Debug)]
4493pub struct io_event_hook_receive_message {
4494 pub receive_message: receive_message_hook,
4495 pub next: *mut io_event_hook_receive_message,
4496}
4497impl std::default::Default for io_event_hook_receive_message {
4498 fn default() -> Self {
4499 unsafe { std::mem::zeroed() }
4500 }
4501}
4502#[repr(C)]
4503#[derive(Copy, Clone)]
4504#[derive(Debug)]
4505pub struct io_event_hook_receive_event {
4506 pub receive_event: receive_event_hook,
4507 pub next: *mut io_event_hook_receive_event,
4508}
4509impl std::default::Default for io_event_hook_receive_event {
4510 fn default() -> Self {
4511 unsafe { std::mem::zeroed() }
4512 }
4513}
4514#[repr(C)]
4515#[derive(Copy, Clone)]
4516#[derive(Debug)]
4517pub struct io_event_hook_read_frame {
4518 pub read_frame: read_frame_hook,
4519 pub next: *mut io_event_hook_read_frame,
4520}
4521impl std::default::Default for io_event_hook_read_frame {
4522 fn default() -> Self {
4523 unsafe { std::mem::zeroed() }
4524 }
4525}
4526#[repr(C)]
4527#[derive(Copy, Clone)]
4528#[derive(Debug)]
4529pub struct io_event_hook_video_read_frame {
4530 pub video_read_frame: read_frame_hook,
4531 pub next: *mut io_event_hook_video_read_frame,
4532}
4533impl std::default::Default for io_event_hook_video_read_frame {
4534 fn default() -> Self {
4535 unsafe { std::mem::zeroed() }
4536 }
4537}
4538#[repr(C)]
4539#[derive(Copy, Clone)]
4540#[derive(Debug)]
4541pub struct io_event_hook_write_frame {
4542 pub write_frame: write_frame_hook,
4543 pub next: *mut io_event_hook_write_frame,
4544}
4545impl std::default::Default for io_event_hook_write_frame {
4546 fn default() -> Self {
4547 unsafe { std::mem::zeroed() }
4548 }
4549}
4550#[repr(C)]
4551#[derive(Copy, Clone)]
4552#[derive(Debug)]
4553pub struct io_event_hook_video_write_frame {
4554 pub video_write_frame: video_write_frame_hook,
4555 pub next: *mut io_event_hook_video_write_frame,
4556}
4557impl std::default::Default for io_event_hook_video_write_frame {
4558 fn default() -> Self {
4559 unsafe { std::mem::zeroed() }
4560 }
4561}
4562#[repr(C)]
4563#[derive(Copy, Clone)]
4564#[derive(Debug)]
4565pub struct io_event_hook_kill_channel {
4566 pub kill_channel: kill_channel_hook,
4567 pub next: *mut io_event_hook_kill_channel,
4568}
4569impl std::default::Default for io_event_hook_kill_channel {
4570 fn default() -> Self {
4571 unsafe { std::mem::zeroed() }
4572 }
4573}
4574#[repr(C)]
4575#[derive(Copy, Clone)]
4576#[derive(Debug)]
4577pub struct io_event_hook_send_dtmf {
4578 pub send_dtmf: send_dtmf_hook,
4579 pub next: *mut io_event_hook_send_dtmf,
4580}
4581impl std::default::Default for io_event_hook_send_dtmf {
4582 fn default() -> Self {
4583 unsafe { std::mem::zeroed() }
4584 }
4585}
4586#[repr(C)]
4587#[derive(Copy, Clone)]
4588#[derive(Debug)]
4589pub struct io_event_hook_recv_dtmf {
4590 pub recv_dtmf: recv_dtmf_hook,
4591 pub next: *mut io_event_hook_recv_dtmf,
4592}
4593impl std::default::Default for io_event_hook_recv_dtmf {
4594 fn default() -> Self {
4595 unsafe { std::mem::zeroed() }
4596 }
4597}
4598#[repr(C)]
4599#[derive(Copy, Clone)]
4600#[derive(Debug)]
4601pub struct io_event_hook_state_change {
4602 pub state_change: state_change_hook,
4603 pub next: *mut io_event_hook_state_change,
4604}
4605impl std::default::Default for io_event_hook_state_change {
4606 fn default() -> Self {
4607 unsafe { std::mem::zeroed() }
4608 }
4609}
4610#[repr(C)]
4611#[derive(Copy, Clone)]
4612#[derive(Debug)]
4613pub struct io_event_hook_state_run {
4614 pub state_run: state_run_hook,
4615 pub next: *mut io_event_hook_state_run,
4616}
4617impl std::default::Default for io_event_hook_state_run {
4618 fn default() -> Self {
4619 unsafe { std::mem::zeroed() }
4620 }
4621}
4622#[repr(C)]
4623#[derive(Copy, Clone)]
4624#[derive(Debug)]
4625pub struct io_event_hooks {
4626 pub outgoing_channel: *mut io_event_hook_outgoing_channel,
4627 pub receive_message: *mut io_event_hook_receive_message,
4628 pub receive_event: *mut io_event_hook_receive_event,
4629 pub read_frame: *mut io_event_hook_read_frame,
4630 pub video_read_frame: *mut io_event_hook_video_read_frame,
4631 pub write_frame: *mut io_event_hook_write_frame,
4632 pub video_write_frame: *mut io_event_hook_video_write_frame,
4633 pub kill_channel: *mut io_event_hook_kill_channel,
4634 pub send_dtmf: *mut io_event_hook_send_dtmf,
4635 pub recv_dtmf: *mut io_event_hook_recv_dtmf,
4636 pub state_change: *mut io_event_hook_state_change,
4637 pub state_run: *mut io_event_hook_state_run,
4638}
4639impl std::default::Default for io_event_hooks {
4640 fn default() -> Self {
4641 unsafe { std::mem::zeroed() }
4642 }
4643}
4644#[repr(C)]
4645#[derive(Copy, Clone)]
4646#[derive(Debug)]
4647pub struct scheduler_task {
4648 pub created: i64,
4649 pub runtime: i64,
4650 pub cmd_id: u32,
4651 pub repeat: u32,
4652 pub group: *mut c_char,
4653 pub cmd_arg: *mut c_void,
4654 pub task_id: u32,
4655 pub hash: c_ulong,
4656}
4657impl std::default::Default for scheduler_task {
4658 fn default() -> Self {
4659 unsafe { std::mem::zeroed() }
4660 }
4661}
4662#[repr(C)]
4663#[derive(Copy)]
4664pub struct config {
4665 pub file: *mut FILE,
4666 pub path: [c_char; 512usize],
4667 pub category: [c_char; 256usize],
4668 pub section: [c_char; 256usize],
4669 pub buf: [c_char; 1024usize],
4670 pub lineno: c_int,
4671 pub catno: c_int,
4672 pub sectno: c_int,
4673 pub lockto: c_int,
4674}
4675impl std::clone::Clone for config {
4676 fn clone(&self) -> Self {
4677 *self
4678 }
4679}
4680impl std::default::Default for config {
4681 fn default() -> Self {
4682 unsafe { std::mem::zeroed() }
4683 }
4684}
4685#[derive(Copy, Clone)]
4686#[repr(u32)]
4687#[derive(Debug)]
4688pub enum nat_type {
4689 NONE = 0,
4690 PMP = 1,
4691 UPNP = 2,
4692}
4693#[derive(Copy, Clone)]
4694#[repr(u32)]
4695#[derive(Debug)]
4696pub enum nat_ip_proto {
4697 UDP = 0,
4698 TCP = 1,
4699}
4700pub type odbc_statement_handle = *mut c_void;
4701#[derive(Copy, Clone)]
4702#[repr(u32)]
4703#[derive(Debug)]
4704pub enum odbc_state {
4705 INIT = 0,
4706 DOWN = 1,
4707 CONNECTED = 2,
4708 ERROR = 3,
4709}
4710#[derive(Copy, Clone)]
4711#[repr(i32)]
4712#[derive(Debug)]
4713pub enum odbc_status {
4714 SUCCESS = 0,
4715 FAIL = -1,
4716}
4717#[derive(Copy, Clone)]
4718#[repr(u32)]
4719#[derive(Debug)]
4720pub enum pgsql_state {
4721 INIT = 0,
4722 DOWN = 1,
4723 CONNECTED = 2,
4724 ERROR = 3,
4725}
4726#[derive(Copy, Clone)]
4727#[repr(i32)]
4728#[derive(Debug)]
4729pub enum pgsql_status {
4730 SUCCESS = 0,
4731 FAIL = -1,
4732}
4733#[derive(Copy, Clone)]
4734#[repr(u32)]
4735#[derive(Debug)]
4736pub enum core_media_dtmf {
4737 AUTO = 0,
4738 RFC2833 = 1,
4739 INFO = 2,
4740 NONE = 3,
4741}
4742#[derive(Copy, Clone)]
4743#[repr(u32)]
4744#[derive(Debug)]
4745pub enum core_media_NDLB {
4746 ALLOW_BAD_IANANAME = 1,
4747 ALLOW_NONDUP_SDP = 2,
4748 ALLOW_CRYPTO_IN_AVP = 4,
4749 DISABLE_SRTP_AUTH = 8,
4750 SENDRECV_IN_SESSION = 16,
4751 NEVER_PATCH_REINVITE = 32,
4752}
4753#[derive(Copy, Clone)]
4754#[repr(u32)]
4755#[derive(Debug)]
4756pub enum core_media_flag {
4757 RUNNING = 0,
4758 DISABLE_TRANSCODING = 1,
4759 AUTOFIX_TIMING = 2,
4760 CODEC_GREEDY = 3,
4761 CODEC_SCROOGE = 4,
4762 DISABLE_HOLD = 5,
4763 RENEG_ON_HOLD = 6,
4764 RENEG_ON_REINVITE = 7,
4765 LIBERAL_DTMF = 8,
4766 SUPPRESS_CNG = 9,
4767 DISABLE_RTP_AUTOADJ = 10,
4768 PASS_RFC2833 = 11,
4769 AUTOFLUSH = 12,
4770 REWRITE_TIMESTAMPS = 13,
4771 RTP_AUTOFLUSH_DURING_BRIDGE = 14,
4772 MULTI_ANSWER_AUDIO = 15,
4773 MULTI_ANSWER_VIDEO = 16,
4774 MAX = 17,
4775}
4776#[derive(Copy, Clone)]
4777#[repr(u32)]
4778#[derive(Debug)]
4779pub enum STUNFLAGS {
4780 SET = 1,
4781 PING = 2,
4782 FUNNY = 4,
4783}
4784#[derive(Copy, Clone)]
4785#[repr(u32)]
4786#[derive(Debug)]
4787pub enum core_media_vflag {
4788 IN = 1,
4789 OUT = 2,
4790}
4791#[repr(C)]
4792#[derive(Copy, Clone)]
4793#[derive(Debug)]
4794pub struct core_media_params {
4795 pub rtp_timeout_sec: u32,
4796 pub rtp_hold_timeout_sec: u32,
4797 pub dtmf_delay: u32,
4798 pub codec_flags: u32,
4799 pub ndlb: core_media_NDLB,
4800 pub auto_rtp_bugs: rtp_bug_flag,
4801 pub inbound_codec_string: *mut c_char,
4802 pub outbound_codec_string: *mut c_char,
4803 pub timer_name: *mut c_char,
4804 pub remote_sdp_str: *mut c_char,
4805 pub early_sdp: *mut c_char,
4806 pub local_sdp_str: *mut c_char,
4807 pub last_sdp_str: *mut c_char,
4808 pub last_sdp_response: *mut c_char,
4809 pub prev_sdp_str: *mut c_char,
4810 pub prev_sdp_response: *mut c_char,
4811 pub stun_ip: *mut c_char,
4812 pub stun_port: port,
4813 pub stun_flags: u32,
4814 pub jb_msec: *mut c_char,
4815 pub vflags: core_media_vflag,
4816 pub manual_rtp_bugs: rtp_bug_flag,
4817 pub manual_video_rtp_bugs: rtp_bug_flag,
4818 pub rtcp_audio_interval_msec: *mut c_char,
4819 pub rtcp_video_interval_msec: *mut c_char,
4820 pub extrtpip: *mut c_char,
4821 pub rtpip: *mut c_char,
4822 pub rtpip4: *mut c_char,
4823 pub rtpip6: *mut c_char,
4824 pub remote_ip: *mut c_char,
4825 pub remote_port: c_int,
4826 pub extsipip: *mut c_char,
4827 pub local_network: *mut c_char,
4828 pub sipip: *mut c_char,
4829 pub sdp_username: *mut c_char,
4830 pub te: payload,
4831 pub recv_te: payload,
4832 pub te_rate: c_ulong,
4833 pub cng_rate: c_ulong,
4834 pub adv_sdp_audio_ip: *mut c_char,
4835 pub num_codecs: c_int,
4836 pub hold_laps: c_int,
4837 pub dtmf_type: core_media_dtmf,
4838 pub cng_pt: payload,
4839 pub external_video_source: switch_bool,
4840 pub video_key_freq: u32,
4841 pub video_key_first: u32,
4842 pub video_write_thread: *mut thread,
4843}
4844impl std::default::Default for core_media_params {
4845 fn default() -> Self {
4846 unsafe { std::mem::zeroed() }
4847 }
4848}
4849#[derive(Copy, Clone)]
4850#[repr(u32)]
4851#[derive(Debug)]
4852pub enum jb_flag {
4853 QUEUE_ONLY = 1,
4854}
4855#[derive(Copy, Clone)]
4856#[repr(u32)]
4857#[derive(Debug)]
4858pub enum jb_type {
4859 VIDEO = 0,
4860 AUDIO = 1,
4861}
4862pub type teletone_process = f64;
4863#[repr(C)]
4864#[derive(Copy, Clone)]
4865#[derive(Debug)]
4866pub struct teletone_tone_map {
4867 pub freqs: [teletone_process; 18usize],
4868}
4869impl std::default::Default for teletone_tone_map {
4870 fn default() -> Self {
4871 unsafe { std::mem::zeroed() }
4872 }
4873}
4874#[repr(C)]
4875#[derive(Copy, Clone)]
4876#[derive(Debug)]
4877pub struct teletone_dds_state {
4878 pub phase_rate: [u32; 4usize],
4879 pub scale_factor: u32,
4880 pub phase_accumulator: u32,
4881 pub tx_level: teletone_process,
4882}
4883impl std::default::Default for teletone_dds_state {
4884 fn default() -> Self {
4885 unsafe { std::mem::zeroed() }
4886 }
4887}
4888pub type teletone_audio = i16;
4889pub type tone_handler =
4890 std::option::Option<unsafe extern "C" fn(ts: *mut teletone_generation_session,
4891 map: *mut teletone_tone_map)
4892 -> c_int>;
4893#[repr(C)]
4894#[derive(Copy)]
4895pub struct teletone_generation_session {
4896 pub TONES: [teletone_tone_map; 127usize],
4897 pub channels: c_int,
4898 pub rate: c_int,
4899 pub duration: c_int,
4900 pub wait: c_int,
4901 pub tmp_duration: c_int,
4902 pub tmp_wait: c_int,
4903 pub loops: c_int,
4904 pub LOOPS: c_int,
4905 pub decay_factor: f32,
4906 pub decay_direction: c_int,
4907 pub decay_step: c_int,
4908 pub volume: f32,
4909 pub debug: c_int,
4910 pub debug_stream: *mut FILE,
4911 pub user_data: *mut c_void,
4912 pub buffer: *mut teletone_audio,
4913 pub datalen: c_int,
4914 pub samples: c_int,
4915 pub dynamic: c_int,
4916 pub handler: tone_handler,
4917}
4918impl std::clone::Clone for teletone_generation_session {
4919 fn clone(&self) -> Self {
4920 *self
4921 }
4922}
4923impl std::default::Default for teletone_generation_session {
4924 fn default() -> Self {
4925 unsafe { std::mem::zeroed() }
4926 }
4927}
4928#[derive(Copy, Clone)]
4929#[repr(u32)]
4930#[derive(Debug)]
4931pub enum teletone_hit_type {
4932 NONE = 0,
4933 BEGIN = 1,
4934 MIDDLE = 2,
4935 END = 3,
4936}
4937#[repr(C)]
4938#[derive(Copy, Clone)]
4939#[derive(Debug)]
4940pub struct teletone_goertzel_state {
4941 pub v2: f32,
4942 pub v3: f32,
4943 pub fac: f64,
4944}
4945impl std::default::Default for teletone_goertzel_state {
4946 fn default() -> Self {
4947 unsafe { std::mem::zeroed() }
4948 }
4949}
4950#[repr(C)]
4951#[derive(Copy, Clone)]
4952#[derive(Debug)]
4953pub struct teletone_dtmf_detect_state {
4954 pub hit1: c_int,
4955 pub hit2: c_int,
4956 pub hit3: c_int,
4957 pub hit4: c_int,
4958 pub dur: c_int,
4959 pub zc: c_int,
4960 pub row_out: [teletone_goertzel_state; 4usize],
4961 pub col_out: [teletone_goertzel_state; 4usize],
4962 pub row_out2nd: [teletone_goertzel_state; 4usize],
4963 pub col_out2nd: [teletone_goertzel_state; 4usize],
4964 pub energy: f32,
4965 pub lenergy: f32,
4966 pub current_sample: c_int,
4967 pub digit: c_char,
4968 pub current_digits: c_int,
4969 pub detected_digits: c_int,
4970 pub lost_digits: c_int,
4971 pub digit_hits: [c_int; 16usize],
4972}
4973impl std::default::Default for teletone_dtmf_detect_state {
4974 fn default() -> Self {
4975 unsafe { std::mem::zeroed() }
4976 }
4977}
4978#[repr(C)]
4979#[derive(Copy, Clone)]
4980#[derive(Debug)]
4981pub struct teletone_detection_descriptor {
4982 pub fac: f32,
4983}
4984impl std::default::Default for teletone_detection_descriptor {
4985 fn default() -> Self {
4986 unsafe { std::mem::zeroed() }
4987 }
4988}
4989#[repr(C)]
4990#[derive(Copy, Clone)]
4991#[derive(Debug)]
4992pub struct teletone_multi_tone {
4993 pub sample_rate: c_int,
4994 pub tdd: [teletone_detection_descriptor; 18usize],
4995 pub gs: [teletone_goertzel_state; 18usize],
4996 pub gs2: [teletone_goertzel_state; 18usize],
4997 pub tone_count: c_int,
4998 pub energy: f32,
4999 pub current_sample: c_int,
5000 pub min_samples: c_int,
5001 pub total_samples: c_int,
5002 pub positives: c_int,
5003 pub negatives: c_int,
5004 pub hits: c_int,
5005 pub positive_factor: c_int,
5006 pub negative_factor: c_int,
5007 pub hit_factor: c_int,
5008}
5009impl std::default::Default for teletone_multi_tone {
5010 fn default() -> Self {
5011 unsafe { std::mem::zeroed() }
5012 }
5013}
5014extern "C" {
5015 pub static mut SWITCH_GLOBAL_dirs: directories;
5016 pub static mut SWITCH_GLOBAL_filenames: filenames;
5017 pub static mut _LIB_VERSION: _LIB_VERSION_TYPE;
5018 pub static mut switch_config_string_strdup: xml_config_string_options;
5019 pub static mut TELETONE_SINES: [i16; 128usize];
5020}
5021extern "C" {
5022 pub fn cJSON_InitHooks(hooks: *mut cJSON_Hooks);
5023 pub fn cJSON_Parse(value: *const c_char) -> *mut cJSON;
5024 pub fn cJSON_Print(item: *mut cJSON) -> *mut c_char;
5025 pub fn cJSON_PrintUnformatted(item: *mut cJSON) -> *mut c_char;
5026 pub fn cJSON_Delete(c: *mut cJSON);
5027 pub fn cJSON_GetArraySize(array: *mut cJSON) -> c_int;
5028 pub fn cJSON_GetArrayItem(array: *mut cJSON, item: c_int) -> *mut cJSON;
5029 pub fn cJSON_GetObjectItem(object: *const cJSON, string: *const c_char) -> *mut cJSON;
5030 pub fn cJSON_GetObjectCstr(object: *const cJSON, string: *const c_char) -> *const c_char;
5031 pub fn cJSON_GetErrorPtr() -> *const c_char;
5032 pub fn cJSON_CreateNull() -> *mut cJSON;
5033 pub fn cJSON_CreateTrue() -> *mut cJSON;
5034 pub fn cJSON_CreateFalse() -> *mut cJSON;
5035 pub fn cJSON_CreateBool(b: c_int) -> *mut cJSON;
5036 pub fn cJSON_CreateNumber(num: f64) -> *mut cJSON;
5037 pub fn cJSON_CreateString(string: *const c_char) -> *mut cJSON;
5038 pub fn cJSON_CreateArray() -> *mut cJSON;
5039 pub fn cJSON_CreateObject() -> *mut cJSON;
5040 pub fn cJSON_CreateIntArray(numbers: *mut c_int, count: c_int) -> *mut cJSON;
5041 pub fn cJSON_CreateFloatArray(numbers: *mut f32, count: c_int) -> *mut cJSON;
5042 pub fn cJSON_CreateDoubleArray(numbers: *mut f64, count: c_int) -> *mut cJSON;
5043 pub fn cJSON_CreateStringArray(strings: *mut *const c_char, count: c_int) -> *mut cJSON;
5044 pub fn cJSON_AddItemToArray(array: *mut cJSON, item: *mut cJSON);
5045 pub fn cJSON_AddItemToObject(object: *mut cJSON, string: *const c_char, item: *mut cJSON);
5046 pub fn cJSON_AddItemReferenceToArray(array: *mut cJSON, item: *mut cJSON);
5047 pub fn cJSON_AddItemReferenceToObject(object: *mut cJSON,
5048 string: *const c_char,
5049 item: *mut cJSON);
5050 pub fn cJSON_DetachItemFromArray(array: *mut cJSON, which: c_int) -> *mut cJSON;
5051 pub fn cJSON_DeleteItemFromArray(array: *mut cJSON, which: c_int);
5052 pub fn cJSON_DetachItemFromObject(object: *mut cJSON, string: *const c_char) -> *mut cJSON;
5053 pub fn cJSON_DeleteItemFromObject(object: *mut cJSON, string: *const c_char);
5054 pub fn cJSON_ReplaceItemInArray(array: *mut cJSON, which: c_int, newitem: *mut cJSON);
5055 pub fn cJSON_ReplaceItemInObject(object: *mut cJSON,
5056 string: *const c_char,
5057 newitem: *mut cJSON);
5058 pub fn cJSON_Duplicate(item: *mut cJSON, recurse: c_int) -> *mut cJSON;
5059 pub fn cJSON_CreateStringPrintf(fmt: *const c_char, ...) -> *mut cJSON;
5060
5061 pub fn vpx_img_alloc(img: *mut vpx_image,
5062 fmt: vpx_img_fmt,
5063 d_w: c_uint,
5064 d_h: c_uint,
5065 align: c_uint)
5066 -> *mut vpx_image;
5067 pub fn vpx_img_wrap(img: *mut vpx_image,
5068 fmt: vpx_img_fmt,
5069 d_w: c_uint,
5070 d_h: c_uint,
5071 align: c_uint,
5072 img_data: *mut c_uchar)
5073 -> *mut vpx_image;
5074 pub fn vpx_img_set_rect(img: *mut vpx_image,
5075 x: c_uint,
5076 y: c_uint,
5077 w: c_uint,
5078 h: c_uint)
5079 -> c_int;
5080 pub fn vpx_img_flip(img: *mut vpx_image);
5081 pub fn vpx_img_free(img: *mut vpx_image);
5082
5083 #[link_name="switch_status_is_timeup"]
5084 pub fn status_is_timeup(status: c_int) -> c_int;
5085 #[link_name="switch_thread_self"]
5086 pub fn thread_self() -> thread_id;
5087 #[link_name="switch_thread_equal"]
5088 pub fn thread_equal(tid1: thread_id, tid2: thread_id) -> c_int;
5089 #[link_name="switch_pool_clear"]
5090 pub fn pool_clear(pool: *mut memory_pool);
5091 #[link_name="switch_copy_string"]
5092 pub fn copy_string(dst: *mut c_char, src: *const c_char, dst_size: usize) -> *mut c_char;
5093 #[link_name="switch__default"]
5094 pub fn hashfunc_default(key: *const c_char, klen: *mut isize) -> c_uint;
5095 #[link_name="switch_ci_hashfunc_default"]
5096 pub fn ci_hashfunc_default(char_key: *const c_char, klen: *mut isize) -> c_uint;
5097 #[link_name="switch_time_make"]
5098 pub fn time_make(sec: time_t, usec: i32) -> time_t;
5099 #[link_name="switch_time_now"]
5100 pub fn time_now() -> time_t;
5101 #[link_name="switch_time_exp_gmt_get"]
5102 pub fn time_exp_gmt_get(result: *mut time_t, input: *mut time_exp) -> status;
5103 #[link_name="switch_strftime"]
5104 pub fn strftime(s: *mut c_char,
5105 retsize: *mut usize,
5106 max: usize,
5107 format: *const c_char,
5108 tm: *mut time_exp)
5109 -> status;
5110 #[link_name="switch_strftime_nocheck"]
5111 pub fn strftime_nocheck(s: *mut c_char,
5112 retsize: *mut usize,
5113 max: usize,
5114 format: *const c_char,
5115 tm: *mut time_exp)
5116 -> status;
5117 #[link_name="switch_rfc822_date"]
5118 pub fn rfc822_date(date_str: *mut c_char, t: time_t) -> status;
5119 #[link_name="switch_time_exp_gmt"]
5120 pub fn time_exp_gmt(result: *mut time_exp, input: time_t) -> status;
5121 #[link_name="switch_time_exp_get"]
5122 pub fn time_exp_get(result: *mut time_t, input: *mut time_exp) -> status;
5123 #[link_name="switch_time_exp_lt"]
5124 pub fn time_exp_lt(result: *mut time_exp, input: time_t) -> status;
5125 #[link_name="switch_time_exp_tz"]
5126 pub fn time_exp_tz(result: *mut time_exp, input: time_t, offs: i32) -> status;
5127 #[link_name="switch_sleep"]
5128 pub fn sleep(t: interval_time_t);
5129 #[link_name="switch_micro_sleep"]
5130 pub fn micro_sleep(t: interval_time_t);
5131 #[link_name="switch_mutex_init"]
5132 pub fn mutex_init(lock: *mut *mut mutex, flags: c_uint, pool: *mut memory_pool) -> status;
5133 #[link_name="switch_mutex_destroy"]
5134 pub fn mutex_destroy(lock: *mut mutex) -> status;
5135 #[link_name="switch_mutex_lock"]
5136 pub fn mutex_lock(lock: *mut mutex) -> status;
5137 #[link_name="switch_mutex_unlock"]
5138 pub fn mutex_unlock(lock: *mut mutex) -> status;
5139 #[link_name="switch_mutex_trylock"]
5140 pub fn mutex_trylock(lock: *mut mutex) -> status;
5141 #[link_name="switch_atomic_init"]
5142 pub fn atomic_init(pool: *mut memory_pool) -> status;
5143 #[link_name="switch_thread_rwlock_create"]
5144 pub fn thread_rwlock_create(rwlock: *mut *mut thread_rwlock, pool: *mut memory_pool) -> status;
5145 #[link_name="switch_thread_rwlock_destroy"]
5146 pub fn thread_rwlock_destroy(rwlock: *mut thread_rwlock) -> status;
5147 #[link_name="switch_thread_rwlock_pool_get"]
5148 pub fn thread_rwlock_pool_get(rwlock: *mut thread_rwlock) -> *mut memory_pool;
5149 #[link_name="switch_thread_rwlock_rdlock"]
5150 pub fn thread_rwlock_rdlock(rwlock: *mut thread_rwlock) -> status;
5151 #[link_name="switch_thread_rwlock_tryrdlock"]
5152 pub fn thread_rwlock_tryrdlock(rwlock: *mut thread_rwlock) -> status;
5153 #[link_name="switch_thread_rwlock_wrlock"]
5154 pub fn thread_rwlock_wrlock(rwlock: *mut thread_rwlock) -> status;
5155 #[link_name="switch_thread_rwlock_trywrlock"]
5156 pub fn thread_rwlock_trywrlock(rwlock: *mut thread_rwlock) -> status;
5157 #[link_name="switch_thread_rwlock_trywrlock_timeout"]
5158 pub fn thread_rwlock_trywrlock_timeout(rwlock: *mut thread_rwlock, timeout: c_int) -> status;
5159 #[link_name="switch_thread_rwlock_unlock"]
5160 pub fn thread_rwlock_unlock(rwlock: *mut thread_rwlock) -> status;
5161 #[link_name="switch_thread_cond_create"]
5162 pub fn thread_cond_create(cond: *mut *mut thread_cond, pool: *mut memory_pool) -> status;
5163 #[link_name="switch_thread_cond_wait"]
5164 pub fn thread_cond_wait(cond: *mut thread_cond, mutex: *mut mutex) -> status;
5165 #[link_name="switch_thread_cond_timedwait"]
5166 pub fn thread_cond_timedwait(cond: *mut thread_cond,
5167 mutex: *mut mutex,
5168 timeout: interval_time_t)
5169 -> status;
5170 #[link_name="switch_thread_cond_signal"]
5171 pub fn thread_cond_signal(cond: *mut thread_cond) -> status;
5172 #[link_name="switch_thread_cond_broadcast"]
5173 pub fn thread_cond_broadcast(cond: *mut thread_cond) -> status;
5174 #[link_name="switch_thread_cond_destroy"]
5175 pub fn thread_cond_destroy(cond: *mut thread_cond) -> status;
5176 #[link_name="switch_uuid_format"]
5177 pub fn uuid_format(buffer: *mut c_char, uuid: *const uuid);
5178 #[link_name="switch_uuid_get"]
5179 pub fn uuid_get(uuid: *mut uuid);
5180 #[link_name="switch_uuid_parse"]
5181 pub fn uuid_parse(uuid: *mut uuid, uuid_str: *const c_char) -> status;
5182 #[link_name="switch_md5"]
5183 pub fn md5(digest: *mut c_uchar, input: *const c_void, inputLen: usize) -> status;
5184 #[link_name="switch_md5_string"]
5185 pub fn md5_string(digest_str: *mut c_char, input: *const c_void, inputLen: usize) -> status;
5186 #[link_name="switch_queue_create"]
5187 pub fn queue_create(queue: *mut *mut queue,
5188 queue_capacity: c_uint,
5189 pool: *mut memory_pool)
5190 -> status;
5191 #[link_name="switch_queue_pop"]
5192 pub fn queue_pop(queue: *mut queue, data: *mut *mut c_void) -> status;
5193 #[link_name="switch_queue_pop_timeout"]
5194 pub fn queue_pop_timeout(queue: *mut queue,
5195 data: *mut *mut c_void,
5196 timeout: interval_time_t)
5197 -> status;
5198 #[link_name="switch_queue_push"]
5199 pub fn queue_push(queue: *mut queue, data: *mut c_void) -> status;
5200 #[link_name="switch_queue_size"]
5201 pub fn queue_size(queue: *mut queue) -> c_uint;
5202 #[link_name="switch_queue_trypop"]
5203 pub fn queue_trypop(queue: *mut queue, data: *mut *mut c_void) -> status;
5204 #[link_name="switch_queue_interrupt_all"]
5205 pub fn queue_interrupt_all(queue: *mut queue) -> status;
5206 #[link_name="switch_queue_term"]
5207 pub fn queue_term(queue: *mut queue) -> status;
5208 #[link_name="switch_queue_trypush"]
5209 pub fn queue_trypush(queue: *mut queue, data: *mut c_void) -> status;
5210 #[link_name="switch_file_open"]
5211 pub fn file_open(newf: *mut *mut file,
5212 fname: *const c_char,
5213 flag: i32,
5214 perm: fileperms,
5215 pool: *mut memory_pool)
5216 -> status;
5217 #[link_name="switch_file_seek"]
5218 pub fn file_seek(thefile: *mut file, where_: seek_where, offset: *mut i64) -> status;
5219 #[link_name="switch_file_copy"]
5220 pub fn file_copy(from_path: *const c_char,
5221 to_path: *const c_char,
5222 perms: fileperms,
5223 pool: *mut memory_pool)
5224 -> status;
5225 #[link_name="switch_file_close"]
5226 pub fn file_close(thefile: *mut file) -> status;
5227 #[link_name="switch_file_trunc"]
5228 pub fn file_trunc(thefile: *mut file, offset: i64) -> status;
5229 #[link_name="switch_file_lock"]
5230 pub fn file_lock(thefile: *mut file, type_: c_int) -> status;
5231 #[link_name="switch_file_remove"]
5232 pub fn file_remove(path: *const c_char, pool: *mut memory_pool) -> status;
5233 #[link_name="switch_file_rename"]
5234 pub fn file_rename(from_path: *const c_char,
5235 to_path: *const c_char,
5236 pool: *mut memory_pool)
5237 -> status;
5238 #[link_name="switch_file_read"]
5239 pub fn file_read(thefile: *mut file, buf: *mut c_void, nbytes: *mut usize) -> status;
5240 #[link_name="switch_file_write"]
5241 pub fn file_write(thefile: *mut file, buf: *const c_void, nbytes: *mut usize) -> status;
5242 #[link_name="switch_file_printf"]
5243 pub fn file_printf(thefile: *mut file, format: *const c_char, ...) -> c_int;
5244 #[link_name="switch_file_mktemp"]
5245 pub fn file_mktemp(thefile: *mut *mut file,
5246 templ: *mut c_char,
5247 flags: i32,
5248 pool: *mut memory_pool)
5249 -> status;
5250 #[link_name="switch_file_get_size"]
5251 pub fn file_get_size(thefile: *mut file) -> usize;
5252 #[link_name="switch_file_exists"]
5253 pub fn file_exists(filename: *const c_char, pool: *mut memory_pool) -> status;
5254 #[link_name="switch_directory_exists"]
5255 pub fn directory_exists(dirname: *const c_char, pool: *mut memory_pool) -> status;
5256 #[link_name="switch_dir_make"]
5257 pub fn dir_make(path: *const c_char, perm: fileperms, pool: *mut memory_pool) -> status;
5258 #[link_name="switch_dir_make_recursive"]
5259 pub fn dir_make_recursive(path: *const c_char,
5260 perm: fileperms,
5261 pool: *mut memory_pool)
5262 -> status;
5263 #[link_name="switch_dir_open"]
5264 pub fn dir_open(new_dir: *mut *mut dir,
5265 dirname: *const c_char,
5266 pool: *mut memory_pool)
5267 -> status;
5268 #[link_name="switch_dir_close"]
5269 pub fn dir_close(thedir: *mut dir) -> status;
5270 #[link_name="switch_dir_next_file"]
5271 pub fn dir_next_file(thedir: *mut dir, buf: *mut c_char, len: usize) -> *const c_char;
5272 #[link_name="switch_dir_count"]
5273 pub fn dir_count(thedir: *mut dir) -> u32;
5274 #[link_name="switch_threadattr_stacksize_set"]
5275 pub fn threadattr_stacksize_set(attr: *mut threadattr, stacksize: usize) -> status;
5276 #[link_name="switch_threadattr_priority_set"]
5277 pub fn threadattr_priority_set(attr: *mut threadattr, priority: thread_priority) -> status;
5278 #[link_name="switch_threadattr_create"]
5279 pub fn threadattr_create(new_attr: *mut *mut threadattr, pool: *mut memory_pool) -> status;
5280 #[link_name="switch_threadattr_detach_set"]
5281 pub fn threadattr_detach_set(attr: *mut threadattr, on: i32) -> status;
5282 #[link_name="switch_thread_create"]
5283 pub fn thread_create(new_thread: *mut *mut thread,
5284 attr: *mut threadattr,
5285 func: thread_start,
5286 data: *mut c_void,
5287 cont: *mut memory_pool)
5288 -> status;
5289 #[link_name="switch_socket_create"]
5290 pub fn socket_create(new_sock: *mut *mut socket,
5291 family: c_int,
5292 type_: c_int,
5293 protocol: c_int,
5294 pool: *mut memory_pool)
5295 -> status;
5296 #[link_name="switch_socket_shutdown"]
5297 pub fn socket_shutdown(sock: *mut socket, how: shutdown_how_e) -> status;
5298 #[link_name="switch_socket_close"]
5299 pub fn socket_close(sock: *mut socket) -> status;
5300 #[link_name="switch_socket_bind"]
5301 pub fn socket_bind(sock: *mut socket, sa: *mut sockaddr) -> status;
5302 #[link_name="switch_socket_listen"]
5303 pub fn socket_listen(sock: *mut socket, backlog: i32) -> status;
5304 #[link_name="switch_socket_accept"]
5305 pub fn socket_accept(new_sock: *mut *mut socket,
5306 sock: *mut socket,
5307 pool: *mut memory_pool)
5308 -> status;
5309 #[link_name="switch_socket_connect"]
5310 pub fn socket_connect(sock: *mut socket, sa: *mut sockaddr) -> status;
5311 #[link_name="switch_socket_fd_get"]
5312 pub fn socket_fd_get(sock: *mut socket) -> c_int;
5313 #[link_name="switch_sockaddr_get_port"]
5314 pub fn sockaddr_get_port(sa: *mut sockaddr) -> u16;
5315 #[link_name="switch_getnameinfo"]
5316 pub fn getnameinfo(hostname: *mut *mut c_char, sa: *mut sockaddr, flags: i32) -> status;
5317 #[link_name="switch_sockaddr_get_family"]
5318 pub fn sockaddr_get_family(sa: *mut sockaddr) -> i32;
5319 #[link_name="switch_sockaddr_ip_get"]
5320 pub fn sockaddr_ip_get(addr: *mut *mut c_char, sa: *mut sockaddr) -> status;
5321 #[link_name="switch_sockaddr_equal"]
5322 pub fn sockaddr_equal(sa1: *const sockaddr, sa2: *const sockaddr) -> c_int;
5323 #[link_name="switch_sockaddr_info_get"]
5324 pub fn sockaddr_info_get(sa: *mut *mut sockaddr,
5325 hostname: *const c_char,
5326 family: i32,
5327 port: port,
5328 flags: i32,
5329 pool: *mut memory_pool)
5330 -> status;
5331 #[link_name="switch_sockaddr_create"]
5332 pub fn sockaddr_create(sa: *mut *mut sockaddr, pool: *mut memory_pool) -> status;
5333 #[link_name="switch_socket_send"]
5334 pub fn socket_send(sock: *mut socket, buf: *const c_char, len: *mut usize) -> status;
5335 #[link_name="switch_socket_sendto"]
5336 pub fn socket_sendto(sock: *mut socket,
5337 where_: *mut sockaddr,
5338 flags: i32,
5339 buf: *const c_char,
5340 len: *mut usize)
5341 -> status;
5342 #[link_name="switch_socket_send_nonblock"]
5343 pub fn socket_send_nonblock(sock: *mut socket, buf: *const c_char, len: *mut usize) -> status;
5344 #[link_name="switch_socket_recvfrom"]
5345 pub fn socket_recvfrom(from: *mut sockaddr,
5346 sock: *mut socket,
5347 flags: i32,
5348 buf: *mut c_char,
5349 len: *mut usize)
5350 -> status;
5351 #[link_name="switch_socket_atmark"]
5352 pub fn socket_atmark(sock: *mut socket, atmark: *mut c_int) -> status;
5353 #[link_name="switch_socket_recv"]
5354 pub fn socket_recv(sock: *mut socket, buf: *mut c_char, len: *mut usize) -> status;
5355 #[link_name="switch_socket_opt_set"]
5356 pub fn socket_opt_set(sock: *mut socket, opt: i32, on: i32) -> status;
5357 #[link_name="switch_socket_timeout_set"]
5358 pub fn socket_timeout_set(sock: *mut socket, t: interval_time_t) -> status;
5359 #[link_name="switch_mcast_join"]
5360 pub fn mcast_join(sock: *mut socket,
5361 join: *mut sockaddr,
5362 iface: *mut sockaddr,
5363 source: *mut sockaddr)
5364 -> status;
5365 #[link_name="switch_mcast_hops"]
5366 pub fn mcast_hops(sock: *mut socket, ttl: u8) -> status;
5367 #[link_name="switch_mcast_loopback"]
5368 pub fn mcast_loopback(sock: *mut socket, opt: u8) -> status;
5369 #[link_name="switch_mcast_interface"]
5370 pub fn mcast_interface(sock: *mut socket, iface: *mut sockaddr) -> status;
5371 #[link_name="switch_pollset_create"]
5372 pub fn pollset_create(pollset: *mut *mut pollset,
5373 size: u32,
5374 pool: *mut memory_pool,
5375 flags: u32)
5376 -> status;
5377 #[link_name="switch_pollset_add"]
5378 pub fn pollset_add(pollset: *mut pollset, descriptor: *const pollfd) -> status;
5379 #[link_name="switch_pollset_remove"]
5380 pub fn pollset_remove(pollset: *mut pollset, descriptor: *const pollfd) -> status;
5381 #[link_name="switch_poll"]
5382 pub fn poll(aprset: *mut pollfd,
5383 numsock: i32,
5384 nsds: *mut i32,
5385 timeout: interval_time_t)
5386 -> status;
5387 #[link_name="switch_pollset_poll"]
5388 pub fn pollset_poll(pollset: *mut pollset,
5389 timeout: interval_time_t,
5390 num: *mut i32,
5391 descriptors: *mut *const pollfd)
5392 -> status;
5393 #[link_name="switch_socket_create_pollset"]
5394 pub fn socket_create_pollset(poll: *mut *mut pollfd,
5395 sock: *mut socket,
5396 flags: i16,
5397 pool: *mut memory_pool)
5398 -> status;
5399 #[link_name="switch_interval_time_from_timeval"]
5400 pub fn interval_time_from_timeval(tvp: *mut timeval) -> interval_time_t;
5401 #[link_name="switch_socket_create_pollfd"]
5402 pub fn socket_create_pollfd(pollfd: *mut *mut pollfd,
5403 sock: *mut socket,
5404 flags: i16,
5405 client_data: *mut c_void,
5406 pool: *mut memory_pool)
5407 -> status;
5408 #[link_name="switch_match_glob"]
5409 pub fn match_glob(pattern: *const c_char,
5410 result: *mut *mut array_header,
5411 pool: *mut memory_pool)
5412 -> status;
5413 #[link_name="switch_os_sock_get"]
5414 pub fn os_sock_get(thesock: *mut os_socket, sock: *mut socket) -> status;
5415 #[link_name="switch_os_sock_put"]
5416 pub fn os_sock_put(sock: *mut *mut socket,
5417 thesock: *mut os_socket,
5418 pool: *mut memory_pool)
5419 -> status;
5420 #[link_name="switch_socket_addr_get"]
5421 pub fn socket_addr_get(sa: *mut *mut sockaddr,
5422 remote: switch_bool,
5423 sock: *mut socket)
5424 -> status;
5425 #[link_name="switch_file_pipe_create"]
5426 pub fn file_pipe_create(in_: *mut *mut file,
5427 out: *mut *mut file,
5428 pool: *mut memory_pool)
5429 -> status;
5430 #[link_name="switch_file_pipe_timeout_get"]
5431 pub fn file_pipe_timeout_get(thepipe: *mut file, timeout: *mut interval_time_t) -> status;
5432 #[link_name="switch_file_pipe_timeout_set"]
5433 pub fn file_pipe_timeout_set(thepipe: *mut file, timeout: interval_time_t) -> status;
5434 #[link_name="switch_thread_exit"]
5435 pub fn thread_exit(thd: *mut thread, retval: status) -> status;
5436 #[link_name="switch_thread_join"]
5437 pub fn thread_join(retval: *mut status, thd: *mut thread) -> status;
5438 #[link_name="switch_strerror"]
5439 pub fn strerror(statcode: status, buf: *mut c_char, bufsize: usize) -> *mut c_char;
5440 #[link_name="switch_mprintf"]
5441 pub fn mprintf(zFormat: *const c_char, ...) -> *mut c_char;
5442 #[link_name="switch_snprintfv"]
5443 pub fn snprintfv(zBuf: *mut c_char, n: c_int, zFormat: *const c_char, ...) -> *mut c_char;
5444 #[link_name="switch_core_db_close"]
5445 pub fn core_db_close(db: *mut core_db) -> c_int;
5446 #[link_name="switch_core_db_open"]
5447 pub fn core_db_open(filename: *const c_char, ppDb: *mut *mut core_db) -> c_int;
5448 #[link_name="switch_core_db_column_text"]
5449 pub fn core_db_column_text(stmt: *mut core_db_stmt, iCol: c_int) -> *const c_uchar;
5450 #[link_name="switch_core_db_column_name"]
5451 pub fn core_db_column_name(stmt: *mut core_db_stmt, N: c_int) -> *const c_char;
5452 #[link_name="switch_core_db_column_count"]
5453 pub fn core_db_column_count(pStmt: *mut core_db_stmt) -> c_int;
5454 #[link_name="switch_core_db_errmsg"]
5455 pub fn core_db_errmsg(db: *mut core_db) -> *const c_char;
5456 #[link_name="switch_core_db_exec"]
5457 pub fn core_db_exec(db: *mut core_db,
5458 sql: *const c_char,
5459 callback: core_db_callback_func,
5460 data: *mut c_void,
5461 errmsg: *mut *mut c_char)
5462 -> c_int;
5463 #[link_name="switch_core_db_finalize"]
5464 pub fn core_db_finalize(pStmt: *mut core_db_stmt) -> c_int;
5465 #[link_name="switch_core_db_prepare"]
5466 pub fn core_db_prepare(db: *mut core_db,
5467 zSql: *const c_char,
5468 nBytes: c_int,
5469 ppStmt: *mut *mut core_db_stmt,
5470 pzTail: *mut *const c_char)
5471 -> c_int;
5472 #[link_name="switch_core_db_step"]
5473 pub fn core_db_step(stmt: *mut core_db_stmt) -> c_int;
5474 #[link_name="switch_core_db_reset"]
5475 pub fn core_db_reset(pStmt: *mut core_db_stmt) -> c_int;
5476 #[link_name="switch_core_db_bind_int"]
5477 pub fn core_db_bind_int(pStmt: *mut core_db_stmt, i: c_int, iValue: c_int) -> c_int;
5478 #[link_name="switch_core_db_bind_int64"]
5479 pub fn core_db_bind_int64(pStmt: *mut core_db_stmt, i: c_int, iValue: i64) -> c_int;
5480 #[link_name="switch_core_db_bind_text"]
5481 pub fn core_db_bind_text(pStmt: *mut core_db_stmt,
5482 i: c_int,
5483 zData: *const c_char,
5484 nData: c_int,
5485 xDel: core_db_destructor_type)
5486 -> c_int;
5487 #[link_name="switch_core_db_bind_double"]
5488 pub fn core_db_bind_double(pStmt: *mut core_db_stmt, i: c_int, dValue: f64) -> c_int;
5489 #[link_name="switch_core_db_last_insert_rowid"]
5490 pub fn core_db_last_insert_rowid(db: *mut core_db) -> i64;
5491 #[link_name="switch_core_db_get_table"]
5492 pub fn core_db_get_table(db: *mut core_db,
5493 sql: *const c_char,
5494 resultp: *mut *mut *mut c_char,
5495 nrow: *mut c_int,
5496 ncolumn: *mut c_int,
5497 errmsg: *mut *mut c_char)
5498 -> c_int;
5499 #[link_name="switch_core_db_free_table"]
5500 pub fn core_db_free_table(result: *mut *mut c_char);
5501 #[link_name="switch_core_db_free"]
5502 pub fn core_db_free(z: *mut c_char);
5503 #[link_name="switch_core_db_changes"]
5504 pub fn core_db_changes(db: *mut core_db) -> c_int;
5505 #[link_name="switch_core_db_load_extension"]
5506 pub fn core_db_load_extension(db: *mut core_db, extension: *const c_char) -> c_int;
5507 #[link_name="switch_sql_concat"]
5508 pub fn sql_concat() -> *mut c_char;
5509 #[link_name="switch_dso_destroy"]
5510 pub fn dso_destroy(lib: *mut dso_lib);
5511 #[link_name="switch_dso_open"]
5512 pub fn dso_open(path: *const c_char, global: c_int, err: *mut *mut c_char) -> dso_lib;
5513 #[link_name="switch_dso_func_sym"]
5514 pub fn dso_func_sym(lib: dso_lib, sym: *const c_char, err: *mut *mut c_char) -> dso_func;
5515 #[link_name="switch_dso_data_sym"]
5516 pub fn dso_data_sym(lib: dso_lib, sym: *const c_char, err: *mut *mut c_char) -> *mut c_void;
5517 #[link_name="switch_regex_compile"]
5518 pub fn regex_compile(pattern: *const c_char,
5519 options: c_int,
5520 errorptr: *mut *const c_char,
5521 erroroffset: *mut c_int,
5522 tables: *const c_uchar)
5523 -> *mut regex;
5524 #[link_name="switch_regex_copy_substring"]
5525 pub fn regex_copy_substring(subject: *const c_char,
5526 ovector: *mut c_int,
5527 stringcount: c_int,
5528 stringnumber: c_int,
5529 buffer: *mut c_char,
5530 size: c_int)
5531 -> c_int;
5532 #[link_name="switch_regex_free"]
5533 pub fn regex_free(data: *mut c_void);
5534 #[link_name="switch_regex_perform"]
5535 pub fn regex_perform(field: *const c_char,
5536 expression: *const c_char,
5537 new_re: *mut *mut regex,
5538 ovector: *mut c_int,
5539 olen: u32)
5540 -> c_int;
5541 #[link_name="switch_perform_substitution"]
5542 pub fn perform_substitution(re: *mut regex,
5543 match_count: c_int,
5544 data: *const c_char,
5545 field_data: *const c_char,
5546 substituted: *mut c_char,
5547 len: usize,
5548 ovector: *mut c_int);
5549 #[link_name="switch_regex_match"]
5550 pub fn regex_match(target: *const c_char, expression: *const c_char) -> status;
5551 #[link_name="switch_regex_match_partial"]
5552 pub fn regex_match_partial(target: *const c_char,
5553 expression: *const c_char,
5554 partial_match: *mut c_int)
5555 -> status;
5556 #[link_name="switch_capture_regex"]
5557 pub fn capture_regex(re: *mut regex,
5558 match_count: c_int,
5559 field_data: *const c_char,
5560 ovector: *mut c_int,
5561 var: *const c_char,
5562 callback: cap_callback,
5563 user_data: *mut c_void);
5564 #[link_name="switch_regex_set_var_callback"]
5565 pub fn regex_set_var_callback(var: *const c_char, val: *const c_char, user_data: *mut c_void);
5566 #[link_name="switch_regex_set_event_header_callback"]
5567 pub fn regex_set_event_header_callback(var: *const c_char,
5568 val: *const c_char,
5569 user_data: *mut c_void);
5570 #[link_name="switch_core_screen_size"]
5571 pub fn core_screen_size(x: *mut c_int, y: *mut c_int);
5572 #[link_name="switch_core_session_sched_heartbeat"]
5573 pub fn core_session_sched_heartbeat(session: *mut core_session, seconds: u32);
5574 #[link_name="switch_core_session_unsched_heartbeat"]
5575 pub fn core_session_unsched_heartbeat(session: *mut core_session);
5576 #[link_name="switch_core_session_enable_heartbeat"]
5577 pub fn core_session_enable_heartbeat(session: *mut core_session, seconds: u32);
5578 #[link_name="switch_core_session_disable_heartbeat"]
5579 pub fn core_session_disable_heartbeat(session: *mut core_session);
5580 #[link_name="switch_core_media_bug_pop"]
5581 pub fn core_media_bug_pop(orig_session: *mut core_session,
5582 function: *const c_char,
5583 pop: *mut *mut media_bug)
5584 -> status;
5585 #[link_name="switch_core_media_bug_exec_all"]
5586 pub fn core_media_bug_exec_all(orig_session: *mut core_session,
5587 function: *const c_char,
5588 cb: media_bug_exec_cb,
5589 user_data: *mut c_void)
5590 -> status;
5591 #[link_name="switch_core_media_bug_patch_video"]
5592 pub fn core_media_bug_patch_video(orig_session: *mut core_session, frame: *mut frame) -> u32;
5593 #[link_name="switch_core_media_bug_count"]
5594 pub fn core_media_bug_count(orig_session: *mut core_session, function: *const c_char) -> u32;
5595 #[link_name="switch_media_bug_set_spy_fmt"]
5596 pub fn media_bug_set_spy_fmt(bug: *mut media_bug, spy_fmt: vid_spy_fmt);
5597 #[link_name="switch_core_media_bug_push_spy_frame"]
5598 pub fn core_media_bug_push_spy_frame(bug: *mut media_bug, frame: *mut frame, rw: rw) -> status;
5599 #[link_name="switch_core_media_bug_patch_spy_frame"]
5600 pub fn core_media_bug_patch_spy_frame(bug: *mut media_bug,
5601 img: *mut vpx_image,
5602 rw: rw)
5603 -> status;
5604 #[link_name="switch_media_bug_parse_spy_fmt"]
5605 pub fn media_bug_parse_spy_fmt(name: *const c_char) -> vid_spy_fmt;
5606 #[link_name="switch_core_media_bug_add"]
5607 pub fn core_media_bug_add(session: *mut core_session,
5608 function: *const c_char,
5609 target: *const c_char,
5610 callback: media_bug_callback,
5611 user_data: *mut c_void,
5612 stop_time: time_t,
5613 flags: media_bug_flag,
5614 new_bug: *mut *mut media_bug)
5615 -> status;
5616 #[link_name="switch_core_media_bug_pause"]
5617 pub fn core_media_bug_pause(session: *mut core_session);
5618 #[link_name="switch_core_media_bug_resume"]
5619 pub fn core_media_bug_resume(session: *mut core_session);
5620 #[link_name="switch_core_media_bug_inuse"]
5621 pub fn core_media_bug_inuse(bug: *mut media_bug, readp: *mut usize, writep: *mut usize);
5622 #[link_name="switch_core_media_bug_get_user_data"]
5623 pub fn core_media_bug_get_user_data(bug: *mut media_bug) -> *mut c_void;
5624 #[link_name="switch_core_media_bug_get_write_replace_frame"]
5625 pub fn core_media_bug_get_write_replace_frame(bug: *mut media_bug) -> *mut frame;
5626 #[link_name="switch_core_media_bug_get_native_read_frame"]
5627 pub fn core_media_bug_get_native_read_frame(bug: *mut media_bug) -> *mut frame;
5628 #[link_name="switch_core_media_bug_get_native_write_frame"]
5629 pub fn core_media_bug_get_native_write_frame(bug: *mut media_bug) -> *mut frame;
5630 #[link_name="switch_core_media_bug_get_video_ping_frame"]
5631 pub fn core_media_bug_get_video_ping_frame(bug: *mut media_bug) -> *mut frame;
5632 #[link_name="switch_core_media_bug_set_write_replace_frame"]
5633 pub fn core_media_bug_set_write_replace_frame(bug: *mut media_bug, frame: *mut frame);
5634 #[link_name="switch_core_media_bug_get_read_replace_frame"]
5635 pub fn core_media_bug_get_read_replace_frame(bug: *mut media_bug) -> *mut frame;
5636 #[link_name="switch_core_media_bug_set_read_demux_frame"]
5637 pub fn core_media_bug_set_read_demux_frame(bug: *mut media_bug, frame: *mut frame);
5638 #[link_name="switch_core_media_bug_get_session"]
5639 pub fn core_media_bug_get_session(bug: *mut media_bug) -> *mut core_session;
5640 #[link_name="switch_core_media_bug_test_flag"]
5641 pub fn core_media_bug_test_flag(bug: *mut media_bug, flag: u32) -> u32;
5642 #[link_name="switch_core_media_bug_set_flag"]
5643 pub fn core_media_bug_set_flag(bug: *mut media_bug, flag: u32) -> u32;
5644 #[link_name="switch_core_media_bug_clear_flag"]
5645 pub fn core_media_bug_clear_flag(bug: *mut media_bug, flag: u32) -> u32;
5646 #[link_name="switch_core_media_bug_set_read_replace_frame"]
5647 pub fn core_media_bug_set_read_replace_frame(bug: *mut media_bug, frame: *mut frame);
5648 #[link_name="switch_core_cpu_count"]
5649 pub fn core_cpu_count() -> u32;
5650 #[link_name="switch_core_media_bug_remove"]
5651 pub fn core_media_bug_remove(session: *mut core_session, bug: *mut *mut media_bug) -> status;
5652 #[link_name="switch_core_media_bug_prune"]
5653 pub fn core_media_bug_prune(session: *mut core_session) -> u32;
5654 #[link_name="switch_core_media_bug_remove_callback"]
5655 pub fn core_media_bug_remove_callback(session: *mut core_session,
5656 callback: media_bug_callback)
5657 -> status;
5658 #[link_name="switch_core_media_bug_close"]
5659 pub fn core_media_bug_close(bug: *mut *mut media_bug) -> status;
5660 #[link_name="switch_core_media_bug_remove_all_function"]
5661 pub fn core_media_bug_remove_all_function(session: *mut core_session,
5662 function: *const c_char)
5663 -> status;
5664 #[link_name="switch_core_media_bug_enumerate"]
5665 pub fn core_media_bug_enumerate(session: *mut core_session,
5666 stream: *mut stream_handle)
5667 -> status;
5668 #[link_name="switch_core_media_bug_transfer_recordings"]
5669 pub fn core_media_bug_transfer_recordings(orig_session: *mut core_session,
5670 new_session: *mut core_session)
5671 -> status;
5672 #[link_name="switch_core_media_bug_transfer_callback"]
5673 pub fn core_media_bug_transfer_callback(orig_session:
5674 *mut core_session,
5675 new_session:
5676 *mut core_session,
5677 callback:
5678 media_bug_callback,
5679 user_data_dup_func:
5680 std::option::Option<unsafe extern "C" fn(arg1:
5681 *mut core_session,
5682 arg2:
5683 *mut c_void)
5684 ->
5685 *mut c_void>)
5686 -> status;
5687 #[link_name="switch_core_media_bug_read"]
5688 pub fn core_media_bug_read(bug: *mut media_bug,
5689 frame: *mut frame,
5690 fill: switch_bool)
5691 -> status;
5692 #[link_name="switch_core_media_bug_flush"]
5693 pub fn core_media_bug_flush(bug: *mut media_bug);
5694 #[link_name="switch_core_media_bug_flush_all"]
5695 pub fn core_media_bug_flush_all(session: *mut core_session) -> status;
5696 #[link_name="switch_core_media_bug_set_pre_buffer_framecount"]
5697 pub fn core_media_bug_set_pre_buffer_framecount(bug: *mut media_bug,
5698 framecount: u32)
5699 -> status;
5700 #[link_name="switch_core_port_allocator_new"]
5701 pub fn core_port_allocator_new(ip: *const c_char,
5702 start: port,
5703 end: port,
5704 flags: port_flag,
5705 new_allocator: *mut *mut core_port_allocator)
5706 -> status;
5707 #[link_name="switch_core_port_allocator_request_port"]
5708 pub fn core_port_allocator_request_port(alloc: *mut core_port_allocator,
5709 port_ptr: *mut port)
5710 -> status;
5711 #[link_name="switch_core_port_allocator_free_port"]
5712 pub fn core_port_allocator_free_port(alloc: *mut core_port_allocator, port: port) -> status;
5713 #[link_name="switch_core_port_allocator_destroy"]
5714 pub fn core_port_allocator_destroy(alloc: *mut *mut core_port_allocator);
5715 #[link_name="switch_core_test_flag"]
5716 pub fn core_test_flag(flag: c_int) -> c_int;
5717 #[link_name="switch_core_init"]
5718 pub fn core_init(flags: core_flag, console: switch_bool, err: *mut *const c_char) -> status;
5719 #[link_name="switch_core_init_and_modload"]
5720 pub fn core_init_and_modload(flags: core_flag,
5721 console: switch_bool,
5722 err: *mut *const c_char)
5723 -> status;
5724 #[link_name="switch_core_session_limit"]
5725 pub fn core_session_limit(new_limit: u32) -> u32;
5726 #[link_name="switch_core_sessions_per_second"]
5727 pub fn core_sessions_per_second(new_limit: u32) -> u32;
5728 #[link_name="switch_core_destroy"]
5729 pub fn core_destroy() -> status;
5730 #[link_name="switch_core_session_io_read_lock"]
5731 pub fn core_session_io_read_lock(session: *mut core_session) -> status;
5732 #[link_name="switch_core_session_io_write_lock"]
5733 pub fn core_session_io_write_lock(session: *mut core_session) -> status;
5734 #[link_name="switch_core_session_io_rwunlock"]
5735 pub fn core_session_io_rwunlock(session: *mut core_session) -> status;
5736 #[link_name="switch_core_session_read_lock"]
5737 pub fn core_session_read_lock(session: *mut core_session) -> status;
5738 #[link_name="switch_core_session_read_lock_hangup"]
5739 pub fn core_session_read_lock_hangup(session: *mut core_session) -> status;
5740 #[link_name="switch_core_session_write_lock"]
5741 pub fn core_session_write_lock(session: *mut core_session);
5742 #[link_name="switch_core_session_rwunlock"]
5743 pub fn core_session_rwunlock(session: *mut core_session);
5744 #[link_name="switch_core_add_state_handler"]
5745 pub fn core_add_state_handler(state_handler: *const state_handler_table) -> c_int;
5746 #[link_name="switch_core_remove_state_handler"]
5747 pub fn core_remove_state_handler(state_handler: *const state_handler_table);
5748 #[link_name="switch_core_get_state_handler"]
5749 pub fn core_get_state_handler(index: c_int) -> *const state_handler_table;
5750 #[link_name="switch_core_memory_pool_tag"]
5751 pub fn core_memory_pool_tag(pool: *mut memory_pool, tag: *const c_char);
5752 #[link_name="switch_core_perform_new_memory_pool"]
5753 pub fn core_perform_new_memory_pool(pool: *mut *mut memory_pool,
5754 file: *const c_char,
5755 func: *const c_char,
5756 line: c_int)
5757 -> status;
5758 #[link_name="switch_core_session_sync_clock"]
5759 pub fn core_session_sync_clock() -> c_int;
5760 #[link_name="switch_core_perform_destroy_memory_pool"]
5761 pub fn core_perform_destroy_memory_pool(pool: *mut *mut memory_pool,
5762 file: *const c_char,
5763 func: *const c_char,
5764 line: c_int)
5765 -> status;
5766 #[link_name="switch_core_memory_pool_set_data"]
5767 pub fn core_memory_pool_set_data(pool: *mut memory_pool,
5768 key: *const c_char,
5769 data: *mut c_void);
5770 #[link_name="switch_core_memory_pool_get_data"]
5771 pub fn core_memory_pool_get_data(pool: *mut memory_pool, key: *const c_char) -> *mut c_void;
5772 #[link_name="switch_core_session_run"]
5773 pub fn core_session_run(session: *mut core_session);
5774 #[link_name="switch_core_session_running"]
5775 pub fn core_session_running(session: *mut core_session) -> c_uint;
5776 #[link_name="switch_core_session_started"]
5777 pub fn core_session_started(session: *mut core_session) -> c_uint;
5778 #[link_name="switch_core_perform_permanent_alloc"]
5779 pub fn core_perform_permanent_alloc(memory: usize,
5780 file: *const c_char,
5781 func: *const c_char,
5782 line: c_int)
5783 -> *mut c_void;
5784 #[link_name="switch_core_perform_alloc"]
5785 pub fn core_perform_alloc(pool: *mut memory_pool,
5786 memory: usize,
5787 file: *const c_char,
5788 func: *const c_char,
5789 line: c_int)
5790 -> *mut c_void;
5791 #[link_name="switch_core_perform_session_alloc"]
5792 pub fn core_perform_session_alloc(session: *mut core_session,
5793 memory: usize,
5794 file: *const c_char,
5795 func: *const c_char,
5796 line: c_int)
5797 -> *mut c_void;
5798 #[link_name="switch_core_perform_permanent_strdup"]
5799 pub fn core_perform_permanent_strdup(todup: *const c_char,
5800 file: *const c_char,
5801 func: *const c_char,
5802 line: c_int)
5803 -> *mut c_char;
5804 #[link_name="switch_core_perform_session_strdup"]
5805 pub fn core_perform_session_strdup(session: *mut core_session,
5806 todup: *const c_char,
5807 file: *const c_char,
5808 func: *const c_char,
5809 line: c_int)
5810 -> *mut c_char;
5811 #[link_name="switch_core_perform_strdup"]
5812 pub fn core_perform_strdup(pool: *mut memory_pool,
5813 todup: *const c_char,
5814 file: *const c_char,
5815 func: *const c_char,
5816 line: c_int)
5817 -> *mut c_char;
5818 #[link_name="switch_core_session_sprintf"]
5819 pub fn core_session_sprintf(session: *mut core_session,
5820 fmt: *const c_char,
5821 ...)
5822 -> *mut c_char;
5823 #[link_name="switch_core_sprintf"]
5824 pub fn core_sprintf(pool: *mut memory_pool, fmt: *const c_char, ...) -> *mut c_char;
5825 #[link_name="switch_core_session_get_pool"]
5826 pub fn core_session_get_pool(session: *mut core_session) -> *mut memory_pool;
5827 #[link_name="switch_core_session_request_xml"]
5828 pub fn core_session_request_xml(endpoint_interface: *mut endpoint_interface,
5829 pool: *mut *mut memory_pool,
5830 xml: xml_t)
5831 -> *mut core_session;
5832 #[link_name="switch_core_session_request_uuid"]
5833 pub fn core_session_request_uuid(endpoint_interface: *mut endpoint_interface,
5834 direction: call_direction,
5835 originate_flags: originate_flag,
5836 pool: *mut *mut memory_pool,
5837 use_uuid: *const c_char)
5838 -> *mut core_session;
5839 #[link_name="switch_core_session_set_uuid"]
5840 pub fn core_session_set_uuid(session: *mut core_session, use_uuid: *const c_char) -> status;
5841 #[link_name="switch_core_session_perform_destroy"]
5842 pub fn core_session_perform_destroy(session: *mut *mut core_session,
5843 file: *const c_char,
5844 func: *const c_char,
5845 line: c_int);
5846 #[link_name="switch_core_session_destroy_state"]
5847 pub fn core_session_destroy_state(session: *mut core_session);
5848 #[link_name="switch_core_session_reporting_state"]
5849 pub fn core_session_reporting_state(session: *mut core_session);
5850 #[link_name="switch_core_session_hangup_state"]
5851 pub fn core_session_hangup_state(session: *mut core_session, force: switch_bool);
5852 #[link_name="switch_core_session_count"]
5853 pub fn core_session_count() -> u32;
5854 #[link_name="switch_core_session_get_id"]
5855 pub fn core_session_get_id(session: *mut core_session) -> usize;
5856 #[link_name="switch_core_session_id"]
5857 pub fn core_session_id() -> usize;
5858 #[link_name="switch_core_session_id_dec"]
5859 pub fn core_session_id_dec() -> usize;
5860 #[link_name="switch_core_session_request_by_name"]
5861 pub fn core_session_request_by_name(endpoint_name: *const c_char,
5862 direction: call_direction,
5863 pool: *mut *mut memory_pool)
5864 -> *mut core_session;
5865 #[link_name="switch_core_session_thread_launch"]
5866 pub fn core_session_thread_launch(session: *mut core_session) -> status;
5867 #[link_name="switch_thread_pool_launch_thread"]
5868 pub fn thread_pool_launch_thread(tdp: *mut *mut thread_data) -> status;
5869 #[link_name="switch_core_session_thread_pool_launch"]
5870 pub fn core_session_thread_pool_launch(session: *mut core_session) -> status;
5871 #[link_name="switch_core_session_get_channel"]
5872 pub fn core_session_get_channel(session: *mut core_session) -> *mut channel;
5873 #[link_name="switch_core_session_get_mutex"]
5874 pub fn core_session_get_mutex(session: *mut core_session) -> *mut mutex;
5875 #[link_name="switch_core_session_wake_session_thread"]
5876 pub fn core_session_wake_session_thread(session: *mut core_session) -> status;
5877 #[link_name="switch_core_session_signal_state_change"]
5878 pub fn core_session_signal_state_change(session: *mut core_session);
5879 #[link_name="switch_core_session_get_uuid"]
5880 pub fn core_session_get_uuid(session: *mut core_session) -> *mut c_char;
5881 #[link_name="switch_core_session_set_loglevel"]
5882 pub fn core_session_set_loglevel(session: *mut core_session, loglevel: log_level) -> status;
5883 #[link_name="switch_core_session_get_loglevel"]
5884 pub fn core_session_get_loglevel(session: *mut core_session) -> log_level;
5885 #[link_name="switch_core_session_get_jb"]
5886 pub fn core_session_get_jb(session: *mut core_session, type_: media_type) -> *mut jb;
5887 #[link_name="switch_core_session_soft_lock"]
5888 pub fn core_session_soft_lock(session: *mut core_session, sec: u32);
5889 #[link_name="switch_core_session_soft_unlock"]
5890 pub fn core_session_soft_unlock(session: *mut core_session);
5891 #[link_name="switch_core_session_set_dmachine"]
5892 pub fn core_session_set_dmachine(session: *mut core_session,
5893 dmachine: *mut ivr_dmachine,
5894 target: digit_action_target);
5895 #[link_name="switch_core_session_get_dmachine"]
5896 pub fn core_session_get_dmachine(session: *mut core_session,
5897 target: digit_action_target)
5898 -> *mut ivr_dmachine;
5899 #[link_name="switch_ivr_dmachine_get_target"]
5900 pub fn ivr_dmachine_get_target(dmachine: *mut ivr_dmachine) -> digit_action_target;
5901 #[link_name="switch_ivr_dmachine_set_target"]
5902 pub fn ivr_dmachine_set_target(dmachine: *mut ivr_dmachine, target: digit_action_target);
5903 #[link_name="switch_ivr_dmachine_set_terminators"]
5904 pub fn ivr_dmachine_set_terminators(dmachine: *mut ivr_dmachine,
5905 terminators: *const c_char)
5906 -> status;
5907 #[link_name="switch_core_session_set_codec_slin"]
5908 pub fn core_session_set_codec_slin(session: *mut core_session, data: *mut slin_data) -> status;
5909 #[link_name="switch_core_session_raw_read"]
5910 pub fn core_session_raw_read(session: *mut core_session);
5911 #[link_name="switch_core_get_uuid"]
5912 pub fn core_get_uuid() -> *mut c_char;
5913 #[link_name="switch_core_session_perform_locate"]
5914 pub fn core_session_perform_locate(uuid_str: *const c_char,
5915 file: *const c_char,
5916 func: *const c_char,
5917 line: c_int)
5918 -> *mut core_session;
5919 #[link_name="switch_core_session_perform_force_locate"]
5920 pub fn core_session_perform_force_locate(uuid_str: *const c_char,
5921 file: *const c_char,
5922 func: *const c_char,
5923 line: c_int)
5924 -> *mut core_session;
5925 #[link_name="switch_core_get_variable"]
5926 pub fn core_get_variable(varname: *const c_char) -> *mut c_char;
5927 #[link_name="switch_core_get_variable_dup"]
5928 pub fn core_get_variable_dup(varname: *const c_char) -> *mut c_char;
5929 #[link_name="switch_core_get_variable_pdup"]
5930 pub fn core_get_variable_pdup(varname: *const c_char, pool: *mut memory_pool) -> *mut c_char;
5931 #[link_name="switch_core_get_hostname"]
5932 pub fn core_get_hostname() -> *const c_char;
5933 #[link_name="switch_core_get_switchname"]
5934 pub fn core_get_switchname() -> *const c_char;
5935 #[link_name="switch_core_get_domain"]
5936 pub fn core_get_domain(dup: switch_bool) -> *mut c_char;
5937 #[link_name="switch_core_set_variable"]
5938 pub fn core_set_variable(varname: *const c_char, value: *const c_char);
5939 #[link_name="switch_core_get_variables"]
5940 pub fn core_get_variables(event: *mut *mut event) -> status;
5941 #[link_name="switch_core_set_var_conditional"]
5942 pub fn core_set_var_conditional(varname: *const c_char,
5943 value: *const c_char,
5944 val2: *const c_char)
5945 -> switch_bool;
5946 #[link_name="switch_core_dump_variables"]
5947 pub fn core_dump_variables(stream: *mut stream_handle);
5948 #[link_name="switch_core_session_hupall"]
5949 pub fn core_session_hupall(cause: call_cause);
5950 #[link_name="switch_core_session_hupall_matching_var_ans"]
5951 pub fn core_session_hupall_matching_var_ans(var_name: *const c_char,
5952 var_val: *const c_char,
5953 cause: call_cause,
5954 type_: hup_type)
5955 -> u32;
5956 #[link_name="switch_core_session_findall_matching_var"]
5957 pub fn core_session_findall_matching_var(var_name: *const c_char,
5958 var_val: *const c_char)
5959 -> *mut console_callback_match;
5960 #[link_name="switch_core_session_findall"]
5961 pub fn core_session_findall() -> *mut console_callback_match;
5962 #[link_name="switch_core_session_hupall_endpoint"]
5963 pub fn core_session_hupall_endpoint(endpoint_interface: *const endpoint_interface,
5964 cause: call_cause);
5965 #[link_name="switch_core_session_perform_get_partner"]
5966 pub fn core_session_perform_get_partner(session: *mut core_session,
5967 partner: *mut *mut core_session,
5968 file: *const c_char,
5969 func: *const c_char,
5970 line: c_int)
5971 -> status;
5972 #[link_name="switch_core_session_message_send"]
5973 pub fn core_session_message_send(uuid_str: *const c_char,
5974 message: *mut core_session_message)
5975 -> status;
5976 #[link_name="switch_core_session_queue_message"]
5977 pub fn core_session_queue_message(session: *mut core_session,
5978 message: *mut core_session_message)
5979 -> status;
5980 #[link_name="switch_core_session_free_message"]
5981 pub fn core_session_free_message(message: *mut *mut core_session_message);
5982 #[link_name="switch_core_session_queue_signal_data"]
5983 pub fn core_session_queue_signal_data(session: *mut core_session,
5984 signal_data: *mut c_void)
5985 -> status;
5986 #[link_name="switch_core_session_dequeue_signal_data"]
5987 pub fn core_session_dequeue_signal_data(session: *mut core_session,
5988 signal_data: *mut *mut c_void)
5989 -> status;
5990 #[link_name="switch_core_session_pass_indication"]
5991 pub fn core_session_pass_indication(session: *mut core_session,
5992 indication: core_session_message_types)
5993 -> status;
5994 #[link_name="switch_core_session_queue_indication"]
5995 pub fn core_session_queue_indication(session: *mut core_session,
5996 indication: core_session_message_types)
5997 -> status;
5998 #[link_name="switch_core_session_dequeue_message"]
5999 pub fn core_session_dequeue_message(session: *mut core_session,
6000 message: *mut *mut core_session_message)
6001 -> status;
6002 #[link_name="switch_core_session_flush_message"]
6003 pub fn core_session_flush_message(session: *mut core_session) -> status;
6004 #[link_name="switch_core_session_event_send"]
6005 pub fn core_session_event_send(uuid_str: *const c_char, event: *mut *mut event) -> status;
6006 #[link_name="switch_core_session_get_app_log"]
6007 pub fn core_session_get_app_log(session: *mut core_session) -> *mut app_log;
6008 #[link_name="switch_core_session_exec"]
6009 pub fn core_session_exec(session: *mut core_session,
6010 application_interface: *const application_interface,
6011 arg: *const c_char)
6012 -> status;
6013 #[link_name="switch_core_session_video_reset"]
6014 pub fn core_session_video_reset(session: *mut core_session);
6015 #[link_name="switch_core_session_execute_application_get_flags"]
6016 pub fn core_session_execute_application_get_flags(session: *mut core_session,
6017 app: *const c_char,
6018 arg: *const c_char,
6019 flags: *mut i32)
6020 -> status;
6021 #[link_name="switch_core_session_execute_application_async"]
6022 pub fn core_session_execute_application_async(session: *mut core_session,
6023 app: *const c_char,
6024 arg: *const c_char)
6025 -> status;
6026 #[link_name="switch_core_session_get_app_flags"]
6027 pub fn core_session_get_app_flags(app: *const c_char, flags: *mut i32) -> status;
6028 #[link_name="switch_core_session_execute_exten"]
6029 pub fn core_session_execute_exten(session: *mut core_session,
6030 exten: *const c_char,
6031 dialplan: *const c_char,
6032 context: *const c_char)
6033 -> status;
6034 #[link_name="switch_core_session_receive_event"]
6035 pub fn core_session_receive_event(session: *mut core_session,
6036 event: *mut *mut event)
6037 -> status;
6038 #[link_name="switch_core_session_get_private_class"]
6039 pub fn core_session_get_private_class(session: *mut core_session,
6040 index: pvt_class)
6041 -> *mut c_void;
6042 #[link_name="switch_core_session_set_private_class"]
6043 pub fn core_session_set_private_class(session: *mut core_session,
6044 private_info: *mut c_void,
6045 index: pvt_class)
6046 -> status;
6047 #[link_name="switch_core_session_add_stream"]
6048 pub fn core_session_add_stream(session: *mut core_session, private_info: *mut c_void) -> c_int;
6049 #[link_name="switch_core_session_get_stream"]
6050 pub fn core_session_get_stream(session: *mut core_session, index: c_int) -> *mut c_void;
6051 #[link_name="switch_core_session_get_stream_count"]
6052 pub fn core_session_get_stream_count(session: *mut core_session) -> c_int;
6053 #[link_name="switch_core_session_launch_thread"]
6054 pub fn core_session_launch_thread(session:
6055 *mut core_session,
6056 func:
6057 std::option::Option<unsafe extern "C" fn(arg1:
6058 *mut thread,
6059 arg2:
6060 *mut c_void)
6061 ->
6062 *mut c_void>,
6063 obj:
6064 *mut c_void);
6065 #[link_name="switch_core_thread_session_end"]
6066 pub fn core_thread_session_end(session: *mut core_session);
6067 #[link_name="switch_core_service_session_av"]
6068 pub fn core_service_session_av(session: *mut core_session,
6069 audio: switch_bool,
6070 video: switch_bool);
6071 #[link_name="switch_core_session_outgoing_channel"]
6072 pub fn core_session_outgoing_channel(session: *mut core_session,
6073 var_event: *mut event,
6074 endpoint_name: *const c_char,
6075 caller_profile: *mut caller_profile,
6076 new_session: *mut *mut core_session,
6077 pool: *mut *mut memory_pool,
6078 flags: originate_flag,
6079 cancel_cause: *mut call_cause)
6080 -> call_cause;
6081 #[link_name="switch_core_session_perform_receive_message"]
6082 pub fn core_session_perform_receive_message(session: *mut core_session,
6083 message: *mut core_session_message,
6084 file: *const c_char,
6085 func: *const c_char,
6086 line: c_int)
6087 -> status;
6088 #[link_name="switch_core_session_queue_event"]
6089 pub fn core_session_queue_event(session: *mut core_session, event: *mut *mut event) -> status;
6090 #[link_name="switch_core_session_event_count"]
6091 pub fn core_session_event_count(session: *mut core_session) -> u32;
6092 #[link_name="switch_core_session_messages_waiting"]
6093 pub fn core_session_messages_waiting(session: *mut core_session) -> u32;
6094 #[link_name="switch_core_session_dequeue_event"]
6095 pub fn core_session_dequeue_event(session: *mut core_session,
6096 event: *mut *mut event,
6097 force: switch_bool)
6098 -> status;
6099 #[link_name="switch_core_session_queue_private_event"]
6100 pub fn core_session_queue_private_event(session: *mut core_session,
6101 event: *mut *mut event,
6102 priority: switch_bool)
6103 -> status;
6104 #[link_name="switch_core_session_private_event_count"]
6105 pub fn core_session_private_event_count(session: *mut core_session) -> u32;
6106 #[link_name="switch_core_session_dequeue_private_event"]
6107 pub fn core_session_dequeue_private_event(session: *mut core_session,
6108 event: *mut *mut event)
6109 -> status;
6110 #[link_name="switch_core_session_flush_private_events"]
6111 pub fn core_session_flush_private_events(session: *mut core_session) -> u32;
6112 #[link_name="switch_core_session_read_frame"]
6113 pub fn core_session_read_frame(session: *mut core_session,
6114 frame: *mut *mut frame,
6115 flags: io_flag,
6116 stream_id: c_int)
6117 -> status;
6118 #[link_name="switch_core_session_read_video_frame"]
6119 pub fn core_session_read_video_frame(session: *mut core_session,
6120 frame: *mut *mut frame,
6121 flags: io_flag,
6122 stream_id: c_int)
6123 -> status;
6124 #[link_name="switch_core_session_write_video_frame"]
6125 pub fn core_session_write_video_frame(session: *mut core_session,
6126 frame: *mut frame,
6127 flags: io_flag,
6128 stream_id: c_int)
6129 -> status;
6130 #[link_name="switch_core_session_write_encoded_video_frame"]
6131 pub fn core_session_write_encoded_video_frame(session: *mut core_session,
6132 frame: *mut frame,
6133 flags: io_flag,
6134 stream_id: c_int)
6135 -> status;
6136 #[link_name="switch_core_session_set_read_impl"]
6137 pub fn core_session_set_read_impl(session: *mut core_session,
6138 impp: *const codec_implementation)
6139 -> status;
6140 #[link_name="switch_core_session_set_write_impl"]
6141 pub fn core_session_set_write_impl(session: *mut core_session,
6142 impp: *const codec_implementation)
6143 -> status;
6144 #[link_name="switch_core_session_set_video_read_impl"]
6145 pub fn core_session_set_video_read_impl(session: *mut core_session,
6146 impp: *const codec_implementation)
6147 -> status;
6148 #[link_name="switch_core_session_set_video_write_impl"]
6149 pub fn core_session_set_video_write_impl(session: *mut core_session,
6150 impp: *const codec_implementation)
6151 -> status;
6152 #[link_name="switch_core_session_reset"]
6153 pub fn core_session_reset(session: *mut core_session,
6154 flush_dtmf: switch_bool,
6155 reset_read_codec: switch_bool);
6156 #[link_name="switch_core_session_write_frame"]
6157 pub fn core_session_write_frame(session: *mut core_session,
6158 frame: *mut frame,
6159 flags: io_flag,
6160 stream_id: c_int)
6161 -> status;
6162 #[link_name="switch_core_session_perform_kill_channel"]
6163 pub fn core_session_perform_kill_channel(session: *mut core_session,
6164 file: *const c_char,
6165 func: *const c_char,
6166 line: c_int,
6167 sig: signal)
6168 -> status;
6169 #[link_name="switch_core_session_send_dtmf"]
6170 pub fn core_session_send_dtmf(session: *mut core_session, dtmf: *const dtmf) -> status;
6171 #[link_name="switch_core_session_send_dtmf_string"]
6172 pub fn core_session_send_dtmf_string(session: *mut core_session,
6173 dtmf_string: *const c_char)
6174 -> status;
6175 #[link_name="switch_core_session_recv_dtmf"]
6176 pub fn core_session_recv_dtmf(session: *mut core_session, dtmf: *const dtmf) -> status;
6177 #[link_name="switch_core_hash_init_case"]
6178 pub fn core_hash_init_case(hash: *mut *mut hash, case_sensitive: switch_bool) -> status;
6179 #[link_name="switch_core_hash_destroy"]
6180 pub fn core_hash_destroy(hash: *mut *mut hash) -> status;
6181 #[link_name="switch_core_hash_insert_destructor"]
6182 pub fn core_hash_insert_destructor(hash: *mut hash,
6183 key: *const c_char,
6184 data: *const c_void,
6185 destructor: hashtable_destructor)
6186 -> status;
6187 #[link_name="switch_core_hash_insert_locked"]
6188 pub fn core_hash_insert_locked(hash: *mut hash,
6189 key: *const c_char,
6190 data: *const c_void,
6191 mutex: *mut mutex)
6192 -> status;
6193 #[link_name="switch_core_hash_insert_wrlock"]
6194 pub fn core_hash_insert_wrlock(hash: *mut hash,
6195 key: *const c_char,
6196 data: *const c_void,
6197 rwlock: *mut thread_rwlock)
6198 -> status;
6199 #[link_name="switch_core_hash_delete"]
6200 pub fn core_hash_delete(hash: *mut hash, key: *const c_char) -> *mut c_void;
6201 #[link_name="switch_core_hash_delete_locked"]
6202 pub fn core_hash_delete_locked(hash: *mut hash,
6203 key: *const c_char,
6204 mutex: *mut mutex)
6205 -> *mut c_void;
6206 #[link_name="switch_core_hash_delete_wrlock"]
6207 pub fn core_hash_delete_wrlock(hash: *mut hash,
6208 key: *const c_char,
6209 rwlock: *mut thread_rwlock)
6210 -> *mut c_void;
6211 #[link_name="switch_core_hash_delete_multi"]
6212 pub fn core_hash_delete_multi(hash: *mut hash,
6213 callback: hash_delete_callback,
6214 pData: *mut c_void)
6215 -> status;
6216 #[link_name="switch_core_hash_find"]
6217 pub fn core_hash_find(hash: *mut hash, key: *const c_char) -> *mut c_void;
6218 #[link_name="switch_core_hash_find_locked"]
6219 pub fn core_hash_find_locked(hash: *mut hash,
6220 key: *const c_char,
6221 mutex: *mut mutex)
6222 -> *mut c_void;
6223 #[link_name="switch_core_hash_find_rdlock"]
6224 pub fn core_hash_find_rdlock(hash: *mut hash,
6225 key: *const c_char,
6226 rwlock: *mut thread_rwlock)
6227 -> *mut c_void;
6228 #[link_name="switch_core_hash_first_iter"]
6229 pub fn core_hash_first_iter(hash: *mut hash, hi: *mut hash_index) -> *mut hash_index;
6230 #[link_name="switch_core_hash_empty"]
6231 pub fn core_hash_empty(hash: *mut hash) -> switch_bool;
6232 #[link_name="switch_core_hash_next"]
6233 pub fn core_hash_next(hi: *mut *mut hash_index) -> *mut hash_index;
6234 #[link_name="switch_core_hash_this"]
6235 pub fn core_hash_this(hi: *mut hash_index,
6236 key: *mut *const c_void,
6237 klen: *mut isize,
6238 val: *mut *mut c_void);
6239 #[link_name="switch_core_hash_this_val"]
6240 pub fn core_hash_this_val(hi: *mut hash_index, val: *mut c_void);
6241 #[link_name="switch_core_inthash_init"]
6242 pub fn core_inthash_init(hash: *mut *mut inthash) -> status;
6243 #[link_name="switch_core_inthash_destroy"]
6244 pub fn core_inthash_destroy(hash: *mut *mut inthash) -> status;
6245 #[link_name="switch_core_inthash_insert"]
6246 pub fn core_inthash_insert(hash: *mut inthash, key: u32, data: *const c_void) -> status;
6247 #[link_name="switch_core_inthash_delete"]
6248 pub fn core_inthash_delete(hash: *mut inthash, key: u32) -> *mut c_void;
6249 #[link_name="switch_core_inthash_find"]
6250 pub fn core_inthash_find(hash: *mut inthash, key: u32) -> *mut c_void;
6251 #[link_name="switch_core_timer_init"]
6252 pub fn core_timer_init(timer: *mut timer,
6253 timer_name: *const c_char,
6254 interval: c_int,
6255 samples: c_int,
6256 pool: *mut memory_pool)
6257 -> status;
6258 #[link_name="switch_time_calibrate_clock"]
6259 pub fn time_calibrate_clock();
6260 #[link_name="switch_core_timer_next"]
6261 pub fn core_timer_next(timer: *mut timer) -> status;
6262 #[link_name="switch_core_timer_step"]
6263 pub fn core_timer_step(timer: *mut timer) -> status;
6264 #[link_name="switch_core_timer_sync"]
6265 pub fn core_timer_sync(timer: *mut timer) -> status;
6266 #[link_name="switch_core_timer_check"]
6267 pub fn core_timer_check(timer: *mut timer, step: switch_bool) -> status;
6268 #[link_name="switch_core_timer_destroy"]
6269 pub fn core_timer_destroy(timer: *mut timer) -> status;
6270 #[link_name="switch_core_codec_init_with_bitrate"]
6271 pub fn core_codec_init_with_bitrate(codec: *mut codec,
6272 codec_name: *const c_char,
6273 fmtp: *const c_char,
6274 modname: *const c_char,
6275 rate: u32,
6276 ms: c_int,
6277 channels: c_int,
6278 bitrate: u32,
6279 flags: u32,
6280 codec_settings: *const codec_settings,
6281 pool: *mut memory_pool)
6282 -> status;
6283 #[link_name="switch_core_codec_copy"]
6284 pub fn core_codec_copy(codec: *mut codec,
6285 new_codec: *mut codec,
6286 codec_settings: *const codec_settings,
6287 pool: *mut memory_pool)
6288 -> status;
6289 #[link_name="switch_core_codec_parse_fmtp"]
6290 pub fn core_codec_parse_fmtp(codec_name: *const c_char,
6291 fmtp: *const c_char,
6292 rate: u32,
6293 codec_fmtp: *mut codec_fmtp)
6294 -> status;
6295 #[link_name="switch_core_codec_reset"]
6296 pub fn core_codec_reset(codec: *mut codec) -> status;
6297 #[link_name="switch_core_codec_encode"]
6298 pub fn core_codec_encode(codec: *mut codec,
6299 other_codec: *mut codec,
6300 decoded_data: *mut c_void,
6301 decoded_data_len: u32,
6302 decoded_rate: u32,
6303 encoded_data: *mut c_void,
6304 encoded_data_len: *mut u32,
6305 encoded_rate: *mut u32,
6306 flag: *mut c_uint)
6307 -> status;
6308 #[link_name="switch_core_codec_decode"]
6309 pub fn core_codec_decode(codec: *mut codec,
6310 other_codec: *mut codec,
6311 encoded_data: *mut c_void,
6312 encoded_data_len: u32,
6313 encoded_rate: u32,
6314 decoded_data: *mut c_void,
6315 decoded_data_len: *mut u32,
6316 decoded_rate: *mut u32,
6317 flag: *mut c_uint)
6318 -> status;
6319 #[link_name="switch_core_codec_encode_video"]
6320 pub fn core_codec_encode_video(codec: *mut codec, frame: *mut frame) -> status;
6321 #[link_name="switch_core_codec_control"]
6322 pub fn core_codec_control(codec: *mut codec,
6323 cmd: codec_control_command,
6324 ctype: codec_control_type,
6325 cmd_data: *mut c_void,
6326 atype: codec_control_type,
6327 cmd_arg: *mut c_void,
6328 rtype: *mut codec_control_type,
6329 ret_data: *mut *mut c_void)
6330 -> status;
6331 #[link_name="switch_core_codec_decode_video"]
6332 pub fn core_codec_decode_video(codec: *mut codec, frame: *mut frame) -> status;
6333 #[link_name="switch_core_codec_destroy"]
6334 pub fn core_codec_destroy(codec: *mut codec) -> status;
6335 #[link_name="switch_core_session_set_read_codec"]
6336 pub fn core_session_set_read_codec(session: *mut core_session, codec: *mut codec) -> status;
6337 #[link_name="switch_core_session_set_real_read_codec"]
6338 pub fn core_session_set_real_read_codec(session: *mut core_session,
6339 codec: *mut codec)
6340 -> status;
6341 #[link_name="switch_core_session_unset_read_codec"]
6342 pub fn core_session_unset_read_codec(session: *mut core_session);
6343 #[link_name="switch_core_session_unset_write_codec"]
6344 pub fn core_session_unset_write_codec(session: *mut core_session);
6345 #[link_name="switch_core_session_lock_codec_write"]
6346 pub fn core_session_lock_codec_write(session: *mut core_session);
6347 #[link_name="switch_core_session_unlock_codec_write"]
6348 pub fn core_session_unlock_codec_write(session: *mut core_session);
6349 #[link_name="switch_core_session_lock_codec_read"]
6350 pub fn core_session_lock_codec_read(session: *mut core_session);
6351 #[link_name="switch_core_session_unlock_codec_read"]
6352 pub fn core_session_unlock_codec_read(session: *mut core_session);
6353 #[link_name="switch_core_session_get_read_impl"]
6354 pub fn core_session_get_read_impl(session: *mut core_session,
6355 impp: *mut codec_implementation)
6356 -> status;
6357 #[link_name="switch_core_session_get_real_read_impl"]
6358 pub fn core_session_get_real_read_impl(session: *mut core_session,
6359 impp: *mut codec_implementation)
6360 -> status;
6361 #[link_name="switch_core_session_get_write_impl"]
6362 pub fn core_session_get_write_impl(session: *mut core_session,
6363 impp: *mut codec_implementation)
6364 -> status;
6365 #[link_name="switch_core_session_get_video_read_impl"]
6366 pub fn core_session_get_video_read_impl(session: *mut core_session,
6367 impp: *mut codec_implementation)
6368 -> status;
6369 #[link_name="switch_core_session_get_video_write_impl"]
6370 pub fn core_session_get_video_write_impl(session: *mut core_session,
6371 impp: *mut codec_implementation)
6372 -> status;
6373 #[link_name="switch_core_session_get_read_codec"]
6374 pub fn core_session_get_read_codec(session: *mut core_session) -> *mut codec;
6375 #[link_name="switch_core_session_get_effective_read_codec"]
6376 pub fn core_session_get_effective_read_codec(session: *mut core_session) -> *mut codec;
6377 #[link_name="switch_core_session_set_write_codec"]
6378 pub fn core_session_set_write_codec(session: *mut core_session, codec: *mut codec) -> status;
6379 #[link_name="switch_core_session_get_write_codec"]
6380 pub fn core_session_get_write_codec(session: *mut core_session) -> *mut codec;
6381 #[link_name="switch_core_session_get_effective_write_codec"]
6382 pub fn core_session_get_effective_write_codec(session: *mut core_session) -> *mut codec;
6383 #[link_name="switch_core_session_set_video_read_codec"]
6384 pub fn core_session_set_video_read_codec(session: *mut core_session,
6385 codec: *mut codec)
6386 -> status;
6387 #[link_name="switch_core_session_get_video_read_codec"]
6388 pub fn core_session_get_video_read_codec(session: *mut core_session) -> *mut codec;
6389 #[link_name="switch_core_session_set_video_write_codec"]
6390 pub fn core_session_set_video_write_codec(session: *mut core_session,
6391 codec: *mut codec)
6392 -> status;
6393 #[link_name="switch_core_session_get_video_write_codec"]
6394 pub fn core_session_get_video_write_codec(session: *mut core_session) -> *mut codec;
6395 #[link_name="switch_core_db_open_file"]
6396 pub fn core_db_open_file(filename: *const c_char) -> *mut core_db;
6397 #[link_name="switch_core_db_persistant_execute"]
6398 pub fn core_db_persistant_execute(db: *mut core_db, sql: *mut c_char, retries: u32) -> status;
6399 #[link_name="switch_core_db_persistant_execute_trans"]
6400 pub fn core_db_persistant_execute_trans(db: *mut core_db,
6401 sql: *mut c_char,
6402 retries: u32)
6403 -> status;
6404 #[link_name="switch_core_db_test_reactive"]
6405 pub fn core_db_test_reactive(db: *mut core_db,
6406 test_sql: *mut c_char,
6407 drop_sql: *mut c_char,
6408 reactive_sql: *mut c_char);
6409 #[link_name="switch_core_perform_file_open"]
6410 pub fn core_perform_file_open(file: *const c_char,
6411 func: *const c_char,
6412 line: c_int,
6413 fh: *mut file_handle,
6414 file_path: *const c_char,
6415 channels: u32,
6416 rate: u32,
6417 flags: c_uint,
6418 pool: *mut memory_pool)
6419 -> status;
6420 #[link_name="switch_core_file_read"]
6421 pub fn core_file_read(fh: *mut file_handle, data: *mut c_void, len: *mut usize) -> status;
6422 #[link_name="switch_core_file_write"]
6423 pub fn core_file_write(fh: *mut file_handle, data: *mut c_void, len: *mut usize) -> status;
6424 #[link_name="switch_core_file_write_video"]
6425 pub fn core_file_write_video(fh: *mut file_handle, frame: *mut frame) -> status;
6426 #[link_name="switch_core_file_read_video"]
6427 pub fn core_file_read_video(fh: *mut file_handle,
6428 frame: *mut frame,
6429 flags: video_read_flag)
6430 -> status;
6431 #[link_name="switch_core_file_seek"]
6432 pub fn core_file_seek(fh: *mut file_handle,
6433 cur_pos: *mut c_uint,
6434 samples: i64,
6435 whence: c_int)
6436 -> status;
6437 #[link_name="switch_core_file_set_string"]
6438 pub fn core_file_set_string(fh: *mut file_handle,
6439 col: audio_col,
6440 string: *const c_char)
6441 -> status;
6442 #[link_name="switch_core_file_get_string"]
6443 pub fn core_file_get_string(fh: *mut file_handle,
6444 col: audio_col,
6445 string: *mut *const c_char)
6446 -> status;
6447 #[link_name="switch_core_file_close"]
6448 pub fn core_file_close(fh: *mut file_handle) -> status;
6449 #[link_name="switch_core_file_command"]
6450 pub fn core_file_command(fh: *mut file_handle, command: file_command) -> status;
6451 #[link_name="switch_core_file_truncate"]
6452 pub fn core_file_truncate(fh: *mut file_handle, offset: i64) -> status;
6453 #[link_name="switch_core_file_has_video"]
6454 pub fn core_file_has_video(fh: *mut file_handle, CHECK_OPEN: switch_bool) -> switch_bool;
6455 #[link_name="switch_core_speech_open"]
6456 pub fn core_speech_open(sh: *mut speech_handle,
6457 module_name: *const c_char,
6458 voice_name: *const c_char,
6459 rate: c_uint,
6460 interval: c_uint,
6461 channels: c_uint,
6462 flags: *mut speech_flag,
6463 pool: *mut memory_pool)
6464 -> status;
6465 #[link_name="switch_core_speech_feed_tts"]
6466 pub fn core_speech_feed_tts(sh: *mut speech_handle,
6467 text: *mut c_char,
6468 flags: *mut speech_flag)
6469 -> status;
6470 #[link_name="switch_core_speech_flush_tts"]
6471 pub fn core_speech_flush_tts(sh: *mut speech_handle);
6472 #[link_name="switch_core_speech_text_param_tts"]
6473 pub fn core_speech_text_param_tts(sh: *mut speech_handle,
6474 param: *mut c_char,
6475 val: *const c_char);
6476 #[link_name="switch_core_speech_numeric_param_tts"]
6477 pub fn core_speech_numeric_param_tts(sh: *mut speech_handle, param: *mut c_char, val: c_int);
6478 #[link_name="switch_core_speech_float_param_tts"]
6479 pub fn core_speech_float_param_tts(sh: *mut speech_handle, param: *mut c_char, val: f64);
6480 #[link_name="switch_core_speech_read_tts"]
6481 pub fn core_speech_read_tts(sh: *mut speech_handle,
6482 data: *mut c_void,
6483 datalen: *mut usize,
6484 flags: *mut speech_flag)
6485 -> status;
6486 #[link_name="switch_core_speech_close"]
6487 pub fn core_speech_close(sh: *mut speech_handle, flags: *mut speech_flag) -> status;
6488 #[link_name="switch_core_asr_open"]
6489 pub fn core_asr_open(ah: *mut asr_handle,
6490 module_name: *const c_char,
6491 codec: *const c_char,
6492 rate: c_int,
6493 dest: *const c_char,
6494 flags: *mut asr_flag,
6495 pool: *mut memory_pool)
6496 -> status;
6497 #[link_name="switch_core_asr_close"]
6498 pub fn core_asr_close(ah: *mut asr_handle, flags: *mut asr_flag) -> status;
6499 #[link_name="switch_core_asr_feed"]
6500 pub fn core_asr_feed(ah: *mut asr_handle,
6501 data: *mut c_void,
6502 len: c_uint,
6503 flags: *mut asr_flag)
6504 -> status;
6505 #[link_name="switch_core_asr_feed_dtmf"]
6506 pub fn core_asr_feed_dtmf(ah: *mut asr_handle,
6507 dtmf: *const dtmf,
6508 flags: *mut asr_flag)
6509 -> status;
6510 #[link_name="switch_core_asr_check_results"]
6511 pub fn core_asr_check_results(ah: *mut asr_handle, flags: *mut asr_flag) -> status;
6512 #[link_name="switch_core_asr_get_results"]
6513 pub fn core_asr_get_results(ah: *mut asr_handle,
6514 xmlstr: *mut *mut c_char,
6515 flags: *mut asr_flag)
6516 -> status;
6517 #[link_name="switch_core_asr_get_result_headers"]
6518 pub fn core_asr_get_result_headers(ah: *mut asr_handle,
6519 headers: *mut *mut event,
6520 flags: *mut asr_flag)
6521 -> status;
6522 #[link_name="switch_core_asr_load_grammar"]
6523 pub fn core_asr_load_grammar(ah: *mut asr_handle,
6524 grammar: *const c_char,
6525 name: *const c_char)
6526 -> status;
6527 #[link_name="switch_core_asr_unload_grammar"]
6528 pub fn core_asr_unload_grammar(ah: *mut asr_handle, name: *const c_char) -> status;
6529 #[link_name="switch_core_asr_enable_grammar"]
6530 pub fn core_asr_enable_grammar(ah: *mut asr_handle, name: *const c_char) -> status;
6531 #[link_name="switch_core_asr_disable_grammar"]
6532 pub fn core_asr_disable_grammar(ah: *mut asr_handle, name: *const c_char) -> status;
6533 #[link_name="switch_core_asr_disable_all_grammars"]
6534 pub fn core_asr_disable_all_grammars(ah: *mut asr_handle) -> status;
6535 #[link_name="switch_core_asr_pause"]
6536 pub fn core_asr_pause(ah: *mut asr_handle) -> status;
6537 #[link_name="switch_core_asr_resume"]
6538 pub fn core_asr_resume(ah: *mut asr_handle) -> status;
6539 #[link_name="switch_core_asr_start_input_timers"]
6540 pub fn core_asr_start_input_timers(ah: *mut asr_handle) -> status;
6541 #[link_name="switch_core_asr_text_param"]
6542 pub fn core_asr_text_param(ah: *mut asr_handle, param: *mut c_char, val: *const c_char);
6543 #[link_name="switch_core_asr_numeric_param"]
6544 pub fn core_asr_numeric_param(ah: *mut asr_handle, param: *mut c_char, val: c_int);
6545 #[link_name="switch_core_asr_float_param"]
6546 pub fn core_asr_float_param(ah: *mut asr_handle, param: *mut c_char, val: f64);
6547 #[link_name="switch_core_directory_open"]
6548 pub fn core_directory_open(dh: *mut directory_handle,
6549 module_name: *mut c_char,
6550 source: *mut c_char,
6551 dsn: *mut c_char,
6552 passwd: *mut c_char,
6553 pool: *mut memory_pool)
6554 -> status;
6555 #[link_name="switch_core_directory_query"]
6556 pub fn core_directory_query(dh: *mut directory_handle,
6557 base: *mut c_char,
6558 query: *mut c_char)
6559 -> status;
6560 #[link_name="switch_core_directory_next"]
6561 pub fn core_directory_next(dh: *mut directory_handle) -> status;
6562 #[link_name="switch_core_directory_next_pair"]
6563 pub fn core_directory_next_pair(dh: *mut directory_handle,
6564 var: *mut *mut c_char,
6565 val: *mut *mut c_char)
6566 -> status;
6567 #[link_name="switch_core_directory_close"]
6568 pub fn core_directory_close(dh: *mut directory_handle) -> status;
6569 #[link_name="switch_core_data_channel"]
6570 pub fn core_data_channel(channel: text_channel) -> *mut FILE;
6571 #[link_name="switch_core_ready"]
6572 pub fn core_ready() -> switch_bool;
6573 #[link_name="switch_core_running"]
6574 pub fn core_running() -> switch_bool;
6575 #[link_name="switch_core_ready_inbound"]
6576 pub fn core_ready_inbound() -> switch_bool;
6577 #[link_name="switch_core_ready_outbound"]
6578 pub fn core_ready_outbound() -> switch_bool;
6579 #[link_name="switch_core_flags"]
6580 pub fn core_flags() -> core_flag;
6581 #[link_name="switch_core_management_exec"]
6582 pub fn core_management_exec(relative_oid: *mut c_char,
6583 action: management_action,
6584 data: *mut c_char,
6585 datalen: usize)
6586 -> status;
6587 #[link_name="switch_core_set_process_privileges"]
6588 pub fn core_set_process_privileges() -> i32;
6589 #[link_name="switch_set_normal_priority"]
6590 pub fn set_normal_priority() -> i32;
6591 #[link_name="switch_set_auto_priority"]
6592 pub fn set_auto_priority() -> i32;
6593 #[link_name="switch_set_realtime_priority"]
6594 pub fn set_realtime_priority() -> i32;
6595 #[link_name="switch_set_low_priority"]
6596 pub fn set_low_priority() -> i32;
6597 #[link_name="switch_core_runtime_loop"]
6598 pub fn core_runtime_loop(bg: c_int);
6599 #[link_name="switch_core_set_console"]
6600 pub fn core_set_console(console: *const c_char) -> status;
6601 #[link_name="switch_core_measure_time"]
6602 pub fn core_measure_time(total_ms: time_t, duration: *mut core_time_duration);
6603 #[link_name="switch_core_uptime"]
6604 pub fn core_uptime() -> time_t;
6605 #[link_name="switch_core_session_ctl"]
6606 pub fn core_session_ctl(cmd: session_ctl, val: *mut c_void) -> i32;
6607 #[link_name="switch_core_get_console"]
6608 pub fn core_get_console() -> *mut FILE;
6609 #[link_name="switch_core_launch_thread"]
6610 pub fn core_launch_thread(func: std::option::Option<unsafe extern "C" fn(arg1: *mut thread,
6611 arg2: *mut c_void)
6612 -> *mut c_void>,
6613 obj: *mut c_void,
6614 pool: *mut memory_pool)
6615 -> *mut thread;
6616 #[link_name="switch_core_set_globals"]
6617 pub fn core_set_globals();
6618 #[link_name="switch_core_session_compare"]
6619 pub fn core_session_compare(a: *mut core_session, b: *mut core_session) -> u8;
6620 #[link_name="switch_core_session_check_interface"]
6621 pub fn core_session_check_interface(session: *mut core_session,
6622 endpoint_interface: *const endpoint_interface)
6623 -> u8;
6624 #[link_name="switch_core_session_set_video_read_callback"]
6625 pub fn core_session_set_video_read_callback(session: *mut core_session,
6626 func: core_video_thread_callback_func,
6627 user_data: *mut c_void)
6628 -> status;
6629 #[link_name="switch_core_session_video_read_callback"]
6630 pub fn core_session_video_read_callback(session: *mut core_session,
6631 frame: *mut frame)
6632 -> status;
6633 #[link_name="switch_core_mime_index"]
6634 pub fn core_mime_index() -> *mut hash_index;
6635 #[link_name="switch_core_mime_ext2type"]
6636 pub fn core_mime_ext2type(ext: *const c_char) -> *const c_char;
6637 #[link_name="switch_core_mime_type2ext"]
6638 pub fn core_mime_type2ext(type_: *const c_char) -> *const c_char;
6639 #[link_name="switch_core_mime_add_type"]
6640 pub fn core_mime_add_type(type_: *const c_char, ext: *const c_char) -> status;
6641 #[link_name="switch_loadable_module_create_module_interface"]
6642 #[link_name="switch_loadable_module_create_module_interface"]
6643 pub fn loadable_module_create_module_interface(pool: *mut memory_pool,
6644 name: *const c_char)
6645 -> *mut loadable_module_interface;
6646 #[link_name="switch_loadable_module_create_interface"]
6647 pub fn loadable_module_create_interface(mod_: *mut loadable_module_interface,
6648 iname: module_interface_name)
6649 -> *mut c_void;
6650 #[link_name="switch_micro_time_now"]
6651 pub fn micro_time_now() -> time_t;
6652 #[link_name="switch_mono_micro_time_now"]
6653 pub fn mono_micro_time_now() -> time_t;
6654 #[link_name="switch_core_memory_reclaim"]
6655 pub fn core_memory_reclaim();
6656 #[link_name="switch_core_memory_reclaim_events"]
6657 pub fn core_memory_reclaim_events();
6658 #[link_name="switch_core_memory_reclaim_logger"]
6659 pub fn core_memory_reclaim_logger();
6660 #[link_name="switch_core_memory_reclaim_all"]
6661 pub fn core_memory_reclaim_all();
6662 #[link_name="switch_core_setrlimits"]
6663 pub fn core_setrlimits();
6664 #[link_name="switch_time_ref"]
6665 pub fn time_ref() -> time_t;
6666 #[link_name="switch_time_sync"]
6667 pub fn time_sync();
6668 #[link_name="switch_epoch_time_now"]
6669 pub fn epoch_time_now(t: *mut time_t) -> time_t;
6670 #[link_name="switch_lookup_timezone"]
6671 pub fn lookup_timezone(tz_name: *const c_char) -> *const c_char;
6672 #[link_name="switch_strftime_tz"]
6673 pub fn strftime_tz(tz: *const c_char,
6674 format: *const c_char,
6675 date: *mut c_char,
6676 len: usize,
6677 thetime: time_t)
6678 -> status;
6679 #[link_name="switch_time_exp_tz_name"]
6680 pub fn time_exp_tz_name(tz: *const c_char, tm: *mut time_exp, thetime: time_t) -> status;
6681 #[link_name="switch_load_network_lists"]
6682 pub fn load_network_lists(reload: switch_bool);
6683 #[link_name="switch_check_network_list_ip_token"]
6684 pub fn check_network_list_ip_token(ip_str: *const c_char,
6685 list_name: *const c_char,
6686 token: *mut *const c_char)
6687 -> switch_bool;
6688 #[link_name="switch_time_set_monotonic"]
6689 pub fn time_set_monotonic(enable: switch_bool);
6690 #[link_name="switch_time_set_timerfd"]
6691 pub fn time_set_timerfd(enable: c_int);
6692 #[link_name="switch_time_set_nanosleep"]
6693 pub fn time_set_nanosleep(enable: switch_bool);
6694 #[link_name="switch_time_set_matrix"]
6695 pub fn time_set_matrix(enable: switch_bool);
6696 #[link_name="switch_time_set_cond_yield"]
6697 pub fn time_set_cond_yield(enable: switch_bool);
6698 #[link_name="switch_time_set_use_system_time"]
6699 pub fn time_set_use_system_time(enable: switch_bool);
6700 #[link_name="switch_core_min_dtmf_duration"]
6701 pub fn core_min_dtmf_duration(duration: u32) -> u32;
6702 #[link_name="switch_core_max_dtmf_duration"]
6703 pub fn core_max_dtmf_duration(duration: u32) -> u32;
6704 #[link_name="switch_core_min_idle_cpu"]
6705 pub fn core_min_idle_cpu(new_limit: f64) -> f64;
6706 #[link_name="switch_core_idle_cpu"]
6707 pub fn core_idle_cpu() -> f64;
6708 #[link_name="switch_core_default_dtmf_duration"]
6709 pub fn core_default_dtmf_duration(duration: u32) -> u32;
6710 #[link_name="switch_console_set_complete"]
6711 pub fn console_set_complete(string: *const c_char) -> status;
6712 #[link_name="switch_console_set_alias"]
6713 pub fn console_set_alias(string: *const c_char) -> status;
6714 #[link_name="switch_system"]
6715 pub fn system(cmd: *const c_char, wait: switch_bool) -> c_int;
6716 #[link_name="switch_stream_system"]
6717 pub fn stream_system(cmd: *const c_char, stream: *mut stream_handle) -> c_int;
6718 #[link_name="switch_cond_yield"]
6719 pub fn cond_yield(t: interval_time_t);
6720 #[link_name="switch_cond_next"]
6721 pub fn cond_next();
6722 #[link_name="switch_core_chat_send_args"]
6723 pub fn core_chat_send_args(dest_proto: *const c_char,
6724 proto: *const c_char,
6725 from: *const c_char,
6726 to: *const c_char,
6727 subject: *const c_char,
6728 body: *const c_char,
6729 type_: *const c_char,
6730 hint: *const c_char,
6731 blocking: switch_bool)
6732 -> status;
6733 #[link_name="switch_core_chat_send"]
6734 pub fn core_chat_send(dest_proto: *const c_char, message_event: *mut event) -> status;
6735 #[link_name="switch_core_chat_deliver"]
6736 pub fn core_chat_deliver(dest_proto: *const c_char, message_event: *mut *mut event) -> status;
6737 #[link_name="switch_ivr_preprocess_session"]
6738 pub fn ivr_preprocess_session(session: *mut core_session, cmds: *const c_char) -> status;
6739 #[link_name="switch_core_sqldb_pause"]
6740 pub fn core_sqldb_pause();
6741 #[link_name="switch_core_sqldb_resume"]
6742 pub fn core_sqldb_resume();
6743 #[link_name="switch_cache_db_get_type"]
6744 pub fn cache_db_get_type(dbh: *mut cache_db_handle) -> cache_db_handle_type;
6745 #[link_name="switch_cache_db_dismiss_db_handle"]
6746 pub fn cache_db_dismiss_db_handle(dbh: *mut *mut cache_db_handle);
6747 #[link_name="switch_cache_db_release_db_handle"]
6748 pub fn cache_db_release_db_handle(dbh: *mut *mut cache_db_handle);
6749 #[link_name="_switch_cache_db_get_db_handle"]
6750 pub fn _cache_db_get_db_handle(dbh: *mut *mut cache_db_handle,
6751 type_: cache_db_handle_type,
6752 connection_options: *mut cache_db_connection_options,
6753 file: *const c_char,
6754 func: *const c_char,
6755 line: c_int)
6756 -> status;
6757 #[link_name="_switch_cache_db_get_db_handle_dsn"]
6758 pub fn _cache_db_get_db_handle_dsn(dbh: *mut *mut cache_db_handle,
6759 dsn: *const c_char,
6760 file: *const c_char,
6761 func: *const c_char,
6762 line: c_int)
6763 -> status;
6764 #[link_name="switch_cache_db_create_schema"]
6765 pub fn cache_db_create_schema(dbh: *mut cache_db_handle,
6766 sql: *mut c_char,
6767 err: *mut *mut c_char)
6768 -> status;
6769 #[link_name="switch_cache_db_execute_sql2str"]
6770 pub fn cache_db_execute_sql2str(dbh: *mut cache_db_handle,
6771 sql: *mut c_char,
6772 str: *mut c_char,
6773 len: usize,
6774 err: *mut *mut c_char)
6775 -> *mut c_char;
6776 #[link_name="switch_cache_db_execute_sql"]
6777 pub fn cache_db_execute_sql(dbh: *mut cache_db_handle,
6778 sql: *mut c_char,
6779 err: *mut *mut c_char)
6780 -> status;
6781 #[link_name="switch_cache_db_execute_sql_callback"]
6782 pub fn cache_db_execute_sql_callback(dbh: *mut cache_db_handle,
6783 sql: *const c_char,
6784 callback: core_db_callback_func,
6785 pdata: *mut c_void,
6786 err: *mut *mut c_char)
6787 -> status;
6788 #[link_name="switch_cache_db_execute_sql_callback_err"]
6789 pub fn cache_db_execute_sql_callback_err(dbh: *mut cache_db_handle,
6790 sql: *const c_char,
6791 callback: core_db_callback_func,
6792 err_callback: core_db_err_callback_func,
6793 pdata: *mut c_void,
6794 err: *mut *mut c_char)
6795 -> status;
6796 #[link_name="switch_cache_db_affected_rows"]
6797 pub fn cache_db_affected_rows(dbh: *mut cache_db_handle) -> c_int;
6798 #[link_name="switch_cache_db_load_extension"]
6799 pub fn cache_db_load_extension(dbh: *mut cache_db_handle, extension: *const c_char) -> c_int;
6800 #[link_name="switch_cache_db_status"]
6801 pub fn cache_db_status(stream: *mut stream_handle);
6802 #[link_name="_switch_core_db_handle"]
6803 pub fn _core_db_handle(dbh: *mut *mut cache_db_handle,
6804 file: *const c_char,
6805 func: *const c_char,
6806 line: c_int)
6807 -> status;
6808 #[link_name="switch_cache_db_test_reactive"]
6809 pub fn cache_db_test_reactive(db: *mut cache_db_handle,
6810 test_sql: *const c_char,
6811 drop_sql: *const c_char,
6812 reactive_sql: *const c_char)
6813 -> switch_bool;
6814 #[link_name="switch_cache_db_persistant_execute"]
6815 pub fn cache_db_persistant_execute(dbh: *mut cache_db_handle,
6816 sql: *const c_char,
6817 retries: u32)
6818 -> status;
6819 #[link_name="switch_cache_db_persistant_execute_trans_full"]
6820 pub fn cache_db_persistant_execute_trans_full(dbh: *mut cache_db_handle,
6821 sql: *mut c_char,
6822 retries: u32,
6823 pre_trans_execute: *const c_char,
6824 post_trans_execute: *const c_char,
6825 inner_pre_trans_execute: *const c_char,
6826 inner_post_trans_execute: *const c_char)
6827 -> status;
6828 #[link_name="switch_core_set_signal_handlers"]
6829 pub fn core_set_signal_handlers();
6830 #[link_name="switch_core_debug_level"]
6831 pub fn core_debug_level() -> u32;
6832 #[link_name="switch_cache_db_flush_handles"]
6833 pub fn cache_db_flush_handles();
6834 #[link_name="switch_core_banner"]
6835 pub fn core_banner() -> *const c_char;
6836 #[link_name="switch_core_session_in_thread"]
6837 pub fn core_session_in_thread(session: *mut core_session) -> switch_bool;
6838 #[link_name="switch_default_ptime"]
6839 pub fn default_ptime(name: *const c_char, number: u32) -> u32;
6840 #[link_name="switch_default_rate"]
6841 pub fn default_rate(name: *const c_char, number: u32) -> u32;
6842 #[link_name="switch_core_add_registration"]
6843 pub fn core_add_registration(user: *const c_char,
6844 realm: *const c_char,
6845 token: *const c_char,
6846 url: *const c_char,
6847 expires: u32,
6848 network_ip: *const c_char,
6849 network_port: *const c_char,
6850 network_proto: *const c_char,
6851 metadata: *const c_char)
6852 -> status;
6853 #[link_name="switch_core_del_registration"]
6854 pub fn core_del_registration(user: *const c_char,
6855 realm: *const c_char,
6856 token: *const c_char)
6857 -> status;
6858 #[link_name="switch_core_expire_registration"]
6859 pub fn core_expire_registration(force: c_int) -> status;
6860 #[link_name="switch_core_get_rtp_port_range_start_port"]
6861 pub fn core_get_rtp_port_range_start_port() -> u16;
6862 #[link_name="switch_core_get_rtp_port_range_end_port"]
6863 pub fn core_get_rtp_port_range_end_port() -> u16;
6864 #[link_name="switch_say_file_handle_get_variable"]
6865 pub fn say_file_handle_get_variable(sh: *mut say_file_handle,
6866 var: *const c_char)
6867 -> *mut c_char;
6868 #[link_name="switch_say_file_handle_get_path"]
6869 pub fn say_file_handle_get_path(sh: *mut say_file_handle) -> *mut c_char;
6870 #[link_name="switch_say_file_handle_detach_path"]
6871 pub fn say_file_handle_detach_path(sh: *mut say_file_handle) -> *mut c_char;
6872 #[link_name="switch_say_file_handle_destroy"]
6873 pub fn say_file_handle_destroy(sh: *mut *mut say_file_handle);
6874 #[link_name="switch_say_file_handle_create"]
6875 pub fn say_file_handle_create(sh: *mut *mut say_file_handle,
6876 ext: *const c_char,
6877 var_event: *mut *mut event)
6878 -> status;
6879 #[link_name="switch_say_file"]
6880 pub fn say_file(sh: *mut say_file_handle, fmt: *const c_char, ...);
6881 #[link_name="switch_max_file_desc"]
6882 pub fn max_file_desc() -> c_int;
6883 #[link_name="switch_close_extra_files"]
6884 pub fn close_extra_files(keep: *mut c_int, keep_ttl: c_int);
6885 #[link_name="switch_core_thread_set_cpu_affinity"]
6886 pub fn core_thread_set_cpu_affinity(cpu: c_int) -> status;
6887 #[link_name="switch_os_yield"]
6888 pub fn os_yield();
6889 #[link_name="switch_core_get_stacksizes"]
6890 pub fn core_get_stacksizes(cur: *mut usize, max: *mut usize) -> status;
6891 #[link_name="switch_core_gen_encoded_silence"]
6892 pub fn core_gen_encoded_silence(data: *mut c_uchar,
6893 read_impl: *const codec_implementation,
6894 len: usize);
6895 #[link_name="switch_core_dbtype"]
6896 pub fn core_dbtype() -> cache_db_handle_type;
6897 #[link_name="switch_core_sql_exec"]
6898 pub fn core_sql_exec(sql: *const c_char);
6899 #[link_name="switch_core_recovery_recover"]
6900 pub fn core_recovery_recover(technology: *const c_char, profile_name: *const c_char) -> c_int;
6901 #[link_name="switch_core_recovery_untrack"]
6902 pub fn core_recovery_untrack(session: *mut core_session, force: switch_bool);
6903 #[link_name="switch_core_recovery_track"]
6904 pub fn core_recovery_track(session: *mut core_session);
6905 #[link_name="switch_core_recovery_flush"]
6906 pub fn core_recovery_flush(technology: *const c_char, profile_name: *const c_char);
6907 #[link_name="switch_sql_queue_manager_pause"]
6908 pub fn sql_queue_manager_pause(qm: *mut sql_queue_manager, flush: switch_bool);
6909 #[link_name="switch_sql_queue_manager_resume"]
6910 pub fn sql_queue_manager_resume(qm: *mut sql_queue_manager);
6911 #[link_name="switch_sql_queue_manager_size"]
6912 pub fn sql_queue_manager_size(qm: *mut sql_queue_manager, index: u32) -> c_int;
6913 #[link_name="switch_sql_queue_manager_push_confirm"]
6914 pub fn sql_queue_manager_push_confirm(qm: *mut sql_queue_manager,
6915 sql: *const c_char,
6916 pos: u32,
6917 dup: switch_bool)
6918 -> status;
6919 #[link_name="switch_sql_queue_manager_push"]
6920 pub fn sql_queue_manager_push(qm: *mut sql_queue_manager,
6921 sql: *const c_char,
6922 pos: u32,
6923 dup: switch_bool)
6924 -> status;
6925 #[link_name="switch_sql_queue_manager_destroy"]
6926 pub fn sql_queue_manager_destroy(qmp: *mut *mut sql_queue_manager) -> status;
6927 #[link_name="switch_sql_queue_manager_init_name"]
6928 pub fn sql_queue_manager_init_name(name: *const c_char,
6929 qmp: *mut *mut sql_queue_manager,
6930 numq: u32,
6931 dsn: *const c_char,
6932 max_trans: u32,
6933 pre_trans_execute: *const c_char,
6934 post_trans_execute: *const c_char,
6935 inner_pre_trans_execute: *const c_char,
6936 inner_post_trans_execute: *const c_char)
6937 -> status;
6938 #[link_name="switch_sql_queue_manager_start"]
6939 pub fn sql_queue_manager_start(qm: *mut sql_queue_manager) -> status;
6940 #[link_name="switch_sql_queue_manager_stop"]
6941 pub fn sql_queue_manager_stop(qm: *mut sql_queue_manager) -> status;
6942 #[link_name="switch_cache_db_execute_sql_event_callback"]
6943 pub fn cache_db_execute_sql_event_callback(dbh: *mut cache_db_handle,
6944 sql: *const c_char,
6945 callback: core_db_event_callback_func,
6946 pdata: *mut c_void,
6947 err: *mut *mut c_char)
6948 -> status;
6949 #[link_name="switch_sql_queue_manager_execute_sql_callback"]
6950 pub fn sql_queue_manager_execute_sql_callback(qm: *mut sql_queue_manager,
6951 sql: *const c_char,
6952 callback: core_db_callback_func,
6953 pdata: *mut c_void);
6954 #[link_name="switch_sql_queue_manager_execute_sql_callback_err"]
6955 pub fn sql_queue_manager_execute_sql_callback_err(qm: *mut sql_queue_manager,
6956 sql: *const c_char,
6957 callback: core_db_callback_func,
6958 err_callback: core_db_err_callback_func,
6959 pdata: *mut c_void);
6960 #[link_name="switch_sql_queue_manager_execute_sql_event_callback"]
6961 pub fn sql_queue_manager_execute_sql_event_callback(qm: *mut sql_queue_manager,
6962 sql: *const c_char,
6963 callback: core_db_event_callback_func,
6964 pdata: *mut c_void);
6965 #[link_name="switch_sql_queue_manager_execute_sql_event_callback_err"]
6966 pub fn sql_queue_manager_execute_sql_event_callback_err(qm: *mut sql_queue_manager,
6967 sql: *const c_char,
6968 callback: core_db_event_callback_func,
6969 err_callback: core_db_err_callback_func,
6970 pdata: *mut c_void);
6971 #[link_name="switch_core_gen_certs"]
6972 pub fn core_gen_certs(prefix: *const c_char) -> c_int;
6973 #[link_name="switch_core_cert_gen_fingerprint"]
6974 pub fn core_cert_gen_fingerprint(prefix: *const c_char, fp: *mut dtls_fingerprint) -> c_int;
6975 #[link_name="switch_core_cert_expand_fingerprint"]
6976 pub fn core_cert_expand_fingerprint(fp: *mut dtls_fingerprint, str: *const c_char) -> c_int;
6977 #[link_name="switch_core_cert_verify"]
6978 pub fn core_cert_verify(fp: *mut dtls_fingerprint) -> c_int;
6979 #[link_name="switch_core_session_request_video_refresh"]
6980 pub fn core_session_request_video_refresh(session: *mut core_session) -> status;
6981 #[link_name="switch_core_session_send_and_request_video_refresh"]
6982 pub fn core_session_send_and_request_video_refresh(session: *mut core_session) -> status;
6983 #[link_name="switch_stream_system_fork"]
6984 pub fn stream_system_fork(cmd: *const c_char, stream: *mut stream_handle) -> c_int;
6985 #[link_name="switch_ice_direction"]
6986 pub fn ice_direction(session: *mut core_session) -> call_direction;
6987 #[link_name="switch_core_session_debug_pool"]
6988 pub fn core_session_debug_pool(stream: *mut stream_handle);
6989 #[link_name="switch_version_major"]
6990 pub fn version_major() -> *const c_char;
6991 #[link_name="switch_version_minor"]
6992 pub fn version_minor() -> *const c_char;
6993 #[link_name="switch_version_micro"]
6994 pub fn version_micro() -> *const c_char;
6995 #[link_name="switch_version_revision"]
6996 pub fn version_revision() -> *const c_char;
6997 #[link_name="switch_version_revision_human"]
6998 pub fn version_revision_human() -> *const c_char;
6999 #[link_name="switch_version_full"]
7000 pub fn version_full() -> *const c_char;
7001 #[link_name="switch_version_full_human"]
7002 pub fn version_full_human() -> *const c_char;
7003 #[link_name="switch_core_autobind_cpu"]
7004 pub fn core_autobind_cpu();
7005 #[link_name="switch_log_init"]
7006 pub fn log_init(pool: *mut memory_pool, colorize: switch_bool) -> status;
7007 #[link_name="switch_log_shutdown"]
7008 pub fn log_shutdown() -> status;
7009 #[link_name="switch_log_printf"]
7010 pub fn log_printf(channel: text_channel,
7011 file: *const c_char,
7012 func: *const c_char,
7013 line: c_int,
7014 userdata: *const c_char,
7015 level: log_level,
7016 fmt: *const c_char,
7017 ...);
7018 #[link_name="switch_log_bind_logger"]
7019 pub fn log_bind_logger(function: log_function,
7020 level: log_level,
7021 is_console: switch_bool)
7022 -> status;
7023 #[link_name="switch_log_unbind_logger"]
7024 pub fn log_unbind_logger(function: log_function) -> status;
7025 #[link_name="switch_log_level2str"]
7026 pub fn log_level2str(level: log_level) -> *const c_char;
7027 #[link_name="switch_log_str2level"]
7028 pub fn log_str2level(str: *const c_char) -> log_level;
7029 #[link_name="switch_log_str2mask"]
7030 pub fn log_str2mask(str: *const c_char) -> u32;
7031 #[link_name="switch_log_node_dup"]
7032 pub fn log_node_dup(node: *const log_node) -> *mut log_node;
7033 #[link_name="switch_log_node_free"]
7034 pub fn log_node_free(pnode: *mut *mut log_node);
7035 #[link_name="switch_resample_perform_create"]
7036 pub fn resample_perform_create(new_resampler: *mut *mut audio_resampler,
7037 from_rate: u32,
7038 to_rate: u32,
7039 to_size: u32,
7040 quality: c_int,
7041 channels: u32,
7042 file: *const c_char,
7043 func: *const c_char,
7044 line: c_int)
7045 -> status;
7046 #[link_name="switch_resample_destroy"]
7047 pub fn resample_destroy(resampler: *mut *mut audio_resampler);
7048 #[link_name="switch_resample_process"]
7049 pub fn resample_process(resampler: *mut audio_resampler, src: *mut i16, srclen: u32) -> u32;
7050 #[link_name="switch_float_to_short"]
7051 pub fn float_to_short(f: *mut f32, s: *mut c_short, len: usize) -> usize;
7052 #[link_name="switch_char_to_float"]
7053 pub fn char_to_float(c: *mut c_char, f: *mut f32, len: c_int) -> c_int;
7054 #[link_name="switch_float_to_char"]
7055 pub fn float_to_char(f: *mut f32, c: *mut c_char, len: c_int) -> c_int;
7056 #[link_name="switch_short_to_float"]
7057 pub fn short_to_float(s: *mut c_short, f: *mut f32, len: c_int) -> c_int;
7058 #[link_name="switch_swap_linear"]
7059 pub fn swap_linear(buf: *mut i16, len: c_int);
7060 #[link_name="switch_generate_sln_silence"]
7061 pub fn generate_sln_silence(data: *mut i16, samples: u32, channels: u32, divisor: u32);
7062 #[link_name="switch_change_sln_volume"]
7063 pub fn change_sln_volume(data: *mut i16, samples: u32, vol: i32);
7064 #[link_name="switch_change_sln_volume_granular"]
7065 pub fn change_sln_volume_granular(data: *mut i16, samples: u32, vol: i32);
7066 #[link_name="switch_merge_sln"]
7067 pub fn merge_sln(data: *mut i16,
7068 samples: u32,
7069 other_data: *mut i16,
7070 other_samples: u32,
7071 channels: c_int)
7072 -> u32;
7073 #[link_name="switch_unmerge_sln"]
7074 pub fn unmerge_sln(data: *mut i16,
7075 samples: u32,
7076 other_data: *mut i16,
7077 other_samples: u32,
7078 channels: c_int)
7079 -> u32;
7080 #[link_name="switch_mux_channels"]
7081 pub fn mux_channels(data: *mut i16, samples: usize, orig_channels: u32, channels: u32);
7082 #[link_name="switch_loadable_module_init"]
7083 pub fn loadable_module_init(autoload: switch_bool) -> status;
7084 #[link_name="switch_loadable_module_shutdown"]
7085 pub fn loadable_module_shutdown();
7086 #[link_name="switch_loadable_module_get_endpoint_interface"]
7087 pub fn loadable_module_get_endpoint_interface(name: *const c_char) -> *mut endpoint_interface;
7088 #[link_name="switch_loadable_module_get_codec_interface"]
7089 pub fn loadable_module_get_codec_interface(name: *const c_char,
7090 modname: *const c_char)
7091 -> *mut codec_interface;
7092 #[link_name="switch_parse_codec_buf"]
7093 pub fn parse_codec_buf(buf: *mut c_char,
7094 interval: *mut u32,
7095 rate: *mut u32,
7096 bit: *mut u32,
7097 channels: *mut u32,
7098 modname: *mut *mut c_char,
7099 fmtp: *mut *mut c_char)
7100 -> *mut c_char;
7101 #[link_name="switch_loadable_module_get_dialplan_interface"]
7102 pub fn loadable_module_get_dialplan_interface(name: *const c_char) -> *mut dialplan_interface;
7103 #[link_name="switch_loadable_module_enumerate_available"]
7104 pub fn loadable_module_enumerate_available(dir_path: *const c_char,
7105 callback: modulename_callback_func,
7106 user_data: *mut c_void)
7107 -> status;
7108 #[link_name="switch_loadable_module_enumerate_loaded"]
7109 pub fn loadable_module_enumerate_loaded(callback: modulename_callback_func,
7110 user_data: *mut c_void)
7111 -> status;
7112 #[link_name="switch_loadable_module_build_dynamic"]
7113 pub fn loadable_module_build_dynamic(filename: *mut c_char,
7114 module_load: module_load,
7115 module_runtime: module_runtime,
7116 module_shutdown: module_shutdown,
7117 runtime: switch_bool)
7118 -> status;
7119 #[link_name="switch_loadable_module_get_timer_interface"]
7120 pub fn loadable_module_get_timer_interface(name: *const c_char) -> *mut timer_interface;
7121 #[link_name="switch_loadable_module_get_application_interface"]
7122 pub fn loadable_module_get_application_interface(name: *const c_char)
7123 -> *mut application_interface;
7124 #[link_name="switch_loadable_module_get_chat_application_interface"]
7125 pub fn loadable_module_get_chat_application_interface(name: *const c_char)
7126 -> *mut chat_application_interface;
7127 #[link_name="switch_core_execute_chat_app"]
7128 pub fn core_execute_chat_app(message: *mut event,
7129 app: *const c_char,
7130 data: *const c_char)
7131 -> status;
7132 #[link_name="switch_loadable_module_get_api_interface"]
7133 pub fn loadable_module_get_api_interface(name: *const c_char) -> *mut api_interface;
7134 #[link_name="switch_loadable_module_get_json_api_interface"]
7135 pub fn loadable_module_get_json_api_interface(name: *const c_char) -> *mut json_api_interface;
7136 #[link_name="switch_loadable_module_get_file_interface"]
7137 pub fn loadable_module_get_file_interface(name: *const c_char,
7138 modname: *const c_char)
7139 -> *mut file_interface;
7140 #[link_name="switch_loadable_module_get_speech_interface"]
7141 pub fn loadable_module_get_speech_interface(name: *const c_char) -> *mut speech_interface;
7142 #[link_name="switch_loadable_module_get_asr_interface"]
7143 pub fn loadable_module_get_asr_interface(name: *const c_char) -> *mut asr_interface;
7144 #[link_name="switch_loadable_module_get_directory_interface"]
7145 pub fn loadable_module_get_directory_interface(name: *const c_char) -> *mut directory_interface;
7146 #[link_name="switch_loadable_module_get_chat_interface"]
7147 pub fn loadable_module_get_chat_interface(name: *const c_char) -> *mut chat_interface;
7148 #[link_name="switch_loadable_module_get_say_interface"]
7149 pub fn loadable_module_get_say_interface(name: *const c_char) -> *mut say_interface;
7150 #[link_name="switch_loadable_module_get_management_interface"]
7151 pub fn loadable_module_get_management_interface(relative_oid: *const c_char)
7152 -> *mut management_interface;
7153 #[link_name="switch_loadable_module_get_limit_interface"]
7154 pub fn loadable_module_get_limit_interface(name: *const c_char) -> *mut limit_interface;
7155 #[link_name="switch_loadable_module_get_codecs"]
7156 pub fn loadable_module_get_codecs(array: *mut *const codec_implementation,
7157 arraylen: c_int)
7158 -> c_int;
7159 #[link_name="switch_loadable_module_get_codecs_sorted"]
7160 pub fn loadable_module_get_codecs_sorted(array: *mut *const codec_implementation,
7161 fmtp_array: *mut [c_char; 256usize],
7162 arraylen: c_int,
7163 prefs: *mut *mut c_char,
7164 preflen: c_int)
7165 -> c_int;
7166 #[link_name="switch_api_execute"]
7167 pub fn api_execute(cmd: *const c_char,
7168 arg: *const c_char,
7169 session: *mut core_session,
7170 stream: *mut stream_handle)
7171 -> status;
7172 #[link_name="switch_json_api_execute"]
7173 pub fn json_api_execute(json: *mut cJSON,
7174 session: *mut core_session,
7175 retval: *mut *mut cJSON)
7176 -> status;
7177 #[link_name="switch_loadable_module_load_module"]
7178 pub fn loadable_module_load_module(dir: *mut c_char,
7179 fname: *mut c_char,
7180 runtime: switch_bool,
7181 err: *mut *const c_char)
7182 -> status;
7183 #[link_name="switch_loadable_module_exists"]
7184 pub fn loadable_module_exists(mod_: *const c_char) -> status;
7185 #[link_name="switch_loadable_module_unload_module"]
7186 pub fn loadable_module_unload_module(dir: *mut c_char,
7187 fname: *mut c_char,
7188 force: switch_bool,
7189 err: *mut *const c_char)
7190 -> status;
7191 #[link_name="switch_module_load"]
7192 pub fn module_load(module_interface: *mut *mut loadable_module_interface,
7193 filename: *mut c_char)
7194 -> status;
7195 #[link_name="switch_module_runtime"]
7196 pub fn module_runtime() -> status;
7197 #[link_name="switch_module_shutdown"]
7198 pub fn module_shutdown() -> status;
7199 #[link_name="switch_core_codec_next_id"]
7200 pub fn core_codec_next_id() -> u32;
7201 #[link_name="switch_core_get_secondary_recover_callback"]
7202 pub fn core_get_secondary_recover_callback(key: *const c_char) -> core_recover_callback;
7203 #[link_name="switch_core_register_secondary_recover_callback"]
7204 pub fn core_register_secondary_recover_callback(key: *const c_char,
7205 cb: core_recover_callback)
7206 -> status;
7207 #[link_name="switch_core_unregister_secondary_recover_callback"]
7208 pub fn core_unregister_secondary_recover_callback(key: *const c_char);
7209 #[link_name="switch_console_loop"]
7210 pub fn console_loop();
7211 #[link_name="switch_console_printf"]
7212 pub fn console_printf(channel: text_channel,
7213 file: *const c_char,
7214 func: *const c_char,
7215 line: c_int,
7216 fmt: *const c_char,
7217 ...);
7218 #[link_name="switch_console_stream_raw_write"]
7219 pub fn console_stream_raw_write(handle: *mut stream_handle,
7220 data: *mut u8,
7221 datalen: usize)
7222 -> status;
7223 #[link_name="switch_console_stream_write"]
7224 pub fn console_stream_write(handle: *mut stream_handle, fmt: *const c_char, ...) -> status;
7225 #[link_name="switch_stream_write_file_contents"]
7226 pub fn stream_write_file_contents(stream: *mut stream_handle, path: *const c_char) -> status;
7227 #[link_name="switch_console_init"]
7228 pub fn console_init(pool: *mut memory_pool) -> status;
7229 #[link_name="switch_console_shutdown"]
7230 pub fn console_shutdown() -> status;
7231 #[link_name="switch_console_add_complete_func"]
7232 pub fn console_add_complete_func(name: *const c_char, cb: console_complete_callback) -> status;
7233 #[link_name="switch_console_del_complete_func"]
7234 pub fn console_del_complete_func(name: *const c_char) -> status;
7235 #[link_name="switch_console_run_complete_func"]
7236 pub fn console_run_complete_func(func: *const c_char,
7237 line: *const c_char,
7238 last_word: *const c_char,
7239 matches: *mut *mut console_callback_match)
7240 -> status;
7241 #[link_name="switch_console_push_match_unique"]
7242 pub fn console_push_match_unique(matches: *mut *mut console_callback_match,
7243 new_val: *const c_char);
7244 #[link_name="switch_console_push_match"]
7245 pub fn console_push_match(matches: *mut *mut console_callback_match, new_val: *const c_char);
7246 #[link_name="switch_console_free_matches"]
7247 pub fn console_free_matches(matches: *mut *mut console_callback_match);
7248 #[link_name="switch_console_complete"]
7249 pub fn console_complete(line: *const c_char,
7250 last_word: *const c_char,
7251 console_out: *mut FILE,
7252 stream: *mut stream_handle,
7253 xml: xml_t)
7254 -> c_uchar;
7255 #[link_name="switch_console_sort_matches"]
7256 pub fn console_sort_matches(matches: *mut console_callback_match);
7257 #[link_name="switch_console_save_history"]
7258 pub fn console_save_history();
7259 #[link_name="switch_console_expand_alias"]
7260 pub fn console_expand_alias(cmd: *mut c_char, arg: *mut c_char) -> *mut c_char;
7261 #[link_name="switch_console_execute"]
7262 pub fn console_execute(xcmd: *mut c_char, rec: c_int, istream: *mut stream_handle) -> status;
7263 #[link_name="switch_testv6_subnet"]
7264 pub fn testv6_subnet(_ip: ip, _net: ip, _mask: ip) -> switch_bool;
7265 #[link_name="switch_print_host"]
7266 pub fn print_host(addr: *mut sockaddr, buf: *mut c_char, len: isize) -> *mut c_char;
7267 #[link_name="switch_b64_encode"]
7268 pub fn b64_encode(in_: *mut c_uchar, ilen: isize, out: *mut c_uchar, olen: isize) -> status;
7269 #[link_name="switch_b64_decode"]
7270 pub fn b64_decode(in_: *mut c_char, out: *mut c_char, olen: isize) -> isize;
7271 #[link_name="switch_amp_encode"]
7272 pub fn amp_encode(s: *mut c_char, buf: *mut c_char, len: isize) -> *mut c_char;
7273 #[link_name="switch_fd_read_line"]
7274 pub fn fd_read_line(fd: c_int, buf: *mut c_char, len: isize) -> isize;
7275 #[link_name="switch_fd_read_dline"]
7276 pub fn fd_read_dline(fd: c_int, buf: *mut *mut c_char, len: *mut isize) -> isize;
7277 #[link_name="switch_fp_read_dline"]
7278 pub fn fp_read_dline(fd: *mut FILE, buf: *mut *mut c_char, len: *mut isize) -> isize;
7279 #[link_name="switch_frame_alloc"]
7280 pub fn frame_alloc(frame: *mut *mut frame, size: usize) -> status;
7281 #[link_name="switch_frame_dup"]
7282 pub fn frame_dup(orig: *mut frame, clone: *mut *mut frame) -> status;
7283 #[link_name="switch_frame_free"]
7284 pub fn frame_free(frame: *mut *mut frame) -> status;
7285 #[link_name="switch_is_number"]
7286 pub fn is_number(str: *const c_char) -> switch_bool;
7287 #[link_name="switch_is_leading_number"]
7288 pub fn is_leading_number(str: *const c_char) -> switch_bool;
7289 #[link_name="switch_find_parameter"]
7290 pub fn find_parameter(str: *const c_char,
7291 param: *const c_char,
7292 pool: *mut memory_pool)
7293 -> *mut c_char;
7294 #[link_name="switch_resolve_host"]
7295 pub fn resolve_host(host: *const c_char, buf: *mut c_char, buflen: usize) -> status;
7296 #[link_name="switch_find_local_ip"]
7297 pub fn find_local_ip(buf: *mut c_char, len: c_int, mask: *mut c_int, family: c_int) -> status;
7298 #[link_name="switch_find_interface_ip"]
7299 pub fn find_interface_ip(buf: *mut c_char,
7300 len: c_int,
7301 mask: *mut c_int,
7302 ifname: *const c_char,
7303 family: c_int)
7304 -> status;
7305 #[link_name="switch_cmp_addr"]
7306 pub fn cmp_addr(sa1: *mut sockaddr, sa2: *mut sockaddr) -> c_int;
7307 #[link_name="switch_cp_addr"]
7308 pub fn cp_addr(sa1: *mut sockaddr, sa2: *mut sockaddr) -> c_int;
7309 #[link_name="switch_build_uri"]
7310 pub fn build_uri(uri: *mut c_char,
7311 size: usize,
7312 scheme: *const c_char,
7313 user: *const c_char,
7314 sa: *const sockaddr,
7315 flags: c_int)
7316 -> c_int;
7317 #[link_name="switch_priority_name"]
7318 pub fn priority_name(priority: priority) -> *const c_char;
7319 #[link_name="switch_rfc2833_to_char"]
7320 pub fn rfc2833_to_char(event: c_int) -> c_char;
7321 #[link_name="switch_char_to_rfc2833"]
7322 pub fn char_to_rfc2833(key: c_char) -> c_uchar;
7323 #[link_name="switch_str_time"]
7324 pub fn str_time(in_: *const c_char) -> time_t;
7325 #[link_name="switch_separate_string"]
7326 pub fn separate_string(buf: *mut c_char,
7327 delim: c_char,
7328 array: *mut *mut c_char,
7329 arraylen: c_uint)
7330 -> c_uint;
7331 #[link_name="switch_separate_string_string"]
7332 pub fn separate_string_string(buf: *mut c_char,
7333 delim: *mut c_char,
7334 array: *mut *mut c_char,
7335 arraylen: c_uint)
7336 -> c_uint;
7337 #[link_name="switch_strip_spaces"]
7338 pub fn strip_spaces(str: *mut c_char, dup: switch_bool) -> *mut c_char;
7339 #[link_name="switch_strip_whitespace"]
7340 pub fn strip_whitespace(str: *const c_char) -> *mut c_char;
7341 #[link_name="switch_strip_commas"]
7342 pub fn strip_commas(in_: *mut c_char, out: *mut c_char, len: usize) -> *mut c_char;
7343 #[link_name="switch_strip_nonnumerics"]
7344 pub fn strip_nonnumerics(in_: *mut c_char, out: *mut c_char, len: usize) -> *mut c_char;
7345 #[link_name="switch_separate_paren_args"]
7346 pub fn separate_paren_args(str: *mut c_char) -> *mut c_char;
7347 #[link_name="switch_stristr"]
7348 pub fn stristr(instr: *const c_char, str: *const c_char) -> *const c_char;
7349 #[link_name="switch_is_lan_addr"]
7350 pub fn is_lan_addr(ip: *const c_char) -> switch_bool;
7351 #[link_name="switch_replace_char"]
7352 pub fn replace_char(str: *mut c_char,
7353 from: c_char,
7354 to: c_char,
7355 dup: switch_bool)
7356 -> *mut c_char;
7357 #[link_name="switch_ast2regex"]
7358 pub fn ast2regex(pat: *const c_char, rbuf: *mut c_char, len: usize) -> switch_bool;
7359 #[link_name="switch_escape_char"]
7360 pub fn escape_char(pool: *mut memory_pool,
7361 in_: *mut c_char,
7362 delim: *const c_char,
7363 esc: c_char)
7364 -> *mut c_char;
7365 #[link_name="switch_escape_string"]
7366 pub fn escape_string(in_: *const c_char, out: *mut c_char, outlen: usize) -> *mut c_char;
7367 #[link_name="switch_escape_string_pool"]
7368 pub fn escape_string_pool(in_: *const c_char, pool: *mut memory_pool) -> *mut c_char;
7369 #[link_name="switch_socket_waitfor"]
7370 pub fn socket_waitfor(poll: *mut pollfd, ms: c_int) -> c_int;
7371 #[link_name="switch_cut_path"]
7372 pub fn cut_path(in_: *const c_char) -> *const c_char;
7373 #[link_name="switch_string_replace"]
7374 pub fn string_replace(string: *const c_char,
7375 search: *const c_char,
7376 replace: *const c_char)
7377 -> *mut c_char;
7378 #[link_name="switch_string_match"]
7379 pub fn string_match(string: *const c_char,
7380 string_len: usize,
7381 search: *const c_char,
7382 search_len: usize)
7383 -> status;
7384 #[link_name="switch_strcasecmp_any"]
7385 pub fn strcasecmp_any(str: *const c_char, ...) -> c_int;
7386 #[link_name="switch_util_quote_shell_arg"]
7387 pub fn util_quote_shell_arg(string: *const c_char) -> *mut c_char;
7388 #[link_name="switch_util_quote_shell_arg_pool"]
7389 pub fn util_quote_shell_arg_pool(string: *const c_char, pool: *mut memory_pool) -> *mut c_char;
7390 #[link_name="switch_url_encode_opt"]
7391 pub fn url_encode_opt(url: *const c_char,
7392 buf: *mut c_char,
7393 len: usize,
7394 double_encode: switch_bool)
7395 -> *mut c_char;
7396 #[link_name="switch_url_encode"]
7397 pub fn url_encode(url: *const c_char, buf: *mut c_char, len: usize) -> *mut c_char;
7398 #[link_name="switch_url_decode"]
7399 pub fn url_decode(s: *mut c_char) -> *mut c_char;
7400 #[link_name="switch_simple_email"]
7401 pub fn simple_email(to: *const c_char,
7402 from: *const c_char,
7403 headers: *const c_char,
7404 body: *const c_char,
7405 file: *const c_char,
7406 convert_cmd: *const c_char,
7407 convert_ext: *const c_char)
7408 -> switch_bool;
7409 #[link_name="switch_find_end_paren"]
7410 pub fn find_end_paren(s: *const c_char, open: c_char, close: c_char) -> *mut c_char;
7411 #[link_name="switch_parse_cidr"]
7412 pub fn parse_cidr(string: *const c_char, ip: *mut ip, mask: *mut ip, bitp: *mut u32) -> c_int;
7413 #[link_name="switch_network_list_create"]
7414 pub fn network_list_create(list: *mut *mut network_list,
7415 name: *const c_char,
7416 default_type: switch_bool,
7417 pool: *mut memory_pool)
7418 -> status;
7419 #[link_name="switch_network_list_add_cidr_token"]
7420 pub fn network_list_add_cidr_token(list: *mut network_list,
7421 cidr_str: *const c_char,
7422 ok: switch_bool,
7423 token: *const c_char)
7424 -> status;
7425 #[link_name="switch_network_ipv4_mapped_ipv6_addr"]
7426 pub fn network_ipv4_mapped_ipv6_addr(ip_str: *const c_char) -> *mut c_char;
7427 #[link_name="switch_network_list_add_host_mask"]
7428 pub fn network_list_add_host_mask(list: *mut network_list,
7429 host: *const c_char,
7430 mask_str: *const c_char,
7431 ok: switch_bool)
7432 -> status;
7433 #[link_name="switch_network_list_validate_ip_token"]
7434 pub fn network_list_validate_ip_token(list: *mut network_list,
7435 ip: u32,
7436 token: *mut *const c_char)
7437 -> switch_bool;
7438 #[link_name="switch_network_list_validate_ip6_token"]
7439 pub fn network_list_validate_ip6_token(list: *mut network_list,
7440 ip: ip,
7441 token: *mut *const c_char)
7442 -> switch_bool;
7443 #[link_name="switch_inet_pton"]
7444 pub fn inet_pton(af: c_int, src: *const c_char, dst: *mut c_void) -> c_int;
7445 #[link_name="switch_dow_int2str"]
7446 pub fn dow_int2str(val: c_int) -> *const c_char;
7447 #[link_name="switch_dow_str2int"]
7448 pub fn dow_str2int(exp: *const c_char) -> c_int;
7449 #[link_name="switch_dow_cmp"]
7450 pub fn dow_cmp(exp: *const c_char, val: c_int) -> switch_bool;
7451 #[link_name="switch_number_cmp"]
7452 pub fn number_cmp(exp: *const c_char, val: c_int) -> c_int;
7453 #[link_name="switch_tod_cmp"]
7454 pub fn tod_cmp(exp: *const c_char, val: c_int) -> c_int;
7455 #[link_name="switch_fulldate_cmp"]
7456 pub fn fulldate_cmp(exp: *const c_char, ts: *mut time_t) -> c_int;
7457 #[link_name="switch_split_date"]
7458 pub fn split_date(exp: *const c_char, year: *mut c_int, month: *mut c_int, day: *mut c_int);
7459 #[link_name="switch_split_time"]
7460 pub fn split_time(exp: *const c_char, hour: *mut c_int, min: *mut c_int, sec: *mut c_int);
7461 #[link_name="switch_split_user_domain"]
7462 pub fn split_user_domain(in_: *mut c_char,
7463 user: *mut *mut c_char,
7464 domain: *mut *mut c_char)
7465 -> c_int;
7466 #[link_name="switch_uuid_str"]
7467 pub fn uuid_str(buf: *mut c_char, len: usize) -> *mut c_char;
7468 #[link_name="switch_format_number"]
7469 pub fn format_number(num: *const c_char) -> *mut c_char;
7470 #[link_name="switch_atoui"]
7471 pub fn atoui(nptr: *const c_char) -> c_uint;
7472 #[link_name="switch_atoul"]
7473 pub fn atoul(nptr: *const c_char) -> c_ulong;
7474 #[link_name="switch_strerror_r"]
7475 pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: usize) -> *mut c_char;
7476 #[link_name="switch_wait_sock"]
7477 pub fn wait_sock(sock: os_socket, ms: u32, flags: poll) -> c_int;
7478 #[link_name="switch_wait_socklist"]
7479 pub fn wait_socklist(waitlist: *mut waitlist, len: u32, ms: u32) -> c_int;
7480 #[link_name="switch_http_parse_header"]
7481 pub fn http_parse_header(buffer: *mut c_char,
7482 datalen: u32,
7483 request: *mut http_request)
7484 -> status;
7485 #[link_name="switch_http_free_request"]
7486 pub fn http_free_request(request: *mut http_request);
7487 #[link_name="switch_http_dump_request"]
7488 pub fn http_dump_request(request: *mut http_request);
7489 #[link_name="switch_http_parse_qs"]
7490 pub fn http_parse_qs(request: *mut http_request, qs: *mut c_char);
7491 #[link_name="switch_frame_buffer_free"]
7492 pub fn frame_buffer_free(fb: *mut frame_buffer, frameP: *mut *mut frame) -> status;
7493 #[link_name="switch_frame_buffer_dup"]
7494 pub fn frame_buffer_dup(fb: *mut frame_buffer,
7495 orig: *mut frame,
7496 clone: *mut *mut frame)
7497 -> status;
7498 #[link_name="switch_frame_buffer_destroy"]
7499 pub fn frame_buffer_destroy(fbP: *mut *mut frame_buffer) -> status;
7500 #[link_name="switch_frame_buffer_create"]
7501 pub fn frame_buffer_create(fbP: *mut *mut frame_buffer) -> status;
7502 #[link_name="switch_getcputime"]
7503 pub fn getcputime(t: *mut cputime);
7504 #[link_name="switch_caller_extension_new"]
7505 pub fn caller_extension_new(session: *mut core_session,
7506 extension_name: *const c_char,
7507 extension_number: *const c_char)
7508 -> *mut caller_extension;
7509 #[link_name="switch_caller_extension_clone"]
7510 pub fn caller_extension_clone(new_ext: *mut *mut caller_extension,
7511 orig: *mut caller_extension,
7512 pool: *mut memory_pool)
7513 -> status;
7514 #[link_name="switch_caller_extension_add_application"]
7515 pub fn caller_extension_add_application(session: *mut core_session,
7516 caller_extension: *mut caller_extension,
7517 application_name: *const c_char,
7518 extra_data: *const c_char);
7519 #[link_name="switch_caller_extension_add_application_printf"]
7520 pub fn caller_extension_add_application_printf(session: *mut core_session,
7521 caller_extension: *mut caller_extension,
7522 application_name: *const c_char,
7523 fmt: *const c_char,
7524 ...);
7525 #[link_name="switch_caller_get_field_by_name"]
7526 pub fn caller_get_field_by_name(caller_profile: *mut caller_profile,
7527 name: *const c_char)
7528 -> *const c_char;
7529 #[link_name="switch_caller_profile_new"]
7530 pub fn caller_profile_new(pool: *mut memory_pool,
7531 username: *const c_char,
7532 dialplan: *const c_char,
7533 caller_id_name: *const c_char,
7534 caller_id_number: *const c_char,
7535 network_addr: *const c_char,
7536 ani: *const c_char,
7537 aniii: *const c_char,
7538 rdnis: *const c_char,
7539 source: *const c_char,
7540 context: *const c_char,
7541 destination_number: *const c_char)
7542 -> *mut caller_profile;
7543 #[link_name="switch_caller_profile_clone"]
7544 pub fn caller_profile_clone(session: *mut core_session,
7545 tocopy: *mut caller_profile)
7546 -> *mut caller_profile;
7547 #[link_name="switch_caller_profile_dup"]
7548 pub fn caller_profile_dup(pool: *mut memory_pool,
7549 tocopy: *mut caller_profile)
7550 -> *mut caller_profile;
7551 #[link_name="switch_caller_profile_event_set_data"]
7552 pub fn caller_profile_event_set_data(caller_profile: *mut caller_profile,
7553 prefix: *const c_char,
7554 event: *mut event);
7555 #[link_name="switch_channel_get_state"]
7556 pub fn channel_get_state(channel: *mut channel) -> channel_state;
7557 #[link_name="switch_channel_get_running_state"]
7558 pub fn channel_get_running_state(channel: *mut channel) -> channel_state;
7559 #[link_name="switch_channel_check_signal"]
7560 pub fn channel_check_signal(channel: *mut channel, in_thread_only: switch_bool) -> c_int;
7561 #[link_name="switch_channel_test_ready"]
7562 pub fn channel_test_ready(channel: *mut channel,
7563 check_ready: switch_bool,
7564 check_media: switch_bool)
7565 -> c_int;
7566 #[link_name="switch_channel_wait_for_state"]
7567 pub fn channel_wait_for_state(channel: *mut channel,
7568 other_channel: *mut channel,
7569 want_state: channel_state);
7570 #[link_name="switch_channel_wait_for_state_timeout"]
7571 pub fn channel_wait_for_state_timeout(other_channel: *mut channel,
7572 want_state: channel_state,
7573 timeout: u32);
7574 #[link_name="switch_channel_wait_for_flag"]
7575 pub fn channel_wait_for_flag(channel: *mut channel,
7576 want_flag: channel_flag,
7577 pres: switch_bool,
7578 to: u32,
7579 super_channel: *mut channel)
7580 -> status;
7581 #[link_name="switch_channel_perform_set_state"]
7582 pub fn channel_perform_set_state(channel: *mut channel,
7583 file: *const c_char,
7584 func: *const c_char,
7585 line: c_int,
7586 state: channel_state)
7587 -> channel_state;
7588 #[link_name="switch_channel_perform_set_running_state"]
7589 pub fn channel_perform_set_running_state(channel: *mut channel,
7590 state: channel_state,
7591 file: *const c_char,
7592 func: *const c_char,
7593 line: c_int)
7594 -> channel_state;
7595 #[link_name="switch_channel_str2cause"]
7596 pub fn channel_str2cause(str: *const c_char) -> call_cause;
7597 #[link_name="switch_channel_get_cause"]
7598 pub fn channel_get_cause(channel: *mut channel) -> call_cause;
7599 #[link_name="switch_channel_cause_q850"]
7600 pub fn channel_cause_q850(cause: call_cause) -> call_cause;
7601 #[link_name="switch_channel_get_cause_q850"]
7602 pub fn channel_get_cause_q850(channel: *mut channel) -> call_cause;
7603 #[link_name="switch_channel_get_cause_ptr"]
7604 pub fn channel_get_cause_ptr(channel: *mut channel) -> *mut call_cause;
7605 #[link_name="switch_channel_cause2str"]
7606 pub fn channel_cause2str(cause: call_cause) -> *const c_char;
7607 #[link_name="switch_channel_get_timetable"]
7608 pub fn channel_get_timetable(channel: *mut channel) -> *mut channel_timetable;
7609 #[link_name="switch_channel_alloc"]
7610 pub fn channel_alloc(channel: *mut *mut channel,
7611 direction: call_direction,
7612 pool: *mut memory_pool)
7613 -> status;
7614 #[link_name="switch_channel_init"]
7615 pub fn channel_init(channel: *mut channel,
7616 session: *mut core_session,
7617 state: channel_state,
7618 flag: channel_flag)
7619 -> status;
7620 #[link_name="switch_channel_set_presence_data_vals"]
7621 pub fn channel_set_presence_data_vals(channel: *mut channel,
7622 presence_data_cols: *const c_char);
7623 #[link_name="switch_channel_perform_presence"]
7624 pub fn channel_perform_presence(channel: *mut channel,
7625 rpid: *const c_char,
7626 status: *const c_char,
7627 id: *const c_char,
7628 file: *const c_char,
7629 func: *const c_char,
7630 line: c_int);
7631 #[link_name="switch_channel_uninit"]
7632 pub fn channel_uninit(channel: *mut channel);
7633 #[link_name="switch_channel_set_caller_profile"]
7634 pub fn channel_set_caller_profile(channel: *mut channel, caller_profile: *mut caller_profile);
7635 #[link_name="switch_channel_step_caller_profile"]
7636 pub fn channel_step_caller_profile(channel: *mut channel);
7637 #[link_name="switch_channel_get_caller_profile"]
7638 pub fn channel_get_caller_profile(channel: *mut channel) -> *mut caller_profile;
7639 #[link_name="switch_channel_set_originator_caller_profile"]
7640 pub fn channel_set_originator_caller_profile(channel: *mut channel,
7641 caller_profile: *mut caller_profile);
7642 #[link_name="switch_channel_set_hunt_caller_profile"]
7643 pub fn channel_set_hunt_caller_profile(channel: *mut channel,
7644 caller_profile: *mut caller_profile);
7645 #[link_name="switch_channel_get_originator_caller_profile"]
7646 pub fn channel_get_originator_caller_profile(channel: *mut channel) -> *mut caller_profile;
7647 #[link_name="switch_channel_set_originatee_caller_profile"]
7648 pub fn channel_set_originatee_caller_profile(channel: *mut channel,
7649 caller_profile: *mut caller_profile);
7650 #[link_name="switch_channel_get_originatee_caller_profile"]
7651 pub fn channel_get_originatee_caller_profile(channel: *mut channel) -> *mut caller_profile;
7652 #[link_name="switch_channel_set_origination_caller_profile"]
7653 pub fn channel_set_origination_caller_profile(channel: *mut channel,
7654 caller_profile: *mut caller_profile);
7655 #[link_name="switch_channel_get_origination_caller_profile"]
7656 pub fn channel_get_origination_caller_profile(channel: *mut channel) -> *mut caller_profile;
7657 #[link_name="switch_channel_get_uuid"]
7658 pub fn channel_get_uuid(channel: *mut channel) -> *mut c_char;
7659 #[link_name="switch_channel_set_profile_var"]
7660 pub fn channel_set_profile_var(channel: *mut channel,
7661 name: *const c_char,
7662 val: *const c_char)
7663 -> status;
7664 #[link_name="switch_channel_set_variable_var_check"]
7665 pub fn channel_set_variable_var_check(channel: *mut channel,
7666 varname: *const c_char,
7667 value: *const c_char,
7668 var_check: switch_bool)
7669 -> status;
7670 #[link_name="switch_channel_add_variable_var_check"]
7671 pub fn channel_add_variable_var_check(channel: *mut channel,
7672 varname: *const c_char,
7673 value: *const c_char,
7674 var_check: switch_bool,
7675 stack: stack)
7676 -> status;
7677 #[link_name="switch_channel_set_variable_printf"]
7678 pub fn channel_set_variable_printf(channel: *mut channel,
7679 varname: *const c_char,
7680 fmt: *const c_char,
7681 ...)
7682 -> status;
7683 #[link_name="switch_channel_set_variable_name_printf"]
7684 pub fn channel_set_variable_name_printf(channel: *mut channel,
7685 val: *const c_char,
7686 fmt: *const c_char,
7687 ...)
7688 -> status;
7689 #[link_name="switch_channel_set_variable_partner_var_check"]
7690 pub fn channel_set_variable_partner_var_check(channel: *mut channel,
7691 varname: *const c_char,
7692 value: *const c_char,
7693 var_check: switch_bool)
7694 -> status;
7695 #[link_name="switch_channel_get_variable_partner"]
7696 pub fn channel_get_variable_partner(channel: *mut channel,
7697 varname: *const c_char)
7698 -> *const c_char;
7699 #[link_name="switch_channel_get_hold_music"]
7700 pub fn channel_get_hold_music(channel: *mut channel) -> *const c_char;
7701 #[link_name="switch_channel_get_hold_music_partner"]
7702 pub fn channel_get_hold_music_partner(channel: *mut channel) -> *const c_char;
7703 #[link_name="switch_channel_del_variable_prefix"]
7704 pub fn channel_del_variable_prefix(channel: *mut channel, prefix: *const c_char) -> u32;
7705 #[link_name="switch_channel_transfer_variable_prefix"]
7706 pub fn channel_transfer_variable_prefix(orig_channel: *mut channel,
7707 new_channel: *mut channel,
7708 prefix: *const c_char)
7709 -> status;
7710 #[link_name="switch_channel_export_variable_var_check"]
7711 pub fn channel_export_variable_var_check(channel: *mut channel,
7712 varname: *const c_char,
7713 val: *const c_char,
7714 export_varname: *const c_char,
7715 var_check: switch_bool)
7716 -> status;
7717 #[link_name="switch_channel_process_export"]
7718 pub fn channel_process_export(channel: *mut channel,
7719 peer_channel: *mut channel,
7720 var_event: *mut event,
7721 export_varname: *const c_char);
7722 #[link_name="switch_channel_export_variable_printf"]
7723 pub fn channel_export_variable_printf(channel: *mut channel,
7724 varname: *const c_char,
7725 export_varname: *const c_char,
7726 fmt: *const c_char,
7727 ...)
7728 -> status;
7729 #[link_name="switch_channel_set_scope_variables"]
7730 pub fn channel_set_scope_variables(channel: *mut channel, event: *mut *mut event);
7731 #[link_name="switch_channel_get_scope_variables"]
7732 pub fn channel_get_scope_variables(channel: *mut channel, event: *mut *mut event) -> status;
7733 #[link_name="switch_channel_get_variable_dup"]
7734 pub fn channel_get_variable_dup(channel: *mut channel,
7735 varname: *const c_char,
7736 dup: switch_bool,
7737 idx: c_int)
7738 -> *const c_char;
7739 #[link_name="switch_channel_get_variables"]
7740 pub fn channel_get_variables(channel: *mut channel, event: *mut *mut event) -> status;
7741 #[link_name="switch_channel_pass_callee_id"]
7742 pub fn channel_pass_callee_id(channel: *mut channel, other_channel: *mut channel) -> status;
7743 #[link_name="switch_channel_variable_first"]
7744 pub fn channel_variable_first(channel: *mut channel) -> *mut event_header;
7745 #[link_name="switch_channel_variable_last"]
7746 pub fn channel_variable_last(channel: *mut channel);
7747 #[link_name="switch_channel_restart"]
7748 pub fn channel_restart(channel: *mut channel);
7749 #[link_name="switch_channel_caller_extension_masquerade"]
7750 pub fn channel_caller_extension_masquerade(orig_channel: *mut channel,
7751 new_channel: *mut channel,
7752 offset: u32)
7753 -> status;
7754 #[link_name="switch_channel_set_caller_extension"]
7755 pub fn channel_set_caller_extension(channel: *mut channel,
7756 caller_extension: *mut caller_extension);
7757 #[link_name="switch_channel_invert_cid"]
7758 pub fn channel_invert_cid(channel: *mut channel);
7759 #[link_name="switch_channel_flip_cid"]
7760 pub fn channel_flip_cid(channel: *mut channel);
7761 #[link_name="switch_channel_sort_cid"]
7762 pub fn channel_sort_cid(channel: *mut channel);
7763 #[link_name="switch_channel_get_caller_extension"]
7764 pub fn channel_get_caller_extension(channel: *mut channel) -> *mut caller_extension;
7765 #[link_name="switch_channel_test_flag"]
7766 pub fn channel_test_flag(channel: *mut channel, flag: channel_flag) -> u32;
7767 #[link_name="switch_channel_set_flag_value"]
7768 pub fn channel_set_flag_value(channel: *mut channel, flag: channel_flag, value: u32);
7769 #[link_name="switch_channel_set_flag_recursive"]
7770 pub fn channel_set_flag_recursive(channel: *mut channel, flag: channel_flag);
7771 #[link_name="switch_channel_set_cap_value"]
7772 pub fn channel_set_cap_value(channel: *mut channel, cap: channel_cap, value: u32);
7773 #[link_name="switch_channel_clear_cap"]
7774 pub fn channel_clear_cap(channel: *mut channel, cap: channel_cap);
7775 #[link_name="switch_channel_test_cap"]
7776 pub fn channel_test_cap(channel: *mut channel, cap: channel_cap) -> u32;
7777 #[link_name="switch_channel_test_cap_partner"]
7778 pub fn channel_test_cap_partner(channel: *mut channel, cap: channel_cap) -> u32;
7779 #[link_name="switch_channel_set_flag_partner"]
7780 pub fn channel_set_flag_partner(channel: *mut channel, flag: channel_flag) -> switch_bool;
7781 #[link_name="switch_channel_clear_flag_partner"]
7782 pub fn channel_clear_flag_partner(channel: *mut channel, flag: channel_flag) -> switch_bool;
7783 #[link_name="switch_channel_test_flag_partner"]
7784 pub fn channel_test_flag_partner(channel: *mut channel, flag: channel_flag) -> u32;
7785 #[link_name="switch_channel_set_state_flag"]
7786 pub fn channel_set_state_flag(channel: *mut channel, flag: channel_flag);
7787 #[link_name="switch_channel_clear_state_flag"]
7788 pub fn channel_clear_state_flag(channel: *mut channel, flag: channel_flag);
7789 #[link_name="switch_channel_clear_flag"]
7790 pub fn channel_clear_flag(channel: *mut channel, flag: channel_flag);
7791 #[link_name="switch_channel_clear_flag_recursive"]
7792 pub fn channel_clear_flag_recursive(channel: *mut channel, flag: channel_flag);
7793 #[link_name="switch_channel_perform_answer"]
7794 pub fn channel_perform_answer(channel: *mut channel,
7795 file: *const c_char,
7796 func: *const c_char,
7797 line: c_int)
7798 -> status;
7799 #[link_name="switch_channel_perform_mark_answered"]
7800 pub fn channel_perform_mark_answered(channel: *mut channel,
7801 file: *const c_char,
7802 func: *const c_char,
7803 line: c_int)
7804 -> status;
7805 #[link_name="switch_channel_check_zrtp"]
7806 pub fn channel_check_zrtp(channel: *mut channel);
7807 #[link_name="switch_channel_perform_ring_ready_value"]
7808 pub fn channel_perform_ring_ready_value(channel: *mut channel,
7809 rv: ring_ready,
7810 file: *const c_char,
7811 func: *const c_char,
7812 line: c_int)
7813 -> status;
7814 #[link_name="switch_channel_perform_pre_answer"]
7815 pub fn channel_perform_pre_answer(channel: *mut channel,
7816 file: *const c_char,
7817 func: *const c_char,
7818 line: c_int)
7819 -> status;
7820 #[link_name="switch_channel_perform_mark_pre_answered"]
7821 pub fn channel_perform_mark_pre_answered(channel: *mut channel,
7822 file: *const c_char,
7823 func: *const c_char,
7824 line: c_int)
7825 -> status;
7826 #[link_name="switch_channel_perform_mark_ring_ready_value"]
7827 pub fn channel_perform_mark_ring_ready_value(channel: *mut channel,
7828 rv: ring_ready,
7829 file: *const c_char,
7830 func: *const c_char,
7831 line: c_int)
7832 -> status;
7833 #[link_name="switch_channel_add_state_handler"]
7834 pub fn channel_add_state_handler(channel: *mut channel,
7835 state_handler: *const state_handler_table)
7836 -> c_int;
7837 #[link_name="switch_channel_clear_state_handler"]
7838 pub fn channel_clear_state_handler(channel: *mut channel,
7839 state_handler: *const state_handler_table);
7840 #[link_name="switch_channel_get_state_handler"]
7841 pub fn channel_get_state_handler(channel: *mut channel,
7842 index: c_int)
7843 -> *const state_handler_table;
7844 #[link_name="switch_channel_set_private"]
7845 pub fn channel_set_private(channel: *mut channel,
7846 key: *const c_char,
7847 private_info: *const c_void)
7848 -> status;
7849 #[link_name="switch_channel_get_private"]
7850 pub fn channel_get_private(channel: *mut channel, key: *const c_char) -> *mut c_void;
7851 #[link_name="switch_channel_get_private_partner"]
7852 pub fn channel_get_private_partner(channel: *mut channel, key: *const c_char) -> *mut c_void;
7853 #[link_name="switch_channel_set_name"]
7854 pub fn channel_set_name(channel: *mut channel, name: *const c_char) -> status;
7855 #[link_name="switch_channel_get_name"]
7856 pub fn channel_get_name(channel: *mut channel) -> *mut c_char;
7857 #[link_name="switch_channel_perform_hangup"]
7858 pub fn channel_perform_hangup(channel: *mut channel,
7859 file: *const c_char,
7860 func: *const c_char,
7861 line: c_int,
7862 hangup_cause: call_cause)
7863 -> channel_state;
7864 #[link_name="switch_channel_has_dtmf"]
7865 pub fn channel_has_dtmf(channel: *mut channel) -> usize;
7866 #[link_name="switch_channel_dtmf_lock"]
7867 pub fn channel_dtmf_lock(channel: *mut channel) -> status;
7868 #[link_name="switch_channel_try_dtmf_lock"]
7869 pub fn channel_try_dtmf_lock(channel: *mut channel) -> status;
7870 #[link_name="switch_channel_dtmf_unlock"]
7871 pub fn channel_dtmf_unlock(channel: *mut channel) -> status;
7872 #[link_name="switch_channel_queue_dtmf"]
7873 pub fn channel_queue_dtmf(channel: *mut channel, dtmf: *const dtmf) -> status;
7874 #[link_name="switch_channel_queue_dtmf_string"]
7875 pub fn channel_queue_dtmf_string(channel: *mut channel, dtmf_string: *const c_char) -> status;
7876 #[link_name="switch_channel_dequeue_dtmf"]
7877 pub fn channel_dequeue_dtmf(channel: *mut channel, dtmf: *mut dtmf) -> status;
7878 #[link_name="switch_channel_flush_dtmf"]
7879 pub fn channel_flush_dtmf(channel: *mut channel);
7880 #[link_name="switch_channel_dequeue_dtmf_string"]
7881 pub fn channel_dequeue_dtmf_string(channel: *mut channel,
7882 dtmf_str: *mut c_char,
7883 len: usize)
7884 -> usize;
7885 #[link_name="switch_channel_state_name"]
7886 pub fn channel_state_name(state: channel_state) -> *const c_char;
7887 #[link_name="switch_channel_name_state"]
7888 pub fn channel_name_state(name: *const c_char) -> channel_state;
7889 #[link_name="switch_channel_event_set_data"]
7890 pub fn channel_event_set_data(channel: *mut channel, event: *mut event);
7891 #[link_name="switch_channel_event_set_basic_data"]
7892 pub fn channel_event_set_basic_data(channel: *mut channel, event: *mut event);
7893 #[link_name="switch_channel_event_set_extended_data"]
7894 pub fn channel_event_set_extended_data(channel: *mut channel, event: *mut event);
7895 #[link_name="switch_channel_expand_variables_check"]
7896 pub fn channel_expand_variables_check(channel: *mut channel,
7897 in_: *const c_char,
7898 var_list: *mut event,
7899 api_list: *mut event,
7900 recur: u32)
7901 -> *mut c_char;
7902 #[link_name="switch_channel_build_param_string"]
7903 pub fn channel_build_param_string(channel: *mut channel,
7904 caller_profile: *mut caller_profile,
7905 prefix: *const c_char)
7906 -> *mut c_char;
7907 #[link_name="switch_channel_set_timestamps"]
7908 pub fn channel_set_timestamps(channel: *mut channel) -> status;
7909 #[link_name="switch_channel_perform_audio_sync"]
7910 pub fn channel_perform_audio_sync(channel: *mut channel,
7911 file: *const c_char,
7912 func: *const c_char,
7913 line: c_int);
7914 #[link_name="switch_channel_perform_video_sync"]
7915 pub fn channel_perform_video_sync(channel: *mut channel,
7916 file: *const c_char,
7917 func: *const c_char,
7918 line: c_int);
7919 #[link_name="switch_channel_set_private_flag"]
7920 pub fn channel_set_private_flag(channel: *mut channel, flags: u32);
7921 #[link_name="switch_channel_clear_private_flag"]
7922 pub fn channel_clear_private_flag(channel: *mut channel, flags: u32);
7923 #[link_name="switch_channel_test_private_flag"]
7924 pub fn channel_test_private_flag(channel: *mut channel, flags: u32) -> c_int;
7925 #[link_name="switch_channel_set_app_flag_key"]
7926 pub fn channel_set_app_flag_key(app: *const c_char, channel: *mut channel, flags: u32);
7927 #[link_name="switch_channel_clear_app_flag_key"]
7928 pub fn channel_clear_app_flag_key(app: *const c_char, channel: *mut channel, flags: u32);
7929 #[link_name="switch_channel_test_app_flag_key"]
7930 pub fn channel_test_app_flag_key(app: *const c_char,
7931 channel: *mut channel,
7932 flags: u32)
7933 -> c_int;
7934 #[link_name="switch_channel_set_bridge_time"]
7935 pub fn channel_set_bridge_time(channel: *mut channel);
7936 #[link_name="switch_channel_set_hangup_time"]
7937 pub fn channel_set_hangup_time(channel: *mut channel);
7938 #[link_name="switch_channel_direction"]
7939 pub fn channel_direction(channel: *mut channel) -> call_direction;
7940 #[link_name="switch_channel_logical_direction"]
7941 pub fn channel_logical_direction(channel: *mut channel) -> call_direction;
7942 #[link_name="switch_channel_set_direction"]
7943 pub fn channel_set_direction(channel: *mut channel, direction: call_direction);
7944 #[link_name="switch_channel_get_session"]
7945 pub fn channel_get_session(channel: *mut channel) -> *mut core_session;
7946 #[link_name="switch_channel_get_flag_string"]
7947 pub fn channel_get_flag_string(channel: *mut channel) -> *mut c_char;
7948 #[link_name="switch_channel_get_cap_string"]
7949 pub fn channel_get_cap_string(channel: *mut channel) -> *mut c_char;
7950 #[link_name="switch_channel_state_change_pending"]
7951 pub fn channel_state_change_pending(channel: *mut channel) -> c_int;
7952 #[link_name="switch_channel_perform_set_callstate"]
7953 pub fn channel_perform_set_callstate(channel: *mut channel,
7954 callstate: channel_callstate,
7955 file: *const c_char,
7956 func: *const c_char,
7957 line: c_int);
7958 #[link_name="switch_channel_get_callstate"]
7959 pub fn channel_get_callstate(channel: *mut channel) -> channel_callstate;
7960 #[link_name="switch_channel_callstate2str"]
7961 pub fn channel_callstate2str(callstate: channel_callstate) -> *const c_char;
7962 #[link_name="switch_channel_str2callstate"]
7963 pub fn channel_str2callstate(str: *const c_char) -> channel_callstate;
7964 #[link_name="switch_channel_mark_hold"]
7965 pub fn channel_mark_hold(channel: *mut channel, on: switch_bool);
7966 #[link_name="switch_channel_execute_on"]
7967 pub fn channel_execute_on(channel: *mut channel, variable_prefix: *const c_char) -> status;
7968 #[link_name="switch_channel_api_on"]
7969 pub fn channel_api_on(channel: *mut channel, variable_prefix: *const c_char) -> status;
7970 #[link_name="switch_channel_process_device_hangup"]
7971 pub fn channel_process_device_hangup(channel: *mut channel);
7972 #[link_name="switch_channel_get_queued_extension"]
7973 pub fn channel_get_queued_extension(channel: *mut channel) -> *mut caller_extension;
7974 #[link_name="switch_channel_transfer_to_extension"]
7975 pub fn channel_transfer_to_extension(channel: *mut channel,
7976 caller_extension: *mut caller_extension);
7977 #[link_name="switch_channel_get_partner_uuid"]
7978 pub fn channel_get_partner_uuid(channel: *mut channel) -> *const c_char;
7979 #[link_name="switch_channel_get_hold_record"]
7980 pub fn channel_get_hold_record(channel: *mut channel) -> *mut hold_record;
7981 #[link_name="switch_channel_state_thread_lock"]
7982 pub fn channel_state_thread_lock(channel: *mut channel);
7983 #[link_name="switch_channel_state_thread_unlock"]
7984 pub fn channel_state_thread_unlock(channel: *mut channel);
7985 #[link_name="switch_channel_state_thread_trylock"]
7986 pub fn channel_state_thread_trylock(channel: *mut channel) -> status;
7987 #[link_name="switch_channel_handle_cause"]
7988 pub fn channel_handle_cause(channel: *mut channel, cause: call_cause);
7989 #[link_name="switch_channel_global_init"]
7990 pub fn channel_global_init(pool: *mut memory_pool);
7991 #[link_name="switch_channel_global_uninit"]
7992 pub fn channel_global_uninit();
7993 #[link_name="switch_channel_set_device_id"]
7994 pub fn channel_set_device_id(channel: *mut channel, device_id: *const c_char) -> *const c_char;
7995 #[link_name="switch_channel_clear_device_record"]
7996 pub fn channel_clear_device_record(channel: *mut channel);
7997 #[link_name="switch_channel_get_device_record"]
7998 pub fn channel_get_device_record(channel: *mut channel) -> *mut device_record;
7999 #[link_name="switch_channel_release_device_record"]
8000 pub fn channel_release_device_record(dcdrp: *mut *mut device_record);
8001 #[link_name="switch_channel_bind_device_state_handler"]
8002 pub fn channel_bind_device_state_handler(function: device_state_function,
8003 user_data: *mut c_void)
8004 -> status;
8005 #[link_name="switch_channel_unbind_device_state_handler"]
8006 pub fn channel_unbind_device_state_handler(function: device_state_function) -> status;
8007 #[link_name="switch_channel_device_state2str"]
8008 pub fn channel_device_state2str(device_state: device_state) -> *const c_char;
8009 #[link_name="switch_channel_pass_sdp"]
8010 pub fn channel_pass_sdp(from_channel: *mut channel,
8011 to_channel: *mut channel,
8012 sdp: *const c_char)
8013 -> status;
8014 #[link_name="switch_buffer_create_partition"]
8015 pub fn buffer_create_partition(pool: *mut memory_pool,
8016 buffer: *mut *mut buffer,
8017 data: *mut c_void,
8018 datalen: usize)
8019 -> status;
8020 #[link_name="switch_buffer_set_partition_data"]
8021 pub fn buffer_set_partition_data(buffer: *mut buffer,
8022 data: *mut c_void,
8023 datalen: usize)
8024 -> status;
8025 #[link_name="switch_buffer_reset_partition_data"]
8026 pub fn buffer_reset_partition_data(buffer: *mut buffer) -> status;
8027 #[link_name="switch_buffer_create"]
8028 pub fn buffer_create(pool: *mut memory_pool,
8029 buffer: *mut *mut buffer,
8030 max_len: usize)
8031 -> status;
8032 #[link_name="switch_buffer_create_dynamic"]
8033 pub fn buffer_create_dynamic(buffer: *mut *mut buffer,
8034 blocksize: usize,
8035 start_len: usize,
8036 max_len: usize)
8037 -> status;
8038 #[link_name="switch_buffer_add_mutex"]
8039 pub fn buffer_add_mutex(buffer: *mut buffer, mutex: *mut mutex);
8040 #[link_name="switch_buffer_lock"]
8041 pub fn buffer_lock(buffer: *mut buffer);
8042 #[link_name="switch_buffer_trylock"]
8043 pub fn buffer_trylock(buffer: *mut buffer) -> status;
8044 #[link_name="switch_buffer_unlock"]
8045 pub fn buffer_unlock(buffer: *mut buffer);
8046 #[link_name="switch_buffer_len"]
8047 pub fn buffer_len(buffer: *mut buffer) -> usize;
8048 #[link_name="switch_buffer_freespace"]
8049 pub fn buffer_freespace(buffer: *mut buffer) -> usize;
8050 #[link_name="switch_buffer_inuse"]
8051 pub fn buffer_inuse(buffer: *mut buffer) -> usize;
8052 #[link_name="switch_buffer_read"]
8053 pub fn buffer_read(buffer: *mut buffer, data: *mut c_void, datalen: usize) -> usize;
8054 #[link_name="switch_buffer_peek"]
8055 pub fn buffer_peek(buffer: *mut buffer, data: *mut c_void, datalen: usize) -> usize;
8056 #[link_name="switch_buffer_peek_zerocopy"]
8057 pub fn buffer_peek_zerocopy(buffer: *mut buffer, ptr: *mut *const c_void) -> usize;
8058 #[link_name="switch_buffer_read_loop"]
8059 pub fn buffer_read_loop(buffer: *mut buffer, data: *mut c_void, datalen: usize) -> usize;
8060 #[link_name="switch_buffer_set_loops"]
8061 pub fn buffer_set_loops(buffer: *mut buffer, loops: i32);
8062 #[link_name="switch_buffer_write"]
8063 pub fn buffer_write(buffer: *mut buffer, data: *const c_void, datalen: usize) -> usize;
8064 #[link_name="switch_buffer_toss"]
8065 pub fn buffer_toss(buffer: *mut buffer, datalen: usize) -> usize;
8066 #[link_name="switch_buffer_zero"]
8067 pub fn buffer_zero(buffer: *mut buffer);
8068 #[link_name="switch_buffer_slide_write"]
8069 pub fn buffer_slide_write(buffer: *mut buffer, data: *const c_void, datalen: usize) -> usize;
8070 #[link_name="switch_buffer_destroy"]
8071 pub fn buffer_destroy(buffer: *mut *mut buffer);
8072 #[link_name="switch_buffer_zwrite"]
8073 pub fn buffer_zwrite(buffer: *mut buffer, data: *const c_void, datalen: usize) -> usize;
8074 #[link_name="switch_event_init"]
8075 pub fn event_init(pool: *mut memory_pool) -> status;
8076 #[link_name="switch_event_shutdown"]
8077 pub fn event_shutdown() -> status;
8078 #[link_name="switch_event_create_subclass_detailed"]
8079 pub fn event_create_subclass_detailed(file: *const c_char,
8080 func: *const c_char,
8081 line: c_int,
8082 event: *mut *mut event,
8083 event_id: event_types,
8084 subclass_name: *const c_char)
8085 -> status;
8086 #[link_name="switch_event_set_priority"]
8087 pub fn event_set_priority(event: *mut event, priority: priority) -> status;
8088 #[link_name="switch_event_get_header_ptr"]
8089 pub fn event_get_header_ptr(event: *mut event,
8090 header_name: *const c_char)
8091 -> *mut event_header;
8092 #[link_name="switch_event_get_header_idx"]
8093 pub fn event_get_header_idx(event: *mut event,
8094 header_name: *const c_char,
8095 idx: c_int)
8096 -> *mut c_char;
8097 #[link_name="switch_event_rename_header"]
8098 pub fn event_rename_header(event: *mut event,
8099 header_name: *const c_char,
8100 new_header_name: *const c_char)
8101 -> status;
8102 #[link_name="switch_event_get_body"]
8103 pub fn event_get_body(event: *mut event) -> *mut c_char;
8104 #[link_name="switch_event_add_header"]
8105 pub fn event_add_header(event: *mut event,
8106 stack: stack,
8107 header_name: *const c_char,
8108 fmt: *const c_char,
8109 ...)
8110 -> status;
8111 #[link_name="switch_event_set_subclass_name"]
8112 pub fn event_set_subclass_name(event: *mut event, subclass_name: *const c_char) -> status;
8113 #[link_name="switch_event_add_header_string"]
8114 pub fn event_add_header_string(event: *mut event,
8115 stack: stack,
8116 header_name: *const c_char,
8117 data: *const c_char)
8118 -> status;
8119 #[link_name="switch_event_del_header_val"]
8120 pub fn event_del_header_val(event: *mut event,
8121 header_name: *const c_char,
8122 val: *const c_char)
8123 -> status;
8124 #[link_name="switch_event_add_array"]
8125 pub fn event_add_array(event: *mut event, var: *const c_char, val: *const c_char) -> c_int;
8126 #[link_name="switch_event_destroy"]
8127 pub fn event_destroy(event: *mut *mut event);
8128 #[link_name="switch_event_dup"]
8129 pub fn event_dup(event: *mut *mut event, todup: *mut event) -> status;
8130 #[link_name="switch_event_merge"]
8131 pub fn event_merge(event: *mut event, tomerge: *mut event);
8132 #[link_name="switch_event_dup_reply"]
8133 pub fn event_dup_reply(event: *mut *mut event, todup: *mut event) -> status;
8134 #[link_name="switch_event_fire_detailed"]
8135 pub fn event_fire_detailed(file: *const c_char,
8136 func: *const c_char,
8137 line: c_int,
8138 event: *mut *mut event,
8139 user_data: *mut c_void)
8140 -> status;
8141 #[link_name="switch_event_prep_for_delivery_detailed"]
8142 pub fn event_prep_for_delivery_detailed(file: *const c_char,
8143 func: *const c_char,
8144 line: c_int,
8145 event: *mut event);
8146 #[link_name="switch_event_bind"]
8147 pub fn event_bind(id: *const c_char,
8148 event: event_types,
8149 subclass_name: *const c_char,
8150 callback: event_callback,
8151 user_data: *mut c_void)
8152 -> status;
8153 #[link_name="switch_event_get_custom_events"]
8154 pub fn event_get_custom_events(matches: *mut *mut console_callback_match) -> status;
8155 #[link_name="switch_event_bind_removable"]
8156 pub fn event_bind_removable(id: *const c_char,
8157 event: event_types,
8158 subclass_name: *const c_char,
8159 callback: event_callback,
8160 user_data: *mut c_void,
8161 node: *mut *mut event_node)
8162 -> status;
8163 #[link_name="switch_event_unbind"]
8164 pub fn event_unbind(node: *mut *mut event_node) -> status;
8165 #[link_name="switch_event_unbind_callback"]
8166 pub fn event_unbind_callback(callback: event_callback) -> status;
8167 #[link_name="switch_event_name"]
8168 pub fn event_name(event: event_types) -> *const c_char;
8169 #[link_name="switch_name_event"]
8170 pub fn name_event(name: *const c_char, type_: *mut event_types) -> status;
8171 #[link_name="switch_event_reserve_subclass_detailed"]
8172 pub fn event_reserve_subclass_detailed(owner: *const c_char,
8173 subclass_name: *const c_char)
8174 -> status;
8175 #[link_name="switch_event_free_subclass_detailed"]
8176 pub fn event_free_subclass_detailed(owner: *const c_char,
8177 subclass_name: *const c_char)
8178 -> status;
8179 #[link_name="switch_event_binary_deserialize"]
8180 pub fn event_binary_deserialize(eventp: *mut *mut event,
8181 data: *mut *mut c_void,
8182 len: usize,
8183 duplicate: switch_bool)
8184 -> status;
8185 #[link_name="switch_event_binary_serialize"]
8186 pub fn event_binary_serialize(event: *mut event,
8187 data: *mut *mut c_void,
8188 len: *mut usize)
8189 -> status;
8190 #[link_name="switch_event_serialize"]
8191 pub fn event_serialize(event: *mut event,
8192 str: *mut *mut c_char,
8193 encode: switch_bool)
8194 -> status;
8195 #[link_name="switch_event_serialize_json"]
8196 pub fn event_serialize_json(event: *mut event, str: *mut *mut c_char) -> status;
8197 #[link_name="switch_event_serialize_json_obj"]
8198 pub fn event_serialize_json_obj(event: *mut event, json: *mut *mut cJSON) -> status;
8199 #[link_name="switch_event_create_json"]
8200 pub fn event_create_json(event: *mut *mut event, json: *const c_char) -> status;
8201 #[link_name="switch_event_create_brackets"]
8202 pub fn event_create_brackets(data: *mut c_char,
8203 a: c_char,
8204 b: c_char,
8205 c: c_char,
8206 event: *mut *mut event,
8207 new_data: *mut *mut c_char,
8208 dup: switch_bool)
8209 -> status;
8210 #[link_name="switch_event_create_array_pair"]
8211 pub fn event_create_array_pair(event: *mut *mut event,
8212 names: *mut *mut c_char,
8213 vals: *mut *mut c_char,
8214 len: c_int)
8215 -> status;
8216 #[link_name="switch_event_xmlize"]
8217 pub fn event_xmlize(event: *mut event, fmt: *const c_char, ...) -> xml_t;
8218 #[link_name="switch_event_running"]
8219 pub fn event_running() -> status;
8220 #[link_name="switch_event_add_body"]
8221 pub fn event_add_body(event: *mut event, fmt: *const c_char, ...) -> status;
8222 #[link_name="switch_event_set_body"]
8223 pub fn event_set_body(event: *mut event, body: *const c_char) -> status;
8224 #[link_name="switch_event_expand_headers_check"]
8225 pub fn event_expand_headers_check(event: *mut event,
8226 in_: *const c_char,
8227 var_list: *mut event,
8228 api_list: *mut event,
8229 recur: u32)
8230 -> *mut c_char;
8231 #[link_name="switch_event_create_pres_in_detailed"]
8232 pub fn event_create_pres_in_detailed(file: *mut c_char,
8233 func: *mut c_char,
8234 line: c_int,
8235 proto: *const c_char,
8236 login: *const c_char,
8237 from: *const c_char,
8238 from_domain: *const c_char,
8239 status: *const c_char,
8240 event_type: *const c_char,
8241 alt_event_type: *const c_char,
8242 event_count: c_int,
8243 unique_id: *const c_char,
8244 channel_state: *const c_char,
8245 answer_state: *const c_char,
8246 call_direction: *const c_char)
8247 -> status;
8248 #[link_name="switch_event_deliver"]
8249 pub fn event_deliver(event: *mut *mut event);
8250 #[link_name="switch_event_build_param_string"]
8251 pub fn event_build_param_string(event: *mut event,
8252 prefix: *const c_char,
8253 vars_map: *mut hash)
8254 -> *mut c_char;
8255 #[link_name="switch_event_check_permission_list"]
8256 pub fn event_check_permission_list(list: *mut event, name: *const c_char) -> c_int;
8257 #[link_name="switch_event_add_presence_data_cols"]
8258 pub fn event_add_presence_data_cols(channel: *mut channel,
8259 event: *mut event,
8260 prefix: *const c_char);
8261 #[link_name="switch_json_add_presence_data_cols"]
8262 pub fn json_add_presence_data_cols(event: *mut event,
8263 json: *mut cJSON,
8264 prefix: *const c_char);
8265 #[link_name="switch_event_launch_dispatch_threads"]
8266 pub fn event_launch_dispatch_threads(max: u32);
8267 #[link_name="switch_event_channel_broadcast"]
8268 pub fn event_channel_broadcast(event_channel: *const c_char,
8269 json: *mut *mut cJSON,
8270 key: *const c_char,
8271 id: event_channel_id)
8272 -> status;
8273 #[link_name="switch_event_channel_unbind"]
8274 pub fn event_channel_unbind(event_channel: *const c_char, func: event_channel_func) -> u32;
8275 #[link_name="switch_event_channel_bind"]
8276 pub fn event_channel_bind(event_channel: *const c_char,
8277 func: event_channel_func,
8278 id: *mut event_channel_id)
8279 -> status;
8280 #[link_name="switch_live_array_clear"]
8281 pub fn live_array_clear(la: *mut live_array) -> status;
8282 #[link_name="switch_live_array_bootstrap"]
8283 pub fn live_array_bootstrap(la: *mut live_array,
8284 sessid: *const c_char,
8285 channel_id: event_channel_id)
8286 -> status;
8287 #[link_name="switch_live_array_destroy"]
8288 pub fn live_array_destroy(live_arrayP: *mut *mut live_array) -> status;
8289 #[link_name="switch_live_array_create"]
8290 pub fn live_array_create(event_channel: *const c_char,
8291 name: *const c_char,
8292 channel_id: event_channel_id,
8293 live_arrayP: *mut *mut live_array)
8294 -> status;
8295 #[link_name="switch_live_array_get"]
8296 pub fn live_array_get(la: *mut live_array, name: *const c_char) -> *mut cJSON;
8297 #[link_name="switch_live_array_get_idx"]
8298 pub fn live_array_get_idx(la: *mut live_array, idx: c_int) -> *mut cJSON;
8299 #[link_name="switch_live_array_del"]
8300 pub fn live_array_del(la: *mut live_array, name: *const c_char) -> status;
8301 #[link_name="switch_live_array_add"]
8302 pub fn live_array_add(la: *mut live_array,
8303 name: *const c_char,
8304 index: c_int,
8305 obj: *mut *mut cJSON,
8306 destroy: switch_bool)
8307 -> status;
8308 #[link_name="switch_live_array_visible"]
8309 pub fn live_array_visible(la: *mut live_array,
8310 visible: switch_bool,
8311 force: switch_bool)
8312 -> status;
8313 #[link_name="switch_live_array_isnew"]
8314 pub fn live_array_isnew(la: *mut live_array) -> switch_bool;
8315 #[link_name="switch_live_array_lock"]
8316 pub fn live_array_lock(la: *mut live_array);
8317 #[link_name="switch_live_array_unlock"]
8318 pub fn live_array_unlock(la: *mut live_array);
8319 #[link_name="switch_live_array_set_user_data"]
8320 pub fn live_array_set_user_data(la: *mut live_array, user_data: *mut c_void);
8321 #[link_name="switch_live_array_set_command_handler"]
8322 pub fn live_array_set_command_handler(la: *mut live_array,
8323 command_handler: live_array_command_handler);
8324 #[link_name="switch_live_array_parse_json"]
8325 pub fn live_array_parse_json(json: *mut cJSON, channel_id: event_channel_id);
8326 #[link_name="switch_live_array_add_alias"]
8327 pub fn live_array_add_alias(la: *mut live_array,
8328 event_channel: *const c_char,
8329 name: *const c_char)
8330 -> switch_bool;
8331 #[link_name="switch_live_array_clear_alias"]
8332 pub fn live_array_clear_alias(la: *mut live_array,
8333 event_channel: *const c_char,
8334 name: *const c_char)
8335 -> switch_bool;
8336 #[link_name="switch_event_channel_permission_verify"]
8337 pub fn event_channel_permission_verify(cookie: *const c_char,
8338 event_channel: *const c_char)
8339 -> switch_bool;
8340 #[link_name="switch_event_channel_permission_modify"]
8341 pub fn event_channel_permission_modify(cookie: *const c_char,
8342 event_channel: *const c_char,
8343 set: switch_bool);
8344 #[link_name="switch_event_channel_permission_clear"]
8345 pub fn event_channel_permission_clear(cookie: *const c_char);
8346 #[link_name="switch_img_alloc"]
8347 pub fn img_alloc(img: *mut vpx_image,
8348 fmt: vpx_img_fmt,
8349 d_w: c_uint,
8350 d_h: c_uint,
8351 align: c_uint)
8352 -> *mut vpx_image;
8353 #[link_name="switch_img_wrap"]
8354 pub fn img_wrap(img: *mut vpx_image,
8355 fmt: vpx_img_fmt,
8356 d_w: c_uint,
8357 d_h: c_uint,
8358 align: c_uint,
8359 img_data: *mut c_uchar)
8360 -> *mut vpx_image;
8361 #[link_name="switch_img_set_rect"]
8362 pub fn img_set_rect(img: *mut vpx_image, x: c_uint, y: c_uint, w: c_uint, h: c_uint) -> c_int;
8363 #[link_name="switch_img_patch"]
8364 pub fn img_patch(IMG: *mut vpx_image, img: *mut vpx_image, x: c_int, y: c_int);
8365 #[link_name="switch_img_patch_rect"]
8366 pub fn img_patch_rect(IMG: *mut vpx_image,
8367 X: c_int,
8368 Y: c_int,
8369 img: *mut vpx_image,
8370 x: u32,
8371 y: u32,
8372 w: u32,
8373 h: u32);
8374 #[link_name="switch_img_copy"]
8375 pub fn img_copy(img: *mut vpx_image, new_img: *mut *mut vpx_image);
8376 #[link_name="switch_img_rotate_copy"]
8377 pub fn img_rotate_copy(img: *mut vpx_image,
8378 new_img: *mut *mut vpx_image,
8379 mode: image_rotation_mode);
8380 #[link_name="switch_img_rotate"]
8381 pub fn img_rotate(img: *mut *mut vpx_image, mode: image_rotation_mode);
8382 #[link_name="switch_img_free"]
8383 pub fn img_free(img: *mut *mut vpx_image);
8384 #[link_name="switch_img_draw_text"]
8385 pub fn img_draw_text(IMG: *mut vpx_image,
8386 x: c_int,
8387 y: c_int,
8388 color: rgb_color,
8389 font_size: u16,
8390 text: *mut c_char);
8391 #[link_name="switch_img_add_text"]
8392 pub fn img_add_text(buffer: *mut c_void, w: c_int, x: c_int, y: c_int, s: *mut c_char);
8393 #[link_name="switch_img_copy_rect"]
8394 pub fn img_copy_rect(img: *mut vpx_image, x: u32, y: u32, w: u32, h: u32) -> *mut vpx_image;
8395 #[link_name="switch_img_fill"]
8396 pub fn img_fill(img: *mut vpx_image,
8397 x: c_int,
8398 y: c_int,
8399 w: c_int,
8400 h: c_int,
8401 color: *mut rgb_color);
8402 #[link_name="switch_color_set_rgb"]
8403 pub fn color_set_rgb(color: *mut rgb_color, color_str: *const c_char);
8404 #[link_name="switch_color_set_yuv"]
8405 pub fn color_set_yuv(color: *mut yuv_color, color_str: *const c_char);
8406 #[link_name="switch_img_txt_handle_create"]
8407 pub fn img_txt_handle_create(handleP: *mut *mut img_txt_handle,
8408 font_family: *const c_char,
8409 font_color: *const c_char,
8410 bgcolor: *const c_char,
8411 font_size: u16,
8412 angle: f64,
8413 pool: *mut memory_pool)
8414 -> status;
8415 #[link_name="switch_img_txt_handle_destroy"]
8416 pub fn img_txt_handle_destroy(handleP: *mut *mut img_txt_handle);
8417 #[link_name="switch_img_txt_handle_render"]
8418 pub fn img_txt_handle_render(handle: *mut img_txt_handle,
8419 img: *mut vpx_image,
8420 x: c_int,
8421 y: c_int,
8422 text: *const c_char,
8423 font_family: *const c_char,
8424 font_color: *const c_char,
8425 bgcolor: *const c_char,
8426 font_size: u16,
8427 angle: f64)
8428 -> u32;
8429 #[link_name="switch_img_patch_hole"]
8430 pub fn img_patch_hole(IMG: *mut vpx_image,
8431 img: *mut vpx_image,
8432 x: c_int,
8433 y: c_int,
8434 rect: *mut vpx_image_rect);
8435 #[link_name="switch_png_patch_img"]
8436 pub fn png_patch_img(use_png: *mut png, img: *mut vpx_image, x: c_int, y: c_int) -> status;
8437 #[link_name="switch_img_read_png"]
8438 pub fn img_read_png(file_name: *const c_char, img_fmt: vpx_img_fmt) -> *mut vpx_image;
8439 #[link_name="switch_img_write_png"]
8440 pub fn img_write_png(img: *mut vpx_image, file_name: *mut c_char) -> status;
8441 #[link_name="switch_png_open"]
8442 pub fn png_open(pngP: *mut *mut png, file_name: *const c_char) -> status;
8443 #[link_name="switch_png_free"]
8444 pub fn png_free(pngP: *mut *mut png);
8445 #[link_name="switch_img_overlay"]
8446 pub fn img_overlay(IMG: *mut vpx_image, img: *mut vpx_image, x: c_int, y: c_int, percent: u8);
8447 #[link_name="switch_img_scale"]
8448 pub fn img_scale(src: *mut vpx_image,
8449 destP: *mut *mut vpx_image,
8450 width: c_int,
8451 height: c_int)
8452 -> status;
8453 #[link_name="switch_img_fit"]
8454 pub fn img_fit(srcP: *mut *mut vpx_image, width: c_int, height: c_int, fit: img_fit) -> status;
8455 pub fn parse_img_position(name: *const c_char) -> img_position;
8456 pub fn parse_img_fit(name: *const c_char) -> img_fit;
8457 #[link_name="switch_img_find_position"]
8458 pub fn img_find_position(pos: img_position,
8459 sw: c_int,
8460 sh: c_int,
8461 iw: c_int,
8462 ih: c_int,
8463 xP: *mut c_int,
8464 yP: *mut c_int);
8465 #[link_name="switch_img_to_raw"]
8466 pub fn img_to_raw(src: *mut vpx_image,
8467 dest: *mut c_void,
8468 stride: c_int,
8469 fmt: vpx_img_fmt)
8470 -> status;
8471 #[link_name="switch_img_from_raw"]
8472 pub fn img_from_raw(dest: *mut vpx_image,
8473 src: *mut c_void,
8474 fmt: vpx_img_fmt,
8475 width: c_int,
8476 height: c_int)
8477 -> status;
8478 #[link_name="switch_img_write_text_img"]
8479 pub fn img_write_text_img(w: c_int,
8480 h: c_int,
8481 full: switch_bool,
8482 text: *const c_char)
8483 -> *mut vpx_image;
8484 #[link_name="switch_img_read_file"]
8485 pub fn img_read_file(file_name: *const c_char) -> *mut vpx_image;
8486 #[link_name="switch_img_letterbox"]
8487 pub fn img_letterbox(img: *mut vpx_image,
8488 imgP: *mut *mut vpx_image,
8489 width: c_int,
8490 height: c_int,
8491 color: *const c_char)
8492 -> status;
8493 #[link_name="switch_core_has_video"]
8494 pub fn core_has_video() -> switch_bool;
8495 #[link_name="switch_I420_copy"]
8496 pub fn I420_copy(src_y: *const u8,
8497 src_stride_y: c_int,
8498 src_u: *const u8,
8499 src_stride_u: c_int,
8500 src_v: *const u8,
8501 src_stride_v: c_int,
8502 dst_y: *mut u8,
8503 dst_stride_y: c_int,
8504 dst_u: *mut u8,
8505 dst_stride_u: c_int,
8506 dst_v: *mut u8,
8507 dst_stride_v: c_int,
8508 width: c_int,
8509 height: c_int)
8510 -> status;
8511 #[link_name="switch_I420_copy2"]
8512 pub fn I420_copy2(src_planes: *mut *mut u8,
8513 src_stride: *mut c_int,
8514 dst_planes: *mut *mut u8,
8515 dst_stride: *mut c_int,
8516 width: c_int,
8517 height: c_int)
8518 -> status;
8519 #[link_name="switch_ivr_deactivate_unicast"]
8520 pub fn ivr_deactivate_unicast(session: *mut core_session) -> status;
8521 #[link_name="switch_ivr_activate_unicast"]
8522 pub fn ivr_activate_unicast(session: *mut core_session,
8523 local_ip: *mut c_char,
8524 local_port: port,
8525 remote_ip: *mut c_char,
8526 remote_port: port,
8527 transport: *mut c_char,
8528 flags: *mut c_char)
8529 -> status;
8530 #[link_name="switch_ivr_generate_json_cdr"]
8531 pub fn ivr_generate_json_cdr(session: *mut core_session,
8532 json_cdr: *mut *mut cJSON,
8533 urlencode: switch_bool)
8534 -> status;
8535 #[link_name="switch_ivr_generate_xml_cdr"]
8536 pub fn ivr_generate_xml_cdr(session: *mut core_session, xml_cdr: *mut xml_t) -> status;
8537 #[link_name="switch_ivr_set_xml_profile_data"]
8538 pub fn ivr_set_xml_profile_data(xml: xml_t,
8539 caller_profile: *mut caller_profile,
8540 off: c_int)
8541 -> c_int;
8542 #[link_name="switch_ivr_set_xml_chan_vars"]
8543 pub fn ivr_set_xml_chan_vars(xml: xml_t, channel: *mut channel, off: c_int) -> c_int;
8544 #[link_name="switch_ivr_parse_event"]
8545 pub fn ivr_parse_event(session: *mut core_session, event: *mut event) -> status;
8546 #[link_name="switch_ivr_parse_all_events"]
8547 pub fn ivr_parse_all_events(session: *mut core_session) -> status;
8548 #[link_name="switch_ivr_parse_next_event"]
8549 pub fn ivr_parse_next_event(session: *mut core_session) -> status;
8550 #[link_name="switch_ivr_parse_all_messages"]
8551 pub fn ivr_parse_all_messages(session: *mut core_session) -> status;
8552 #[link_name="switch_ivr_parse_all_signal_data"]
8553 pub fn ivr_parse_all_signal_data(session: *mut core_session) -> status;
8554 #[link_name="switch_ivr_parse_signal_data"]
8555 pub fn ivr_parse_signal_data(session: *mut core_session,
8556 all: switch_bool,
8557 only_session_thread: switch_bool)
8558 -> status;
8559 #[link_name="switch_ivr_parse_next_signal_data"]
8560 pub fn ivr_parse_next_signal_data(session: *mut core_session) -> status;
8561 #[link_name="switch_ivr_process_indications"]
8562 pub fn ivr_process_indications(session: *mut core_session,
8563 message: *mut core_session_message)
8564 -> status;
8565 #[link_name="switch_ivr_sleep"]
8566 pub fn ivr_sleep(session: *mut core_session,
8567 ms: u32,
8568 sync: switch_bool,
8569 args: *mut input_args)
8570 -> status;
8571 #[link_name="switch_ivr_park"]
8572 pub fn ivr_park(session: *mut core_session, args: *mut input_args) -> status;
8573 #[link_name="switch_ivr_collect_digits_callback"]
8574 pub fn ivr_collect_digits_callback(session: *mut core_session,
8575 args: *mut input_args,
8576 digit_timeout: u32,
8577 abs_timeout: u32)
8578 -> status;
8579 #[link_name="switch_ivr_collect_digits_count"]
8580 pub fn ivr_collect_digits_count(session: *mut core_session,
8581 buf: *mut c_char,
8582 buflen: usize,
8583 maxdigits: usize,
8584 terminators: *const c_char,
8585 terminator: *mut c_char,
8586 first_timeout: u32,
8587 digit_timeout: u32,
8588 abs_timeout: u32)
8589 -> status;
8590 #[link_name="switch_ivr_play_and_detect_speech"]
8591 pub fn ivr_play_and_detect_speech(session: *mut core_session,
8592 file: *const c_char,
8593 mod_name: *const c_char,
8594 grammar: *const c_char,
8595 result: *mut *mut c_char,
8596 input_timeout: u32,
8597 args: *mut input_args)
8598 -> status;
8599 #[link_name="switch_ivr_detect_speech_init"]
8600 pub fn ivr_detect_speech_init(session: *mut core_session,
8601 mod_name: *const c_char,
8602 dest: *const c_char,
8603 ah: *mut asr_handle)
8604 -> status;
8605 #[link_name="switch_ivr_detect_speech"]
8606 pub fn ivr_detect_speech(session: *mut core_session,
8607 mod_name: *const c_char,
8608 grammar: *const c_char,
8609 name: *const c_char,
8610 dest: *const c_char,
8611 ah: *mut asr_handle)
8612 -> status;
8613 #[link_name="switch_ivr_stop_detect_speech"]
8614 pub fn ivr_stop_detect_speech(session: *mut core_session) -> status;
8615 #[link_name="switch_ivr_pause_detect_speech"]
8616 pub fn ivr_pause_detect_speech(session: *mut core_session) -> status;
8617 #[link_name="switch_ivr_resume_detect_speech"]
8618 pub fn ivr_resume_detect_speech(session: *mut core_session) -> status;
8619 #[link_name="switch_ivr_detect_speech_load_grammar"]
8620 pub fn ivr_detect_speech_load_grammar(session: *mut core_session,
8621 grammar: *const c_char,
8622 name: *const c_char)
8623 -> status;
8624 #[link_name="switch_ivr_detect_speech_unload_grammar"]
8625 pub fn ivr_detect_speech_unload_grammar(session: *mut core_session,
8626 name: *const c_char)
8627 -> status;
8628 #[link_name="switch_ivr_detect_speech_enable_grammar"]
8629 pub fn ivr_detect_speech_enable_grammar(session: *mut core_session,
8630 name: *const c_char)
8631 -> status;
8632 #[link_name="switch_ivr_detect_speech_disable_grammar"]
8633 pub fn ivr_detect_speech_disable_grammar(session: *mut core_session,
8634 name: *const c_char)
8635 -> status;
8636 #[link_name="switch_ivr_detect_speech_disable_all_grammars"]
8637 pub fn ivr_detect_speech_disable_all_grammars(session: *mut core_session) -> status;
8638 #[link_name="switch_ivr_set_param_detect_speech"]
8639 pub fn ivr_set_param_detect_speech(session: *mut core_session,
8640 name: *const c_char,
8641 val: *const c_char)
8642 -> status;
8643 #[link_name="switch_ivr_detect_speech_start_input_timers"]
8644 pub fn ivr_detect_speech_start_input_timers(session: *mut core_session) -> status;
8645 #[link_name="switch_ivr_record_session"]
8646 pub fn ivr_record_session(session: *mut core_session,
8647 file: *mut c_char,
8648 limit: u32,
8649 fh: *mut file_handle)
8650 -> status;
8651 #[link_name="switch_ivr_transfer_recordings"]
8652 pub fn ivr_transfer_recordings(orig_session: *mut core_session,
8653 new_session: *mut core_session)
8654 -> status;
8655 #[link_name="switch_ivr_eavesdrop_pop_eavesdropper"]
8656 pub fn ivr_eavesdrop_pop_eavesdropper(session: *mut core_session,
8657 sessionp: *mut *mut core_session)
8658 -> status;
8659 #[link_name="switch_ivr_eavesdrop_exec_all"]
8660 pub fn ivr_eavesdrop_exec_all(session: *mut core_session,
8661 app: *const c_char,
8662 arg: *const c_char)
8663 -> status;
8664 #[link_name="switch_ivr_eavesdrop_update_display"]
8665 pub fn ivr_eavesdrop_update_display(session: *mut core_session,
8666 name: *const c_char,
8667 number: *const c_char)
8668 -> status;
8669 #[link_name="switch_ivr_eavesdrop_session"]
8670 pub fn ivr_eavesdrop_session(session: *mut core_session,
8671 uuid: *const c_char,
8672 require_group: *const c_char,
8673 flags: eavesdrop_flag)
8674 -> status;
8675 #[link_name="switch_ivr_displace_session"]
8676 pub fn ivr_displace_session(session: *mut core_session,
8677 file: *const c_char,
8678 limit: u32,
8679 flags: *const c_char)
8680 -> status;
8681 #[link_name="switch_ivr_stop_displace_session"]
8682 pub fn ivr_stop_displace_session(session: *mut core_session, file: *const c_char) -> status;
8683 #[link_name="switch_ivr_stop_record_session"]
8684 pub fn ivr_stop_record_session(session: *mut core_session, file: *const c_char) -> status;
8685 #[link_name="switch_ivr_session_audio"]
8686 pub fn ivr_session_audio(session: *mut core_session,
8687 cmd: *const c_char,
8688 direction: *const c_char,
8689 level: c_int)
8690 -> status;
8691 #[link_name="switch_ivr_stop_session_audio"]
8692 pub fn ivr_stop_session_audio(session: *mut core_session) -> status;
8693 #[link_name="switch_ivr_inband_dtmf_session"]
8694 pub fn ivr_inband_dtmf_session(session: *mut core_session) -> status;
8695 #[link_name="switch_ivr_stop_inband_dtmf_session"]
8696 pub fn ivr_stop_inband_dtmf_session(session: *mut core_session) -> status;
8697 #[link_name="switch_ivr_inband_dtmf_generate_session"]
8698 pub fn ivr_inband_dtmf_generate_session(session: *mut core_session,
8699 read_stream: switch_bool)
8700 -> status;
8701 #[link_name="switch_ivr_stop_inband_dtmf_generate_session"]
8702 pub fn ivr_stop_inband_dtmf_generate_session(session: *mut core_session) -> status;
8703 #[link_name="switch_ivr_session_echo"]
8704 pub fn ivr_session_echo(session: *mut core_session, args: *mut input_args) -> status;
8705 #[link_name="switch_ivr_stop_tone_detect_session"]
8706 pub fn ivr_stop_tone_detect_session(session: *mut core_session) -> status;
8707 #[link_name="switch_ivr_tone_detect_session"]
8708 pub fn ivr_tone_detect_session(session: *mut core_session,
8709 key: *const c_char,
8710 tone_spec: *const c_char,
8711 flags: *const c_char,
8712 timeout: time_t,
8713 hits: c_int,
8714 app: *const c_char,
8715 data: *const c_char,
8716 callback: tone_detect_callback)
8717 -> status;
8718 #[link_name="switch_ivr_play_file"]
8719 pub fn ivr_play_file(session: *mut core_session,
8720 fh: *mut file_handle,
8721 file: *const c_char,
8722 args: *mut input_args)
8723 -> status;
8724 #[link_name="switch_ivr_wait_for_silence"]
8725 pub fn ivr_wait_for_silence(session: *mut core_session,
8726 thresh: u32,
8727 silence_hits: u32,
8728 listen_hits: u32,
8729 timeout_ms: u32,
8730 file: *const c_char)
8731 -> status;
8732 #[link_name="switch_ivr_gentones"]
8733 pub fn ivr_gentones(session: *mut core_session,
8734 script: *const c_char,
8735 loops: i32,
8736 args: *mut input_args)
8737 -> status;
8738 #[link_name="switch_ivr_record_file"]
8739 pub fn ivr_record_file(session: *mut core_session,
8740 fh: *mut file_handle,
8741 file: *const c_char,
8742 args: *mut input_args,
8743 limit: u32)
8744 -> status;
8745 #[link_name="switch_play_and_get_digits"]
8746 pub fn play_and_get_digits(session: *mut core_session,
8747 min_digits: u32,
8748 max_digits: u32,
8749 max_tries: u32,
8750 timeout: u32,
8751 valid_terminators: *const c_char,
8752 audio_file: *const c_char,
8753 bad_input_audio_file: *const c_char,
8754 var_name: *const c_char,
8755 digit_buffer: *mut c_char,
8756 digit_buffer_length: u32,
8757 digits_regex: *const c_char,
8758 digit_timeout: u32,
8759 transfer_on_failure: *const c_char)
8760 -> status;
8761 #[link_name="switch_ivr_speak_text_handle"]
8762 pub fn ivr_speak_text_handle(session: *mut core_session,
8763 sh: *mut speech_handle,
8764 codec: *mut codec,
8765 timer: *mut timer,
8766 text: *mut c_char,
8767 args: *mut input_args)
8768 -> status;
8769 #[link_name="switch_ivr_clear_speech_cache"]
8770 pub fn ivr_clear_speech_cache(session: *mut core_session);
8771 #[link_name="switch_ivr_speak_text"]
8772 pub fn ivr_speak_text(session: *mut core_session,
8773 tts_name: *const c_char,
8774 voice_name: *const c_char,
8775 text: *mut c_char,
8776 args: *mut input_args)
8777 -> status;
8778 #[link_name="switch_ivr_originate"]
8779 pub fn ivr_originate(session: *mut core_session,
8780 bleg: *mut *mut core_session,
8781 cause: *mut call_cause,
8782 bridgeto: *const c_char,
8783 timelimit_sec: u32,
8784 table: *const state_handler_table,
8785 cid_name_override: *const c_char,
8786 cid_num_override: *const c_char,
8787 caller_profile_override: *mut caller_profile,
8788 ovars: *mut event,
8789 flags: originate_flag,
8790 cancel_cause: *mut call_cause)
8791 -> status;
8792 #[link_name="switch_ivr_enterprise_originate"]
8793 pub fn ivr_enterprise_originate(session: *mut core_session,
8794 bleg: *mut *mut core_session,
8795 cause: *mut call_cause,
8796 bridgeto: *const c_char,
8797 timelimit_sec: u32,
8798 table: *const state_handler_table,
8799 cid_name_override: *const c_char,
8800 cid_num_override: *const c_char,
8801 caller_profile_override: *mut caller_profile,
8802 ovars: *mut event,
8803 flags: originate_flag,
8804 cancel_cause: *mut call_cause)
8805 -> status;
8806 #[link_name="switch_ivr_bridge_display"]
8807 pub fn ivr_bridge_display(session: *mut core_session, peer_session: *mut core_session);
8808 #[link_name="switch_ivr_multi_threaded_bridge"]
8809 pub fn ivr_multi_threaded_bridge(session: *mut core_session,
8810 peer_session: *mut core_session,
8811 dtmf_callback: input_callback_function,
8812 session_data: *mut c_void,
8813 peer_session_data: *mut c_void)
8814 -> status;
8815 #[link_name="switch_ivr_signal_bridge"]
8816 pub fn ivr_signal_bridge(session: *mut core_session,
8817 peer_session: *mut core_session)
8818 -> status;
8819 #[link_name="switch_ivr_session_transfer"]
8820 pub fn ivr_session_transfer(session: *mut core_session,
8821 extension: *const c_char,
8822 dialplan: *const c_char,
8823 context: *const c_char)
8824 -> status;
8825 #[link_name="switch_ivr_schedule_transfer"]
8826 pub fn ivr_schedule_transfer(runtime: time_t,
8827 uuid: *const c_char,
8828 extension: *mut c_char,
8829 dialplan: *mut c_char,
8830 context: *mut c_char)
8831 -> u32;
8832 #[link_name="switch_ivr_schedule_hangup"]
8833 pub fn ivr_schedule_hangup(runtime: time_t,
8834 uuid: *const c_char,
8835 cause: call_cause,
8836 bleg: switch_bool)
8837 -> u32;
8838 #[link_name="switch_ivr_uuid_bridge"]
8839 pub fn ivr_uuid_bridge(originator_uuid: *const c_char,
8840 originatee_uuid: *const c_char)
8841 -> status;
8842 #[link_name="switch_ivr_media"]
8843 pub fn ivr_media(uuid: *const c_char, flags: media_flag) -> status;
8844 #[link_name="switch_ivr_3p_media"]
8845 pub fn ivr_3p_media(uuid: *const c_char, flags: media_flag) -> status;
8846 #[link_name="switch_ivr_nomedia"]
8847 pub fn ivr_nomedia(uuid: *const c_char, flags: media_flag) -> status;
8848 #[link_name="switch_ivr_3p_nomedia"]
8849 pub fn ivr_3p_nomedia(uuid: *const c_char, flags: media_flag) -> status;
8850 #[link_name="switch_ivr_bg_media"]
8851 pub fn ivr_bg_media(uuid: *const c_char,
8852 flags: media_flag,
8853 on: switch_bool,
8854 is3p: switch_bool,
8855 delay: u32);
8856 #[link_name="switch_ivr_hold_uuid"]
8857 pub fn ivr_hold_uuid(uuid: *const c_char, message: *const c_char, moh: switch_bool) -> status;
8858 #[link_name="switch_ivr_hold_toggle_uuid"]
8859 pub fn ivr_hold_toggle_uuid(uuid: *const c_char,
8860 message: *const c_char,
8861 moh: switch_bool)
8862 -> status;
8863 #[link_name="switch_ivr_unhold_uuid"]
8864 pub fn ivr_unhold_uuid(uuid: *const c_char) -> status;
8865 #[link_name="switch_ivr_hold"]
8866 pub fn ivr_hold(session: *mut core_session,
8867 message: *const c_char,
8868 moh: switch_bool)
8869 -> status;
8870 #[link_name="switch_ivr_unhold"]
8871 pub fn ivr_unhold(session: *mut core_session) -> status;
8872 #[link_name="switch_ivr_schedule_broadcast"]
8873 pub fn ivr_schedule_broadcast(runtime: time_t,
8874 uuid: *const c_char,
8875 path: *const c_char,
8876 flags: media_flag)
8877 -> u32;
8878 #[link_name="switch_ivr_broadcast"]
8879 pub fn ivr_broadcast(uuid: *const c_char, path: *const c_char, flags: media_flag) -> status;
8880 #[link_name="switch_ivr_broadcast_in_thread"]
8881 pub fn ivr_broadcast_in_thread(session: *mut core_session, app: *const c_char, flags: c_int);
8882 #[link_name="switch_ivr_transfer_variable"]
8883 pub fn ivr_transfer_variable(sessa: *mut core_session,
8884 sessb: *mut core_session,
8885 var: *mut c_char)
8886 -> status;
8887 #[link_name="switch_ivr_digit_stream_parser_new"]
8888 pub fn ivr_digit_stream_parser_new(pool: *mut memory_pool,
8889 parser: *mut *mut ivr_digit_stream_parser)
8890 -> status;
8891 #[link_name="switch_ivr_digit_stream_parser_destroy"]
8892 pub fn ivr_digit_stream_parser_destroy(parser: *mut ivr_digit_stream_parser) -> status;
8893 #[link_name="switch_ivr_digit_stream_new"]
8894 pub fn ivr_digit_stream_new(parser: *mut ivr_digit_stream_parser,
8895 stream: *mut *mut ivr_digit_stream)
8896 -> status;
8897 #[link_name="switch_ivr_digit_stream_destroy"]
8898 pub fn ivr_digit_stream_destroy(stream: *mut *mut ivr_digit_stream) -> status;
8899 #[link_name="switch_ivr_digit_stream_parser_set_event"]
8900 pub fn ivr_digit_stream_parser_set_event(parser: *mut ivr_digit_stream_parser,
8901 digits: *mut c_char,
8902 data: *mut c_void)
8903 -> status;
8904 #[link_name="switch_ivr_digit_stream_parser_del_event"]
8905 pub fn ivr_digit_stream_parser_del_event(parser: *mut ivr_digit_stream_parser,
8906 digits: *mut c_char)
8907 -> status;
8908 #[link_name="switch_ivr_digit_stream_parser_feed"]
8909 pub fn ivr_digit_stream_parser_feed(parser: *mut ivr_digit_stream_parser,
8910 stream: *mut ivr_digit_stream,
8911 digit: c_char)
8912 -> *mut c_void;
8913 #[link_name="switch_ivr_digit_stream_reset"]
8914 pub fn ivr_digit_stream_reset(stream: *mut ivr_digit_stream) -> status;
8915 #[link_name="switch_ivr_digit_stream_parser_set_terminator"]
8916 pub fn ivr_digit_stream_parser_set_terminator(parser: *mut ivr_digit_stream_parser,
8917 digit: c_char)
8918 -> status;
8919 #[link_name="switch_ivr_menu_init"]
8920 pub fn ivr_menu_init(new_menu: *mut *mut ivr_menu,
8921 main: *mut ivr_menu,
8922 name: *const c_char,
8923 greeting_sound: *const c_char,
8924 short_greeting_sound: *const c_char,
8925 invalid_sound: *const c_char,
8926 exit_sound: *const c_char,
8927 transfer_sound: *const c_char,
8928 confirm_macro: *const c_char,
8929 confirm_key: *const c_char,
8930 tts_engine: *const c_char,
8931 tts_voice: *const c_char,
8932 confirm_attempts: c_int,
8933 inter_timeout: c_int,
8934 digit_len: c_int,
8935 timeout: c_int,
8936 max_failures: c_int,
8937 max_timeouts: c_int,
8938 pool: *mut memory_pool)
8939 -> status;
8940 #[link_name="switch_ivr_menu_bind_action"]
8941 pub fn ivr_menu_bind_action(menu: *mut ivr_menu,
8942 ivr_action: ivr_action,
8943 arg: *const c_char,
8944 bind: *const c_char)
8945 -> status;
8946 #[link_name="switch_ivr_menu_bind_function"]
8947 pub fn ivr_menu_bind_function(menu: *mut ivr_menu,
8948 function: *mut ivr_menu_action_function,
8949 arg: *const c_char,
8950 bind: *const c_char)
8951 -> status;
8952 #[link_name="switch_ivr_menu_execute"]
8953 pub fn ivr_menu_execute(session: *mut core_session,
8954 stack: *mut ivr_menu,
8955 name: *mut c_char,
8956 obj: *mut c_void)
8957 -> status;
8958 #[link_name="switch_ivr_menu_stack_free"]
8959 pub fn ivr_menu_stack_free(stack: *mut ivr_menu) -> status;
8960 #[link_name="switch_ivr_menu_stack_xml_build"]
8961 pub fn ivr_menu_stack_xml_build(xml_menu_ctx: *mut ivr_menu_xml_ctx,
8962 menu_stack: *mut *mut ivr_menu,
8963 xml_menus: xml_t,
8964 xml_menu: xml_t)
8965 -> status;
8966 #[link_name="switch_ivr_menu_str2action"]
8967 pub fn ivr_menu_str2action(action_name: *const c_char, action: *mut ivr_action) -> status;
8968 #[link_name="switch_ivr_menu_stack_xml_add_custom"]
8969 pub fn ivr_menu_stack_xml_add_custom(xml_menu_ctx: *mut ivr_menu_xml_ctx,
8970 name: *const c_char,
8971 function: *mut ivr_menu_action_function)
8972 -> status;
8973 #[link_name="switch_ivr_menu_stack_xml_init"]
8974 pub fn ivr_menu_stack_xml_init(xml_menu_ctx: *mut *mut ivr_menu_xml_ctx,
8975 pool: *mut memory_pool)
8976 -> status;
8977 #[link_name="switch_ivr_phrase_macro_event"]
8978 pub fn ivr_phrase_macro_event(session: *mut core_session,
8979 macro_name: *const c_char,
8980 data: *const c_char,
8981 event: *mut event,
8982 lang: *const c_char,
8983 args: *mut input_args)
8984 -> status;
8985 #[link_name="switch_ivr_delay_echo"]
8986 pub fn ivr_delay_echo(session: *mut core_session, delay_ms: u32);
8987 #[link_name="switch_ivr_find_bridged_uuid"]
8988 pub fn ivr_find_bridged_uuid(uuid: *const c_char, b_uuid: *mut c_char, blen: usize) -> status;
8989 #[link_name="switch_ivr_intercept_session"]
8990 pub fn ivr_intercept_session(session: *mut core_session,
8991 uuid: *const c_char,
8992 bleg: switch_bool);
8993 #[link_name="switch_ivr_park_session"]
8994 pub fn ivr_park_session(session: *mut core_session);
8995 #[link_name="switch_ivr_wait_for_answer"]
8996 pub fn ivr_wait_for_answer(session: *mut core_session,
8997 peer_session: *mut core_session)
8998 -> status;
8999 #[link_name="switch_ivr_read"]
9000 pub fn ivr_read(session: *mut core_session,
9001 min_digits: u32,
9002 max_digits: u32,
9003 prompt_audio_file: *const c_char,
9004 var_name: *const c_char,
9005 digit_buffer: *mut c_char,
9006 digit_buffer_length: usize,
9007 timeout: u32,
9008 valid_terminators: *const c_char,
9009 digit_timeout: u32)
9010 -> status;
9011 #[link_name="switch_ivr_block_dtmf_session"]
9012 pub fn ivr_block_dtmf_session(session: *mut core_session) -> status;
9013 #[link_name="switch_ivr_unblock_dtmf_session"]
9014 pub fn ivr_unblock_dtmf_session(session: *mut core_session) -> status;
9015 #[link_name="switch_ivr_bind_dtmf_meta_session"]
9016 pub fn ivr_bind_dtmf_meta_session(session: *mut core_session,
9017 key: u32,
9018 bind_flags: bind_flag,
9019 app: *const c_char)
9020 -> status;
9021 #[link_name="switch_ivr_unbind_dtmf_meta_session"]
9022 pub fn ivr_unbind_dtmf_meta_session(session: *mut core_session, key: u32) -> status;
9023 #[link_name="switch_ivr_soft_hold"]
9024 pub fn ivr_soft_hold(session: *mut core_session,
9025 unhold_key: *const c_char,
9026 moh_a: *const c_char,
9027 moh_b: *const c_char)
9028 -> status;
9029 #[link_name="switch_ivr_say"]
9030 pub fn ivr_say(session: *mut core_session,
9031 tosay: *const c_char,
9032 module_name: *const c_char,
9033 say_type: *const c_char,
9034 say_method: *const c_char,
9035 say_gender: *const c_char,
9036 args: *mut input_args)
9037 -> status;
9038 #[link_name="switch_ivr_say_string"]
9039 pub fn ivr_say_string(session: *mut core_session,
9040 lang: *const c_char,
9041 ext: *const c_char,
9042 tosay: *const c_char,
9043 module_name: *const c_char,
9044 say_type: *const c_char,
9045 say_method: *const c_char,
9046 say_gender: *const c_char,
9047 rstr: *mut *mut c_char)
9048 -> status;
9049 #[link_name="switch_ivr_get_say_method_by_name"]
9050 pub fn ivr_get_say_method_by_name(name: *const c_char) -> say_method;
9051 #[link_name="switch_ivr_get_say_gender_by_name"]
9052 pub fn ivr_get_say_gender_by_name(name: *const c_char) -> say_gender;
9053 #[link_name="switch_ivr_get_say_type_by_name"]
9054 pub fn ivr_get_say_type_by_name(name: *const c_char) -> say_type;
9055 #[link_name="switch_ivr_say_spell"]
9056 pub fn ivr_say_spell(session: *mut core_session,
9057 tosay: *mut c_char,
9058 say_args: *mut say_args,
9059 args: *mut input_args)
9060 -> status;
9061 #[link_name="switch_ivr_say_ip"]
9062 pub fn ivr_say_ip(session: *mut core_session,
9063 tosay: *mut c_char,
9064 number_func: say_callback,
9065 say_args: *mut say_args,
9066 args: *mut input_args)
9067 -> status;
9068 #[link_name="switch_ivr_set_user"]
9069 pub fn ivr_set_user(session: *mut core_session, data: *const c_char) -> status;
9070 #[link_name="switch_ivr_set_user_xml"]
9071 pub fn ivr_set_user_xml(session: *mut core_session,
9072 prefix: *const c_char,
9073 user: *const c_char,
9074 domain: *const c_char,
9075 x_user: xml_t)
9076 -> status;
9077 #[link_name="switch_ivr_sound_test"]
9078 pub fn ivr_sound_test(session: *mut core_session) -> status;
9079 #[link_name="switch_process_import"]
9080 pub fn process_import(session: *mut core_session,
9081 peer_channel: *mut channel,
9082 varname: *const c_char,
9083 prefix: *const c_char);
9084 #[link_name="switch_ivr_uuid_exists"]
9085 pub fn ivr_uuid_exists(uuid: *const c_char) -> switch_bool;
9086 #[link_name="switch_ivr_uuid_force_exists"]
9087 pub fn ivr_uuid_force_exists(uuid: *const c_char) -> switch_bool;
9088 #[link_name="switch_ivr_dmachine_is_parsing"]
9089 pub fn ivr_dmachine_is_parsing(dmachine: *mut ivr_dmachine) -> switch_bool;
9090 #[link_name="switch_ivr_dmachine_last_ping"]
9091 pub fn ivr_dmachine_last_ping(dmachine: *mut ivr_dmachine) -> status;
9092 #[link_name="switch_ivr_dmachine_get_name"]
9093 pub fn ivr_dmachine_get_name(dmachine: *mut ivr_dmachine) -> *const c_char;
9094 #[link_name="switch_ivr_dmachine_set_match_callback"]
9095 pub fn ivr_dmachine_set_match_callback(dmachine: *mut ivr_dmachine,
9096 match_callback: ivr_dmachine_callback);
9097 #[link_name="switch_ivr_dmachine_set_nonmatch_callback"]
9098 pub fn ivr_dmachine_set_nonmatch_callback(dmachine: *mut ivr_dmachine,
9099 nonmatch_callback: ivr_dmachine_callback);
9100 #[link_name="switch_ivr_dmachine_create"]
9101 pub fn ivr_dmachine_create(dmachine_p: *mut *mut ivr_dmachine,
9102 name: *const c_char,
9103 pool: *mut memory_pool,
9104 digit_timeout: u32,
9105 input_timeout: u32,
9106 match_callback: ivr_dmachine_callback,
9107 nonmatch_callback: ivr_dmachine_callback,
9108 user_data: *mut c_void)
9109 -> status;
9110 #[link_name="switch_ivr_dmachine_destroy"]
9111 pub fn ivr_dmachine_destroy(dmachine: *mut *mut ivr_dmachine);
9112 #[link_name="switch_ivr_dmachine_bind"]
9113 pub fn ivr_dmachine_bind(dmachine: *mut ivr_dmachine,
9114 realm: *const c_char,
9115 digits: *const c_char,
9116 key: i32,
9117 callback: ivr_dmachine_callback,
9118 user_data: *mut c_void)
9119 -> status;
9120 #[link_name="switch_ivr_dmachine_feed"]
9121 pub fn ivr_dmachine_feed(dmachine: *mut ivr_dmachine,
9122 digits: *const c_char,
9123 match_: *mut *mut ivr_dmachine_match)
9124 -> status;
9125 #[link_name="switch_ivr_dmachine_clear"]
9126 pub fn ivr_dmachine_clear(dmachine: *mut ivr_dmachine) -> status;
9127 #[link_name="switch_ivr_dmachine_ping"]
9128 pub fn ivr_dmachine_ping(dmachine: *mut ivr_dmachine,
9129 match_p: *mut *mut ivr_dmachine_match)
9130 -> status;
9131 #[link_name="switch_ivr_dmachine_get_match"]
9132 pub fn ivr_dmachine_get_match(dmachine: *mut ivr_dmachine) -> *mut ivr_dmachine_match;
9133 #[link_name="switch_ivr_dmachine_get_failed_digits"]
9134 pub fn ivr_dmachine_get_failed_digits(dmachine: *mut ivr_dmachine) -> *const c_char;
9135 #[link_name="switch_ivr_dmachine_set_digit_timeout_ms"]
9136 pub fn ivr_dmachine_set_digit_timeout_ms(dmachine: *mut ivr_dmachine, digit_timeout_ms: u32);
9137 #[link_name="switch_ivr_dmachine_set_input_timeout_ms"]
9138 pub fn ivr_dmachine_set_input_timeout_ms(dmachine: *mut ivr_dmachine, input_timeout_ms: u32);
9139 #[link_name="switch_ivr_dmachine_clear_realm"]
9140 pub fn ivr_dmachine_clear_realm(dmachine: *mut ivr_dmachine, realm: *const c_char) -> status;
9141 #[link_name="switch_ivr_dmachine_set_realm"]
9142 pub fn ivr_dmachine_set_realm(dmachine: *mut ivr_dmachine, realm: *const c_char) -> status;
9143 #[link_name="switch_ivr_get_file_handle"]
9144 pub fn ivr_get_file_handle(session: *mut core_session, fh: *mut *mut file_handle) -> status;
9145 #[link_name="switch_ivr_release_file_handle"]
9146 pub fn ivr_release_file_handle(session: *mut core_session,
9147 fh: *mut *mut file_handle)
9148 -> status;
9149 #[link_name="switch_ivr_process_fh"]
9150 pub fn ivr_process_fh(session: *mut core_session,
9151 cmd: *const c_char,
9152 fhp: *mut file_handle)
9153 -> status;
9154 #[link_name="switch_ivr_insert_file"]
9155 pub fn ivr_insert_file(session: *mut core_session,
9156 file: *const c_char,
9157 insert_file: *const c_char,
9158 sample_point: usize)
9159 -> status;
9160 #[link_name="switch_ivr_create_message_reply"]
9161 pub fn ivr_create_message_reply(reply: *mut *mut event,
9162 message: *mut event,
9163 new_proto: *const c_char)
9164 -> status;
9165 #[link_name="switch_ivr_check_presence_mapping"]
9166 pub fn ivr_check_presence_mapping(exten_name: *const c_char,
9167 domain_name: *const c_char)
9168 -> *mut c_char;
9169 #[link_name="switch_ivr_kill_uuid"]
9170 pub fn ivr_kill_uuid(uuid: *const c_char, cause: call_cause) -> status;
9171 #[link_name="switch_ivr_blind_transfer_ack"]
9172 pub fn ivr_blind_transfer_ack(session: *mut core_session, success: switch_bool) -> status;
9173 #[link_name="switch_ivr_record_session_mask"]
9174 pub fn ivr_record_session_mask(session: *mut core_session,
9175 file: *const c_char,
9176 on: switch_bool)
9177 -> status;
9178 #[link_name="switch_ivr_stop_video_write_overlay_session"]
9179 pub fn ivr_stop_video_write_overlay_session(session: *mut core_session) -> status;
9180 #[link_name="switch_ivr_video_write_overlay_session"]
9181 pub fn ivr_video_write_overlay_session(session: *mut core_session,
9182 img_path: *const c_char,
9183 pos: img_position,
9184 alpha: u8)
9185 -> status;
9186 #[link_name="switch_rtp_add_crypto_key"]
9187 pub fn rtp_add_crypto_key(rtp_session: *mut rtp,
9188 direction: rtp_crypto_direction,
9189 index: u32,
9190 type_: rtp_crypto_key_type,
9191 key: *mut c_uchar,
9192 keylen: usize)
9193 -> status;
9194 #[link_name="switch_rtp_get_random"]
9195 pub fn rtp_get_random(buf: *mut c_void, len: u32);
9196 #[link_name="switch_rtp_init"]
9197 pub fn rtp_init(pool: *mut memory_pool);
9198 #[link_name="switch_rtp_shutdown"]
9199 pub fn rtp_shutdown();
9200 #[link_name="switch_rtp_set_start_port"]
9201 pub fn rtp_set_start_port(port: port) -> port;
9202 #[link_name="switch_rtp_set_ssrc"]
9203 pub fn rtp_set_ssrc(rtp_session: *mut rtp, ssrc: u32) -> status;
9204 #[link_name="switch_rtp_set_remote_ssrc"]
9205 pub fn rtp_set_remote_ssrc(rtp_session: *mut rtp, ssrc: u32) -> status;
9206 #[link_name="switch_rtp_set_end_port"]
9207 pub fn rtp_set_end_port(port: port) -> port;
9208 #[link_name="switch_rtp_request_port"]
9209 pub fn rtp_request_port(ip: *const c_char) -> port;
9210 #[link_name="switch_rtp_release_port"]
9211 pub fn rtp_release_port(ip: *const c_char, port: port);
9212 #[link_name="switch_rtp_set_interval"]
9213 pub fn rtp_set_interval(rtp_session: *mut rtp,
9214 ms_per_packet: u32,
9215 samples_per_interval: u32)
9216 -> status;
9217 #[link_name="switch_rtp_change_interval"]
9218 pub fn rtp_change_interval(rtp_session: *mut rtp,
9219 ms_per_packet: u32,
9220 samples_per_interval: u32)
9221 -> status;
9222 #[link_name="switch_rtp_create"]
9223 pub fn rtp_create(new_rtp_session: *mut *mut rtp,
9224 payload: payload,
9225 samples_per_interval: u32,
9226 ms_per_packet: u32,
9227 flags: *mut rtp_flag,
9228 timer_name: *mut c_char,
9229 err: *mut *const c_char,
9230 pool: *mut memory_pool)
9231 -> status;
9232 #[link_name="switch_rtp_new"]
9233 pub fn rtp_new(rx_host: *const c_char,
9234 rx_port: port,
9235 tx_host: *const c_char,
9236 tx_port: port,
9237 payload: payload,
9238 samples_per_interval: u32,
9239 ms_per_packet: u32,
9240 flags: *mut rtp_flag,
9241 timer_name: *mut c_char,
9242 err: *mut *const c_char,
9243 pool: *mut memory_pool)
9244 -> *mut rtp;
9245 #[link_name="switch_rtp_set_remote_address"]
9246 pub fn rtp_set_remote_address(rtp_session: *mut rtp,
9247 host: *const c_char,
9248 port: port,
9249 remote_rtcp_port: port,
9250 change_adv_addr: switch_bool,
9251 err: *mut *const c_char)
9252 -> status;
9253 #[link_name="switch_rtp_reset_jb"]
9254 pub fn rtp_reset_jb(rtp_session: *mut rtp);
9255 #[link_name="switch_rtp_get_remote_host"]
9256 pub fn rtp_get_remote_host(rtp_session: *mut rtp) -> *mut c_char;
9257 #[link_name="switch_rtp_get_remote_port"]
9258 pub fn rtp_get_remote_port(rtp_session: *mut rtp) -> port;
9259 #[link_name="switch_rtp_reset_media_timer"]
9260 pub fn rtp_reset_media_timer(rtp_session: *mut rtp);
9261 #[link_name="switch_rtp_set_max_missed_packets"]
9262 pub fn rtp_set_max_missed_packets(rtp_session: *mut rtp, max: u32);
9263 #[link_name="switch_rtp_udptl_mode"]
9264 pub fn rtp_udptl_mode(rtp_session: *mut rtp) -> status;
9265 #[link_name="switch_rtp_reset"]
9266 pub fn rtp_reset(rtp_session: *mut rtp);
9267 #[link_name="switch_rtp_set_local_address"]
9268 pub fn rtp_set_local_address(rtp_session: *mut rtp,
9269 host: *const c_char,
9270 port: port,
9271 err: *mut *const c_char)
9272 -> status;
9273 #[link_name="switch_rtp_kill_socket"]
9274 pub fn rtp_kill_socket(rtp_session: *mut rtp);
9275 #[link_name="switch_rtp_break"]
9276 pub fn rtp_break(rtp_session: *mut rtp);
9277 #[link_name="switch_rtp_flush"]
9278 pub fn rtp_flush(rtp_session: *mut rtp);
9279 #[link_name="switch_rtp_ready"]
9280 pub fn rtp_ready(rtp_session: *mut rtp) -> u8;
9281 #[link_name="switch_rtp_destroy"]
9282 pub fn rtp_destroy(rtp_session: *mut *mut rtp);
9283 #[link_name="switch_rtp_sync_stats"]
9284 pub fn rtp_sync_stats(rtp_session: *mut rtp) -> status;
9285 #[link_name="switch_rtp_activate_ice"]
9286 pub fn rtp_activate_ice(rtp_session: *mut rtp,
9287 login: *mut c_char,
9288 rlogin: *mut c_char,
9289 password: *const c_char,
9290 rpassword: *const c_char,
9291 proto: ice_proto,
9292 type_: core_media_ice_type,
9293 ice_params: *mut ice)
9294 -> status;
9295 #[link_name="switch_rtp_activate_rtcp"]
9296 pub fn rtp_activate_rtcp(rtp_session: *mut rtp,
9297 send_rate: c_int,
9298 remote_port: port,
9299 mux: switch_bool)
9300 -> status;
9301 #[link_name="switch_rtp_get_media_timer"]
9302 pub fn rtp_get_media_timer(rtp_session: *mut rtp) -> *mut timer;
9303 #[link_name="switch_rtp_set_video_buffer_size"]
9304 pub fn rtp_set_video_buffer_size(rtp_session: *mut rtp,
9305 frames: u32,
9306 max_frames: u32)
9307 -> status;
9308 #[link_name="switch_rtp_get_video_buffer_size"]
9309 pub fn rtp_get_video_buffer_size(rtp_session: *mut rtp,
9310 min_frame_len: *mut u32,
9311 max_frame_len: *mut u32,
9312 cur_frame_len: *mut u32,
9313 highest_frame_len: *mut u32)
9314 -> status;
9315 #[link_name="switch_rtp_activate_jitter_buffer"]
9316 pub fn rtp_activate_jitter_buffer(rtp_session: *mut rtp,
9317 queue_frames: u32,
9318 max_queue_frames: u32,
9319 samples_per_packet: u32,
9320 samples_per_second: u32)
9321 -> status;
9322 #[link_name="switch_rtp_debug_jitter_buffer"]
9323 pub fn rtp_debug_jitter_buffer(rtp_session: *mut rtp, name: *const c_char) -> status;
9324 #[link_name="switch_rtp_deactivate_jitter_buffer"]
9325 pub fn rtp_deactivate_jitter_buffer(rtp_session: *mut rtp) -> status;
9326 #[link_name="switch_rtp_pause_jitter_buffer"]
9327 pub fn rtp_pause_jitter_buffer(rtp_session: *mut rtp, pause: switch_bool) -> status;
9328 #[link_name="switch_rtp_get_jitter_buffer"]
9329 pub fn rtp_get_jitter_buffer(rtp_session: *mut rtp) -> *mut jb;
9330 #[link_name="switch_rtp_set_flag"]
9331 pub fn rtp_set_flag(rtp_session: *mut rtp, flag: rtp_flag);
9332 #[link_name="switch_rtp_set_flags"]
9333 pub fn rtp_set_flags(rtp_session: *mut rtp, flags: *mut rtp_flag);
9334 #[link_name="switch_rtp_clear_flags"]
9335 pub fn rtp_clear_flags(rtp_session: *mut rtp, flags: *mut rtp_flag);
9336 #[link_name="switch_rtp_test_flag"]
9337 pub fn rtp_test_flag(rtp_session: *mut rtp, flags: rtp_flag) -> u32;
9338 #[link_name="switch_rtp_clear_flag"]
9339 pub fn rtp_clear_flag(rtp_session: *mut rtp, flag: rtp_flag);
9340 #[link_name="switch_rtp_get_rtp_socket"]
9341 pub fn rtp_get_rtp_socket(rtp_session: *mut rtp) -> *mut socket;
9342 #[link_name="switch_rtp_ping"]
9343 pub fn rtp_ping(rtp_session: *mut rtp);
9344 #[link_name="switch_rtp_get_default_samples_per_interval"]
9345 pub fn rtp_get_default_samples_per_interval(rtp_session: *mut rtp) -> u32;
9346 #[link_name="switch_rtp_set_default_payload"]
9347 pub fn rtp_set_default_payload(rtp_session: *mut rtp, payload: payload);
9348 #[link_name="switch_rtp_get_default_payload"]
9349 pub fn rtp_get_default_payload(rtp_session: *mut rtp) -> u32;
9350 #[link_name="switch_rtp_set_invalid_handler"]
9351 pub fn rtp_set_invalid_handler(rtp_session: *mut rtp, on_invalid: rtp_invalid_handler);
9352 #[link_name="switch_rtp_read"]
9353 pub fn rtp_read(rtp_session: *mut rtp,
9354 data: *mut c_void,
9355 datalen: *mut u32,
9356 payload_type: *mut payload,
9357 flags: *mut frame_flag,
9358 io_flags: io_flag)
9359 -> status;
9360 #[link_name="switch_rtp_queue_rfc2833"]
9361 pub fn rtp_queue_rfc2833(rtp_session: *mut rtp, dtmf: *const dtmf) -> status;
9362 #[link_name="switch_rtp_queue_rfc2833_in"]
9363 pub fn rtp_queue_rfc2833_in(rtp_session: *mut rtp, dtmf: *const dtmf) -> status;
9364 #[link_name="switch_rtp_has_dtmf"]
9365 pub fn rtp_has_dtmf(rtp_session: *mut rtp) -> usize;
9366 #[link_name="switch_rtp_dequeue_dtmf"]
9367 pub fn rtp_dequeue_dtmf(rtp_session: *mut rtp, dtmf: *mut dtmf) -> usize;
9368 #[link_name="switch_rtp_zerocopy_read"]
9369 pub fn rtp_zerocopy_read(rtp_session: *mut rtp,
9370 data: *mut *mut c_void,
9371 datalen: *mut u32,
9372 payload_type: *mut payload,
9373 flags: *mut frame_flag,
9374 io_flags: io_flag)
9375 -> status;
9376 #[link_name="switch_rtp_zerocopy_read_frame"]
9377 pub fn rtp_zerocopy_read_frame(rtp_session: *mut rtp,
9378 frame: *mut frame,
9379 io_flags: io_flag)
9380 -> status;
9381 #[link_name="switch_rtcp_zerocopy_read_frame"]
9382 pub fn rtcp_zerocopy_read_frame(rtp_session: *mut rtp, frame: *mut rtcp_frame) -> status;
9383 pub fn rtp_flush_read_buffer(rtp_session: *mut rtp, flush: rtp_flush);
9384 #[link_name="switch_rtp_enable_vad"]
9385 pub fn rtp_enable_vad(rtp_session: *mut rtp,
9386 session: *mut core_session,
9387 codec: *mut codec,
9388 flags: vad_flag)
9389 -> status;
9390 #[link_name="switch_rtp_disable_vad"]
9391 pub fn rtp_disable_vad(rtp_session: *mut rtp) -> status;
9392 #[link_name="switch_rtp_write_frame"]
9393 pub fn rtp_write_frame(rtp_session: *mut rtp, frame: *mut frame) -> c_int;
9394 #[link_name="switch_rtp_write_manual"]
9395 pub fn rtp_write_manual(rtp_session: *mut rtp,
9396 data: *mut c_void,
9397 datalen: u32,
9398 m: u8,
9399 payload: payload,
9400 ts: u32,
9401 flags: *mut frame_flag)
9402 -> c_int;
9403 #[link_name="switch_rtp_write_raw"]
9404 pub fn rtp_write_raw(rtp_session: *mut rtp,
9405 data: *mut c_void,
9406 bytes: *mut usize,
9407 process_encryption: switch_bool)
9408 -> status;
9409 #[link_name="switch_rtp_get_ssrc"]
9410 pub fn rtp_get_ssrc(rtp_session: *mut rtp) -> u32;
9411 #[link_name="switch_rtp_set_private"]
9412 pub fn rtp_set_private(rtp_session: *mut rtp, private_data: *mut c_void);
9413 #[link_name="switch_rtp_set_telephony_event"]
9414 pub fn rtp_set_telephony_event(rtp_session: *mut rtp, te: payload);
9415 #[link_name="switch_rtp_set_telephony_recv_event"]
9416 pub fn rtp_set_telephony_recv_event(rtp_session: *mut rtp, te: payload);
9417 #[link_name="switch_rtp_set_cng_pt"]
9418 pub fn rtp_set_cng_pt(rtp_session: *mut rtp, pt: payload);
9419 #[link_name="switch_rtp_get_private"]
9420 pub fn rtp_get_private(rtp_session: *mut rtp) -> *mut c_void;
9421 #[link_name="switch_rtp_set_payload_map"]
9422 pub fn rtp_set_payload_map(rtp_session: *mut rtp, pmap: *mut *mut payload_map) -> status;
9423 #[link_name="switch_rtp_intentional_bugs"]
9424 pub fn rtp_intentional_bugs(rtp_session: *mut rtp, bugs: rtp_bug_flag);
9425 #[link_name="switch_rtp_get_stats"]
9426 pub fn rtp_get_stats(rtp_session: *mut rtp, pool: *mut memory_pool) -> *mut rtp_stats;
9427 #[link_name="switch_rtp_check_auto_adj"]
9428 pub fn rtp_check_auto_adj(rtp_session: *mut rtp) -> u8;
9429 #[link_name="switch_rtp_set_interdigit_delay"]
9430 pub fn rtp_set_interdigit_delay(rtp_session: *mut rtp, delay: u32);
9431 #[link_name="switch_rtp_add_dtls"]
9432 pub fn rtp_add_dtls(rtp_session: *mut rtp,
9433 local_fp: *mut dtls_fingerprint,
9434 remote_fp: *mut dtls_fingerprint,
9435 type_: dtls_type)
9436 -> status;
9437 #[link_name="switch_rtp_del_dtls"]
9438 pub fn rtp_del_dtls(rtp_session: *mut rtp, type_: dtls_type) -> status;
9439 #[link_name="switch_rtp_dtls_state"]
9440 pub fn rtp_dtls_state(rtp_session: *mut rtp, type_: dtls_type) -> dtls_state;
9441 #[link_name="switch_rtp_has_dtls"]
9442 pub fn rtp_has_dtls() -> c_int;
9443 #[link_name="switch_rtp_req_bitrate"]
9444 pub fn rtp_req_bitrate(rtp_session: *mut rtp, bps: u32) -> status;
9445 #[link_name="switch_rtp_ack_bitrate"]
9446 pub fn rtp_ack_bitrate(rtp_session: *mut rtp, bps: u32) -> status;
9447 #[link_name="switch_rtp_video_refresh"]
9448 pub fn rtp_video_refresh(rtp_session: *mut rtp);
9449 #[link_name="switch_rtp_video_loss"]
9450 pub fn rtp_video_loss(rtp_session: *mut rtp);
9451 #[link_name="switch_xml_parse_str_dynamic"]
9452 pub fn xml_parse_str_dynamic(s: *mut c_char, dup: switch_bool) -> xml_t;
9453 #[link_name="switch_xml_parse_str"]
9454 pub fn xml_parse_str(s: *mut c_char, len: usize) -> xml_t;
9455 #[link_name="switch_xml_parse_fd"]
9456 pub fn xml_parse_fd(fd: c_int) -> xml_t;
9457 #[link_name="switch_xml_parse_file"]
9458 pub fn xml_parse_file(file: *const c_char) -> xml_t;
9459 #[link_name="switch_xml_parse_file_simple"]
9460 pub fn xml_parse_file_simple(file: *const c_char) -> xml_t;
9461 #[link_name="switch_xml_parse_fp"]
9462 pub fn xml_parse_fp(fp: *mut FILE) -> xml_t;
9463 #[link_name="switch_xml_child"]
9464 pub fn xml_child(xml: xml_t, name: *const c_char) -> xml_t;
9465 #[link_name="switch_xml_find_child"]
9466 pub fn xml_find_child(node: xml_t,
9467 childname: *const c_char,
9468 attrname: *const c_char,
9469 value: *const c_char)
9470 -> xml_t;
9471 #[link_name="switch_xml_find_child_multi"]
9472 pub fn xml_find_child_multi(node: xml_t, childname: *const c_char, ...) -> xml_t;
9473 #[link_name="switch_xml_idx"]
9474 pub fn xml_idx(xml: xml_t, idx: c_int) -> xml_t;
9475 #[link_name="switch_xml_attr"]
9476 pub fn xml_attr(xml: xml_t, attr: *const c_char) -> *const c_char;
9477 #[link_name="switch_xml_attr_soft"]
9478 pub fn xml_attr_soft(xml: xml_t, attr: *const c_char) -> *const c_char;
9479 #[link_name="switch_xml_get"]
9480 pub fn xml_get(xml: xml_t, ...) -> xml_t;
9481 #[link_name="switch_xml_toxml"]
9482 pub fn xml_toxml(xml: xml_t, prn_header: switch_bool) -> *mut c_char;
9483 #[link_name="switch_xml_toxml_nolock"]
9484 pub fn xml_toxml_nolock(xml: xml_t, prn_header: switch_bool) -> *mut c_char;
9485 #[link_name="switch_xml_tohtml"]
9486 pub fn xml_tohtml(xml: xml_t, prn_header: switch_bool) -> *mut c_char;
9487 #[link_name="switch_xml_toxml_buf"]
9488 pub fn xml_toxml_buf(xml: xml_t,
9489 buf: *mut c_char,
9490 buflen: usize,
9491 offset: usize,
9492 prn_header: switch_bool)
9493 -> *mut c_char;
9494 #[link_name="switch_xml_pi"]
9495 pub fn xml_pi(xml: xml_t, target: *const c_char) -> *mut *const c_char;
9496 #[link_name="switch_xml_free"]
9497 pub fn xml_free(xml: xml_t);
9498 #[link_name="switch_xml_free_in_thread"]
9499 pub fn xml_free_in_thread(xml: xml_t, stacksize: c_int);
9500 #[link_name="switch_xml_error"]
9501 pub fn xml_error(xml: xml_t) -> *const c_char;
9502 #[link_name="switch_xml_new"]
9503 pub fn xml_new(name: *const c_char) -> xml_t;
9504 #[link_name="switch_xml_add_child"]
9505 pub fn xml_add_child(xml: xml_t, name: *const c_char, off: usize) -> xml_t;
9506 #[link_name="switch_xml_set_txt"]
9507 pub fn xml_set_txt(xml: xml_t, txt: *const c_char) -> xml_t;
9508 #[link_name="switch_xml_set_attr"]
9509 pub fn xml_set_attr(xml: xml_t, name: *const c_char, value: *const c_char) -> xml_t;
9510 #[link_name="switch_xml_set_flag"]
9511 pub fn xml_set_flag(xml: xml_t, flag: xml_flag) -> xml_t;
9512 #[link_name="switch_xml_cut"]
9513 pub fn xml_cut(xml: xml_t) -> xml_t;
9514 #[link_name="switch_xml_insert"]
9515 pub fn xml_insert(xml: xml_t, dest: xml_t, off: usize) -> xml_t;
9516 #[link_name="switch_xml_set_root"]
9517 pub fn xml_set_root(new_main: xml_t) -> status;
9518 #[link_name="switch_xml_set_open_root_function"]
9519 pub fn xml_set_open_root_function(func: xml_open_root_function,
9520 user_data: *mut c_void)
9521 -> status;
9522 #[link_name="switch_xml_open_root"]
9523 pub fn xml_open_root(reload: u8, err: *mut *const c_char) -> xml_t;
9524 #[link_name="switch_xml_init"]
9525 pub fn xml_init(pool: *mut memory_pool, err: *mut *const c_char) -> status;
9526 #[link_name="switch_xml_reload"]
9527 pub fn xml_reload(err: *mut *const c_char) -> status;
9528 #[link_name="switch_xml_destroy"]
9529 pub fn xml_destroy() -> status;
9530 #[link_name="switch_xml_root"]
9531 pub fn xml_root() -> xml_t;
9532 #[link_name="switch_xml_locate"]
9533 pub fn xml_locate(section: *const c_char,
9534 tag_name: *const c_char,
9535 key_name: *const c_char,
9536 key_value: *const c_char,
9537 root: *mut xml_t,
9538 node: *mut xml_t,
9539 params: *mut event,
9540 clone: switch_bool)
9541 -> status;
9542 #[link_name="switch_xml_locate_domain"]
9543 pub fn xml_locate_domain(domain_name: *const c_char,
9544 params: *mut event,
9545 root: *mut xml_t,
9546 domain: *mut xml_t)
9547 -> status;
9548 #[link_name="switch_xml_locate_group"]
9549 pub fn xml_locate_group(group_name: *const c_char,
9550 domain_name: *const c_char,
9551 root: *mut xml_t,
9552 domain: *mut xml_t,
9553 group: *mut xml_t,
9554 params: *mut event)
9555 -> status;
9556 #[link_name="switch_xml_locate_user"]
9557 pub fn xml_locate_user(key: *const c_char,
9558 user_name: *const c_char,
9559 domain_name: *const c_char,
9560 ip: *const c_char,
9561 root: *mut xml_t,
9562 domain: *mut xml_t,
9563 user: *mut xml_t,
9564 ingroup: *mut xml_t,
9565 params: *mut event)
9566 -> status;
9567 #[link_name="switch_xml_locate_user_in_domain"]
9568 pub fn xml_locate_user_in_domain(user_name: *const c_char,
9569 domain: xml_t,
9570 user: *mut xml_t,
9571 ingroup: *mut xml_t)
9572 -> status;
9573 #[link_name="switch_xml_locate_user_merged"]
9574 pub fn xml_locate_user_merged(key: *const c_char,
9575 user_name: *const c_char,
9576 domain_name: *const c_char,
9577 ip: *const c_char,
9578 user: *mut xml_t,
9579 params: *mut event)
9580 -> status;
9581 #[link_name="switch_xml_clear_user_cache"]
9582 pub fn xml_clear_user_cache(key: *const c_char,
9583 user_name: *const c_char,
9584 domain_name: *const c_char)
9585 -> u32;
9586 #[link_name="switch_xml_merge_user"]
9587 pub fn xml_merge_user(user: xml_t, domain: xml_t, group: xml_t);
9588 #[link_name="switch_xml_dup"]
9589 pub fn xml_dup(xml: xml_t) -> xml_t;
9590 #[link_name="switch_xml_open_cfg"]
9591 pub fn xml_open_cfg(file_path: *const c_char, node: *mut xml_t, params: *mut event) -> xml_t;
9592 #[link_name="switch_xml_set_binding_sections"]
9593 pub fn xml_set_binding_sections(binding: *mut xml_binding, sections: xml_section);
9594 #[link_name="switch_xml_set_binding_user_data"]
9595 pub fn xml_set_binding_user_data(binding: *mut xml_binding, user_data: *mut c_void);
9596 #[link_name="switch_xml_get_binding_sections"]
9597 pub fn xml_get_binding_sections(binding: *mut xml_binding) -> xml_section;
9598 #[link_name="switch_xml_get_binding_user_data"]
9599 pub fn xml_get_binding_user_data(binding: *mut xml_binding) -> *mut c_void;
9600 #[link_name="switch_xml_bind_search_function_ret"]
9601 pub fn xml_bind_search_function_ret(function: xml_search_function,
9602 sections: xml_section,
9603 user_data: *mut c_void,
9604 ret_binding: *mut *mut xml_binding)
9605 -> status;
9606 #[link_name="switch_xml_unbind_search_function"]
9607 pub fn xml_unbind_search_function(binding: *mut *mut xml_binding) -> status;
9608 #[link_name="switch_xml_unbind_search_function_ptr"]
9609 pub fn xml_unbind_search_function_ptr(function: xml_search_function) -> status;
9610 #[link_name="switch_xml_parse_section_string"]
9611 pub fn xml_parse_section_string(str: *const c_char) -> xml_section;
9612 #[link_name="switch_xml_std_datetime_check"]
9613 pub fn xml_std_datetime_check(xcond: xml_t,
9614 offset: *mut c_int,
9615 tzname: *const c_char)
9616 -> c_int;
9617 #[link_name="switch_xml_locate_language"]
9618 pub fn xml_locate_language(root: *mut xml_t,
9619 node: *mut xml_t,
9620 params: *mut event,
9621 language: *mut xml_t,
9622 phrases: *mut xml_t,
9623 macros: *mut xml_t,
9624 str_language: *const c_char)
9625 -> status;
9626 #[link_name="switch_config_perform_set_item"]
9627 pub fn config_perform_set_item(item: *mut xml_config_item,
9628 key: *const c_char,
9629 type_: xml_config_type,
9630 flags: c_int,
9631 ptr: *mut c_void,
9632 defaultvalue: *const c_void,
9633 data: *mut c_void,
9634 function: xml_config_callback,
9635 syntax: *const c_char,
9636 helptext: *const c_char);
9637 #[link_name="switch_xml_config_enum_str2int"]
9638 pub fn xml_config_enum_str2int(enum_options: *mut xml_config_enum_item,
9639 value: *const c_char,
9640 out: *mut c_int)
9641 -> status;
9642 #[link_name="switch_xml_config_enum_int2str"]
9643 pub fn xml_config_enum_int2str(enum_options: *mut xml_config_enum_item,
9644 value: c_int)
9645 -> *const c_char;
9646 #[link_name="switch_xml_config_item_print_doc"]
9647 pub fn xml_config_item_print_doc(level: c_int, item: *mut xml_config_item);
9648 #[link_name="switch_xml_config_parse"]
9649 pub fn xml_config_parse(xml: xml_t,
9650 reload: switch_bool,
9651 instructions: *mut xml_config_item)
9652 -> status;
9653 #[link_name="switch_xml_config_parse_module_settings"]
9654 pub fn xml_config_parse_module_settings(file: *const c_char,
9655 reload: switch_bool,
9656 instructions: *mut xml_config_item)
9657 -> status;
9658 #[link_name="switch_xml_config_parse_event"]
9659 pub fn xml_config_parse_event(event: *mut event,
9660 count: c_int,
9661 reload: switch_bool,
9662 instructions: *mut xml_config_item)
9663 -> status;
9664 #[link_name="switch_event_import_xml"]
9665 pub fn event_import_xml(xml: xml_t,
9666 keyname: *const c_char,
9667 valuename: *const c_char,
9668 event: *mut *mut event)
9669 -> usize;
9670 #[link_name="switch_xml_config_cleanup"]
9671 pub fn xml_config_cleanup(instructions: *mut xml_config_item);
9672 #[link_name="switch_core_session_get_event_hooks"]
9673 pub fn core_session_get_event_hooks(session: *mut core_session) -> io_event_hooks;
9674 #[link_name="switch_core_event_hook_add_outgoing_channel"]
9675 pub fn core_event_hook_add_outgoing_channel(session: *mut core_session,
9676 outgoing_channel: outgoing_channel_hook)
9677 -> status;
9678 #[link_name="switch_core_event_hook_add_receive_message"]
9679 pub fn core_event_hook_add_receive_message(session: *mut core_session,
9680 receive_message: receive_message_hook)
9681 -> status;
9682 #[link_name="switch_core_event_hook_add_receive_event"]
9683 pub fn core_event_hook_add_receive_event(session: *mut core_session,
9684 receive_event: receive_event_hook)
9685 -> status;
9686 #[link_name="switch_core_event_hook_add_state_change"]
9687 pub fn core_event_hook_add_state_change(session: *mut core_session,
9688 state_change: state_change_hook)
9689 -> status;
9690 #[link_name="switch_core_event_hook_add_state_run"]
9691 pub fn core_event_hook_add_state_run(session: *mut core_session,
9692 state_run: state_run_hook)
9693 -> status;
9694 #[link_name="switch_core_event_hook_add_read_frame"]
9695 pub fn core_event_hook_add_read_frame(session: *mut core_session,
9696 read_frame: read_frame_hook)
9697 -> status;
9698 #[link_name="switch_core_event_hook_add_write_frame"]
9699 pub fn core_event_hook_add_write_frame(session: *mut core_session,
9700 write_frame: write_frame_hook)
9701 -> status;
9702 #[link_name="switch_core_event_hook_add_video_read_frame"]
9703 pub fn core_event_hook_add_video_read_frame(session: *mut core_session,
9704 video_read_frame: video_read_frame_hook)
9705 -> status;
9706 #[link_name="switch_core_event_hook_add_video_write_frame"]
9707 pub fn core_event_hook_add_video_write_frame(session: *mut core_session,
9708 video_write_frame: video_write_frame_hook)
9709 -> status;
9710 #[link_name="switch_core_event_hook_add_kill_channel"]
9711 pub fn core_event_hook_add_kill_channel(session: *mut core_session,
9712 kill_channel: kill_channel_hook)
9713 -> status;
9714 #[link_name="switch_core_event_hook_add_send_dtmf"]
9715 pub fn core_event_hook_add_send_dtmf(session: *mut core_session,
9716 send_dtmf: send_dtmf_hook)
9717 -> status;
9718 #[link_name="switch_core_event_hook_add_recv_dtmf"]
9719 pub fn core_event_hook_add_recv_dtmf(session: *mut core_session,
9720 recv_dtmf: recv_dtmf_hook)
9721 -> status;
9722 #[link_name="switch_core_event_hook_remove_outgoing_channel"]
9723 pub fn core_event_hook_remove_outgoing_channel(session: *mut core_session,
9724 outgoing_channel: outgoing_channel_hook)
9725 -> status;
9726 #[link_name="switch_core_event_hook_remove_receive_message"]
9727 pub fn core_event_hook_remove_receive_message(session: *mut core_session,
9728 receive_message: receive_message_hook)
9729 -> status;
9730 #[link_name="switch_core_event_hook_remove_receive_event"]
9731 pub fn core_event_hook_remove_receive_event(session: *mut core_session,
9732 receive_event: receive_event_hook)
9733 -> status;
9734 #[link_name="switch_core_event_hook_remove_state_change"]
9735 pub fn core_event_hook_remove_state_change(session: *mut core_session,
9736 state_change: state_change_hook)
9737 -> status;
9738 #[link_name="switch_core_event_hook_remove_state_run"]
9739 pub fn core_event_hook_remove_state_run(session: *mut core_session,
9740 state_run: state_run_hook)
9741 -> status;
9742 #[link_name="switch_core_event_hook_remove_read_frame"]
9743 pub fn core_event_hook_remove_read_frame(session: *mut core_session,
9744 read_frame: read_frame_hook)
9745 -> status;
9746 #[link_name="switch_core_event_hook_remove_write_frame"]
9747 pub fn core_event_hook_remove_write_frame(session: *mut core_session,
9748 write_frame: write_frame_hook)
9749 -> status;
9750 #[link_name="switch_core_event_hook_remove_video_read_frame"]
9751 pub fn core_event_hook_remove_video_read_frame(session: *mut core_session,
9752 video_read_frame: video_read_frame_hook)
9753 -> status;
9754 #[link_name="switch_core_event_hook_remove_video_write_frame"]
9755 pub fn core_event_hook_remove_video_write_frame(session: *mut core_session,
9756 video_write_frame: video_write_frame_hook)
9757 -> status;
9758 #[link_name="switch_core_event_hook_remove_kill_channel"]
9759 pub fn core_event_hook_remove_kill_channel(session: *mut core_session,
9760 kill_channel: kill_channel_hook)
9761 -> status;
9762 #[link_name="switch_core_event_hook_remove_send_dtmf"]
9763 pub fn core_event_hook_remove_send_dtmf(session: *mut core_session,
9764 send_dtmf: send_dtmf_hook)
9765 -> status;
9766 #[link_name="switch_core_event_hook_remove_recv_dtmf"]
9767 pub fn core_event_hook_remove_recv_dtmf(session: *mut core_session,
9768 recv_dtmf: recv_dtmf_hook)
9769 -> status;
9770 #[link_name="switch_scheduler_add_task"]
9771 pub fn scheduler_add_task(task_runtime: time_t,
9772 func: scheduler_func,
9773 desc: *const c_char,
9774 group: *const c_char,
9775 cmd_id: u32,
9776 cmd_arg: *mut c_void,
9777 flags: scheduler_flag)
9778 -> u32;
9779 #[link_name="switch_scheduler_del_task_id"]
9780 pub fn scheduler_del_task_id(task_id: u32) -> u32;
9781 #[link_name="switch_scheduler_del_task_group"]
9782 pub fn scheduler_del_task_group(group: *const c_char) -> u32;
9783 #[link_name="switch_scheduler_task_thread_start"]
9784 pub fn scheduler_task_thread_start();
9785 #[link_name="switch_scheduler_task_thread_stop"]
9786 pub fn scheduler_task_thread_stop();
9787 #[link_name="switch_config_open_file"]
9788 pub fn config_open_file(cfg: *mut config, file_path: *mut c_char) -> c_int;
9789 #[link_name="switch_config_close_file"]
9790 pub fn config_close_file(cfg: *mut config);
9791 #[link_name="switch_config_next_pair"]
9792 pub fn config_next_pair(cfg: *mut config,
9793 var: *mut *mut c_char,
9794 val: *mut *mut c_char)
9795 -> c_int;
9796 #[link_name="switch_nat_get_type"]
9797 pub fn nat_get_type() -> *const c_char;
9798 #[link_name="switch_nat_init"]
9799 pub fn nat_init(pool: *mut memory_pool, mapping: switch_bool);
9800 #[link_name="switch_nat_late_init"]
9801 pub fn nat_late_init();
9802 #[link_name="switch_nat_shutdown"]
9803 pub fn nat_shutdown();
9804 #[link_name="switch_nat_status"]
9805 pub fn nat_status() -> *mut c_char;
9806 #[link_name="switch_nat_republish"]
9807 pub fn nat_republish();
9808 #[link_name="switch_nat_reinit"]
9809 pub fn nat_reinit();
9810 #[link_name="switch_nat_set_mapping"]
9811 pub fn nat_set_mapping(mapping: switch_bool);
9812 #[link_name="switch_nat_add_mapping"]
9813 pub fn nat_add_mapping(port: port,
9814 proto: nat_ip_proto,
9815 external_port: *mut port,
9816 sticky: switch_bool)
9817 -> status;
9818 #[link_name="switch_nat_is_initialized"]
9819 pub fn nat_is_initialized() -> switch_bool;
9820 #[link_name="switch_nat_del_mapping"]
9821 pub fn nat_del_mapping(port: port, proto: nat_ip_proto) -> status;
9822 #[link_name="switch_odbc_handle_new"]
9823 pub fn odbc_handle_new(dsn: *const c_char,
9824 username: *const c_char,
9825 password: *const c_char)
9826 -> *mut odbc_handle;
9827 #[link_name="switch_odbc_set_num_retries"]
9828 pub fn odbc_set_num_retries(handle: *mut odbc_handle, num_retries: c_int);
9829 #[link_name="switch_odbc_handle_disconnect"]
9830 pub fn odbc_handle_disconnect(handle: *mut odbc_handle) -> odbc_status;
9831 #[link_name="switch_odbc_handle_connect"]
9832 pub fn odbc_handle_connect(handle: *mut odbc_handle) -> odbc_status;
9833 #[link_name="switch_odbc_handle_destroy"]
9834 pub fn odbc_handle_destroy(handlep: *mut *mut odbc_handle);
9835 #[link_name="switch_odbc_handle_get_state"]
9836 pub fn odbc_handle_get_state(handle: *mut odbc_handle) -> odbc_state;
9837 #[link_name="switch_odbc_handle_exec"]
9838 pub fn odbc_handle_exec(handle: *mut odbc_handle,
9839 sql: *const c_char,
9840 rstmt: *mut odbc_statement_handle,
9841 err: *mut *mut c_char)
9842 -> odbc_status;
9843 #[link_name="switch_odbc_handle_exec_string"]
9844 pub fn odbc_handle_exec_string(handle: *mut odbc_handle,
9845 sql: *const c_char,
9846 resbuf: *mut c_char,
9847 len: usize,
9848 err: *mut *mut c_char)
9849 -> odbc_status;
9850 #[link_name="switch_odbc_available"]
9851 pub fn odbc_available() -> switch_bool;
9852 #[link_name="switch_odbc_SQLSetAutoCommitAttr"]
9853 pub fn odbc_SQLSetAutoCommitAttr(handle: *mut odbc_handle, on: switch_bool) -> odbc_status;
9854 #[link_name="switch_odbc_SQLEndTran"]
9855 pub fn odbc_SQLEndTran(handle: *mut odbc_handle, commit: switch_bool) -> odbc_status;
9856 #[link_name="switch_odbc_statement_handle_free"]
9857 pub fn odbc_statement_handle_free(stmt: *mut odbc_statement_handle) -> odbc_status;
9858 #[link_name="switch_odbc_handle_callback_exec_detailed"]
9859 pub fn odbc_handle_callback_exec_detailed(file: *const c_char,
9860 func: *const c_char,
9861 line: c_int,
9862 handle: *mut odbc_handle,
9863 sql: *const c_char,
9864 callback: core_db_callback_func,
9865 pdata: *mut c_void,
9866 err: *mut *mut c_char)
9867 -> odbc_status;
9868 #[link_name="switch_odbc_handle_get_error"]
9869 pub fn odbc_handle_get_error(handle: *mut odbc_handle,
9870 stmt: odbc_statement_handle)
9871 -> *mut c_char;
9872 #[link_name="switch_odbc_handle_affected_rows"]
9873 pub fn odbc_handle_affected_rows(handle: *mut odbc_handle) -> c_int;
9874 #[link_name="switch_pgsql_handle_new"]
9875 pub fn pgsql_handle_new(dsn: *const c_char) -> *mut pgsql_handle;
9876 #[link_name="switch_pgsql_set_num_retries"]
9877 pub fn pgsql_set_num_retries(handle: *mut pgsql_handle, num_retries: c_int);
9878 #[link_name="switch_pgsql_handle_disconnect"]
9879 pub fn pgsql_handle_disconnect(handle: *mut pgsql_handle) -> pgsql_status;
9880 #[link_name="switch_pgsql_handle_connect"]
9881 pub fn pgsql_handle_connect(handle: *mut pgsql_handle) -> pgsql_status;
9882 #[link_name="switch_pgsql_handle_destroy"]
9883 pub fn pgsql_handle_destroy(handlep: *mut *mut pgsql_handle);
9884 #[link_name="switch_pgsql_send_query"]
9885 pub fn pgsql_send_query(handle: *mut pgsql_handle, sql: *const c_char) -> pgsql_status;
9886 #[link_name="switch_pgsql_cancel_real"]
9887 pub fn pgsql_cancel_real(file: *const c_char,
9888 func: *const c_char,
9889 line: c_int,
9890 handle: *mut pgsql_handle)
9891 -> pgsql_status;
9892 #[link_name="switch_pgsql_next_result_timed"]
9893 pub fn pgsql_next_result_timed(handle: *mut pgsql_handle,
9894 result_out: *mut *mut pgsql_result,
9895 seconds: c_int)
9896 -> pgsql_status;
9897 #[link_name="switch_pgsql_free_result"]
9898 pub fn pgsql_free_result(result: *mut *mut pgsql_result);
9899 #[link_name="switch_pgsql_finish_results_real"]
9900 pub fn pgsql_finish_results_real(file: *const c_char,
9901 func: *const c_char,
9902 line: c_int,
9903 handle: *mut pgsql_handle)
9904 -> pgsql_status;
9905 #[link_name="switch_pgsql_handle_exec_base_detailed"]
9906 pub fn pgsql_handle_exec_base_detailed(file: *const c_char,
9907 func: *const c_char,
9908 line: c_int,
9909 handle: *mut pgsql_handle,
9910 sql: *const c_char,
9911 err: *mut *mut c_char)
9912 -> pgsql_status;
9913 #[link_name="switch_pgsql_handle_get_state"]
9914 pub fn pgsql_handle_get_state(handle: *mut pgsql_handle) -> pgsql_state;
9915 #[link_name="switch_pgsql_handle_exec_detailed"]
9916 pub fn pgsql_handle_exec_detailed(file: *const c_char,
9917 func: *const c_char,
9918 line: c_int,
9919 handle: *mut pgsql_handle,
9920 sql: *const c_char,
9921 err: *mut *mut c_char)
9922 -> pgsql_status;
9923 #[link_name="switch_pgsql_handle_exec_string_detailed"]
9924 pub fn pgsql_handle_exec_string_detailed(file: *const c_char,
9925 func: *const c_char,
9926 line: c_int,
9927 handle: *mut pgsql_handle,
9928 sql: *const c_char,
9929 resbuf: *mut c_char,
9930 len: usize,
9931 err: *mut *mut c_char)
9932 -> pgsql_status;
9933 #[link_name="switch_pgsql_available"]
9934 pub fn pgsql_available() -> switch_bool;
9935 #[link_name="switch_pgsql_SQLSetAutoCommitAttr"]
9936 pub fn pgsql_SQLSetAutoCommitAttr(handle: *mut pgsql_handle, on: switch_bool) -> pgsql_status;
9937 #[link_name="switch_pgsql_SQLEndTran"]
9938 pub fn pgsql_SQLEndTran(handle: *mut pgsql_handle, commit: switch_bool) -> pgsql_status;
9939 #[link_name="switch_pgsql_handle_callback_exec_detailed"]
9940 pub fn pgsql_handle_callback_exec_detailed(file: *const c_char,
9941 func: *const c_char,
9942 line: c_int,
9943 handle: *mut pgsql_handle,
9944 sql: *const c_char,
9945 callback: core_db_callback_func,
9946 pdata: *mut c_void,
9947 err: *mut *mut c_char)
9948 -> pgsql_status;
9949 #[link_name="switch_pgsql_handle_get_error"]
9950 pub fn pgsql_handle_get_error(handle: *mut pgsql_handle) -> *mut c_char;
9951 #[link_name="switch_pgsql_handle_affected_rows"]
9952 pub fn pgsql_handle_affected_rows(handle: *mut pgsql_handle) -> c_int;
9953 #[link_name="switch_pgsql_flush"]
9954 pub fn pgsql_flush(handle: *mut pgsql_handle) -> pgsql_status;
9955 #[link_name="switch_limit_init"]
9956 pub fn limit_init(pool: *mut memory_pool);
9957 #[link_name="switch_limit_incr"]
9958 pub fn limit_incr(backend: *const c_char,
9959 session: *mut core_session,
9960 realm: *const c_char,
9961 resource: *const c_char,
9962 max: c_int,
9963 interval: c_int)
9964 -> status;
9965 #[link_name="switch_limit_release"]
9966 pub fn limit_release(backend: *const c_char,
9967 session: *mut core_session,
9968 realm: *const c_char,
9969 resource: *const c_char)
9970 -> status;
9971 #[link_name="switch_limit_usage"]
9972 pub fn limit_usage(backend: *const c_char,
9973 realm: *const c_char,
9974 resource: *const c_char,
9975 rcount: *mut u32)
9976 -> c_int;
9977 #[link_name="switch_limit_interval_reset"]
9978 pub fn limit_interval_reset(backend: *const c_char,
9979 realm: *const c_char,
9980 resource: *const c_char)
9981 -> status;
9982 #[link_name="switch_limit_reset"]
9983 pub fn limit_reset(backend: *const c_char) -> status;
9984 #[link_name="switch_limit_fire_event"]
9985 pub fn limit_fire_event(backend: *const c_char,
9986 realm: *const c_char,
9987 resource: *const c_char,
9988 usage: u32,
9989 rate: u32,
9990 max: u32,
9991 ratemax: u32);
9992 #[link_name="switch_limit_status"]
9993 pub fn limit_status(backend: *const c_char) -> *mut c_char;
9994 #[link_name="switch_media_handle_create"]
9995 pub fn media_handle_create(smhp: *mut *mut media_handle,
9996 session: *mut core_session,
9997 params: *mut core_media_params)
9998 -> status;
9999 #[link_name="switch_media_handle_destroy"]
10000 pub fn media_handle_destroy(session: *mut core_session);
10001 #[link_name="switch_core_session_get_media_handle"]
10002 pub fn core_session_get_media_handle(session: *mut core_session) -> *mut media_handle;
10003 #[link_name="switch_core_session_clear_media_handle"]
10004 pub fn core_session_clear_media_handle(session: *mut core_session) -> status;
10005 #[link_name="switch_core_session_media_handle_ready"]
10006 pub fn core_session_media_handle_ready(session: *mut core_session) -> status;
10007 #[link_name="switch_media_handle_set_media_flag"]
10008 pub fn media_handle_set_media_flag(smh: *mut media_handle, flag: core_media_flag);
10009 #[link_name="switch_media_handle_clear_media_flag"]
10010 pub fn media_handle_clear_media_flag(smh: *mut media_handle, flag: core_media_flag);
10011 #[link_name="switch_media_handle_test_media_flag"]
10012 pub fn media_handle_test_media_flag(smh: *mut media_handle, flag: core_media_flag) -> i32;
10013 #[link_name="switch_media_handle_set_media_flags"]
10014 pub fn media_handle_set_media_flags(smh: *mut media_handle, flags: *mut core_media_flag);
10015 #[link_name="switch_core_session_check_outgoing_crypto"]
10016 pub fn core_session_check_outgoing_crypto(session: *mut core_session);
10017 #[link_name="switch_core_session_local_crypto_key"]
10018 pub fn core_session_local_crypto_key(session: *mut core_session,
10019 type_: media_type)
10020 -> *const c_char;
10021 #[link_name="switch_core_session_check_incoming_crypto"]
10022 pub fn core_session_check_incoming_crypto(session: *mut core_session,
10023 varname: *const c_char,
10024 type_: media_type,
10025 crypto: *const c_char,
10026 crypto_tag: c_int,
10027 sdp_type: sdp_type)
10028 -> c_int;
10029 #[link_name="switch_core_media_get_video_fps"]
10030 pub fn core_media_get_video_fps(session: *mut core_session) -> u32;
10031 #[link_name="switch_core_media_set_rtp_session"]
10032 pub fn core_media_set_rtp_session(session: *mut core_session,
10033 type_: media_type,
10034 rtp_session: *mut rtp);
10035 #[link_name="switch_core_media_get_codec_string"]
10036 pub fn core_media_get_codec_string(session: *mut core_session) -> *const c_char;
10037 #[link_name="switch_core_media_parse_rtp_bugs"]
10038 pub fn core_media_parse_rtp_bugs(flag_pole: *mut rtp_bug_flag, str: *const c_char);
10039 #[link_name="switch_core_media_extract_t38_options"]
10040 pub fn core_media_extract_t38_options(session: *mut core_session,
10041 r_sdp: *const c_char)
10042 -> *mut t38_options;
10043 #[link_name="switch_core_media_pass_zrtp_hash"]
10044 pub fn core_media_pass_zrtp_hash(session: *mut core_session);
10045 #[link_name="switch_core_media_get_zrtp_hash"]
10046 pub fn core_media_get_zrtp_hash(session: *mut core_session,
10047 type_: media_type,
10048 local: switch_bool)
10049 -> *const c_char;
10050 #[link_name="switch_core_media_pass_zrtp_hash2"]
10051 pub fn core_media_pass_zrtp_hash2(aleg_session: *mut core_session,
10052 bleg_session: *mut core_session);
10053 #[link_name="switch_core_media_toggle_hold"]
10054 pub fn core_media_toggle_hold(session: *mut core_session, sendonly: c_int) -> c_int;
10055 #[link_name="switch_core_media_copy_t38_options"]
10056 pub fn core_media_copy_t38_options(t38_options: *mut t38_options, session: *mut core_session);
10057 #[link_name="switch_core_media_negotiate_sdp"]
10058 pub fn core_media_negotiate_sdp(session: *mut core_session,
10059 r_sdp: *const c_char,
10060 proceed: *mut u8,
10061 sdp_type: sdp_type)
10062 -> u8;
10063 #[link_name="switch_core_media_set_video_codec"]
10064 pub fn core_media_set_video_codec(session: *mut core_session, force: c_int) -> status;
10065 #[link_name="switch_core_media_set_codec"]
10066 pub fn core_media_set_codec(session: *mut core_session,
10067 force: c_int,
10068 codec_flags: u32)
10069 -> status;
10070 #[link_name="switch_core_media_check_video_codecs"]
10071 pub fn core_media_check_video_codecs(session: *mut core_session);
10072 #[link_name="switch_core_media_read_frame"]
10073 pub fn core_media_read_frame(session: *mut core_session,
10074 frame: *mut *mut frame,
10075 flags: io_flag,
10076 stream_id: c_int,
10077 type_: media_type)
10078 -> status;
10079 #[link_name="switch_core_media_write_frame"]
10080 pub fn core_media_write_frame(session: *mut core_session,
10081 frame: *mut frame,
10082 flags: io_flag,
10083 stream_id: c_int,
10084 type_: media_type)
10085 -> status;
10086 #[link_name="switch_core_media_check_nat"]
10087 pub fn core_media_check_nat(smh: *mut media_handle, network_ip: *const c_char) -> c_int;
10088 #[link_name="switch_core_media_choose_port"]
10089 pub fn core_media_choose_port(session: *mut core_session,
10090 type_: media_type,
10091 force: c_int)
10092 -> status;
10093 #[link_name="switch_core_media_choose_ports"]
10094 pub fn core_media_choose_ports(session: *mut core_session,
10095 audio: switch_bool,
10096 video: switch_bool)
10097 -> status;
10098 #[link_name="switch_core_media_check_dtmf_type"]
10099 pub fn core_media_check_dtmf_type(session: *mut core_session);
10100 #[link_name="switch_core_media_absorb_sdp"]
10101 pub fn core_media_absorb_sdp(session: *mut core_session);
10102 #[link_name="switch_core_media_proxy_remote_addr"]
10103 pub fn core_media_proxy_remote_addr(session: *mut core_session,
10104 sdp_str: *const c_char)
10105 -> status;
10106 #[link_name="switch_core_media_deactivate_rtp"]
10107 pub fn core_media_deactivate_rtp(session: *mut core_session);
10108 #[link_name="switch_core_media_activate_rtp"]
10109 pub fn core_media_activate_rtp(session: *mut core_session) -> status;
10110 #[link_name="switch_core_media_ext_address_lookup"]
10111 pub fn core_media_ext_address_lookup(session: *mut core_session,
10112 ip: *mut *mut c_char,
10113 port: *mut port,
10114 sourceip: *const c_char)
10115 -> status;
10116 #[link_name="switch_core_media_process_t38_passthru"]
10117 pub fn core_media_process_t38_passthru(session: *mut core_session,
10118 other_session: *mut core_session,
10119 t38_options: *mut t38_options)
10120 -> status;
10121 #[link_name="switch_core_media_gen_local_sdp"]
10122 pub fn core_media_gen_local_sdp(session: *mut core_session,
10123 sdp_type: sdp_type,
10124 ip: *const c_char,
10125 port: port,
10126 sr: *const c_char,
10127 force: c_int);
10128 #[link_name="switch_core_media_set_local_sdp"]
10129 pub fn core_media_set_local_sdp(session: *mut core_session,
10130 sdp_str: *const c_char,
10131 dup: switch_bool);
10132 #[link_name="switch_core_media_patch_sdp"]
10133 pub fn core_media_patch_sdp(session: *mut core_session);
10134 #[link_name="switch_core_media_set_udptl_image_sdp"]
10135 pub fn core_media_set_udptl_image_sdp(session: *mut core_session,
10136 t38_options: *mut t38_options,
10137 insist: c_int);
10138 #[link_name="switch_core_media_get_mparams"]
10139 pub fn core_media_get_mparams(smh: *mut media_handle) -> *mut core_media_params;
10140 #[link_name="switch_core_media_prepare_codecs"]
10141 pub fn core_media_prepare_codecs(session: *mut core_session, force: switch_bool);
10142 #[link_name="switch_core_media_start_udptl"]
10143 pub fn core_media_start_udptl(session: *mut core_session, t38_options: *mut t38_options);
10144 #[link_name="switch_core_media_hard_mute"]
10145 pub fn core_media_hard_mute(session: *mut core_session, on: switch_bool);
10146 #[link_name="switch_core_media_receive_message"]
10147 pub fn core_media_receive_message(session: *mut core_session,
10148 msg: *mut core_session_message)
10149 -> status;
10150 #[link_name="switch_core_media_break"]
10151 pub fn core_media_break(session: *mut core_session, type_: media_type);
10152 #[link_name="switch_core_media_kill_socket"]
10153 pub fn core_media_kill_socket(session: *mut core_session, type_: media_type);
10154 #[link_name="switch_core_media_queue_rfc2833"]
10155 pub fn core_media_queue_rfc2833(session: *mut core_session,
10156 type_: media_type,
10157 dtmf: *const dtmf)
10158 -> status;
10159 #[link_name="switch_core_media_queue_rfc2833_in"]
10160 pub fn core_media_queue_rfc2833_in(session: *mut core_session,
10161 type_: media_type,
10162 dtmf: *const dtmf)
10163 -> status;
10164 #[link_name="switch_core_media_ready"]
10165 pub fn core_media_ready(session: *mut core_session, type_: media_type) -> u8;
10166 #[link_name="switch_core_media_set_telephony_event"]
10167 pub fn core_media_set_telephony_event(session: *mut core_session,
10168 type_: media_type,
10169 te: payload);
10170 #[link_name="switch_core_media_set_telephony_recv_event"]
10171 pub fn core_media_set_telephony_recv_event(session: *mut core_session,
10172 type_: media_type,
10173 te: payload);
10174 #[link_name="switch_core_media_stats"]
10175 pub fn core_media_stats(session: *mut core_session,
10176 type_: media_type,
10177 pool: *mut memory_pool)
10178 -> *mut rtp_stats;
10179 #[link_name="switch_core_media_udptl_mode"]
10180 pub fn core_media_udptl_mode(session: *mut core_session, type_: media_type) -> status;
10181 #[link_name="switch_core_media_check_udptl_mode"]
10182 pub fn core_media_check_udptl_mode(session: *mut core_session,
10183 type_: media_type)
10184 -> switch_bool;
10185 #[link_name="switch_core_media_set_rtp_flag"]
10186 pub fn core_media_set_rtp_flag(session: *mut core_session, type_: media_type, flag: rtp_flag);
10187 #[link_name="switch_core_media_clear_rtp_flag"]
10188 pub fn core_media_clear_rtp_flag(session: *mut core_session,
10189 type_: media_type,
10190 flag: rtp_flag);
10191 #[link_name="switch_core_media_get_jb"]
10192 pub fn core_media_get_jb(session: *mut core_session, type_: media_type) -> *mut jb;
10193 #[link_name="switch_core_media_get_stats"]
10194 pub fn core_media_get_stats(session: *mut core_session,
10195 type_: media_type,
10196 pool: *mut memory_pool)
10197 -> *mut rtp_stats;
10198 #[link_name="switch_core_media_set_sdp_codec_string"]
10199 pub fn core_media_set_sdp_codec_string(session: *mut core_session,
10200 r_sdp: *const c_char,
10201 sdp_type: sdp_type);
10202 #[link_name="switch_core_media_reset_autofix"]
10203 pub fn core_media_reset_autofix(session: *mut core_session, type_: media_type);
10204 #[link_name="switch_core_media_check_outgoing_proxy"]
10205 pub fn core_media_check_outgoing_proxy(session: *mut core_session,
10206 o_session: *mut core_session);
10207 #[link_name="switch_core_media_codec_chosen"]
10208 pub fn core_media_codec_chosen(session: *mut core_session, media: media_type) -> status;
10209 #[link_name="switch_core_media_recover_session"]
10210 pub fn core_media_recover_session(session: *mut core_session);
10211 #[link_name="switch_core_media_add_ice_acl"]
10212 pub fn core_media_add_ice_acl(session: *mut core_session,
10213 type_: media_type,
10214 acl_name: *const c_char)
10215 -> status;
10216 #[link_name="switch_core_session_set_ice"]
10217 pub fn core_session_set_ice(session: *mut core_session);
10218 #[link_name="switch_core_media_clear_ice"]
10219 pub fn core_media_clear_ice(session: *mut core_session);
10220 #[link_name="switch_core_media_pause"]
10221 pub fn core_media_pause(session: *mut core_session);
10222 #[link_name="switch_core_media_resume"]
10223 pub fn core_media_resume(session: *mut core_session);
10224 #[link_name="switch_core_media_init"]
10225 pub fn core_media_init();
10226 #[link_name="switch_core_media_deinit"]
10227 pub fn core_media_deinit();
10228 #[link_name="switch_core_media_set_stats"]
10229 pub fn core_media_set_stats(session: *mut core_session);
10230 #[link_name="switch_core_media_sync_stats"]
10231 pub fn core_media_sync_stats(session: *mut core_session);
10232 #[link_name="switch_core_session_wake_video_thread"]
10233 pub fn core_session_wake_video_thread(session: *mut core_session);
10234 #[link_name="switch_core_session_clear_crypto"]
10235 pub fn core_session_clear_crypto(session: *mut core_session);
10236 #[link_name="switch_core_session_get_payload_code"]
10237 pub fn core_session_get_payload_code(session: *mut core_session,
10238 type_: media_type,
10239 iananame: *const c_char,
10240 rate: u32,
10241 fmtp_in: *const c_char,
10242 ptP: *mut payload,
10243 recv_ptP: *mut payload,
10244 fmtpP: *mut *mut c_char)
10245 -> status;
10246 #[link_name="switch_core_media_add_payload_map"]
10247 pub fn core_media_add_payload_map(session: *mut core_session,
10248 type_: media_type,
10249 name: *const c_char,
10250 modname: *const c_char,
10251 fmtp: *const c_char,
10252 sdp_type: sdp_type,
10253 pt: u32,
10254 rate: u32,
10255 ptime: u32,
10256 channels: u32,
10257 negotiated: u8)
10258 -> *mut payload_map;
10259 #[link_name="switch_core_media_check_autoadj"]
10260 pub fn core_media_check_autoadj(session: *mut core_session) -> status;
10261 #[link_name="switch_core_media_crypto_str2type"]
10262 pub fn core_media_crypto_str2type(str: *const c_char) -> rtp_crypto_key_type;
10263 #[link_name="switch_core_media_crypto_type2str"]
10264 pub fn core_media_crypto_type2str(type_: rtp_crypto_key_type) -> *const c_char;
10265 #[link_name="switch_core_media_crypto_keylen"]
10266 pub fn core_media_crypto_keylen(type_: rtp_crypto_key_type) -> c_int;
10267 #[link_name="switch_core_media_filter_sdp"]
10268 pub fn core_media_filter_sdp(sdp: *const c_char,
10269 cmd: *const c_char,
10270 arg: *const c_char)
10271 -> *mut c_char;
10272 #[link_name="switch_core_media_process_sdp_filter"]
10273 pub fn core_media_process_sdp_filter(sdp: *const c_char,
10274 cmd_buf: *const c_char,
10275 session: *mut core_session)
10276 -> *mut c_char;
10277 #[link_name="switch_core_media_codec_control"]
10278 pub fn core_media_codec_control(session: *mut core_session,
10279 mtype: media_type,
10280 iotype: io_type,
10281 cmd: codec_control_command,
10282 ctype: codec_control_type,
10283 cmd_data: *mut c_void,
10284 atype: codec_control_type,
10285 cmd_arg: *mut c_void,
10286 rtype: *mut codec_control_type,
10287 ret_data: *mut *mut c_void)
10288 -> status;
10289 #[link_name="switch_core_media_get_timer"]
10290 pub fn core_media_get_timer(session: *mut core_session, mtype: media_type) -> *mut timer;
10291 #[link_name="switch_core_media_start_video_function"]
10292 pub fn core_media_start_video_function(session: *mut core_session,
10293 video_function: video_function,
10294 user_data: *mut c_void);
10295 #[link_name="switch_core_media_end_video_function"]
10296 pub fn core_media_end_video_function(session: *mut core_session);
10297 #[link_name="switch_core_session_start_video_thread"]
10298 pub fn core_session_start_video_thread(session: *mut core_session) -> status;
10299 #[link_name="switch_core_media_check_video_function"]
10300 pub fn core_media_check_video_function(session: *mut core_session) -> c_int;
10301 #[link_name="switch_core_session_video_reinit"]
10302 pub fn core_session_video_reinit(session: *mut core_session);
10303 #[link_name="switch_core_media_read_lock_unlock"]
10304 pub fn core_media_read_lock_unlock(session: *mut core_session,
10305 type_: media_type,
10306 lock: switch_bool)
10307 -> status;
10308 #[link_name="switch_core_session_stop_media"]
10309 pub fn core_session_stop_media(session: *mut core_session);
10310 #[link_name="switch_core_session_media_flow"]
10311 pub fn core_session_media_flow(session: *mut core_session, type_: media_type) -> media_flow;
10312 #[link_name="switch_core_media_get_vid_params"]
10313 pub fn core_media_get_vid_params(session: *mut core_session,
10314 vid_params: *mut vid_params)
10315 -> status;
10316 #[link_name="switch_core_media_lock_video_file"]
10317 pub fn core_media_lock_video_file(session: *mut core_session, rw: rw) -> status;
10318 #[link_name="switch_core_media_unlock_video_file"]
10319 pub fn core_media_unlock_video_file(session: *mut core_session, rw: rw) -> status;
10320 #[link_name="switch_core_media_set_video_file"]
10321 pub fn core_media_set_video_file(session: *mut core_session,
10322 fh: *mut file_handle,
10323 rw: rw)
10324 -> status;
10325 #[link_name="switch_core_media_get_video_file"]
10326 pub fn core_media_get_video_file(session: *mut core_session, rw: rw) -> *mut file_handle;
10327 #[link_name="switch_core_session_in_video_thread"]
10328 pub fn core_session_in_video_thread(session: *mut core_session) -> switch_bool;
10329 #[link_name="switch_core_media_check_dtls"]
10330 pub fn core_media_check_dtls(session: *mut core_session, type_: media_type) -> switch_bool;
10331 #[link_name="switch_core_media_set_outgoing_bitrate"]
10332 pub fn core_media_set_outgoing_bitrate(session: *mut core_session,
10333 type_: media_type,
10334 bitrate: u32)
10335 -> status;
10336 #[link_name="switch_core_media_reset_jb"]
10337 pub fn core_media_reset_jb(session: *mut core_session, type_: media_type) -> status;
10338 #[link_name="switch_core_session_wait_for_video_input_params"]
10339 pub fn core_session_wait_for_video_input_params(session: *mut core_session,
10340 timeout_ms: u32)
10341 -> status;
10342 #[link_name="switch_jb_create"]
10343 pub fn jb_create(jbp: *mut *mut jb,
10344 type_: jb_type,
10345 min_frame_len: u32,
10346 max_frame_len: u32,
10347 pool: *mut memory_pool)
10348 -> status;
10349 #[link_name="switch_jb_set_frames"]
10350 pub fn jb_set_frames(jb: *mut jb, min_frame_len: u32, max_frame_len: u32) -> status;
10351 #[link_name="switch_jb_peek_frame"]
10352 pub fn jb_peek_frame(jb: *mut jb, ts: u32, seq: u16, peek: c_int, frame: *mut frame) -> status;
10353 #[link_name="switch_jb_get_frames"]
10354 pub fn jb_get_frames(jb: *mut jb,
10355 min_frame_len: *mut u32,
10356 max_frame_len: *mut u32,
10357 cur_frame_len: *mut u32,
10358 highest_frame_len: *mut u32)
10359 -> status;
10360 #[link_name="switch_jb_destroy"]
10361 pub fn jb_destroy(jbp: *mut *mut jb) -> status;
10362 #[link_name="switch_jb_reset"]
10363 pub fn jb_reset(jb: *mut jb);
10364 #[link_name="switch_jb_debug_level"]
10365 pub fn jb_debug_level(jb: *mut jb, level: u8);
10366 #[link_name="switch_jb_frame_count"]
10367 pub fn jb_frame_count(jb: *mut jb) -> c_int;
10368 #[link_name="switch_jb_poll"]
10369 pub fn jb_poll(jb: *mut jb) -> c_int;
10370 #[link_name="switch_jb_put_packet"]
10371 pub fn jb_put_packet(jb: *mut jb, packet: *mut rtp_packet, len: usize) -> status;
10372 #[link_name="switch_jb_get_last_read_len"]
10373 pub fn jb_get_last_read_len(jb: *mut jb) -> usize;
10374 #[link_name="switch_jb_get_packet"]
10375 pub fn jb_get_packet(jb: *mut jb, packet: *mut rtp_packet, len: *mut usize) -> status;
10376 #[link_name="switch_jb_pop_nack"]
10377 pub fn jb_pop_nack(jb: *mut jb) -> u32;
10378 #[link_name="switch_jb_get_packet_by_seq"]
10379 pub fn jb_get_packet_by_seq(jb: *mut jb,
10380 seq: u16,
10381 packet: *mut rtp_packet,
10382 len: *mut usize)
10383 -> status;
10384 #[link_name="switch_jb_set_session"]
10385 pub fn jb_set_session(jb: *mut jb, session: *mut core_session);
10386 #[link_name="switch_jb_ts_mode"]
10387 pub fn jb_ts_mode(jb: *mut jb, samples_per_frame: u32, samples_per_second: u32);
10388 #[link_name="switch_jb_set_flag"]
10389 pub fn jb_set_flag(jb: *mut jb, flag: jb_flag);
10390 #[link_name="switch_jb_clear_flag"]
10391 pub fn jb_clear_flag(jb: *mut jb, flag: jb_flag);
10392 pub fn teletone_set_tone(ts: *mut teletone_generation_session, index: c_int, ...) -> c_int;
10393 pub fn teletone_set_map(map: *mut teletone_tone_map, ...) -> c_int;
10394 pub fn teletone_init_session(ts: *mut teletone_generation_session,
10395 buflen: c_int,
10396 handler: tone_handler,
10397 user_data: *mut c_void)
10398 -> c_int;
10399 pub fn teletone_destroy_session(ts: *mut teletone_generation_session) -> c_int;
10400 pub fn teletone_mux_tones(ts: *mut teletone_generation_session,
10401 map: *mut teletone_tone_map)
10402 -> c_int;
10403 pub fn teletone_run(ts: *mut teletone_generation_session, cmd: *const c_char) -> c_int;
10404 pub fn teletone_multi_tone_init(mt: *mut teletone_multi_tone, map: *mut teletone_tone_map);
10405 pub fn teletone_multi_tone_detect(mt: *mut teletone_multi_tone,
10406 sample_buffer: *mut i16,
10407 samples: c_int)
10408 -> c_int;
10409 pub fn teletone_dtmf_detect_init(dtmf_detect_state: *mut teletone_dtmf_detect_state,
10410 sample_rate: c_int);
10411 pub fn teletone_dtmf_detect(dtmf_detect_state: *mut teletone_dtmf_detect_state,
10412 sample_buffer: *mut i16,
10413 samples: c_int)
10414 -> teletone_hit_type;
10415 pub fn teletone_dtmf_get(dtmf_detect_state: *mut teletone_dtmf_detect_state,
10416 buf: *mut c_char,
10417 dur: *mut c_uint)
10418 -> c_int;
10419 pub fn teletone_goertzel_update(goertzel_state: *mut teletone_goertzel_state,
10420 sample_buffer: *mut i16,
10421 samples: c_int);
10422}