mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 06:34:19 +00:00
run indent on the whole tree and update copyright dates in prep for 1.0.5
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16579 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
7b347417e5
commit
886e1ddb4d
229 files changed
+20252
-20192
No files matched your search
+64
-60
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2009, Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Copyright (C) 2005-2010, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
@@ -369,7 +369,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(_In_ switch_core_s
|
||||
|
||||
|
||||
#ifdef SWITCH_DEBUG_RWLOCKS
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_read_lock_hangup(_In_ switch_core_session_t *session, const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_read_lock_hangup(_In_ switch_core_session_t *session, const char *file, const char *func,
|
||||
int line);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@@ -595,6 +596,9 @@ SWITCH_DECLARE(char *) switch_core_vsprintf(switch_memory_pool_t *pool, _In_z_ _
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_core_session_get_pool(_In_ switch_core_session_t *session);
|
||||
///\}
|
||||
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_xml(switch_endpoint_interface_t *endpoint_interface,
|
||||
switch_memory_pool_t **pool, switch_xml_t xml);
|
||||
|
||||
///\defgroup sessm Session Creation / Management
|
||||
///\ingroup core1
|
||||
///\{
|
||||
@@ -604,7 +608,7 @@ SWITCH_DECLARE(switch_memory_pool_t *) switch_core_session_get_pool(_In_ switch_
|
||||
\param pool the pool to use for the allocation (a new one will be used if NULL)
|
||||
\return the newly created session
|
||||
*/
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_uuid(_In_ switch_endpoint_interface_t *endpoint_interface,
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_uuid(_In_ switch_endpoint_interface_t *endpoint_interface,
|
||||
_In_ switch_call_direction_t direction,
|
||||
_Inout_opt_ switch_memory_pool_t **pool, _In_opt_z_ const char *use_uuid);
|
||||
#define switch_core_session_request(_ep, _d, _p) switch_core_session_request_uuid(_ep, _d, _p, NULL)
|
||||
@@ -645,9 +649,8 @@ SWITCH_DECLARE(switch_size_t) switch_core_session_id(void);
|
||||
\param pool the pool to use
|
||||
\return the newly created session
|
||||
*/
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(_In_z_ const char *endpoint_name,
|
||||
_In_ switch_call_direction_t direction,
|
||||
_Inout_ switch_memory_pool_t **pool);
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(_In_z_ const char *endpoint_name,
|
||||
_In_ switch_call_direction_t direction, _Inout_ switch_memory_pool_t **pool);
|
||||
|
||||
/*!
|
||||
\brief Launch the session thread (state machine) on a given session
|
||||
@@ -963,7 +966,8 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(_In_opt
|
||||
_In_z_ const char *endpoint_name,
|
||||
_In_ switch_caller_profile_t *caller_profile,
|
||||
_Inout_ switch_core_session_t **new_session,
|
||||
_Inout_ switch_memory_pool_t **pool, _In_ switch_originate_flag_t flags, switch_call_cause_t *cancel_cause);
|
||||
_Inout_ switch_memory_pool_t **pool, _In_ switch_originate_flag_t flags,
|
||||
switch_call_cause_t *cancel_cause);
|
||||
|
||||
SWITCH_DECLARE(switch_call_cause_t) switch_core_session_resurrect_channel(_In_z_ const char *endpoint_name,
|
||||
_Inout_ switch_core_session_t **new_session,
|
||||
@@ -975,7 +979,7 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_resurrect_channel(_In_z_
|
||||
\param message the message to recieve
|
||||
\return the status returned by the message handler
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(_In_ switch_core_session_t *session,
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(_In_ switch_core_session_t *session,
|
||||
_In_ switch_core_session_message_t *message,
|
||||
const char *file, const char *func, int line);
|
||||
#define switch_core_session_receive_message(_session, _message) switch_core_session_perform_receive_message(_session, _message, \
|
||||
@@ -1013,7 +1017,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_event(_In_ switch_co
|
||||
\param priority event has high priority
|
||||
\return the status returned by the message handler
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_private_event(_In_ switch_core_session_t *session, _Inout_ switch_event_t **event, switch_bool_t priority);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_private_event(_In_ switch_core_session_t *session, _Inout_ switch_event_t **event,
|
||||
switch_bool_t priority);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -1381,10 +1386,10 @@ SWITCH_DECLARE(void) switch_core_session_lock_codec_read(_In_ switch_core_sessio
|
||||
SWITCH_DECLARE(void) switch_core_session_unlock_codec_read(_In_ switch_core_session_t *session);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_read_impl(switch_core_session_t *session, switch_codec_implementation_t *impp);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_write_impl(switch_core_session_t *session, switch_codec_implementation_t *impp);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_video_read_impl(switch_core_session_t *session, switch_codec_implementation_t *impp);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_video_write_impl(switch_core_session_t *session, switch_codec_implementation_t *impp);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_read_impl(switch_core_session_t *session, switch_codec_implementation_t *impp);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_write_impl(switch_core_session_t *session, switch_codec_implementation_t *impp);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_video_read_impl(switch_core_session_t *session, switch_codec_implementation_t *impp);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_video_write_impl(switch_core_session_t *session, switch_codec_implementation_t *impp);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -1636,8 +1641,7 @@ SWITCH_DECLARE(void) switch_core_speech_float_param_tts(switch_speech_handle_t *
|
||||
\param flags flags in/out for fine tuning
|
||||
\return SWITCH_STATUS_SUCCESS with len adjusted to the bytes written if successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_speech_read_tts(switch_speech_handle_t *sh,
|
||||
void *data, switch_size_t *datalen, switch_speech_flag_t *flags);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_speech_read_tts(switch_speech_handle_t *sh, void *data, switch_size_t *datalen, switch_speech_flag_t *flags);
|
||||
/*!
|
||||
\brief Close an open speech handle
|
||||
\param sh the speech handle to close
|
||||
@@ -1907,7 +1911,7 @@ SWITCH_DECLARE(FILE *) switch_core_get_console(void);
|
||||
/*!
|
||||
\brief Launch a thread
|
||||
*/
|
||||
SWITCH_DECLARE(switch_thread_t *) switch_core_launch_thread(void *(SWITCH_THREAD_FUNC *func) (switch_thread_t *, void *),
|
||||
SWITCH_DECLARE(switch_thread_t *) switch_core_launch_thread(void *(SWITCH_THREAD_FUNC * func) (switch_thread_t *, void *),
|
||||
void *obj, switch_memory_pool_t *pool);
|
||||
#endif
|
||||
|
||||
@@ -1970,7 +1974,7 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_alias(const char *string);
|
||||
SWITCH_DECLARE(int) switch_system(const char *cmd, switch_bool_t wait);
|
||||
SWITCH_DECLARE(void) switch_cond_yield(switch_interval_time_t t);
|
||||
SWITCH_DECLARE(void) switch_cond_next(void);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_chat_send(const char *name, const char *proto, const char *from, const char *to,
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_chat_send(const char *name, const char *proto, const char *from, const char *to,
|
||||
const char *subject, const char *body, const char *type, const char *hint);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_preprocess_session(switch_core_session_t *session, const char *cmds);
|
||||
@@ -1982,51 +1986,51 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_preprocess_session(switch_core_sessio
|
||||
*/
|
||||
|
||||
#define CACHE_DB_LEN 256
|
||||
typedef enum {
|
||||
CDF_INUSE = (1 << 0)
|
||||
} cache_db_flag_t;
|
||||
typedef enum {
|
||||
CDF_INUSE = (1 << 0)
|
||||
} cache_db_flag_t;
|
||||
|
||||
typedef enum {
|
||||
SCDB_TYPE_CORE_DB,
|
||||
SCDB_TYPE_ODBC
|
||||
} switch_cache_db_handle_type_t;
|
||||
typedef enum {
|
||||
SCDB_TYPE_CORE_DB,
|
||||
SCDB_TYPE_ODBC
|
||||
} switch_cache_db_handle_type_t;
|
||||
|
||||
typedef union {
|
||||
switch_core_db_t *core_db_dbh;
|
||||
switch_odbc_handle_t *odbc_dbh;
|
||||
} switch_cache_db_native_handle_t;
|
||||
typedef union {
|
||||
switch_core_db_t *core_db_dbh;
|
||||
switch_odbc_handle_t *odbc_dbh;
|
||||
} switch_cache_db_native_handle_t;
|
||||
|
||||
typedef struct {
|
||||
char *db_path;
|
||||
} switch_cache_db_core_db_options_t;
|
||||
typedef struct {
|
||||
char *db_path;
|
||||
} switch_cache_db_core_db_options_t;
|
||||
|
||||
typedef struct {
|
||||
char *dsn;
|
||||
char *user;
|
||||
char *pass;
|
||||
} switch_cache_db_odbc_options_t;
|
||||
typedef struct {
|
||||
char *dsn;
|
||||
char *user;
|
||||
char *pass;
|
||||
} switch_cache_db_odbc_options_t;
|
||||
|
||||
typedef union {
|
||||
switch_cache_db_core_db_options_t core_db_options;
|
||||
switch_cache_db_odbc_options_t odbc_options;
|
||||
} switch_cache_db_connection_options_t;
|
||||
typedef union {
|
||||
switch_cache_db_core_db_options_t core_db_options;
|
||||
switch_cache_db_odbc_options_t odbc_options;
|
||||
} switch_cache_db_connection_options_t;
|
||||
|
||||
typedef struct {
|
||||
char name[CACHE_DB_LEN];
|
||||
switch_cache_db_handle_type_t type;
|
||||
switch_cache_db_native_handle_t native_handle;
|
||||
time_t last_used;
|
||||
switch_mutex_t *mutex;
|
||||
switch_mutex_t *io_mutex;
|
||||
switch_memory_pool_t *pool;
|
||||
int32_t flags;
|
||||
unsigned long hash;
|
||||
char creator[CACHE_DB_LEN];
|
||||
char last_user[CACHE_DB_LEN];
|
||||
} switch_cache_db_handle_t;
|
||||
typedef struct {
|
||||
char name[CACHE_DB_LEN];
|
||||
switch_cache_db_handle_type_t type;
|
||||
switch_cache_db_native_handle_t native_handle;
|
||||
time_t last_used;
|
||||
switch_mutex_t *mutex;
|
||||
switch_mutex_t *io_mutex;
|
||||
switch_memory_pool_t *pool;
|
||||
int32_t flags;
|
||||
unsigned long hash;
|
||||
char creator[CACHE_DB_LEN];
|
||||
char last_user[CACHE_DB_LEN];
|
||||
} switch_cache_db_handle_t;
|
||||
|
||||
|
||||
static inline const char *switch_cache_db_type_name(switch_cache_db_handle_type_t type)
|
||||
static inline const char *switch_cache_db_type_name(switch_cache_db_handle_type_t type)
|
||||
{
|
||||
const char *type_str = "INVALID";
|
||||
|
||||
@@ -2046,9 +2050,9 @@ static inline const char *switch_cache_db_type_name(switch_cache_db_handle_type_
|
||||
return type_str;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_cache_db_release_db_handle(switch_cache_db_handle_t **dbh);
|
||||
SWITCH_DECLARE(void) switch_cache_db_destroy_db_handle(switch_cache_db_handle_t **dbh);
|
||||
SWITCH_DECLARE(switch_status_t) _switch_cache_db_get_db_handle(switch_cache_db_handle_t **dbh,
|
||||
SWITCH_DECLARE(void) switch_cache_db_release_db_handle(switch_cache_db_handle_t ** dbh);
|
||||
SWITCH_DECLARE(void) switch_cache_db_destroy_db_handle(switch_cache_db_handle_t ** dbh);
|
||||
SWITCH_DECLARE(switch_status_t) _switch_cache_db_get_db_handle(switch_cache_db_handle_t ** dbh,
|
||||
switch_cache_db_handle_type_t type,
|
||||
switch_cache_db_connection_options_t *connection_options,
|
||||
const char *file, const char *func, int line);
|
||||
@@ -2056,14 +2060,14 @@ SWITCH_DECLARE(switch_status_t) _switch_cache_db_get_db_handle(switch_cache_db_h
|
||||
|
||||
SWITCH_DECLARE(char *) switch_cache_db_execute_sql2str(switch_cache_db_handle_t *dbh, char *sql, char *str, size_t len, char **err);
|
||||
SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql(switch_cache_db_handle_t *dbh, char *sql, char **err);
|
||||
SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql_callback(switch_cache_db_handle_t *dbh, const char *sql,
|
||||
SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql_callback(switch_cache_db_handle_t *dbh, const char *sql,
|
||||
switch_core_db_callback_func_t callback, void *pdata, char **err);
|
||||
|
||||
SWITCH_DECLARE(void) switch_cache_db_status(switch_stream_handle_t *stream);
|
||||
SWITCH_DECLARE(switch_status_t) _switch_core_db_handle(switch_cache_db_handle_t **dbh, const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(switch_status_t) _switch_core_db_handle(switch_cache_db_handle_t ** dbh, const char *file, const char *func, int line);
|
||||
#define switch_core_db_handle(_a) _switch_core_db_handle(_a, __FILE__, __SWITCH_FUNC__, __LINE__)
|
||||
|
||||
SWITCH_DECLARE(switch_bool_t) switch_cache_db_test_reactive(switch_cache_db_handle_t *db,
|
||||
SWITCH_DECLARE(switch_bool_t) switch_cache_db_test_reactive(switch_cache_db_handle_t *db,
|
||||
const char *test_sql, const char *drop_sql, const char *reactive_sql);
|
||||
SWITCH_DECLARE(switch_status_t) switch_cache_db_persistant_execute(switch_cache_db_handle_t *dbh, const char *sql, uint32_t retries);
|
||||
SWITCH_DECLARE(switch_status_t) switch_cache_db_persistant_execute_trans(switch_cache_db_handle_t *dbh, char *sql, uint32_t retries);
|
||||
|
||||
Reference in new issue
Block a user