mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-20 03:01:50 +00:00
look out below
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8221 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -11,6 +11,7 @@ extern "C" {
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
|
||||
#define sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0)
|
||||
#define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0)
|
||||
#define init_vars() do { session = NULL; channel = NULL; uuid = NULL; tts_name = NULL; voice_name = NULL; memset(&args, 0, sizeof(args)); ap = NULL; caller_profile.source = "mod_unknown"; caller_profile.dialplan = ""; caller_profile.context = ""; caller_profile.caller_id_name = ""; caller_profile.caller_id_number = ""; caller_profile.network_addr = ""; caller_profile.ani = ""; caller_profile.aniii = ""; caller_profile.rdnis = ""; caller_profile.username = ""; on_hangup = NULL; memset(&cb_state, 0, sizeof(cb_state)); hook_state = CS_NEW; } while(0)
|
||||
@@ -26,7 +27,7 @@ extern "C" {
|
||||
// Copyright: See COPYING file that comes with this distribution
|
||||
//
|
||||
|
||||
|
||||
#if 0
|
||||
#ifndef SWITCHTOMEMPOOL
|
||||
#define SWITCHTOMEMPOOL
|
||||
class SwitchToMempool {
|
||||
@@ -42,7 +43,7 @@ class SwitchToMempool {
|
||||
switch_memory_pool_t *memorypool;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -100,13 +101,15 @@ class Event {
|
||||
SWITCH_DECLARE_CONSTRUCTOR Event(switch_event_t *wrap_me, int free_me=0);
|
||||
virtual SWITCH_DECLARE_CONSTRUCTOR ~Event();
|
||||
SWITCH_DECLARE(const char *)serialize(const char *format=NULL);
|
||||
SWITCH_DECLARE(bool) set_priority(switch_priority_t priority = SWITCH_PRIORITY_NORMAL);
|
||||
SWITCH_DECLARE(char *)get_header(char *header_name);
|
||||
SWITCH_DECLARE(char *)get_body(void);
|
||||
SWITCH_DECLARE(bool) add_body(const char *value);
|
||||
SWITCH_DECLARE(bool) add_header(const char *header_name, const char *value);
|
||||
SWITCH_DECLARE(bool) del_header(const char *header_name);
|
||||
SWITCH_DECLARE(bool) setPriority(switch_priority_t priority = SWITCH_PRIORITY_NORMAL);
|
||||
SWITCH_DECLARE(char *)getHeader(char *header_name);
|
||||
SWITCH_DECLARE(char *)getBody(void);
|
||||
SWITCH_DECLARE(char *)getType(void);
|
||||
SWITCH_DECLARE(bool) addBody(const char *value);
|
||||
SWITCH_DECLARE(bool) addHeader(const char *header_name, const char *value);
|
||||
SWITCH_DECLARE(bool) delHeader(const char *header_name);
|
||||
SWITCH_DECLARE(bool) fire(void);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user