mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
indent
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4798 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -143,7 +143,7 @@ struct switch_media_bug {
|
||||
struct switch_media_bug *next;
|
||||
};
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t * pool);
|
||||
SWITCH_DECLARE(void) switch_core_sqldb_stop(void);
|
||||
SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t * pool);
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_core_memory_init(void);
|
||||
|
||||
+79
-99
@@ -55,7 +55,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
* @{
|
||||
*/
|
||||
/** The fundamental pool type */
|
||||
typedef struct apr_pool_t switch_memory_pool_t;
|
||||
typedef struct apr_pool_t switch_memory_pool_t;
|
||||
|
||||
|
||||
/**
|
||||
@@ -66,7 +66,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
* to re-use this memory for the next allocation.
|
||||
* @see apr_pool_destroy()
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t *p);
|
||||
SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t * p);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -93,14 +93,13 @@ SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t *p);
|
||||
* @bug We aught to provide an alternative to RTLD_GLOBAL, which
|
||||
* is the only supported method of loading DSOs today.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t **res_handle,
|
||||
const char *path, switch_memory_pool_t *ctx);
|
||||
SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t ** res_handle, const char *path, switch_memory_pool_t * ctx);
|
||||
|
||||
/**
|
||||
* Close a DSO library.
|
||||
* @param handle handle to close.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_dso_unload(switch_dso_handle_t *handle);
|
||||
SWITCH_DECLARE(switch_status_t) switch_dso_unload(switch_dso_handle_t * handle);
|
||||
|
||||
/**
|
||||
* Load a symbol from a DSO handle.
|
||||
@@ -108,8 +107,7 @@ SWITCH_DECLARE(switch_status_t) switch_dso_unload(switch_dso_handle_t *handle);
|
||||
* @param handle handle to load the symbol from.
|
||||
* @param symname Name of the symbol to load.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_dso_sym(switch_dso_handle_sym_t * ressym,
|
||||
switch_dso_handle_t *handle, const char *symname);
|
||||
SWITCH_DECLARE(switch_status_t) switch_dso_sym(switch_dso_handle_sym_t * ressym, switch_dso_handle_t * handle, const char *symname);
|
||||
|
||||
/**
|
||||
* Report more information when a DSO function fails.
|
||||
@@ -117,7 +115,7 @@ SWITCH_DECLARE(switch_status_t) switch_dso_sym(switch_dso_handle_sym_t * ressym,
|
||||
* @param buf Location to store the dso error
|
||||
* @param bufsize The size of the provided buffer
|
||||
*/
|
||||
SWITCH_DECLARE(const char *) switch_dso_error(switch_dso_handle_t *dso, char *buf, size_t bufsize);
|
||||
SWITCH_DECLARE(const char *) switch_dso_error(switch_dso_handle_t * dso, char *buf, size_t bufsize);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -165,7 +163,7 @@ SWITCH_DECLARE(char *) switch_copy_string(char *dst, const char *src, switch_siz
|
||||
* progress at the same time.
|
||||
|
||||
*/
|
||||
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p, switch_hash_t *ht);
|
||||
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t * p, switch_hash_t * ht);
|
||||
|
||||
/**
|
||||
* Continue iterating over the entries in a hash table.
|
||||
@@ -173,7 +171,7 @@ SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p,
|
||||
* @return a pointer to the updated iteration state. NULL if there are no more
|
||||
* entries.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(switch_hash_index_t *ht);
|
||||
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(switch_hash_index_t * ht);
|
||||
|
||||
/**
|
||||
* Get the current entry's details from the iteration state.
|
||||
@@ -184,7 +182,7 @@ SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(switch_hash_index_t *ht);
|
||||
* @remark The return pointers should point to a variable that will be set to the
|
||||
* corresponding data, or they may be NULL if the data isn't interesting.
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_hash_this(switch_hash_index_t *hi, const void **key, switch_ssize_t *klen, void **val);
|
||||
SWITCH_DECLARE(void) switch_hash_this(switch_hash_index_t * hi, const void **key, switch_ssize_t *klen, void **val);
|
||||
|
||||
/**
|
||||
* The default hash function.
|
||||
@@ -194,7 +192,7 @@ SWITCH_DECLARE(void) switch_hash_this(switch_hash_index_t *hi, const void **key,
|
||||
*/
|
||||
SWITCH_DECLARE(unsigned int) switch_hashfunc_default(const char *key, switch_ssize_t *klen);
|
||||
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_hash_pool_get(switch_hash_t *ht);
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_hash_pool_get(switch_hash_t * ht);
|
||||
|
||||
/** @} */
|
||||
/**
|
||||
@@ -252,7 +250,7 @@ SWITCH_DECLARE(switch_time_t) switch_time_now(void);
|
||||
* @param result the resulting imploded time
|
||||
* @param input the input exploded time
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_gmt_get(switch_time_t *result, switch_time_exp_t *input);
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_gmt_get(switch_time_t * result, switch_time_exp_t * input);
|
||||
|
||||
/**
|
||||
* formats the exploded time according to the format specified
|
||||
@@ -262,9 +260,7 @@ SWITCH_DECLARE(switch_status_t) switch_time_exp_gmt_get(switch_time_t *result, s
|
||||
* @param format The format for the time string
|
||||
* @param tm The time to convert
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_strftime(char *s,
|
||||
switch_size_t *retsize,
|
||||
switch_size_t max, const char *format, switch_time_exp_t *tm);
|
||||
SWITCH_DECLARE(switch_status_t) switch_strftime(char *s, switch_size_t *retsize, switch_size_t max, const char *format, switch_time_exp_t * tm);
|
||||
|
||||
/**
|
||||
* switch_rfc822_date formats dates in the RFC822
|
||||
@@ -281,7 +277,7 @@ SWITCH_DECLARE(switch_status_t) switch_rfc822_date(char *date_str, switch_time_t
|
||||
* @param result the exploded time
|
||||
* @param input the time to explode
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_gmt(switch_time_exp_t *result, switch_time_t input);
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_gmt(switch_time_exp_t * result, switch_time_t input);
|
||||
|
||||
/**
|
||||
* Convert time value from human readable format to a numeric apr_time_t
|
||||
@@ -289,14 +285,14 @@ SWITCH_DECLARE(switch_status_t) switch_time_exp_gmt(switch_time_exp_t *result, s
|
||||
* @param result the resulting imploded time
|
||||
* @param input the input exploded time
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_get(switch_time_t *result, switch_time_exp_t *input);
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_get(switch_time_t * result, switch_time_exp_t * input);
|
||||
|
||||
/**
|
||||
* convert a time to its human readable components in local timezone
|
||||
* @param result the exploded time
|
||||
* @param input the time to explode
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_lt(switch_time_exp_t *result, switch_time_t input);
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_lt(switch_time_exp_t * result, switch_time_t input);
|
||||
|
||||
/**
|
||||
* Sleep for the specified number of micro-seconds.
|
||||
@@ -337,28 +333,27 @@ SWITCH_DECLARE(void) switch_sleep(switch_interval_time_t t);
|
||||
* it will behave as either a nested or an unnested lock.
|
||||
*
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t **lock,
|
||||
unsigned int flags, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t ** lock, unsigned int flags, switch_memory_pool_t * pool);
|
||||
|
||||
|
||||
/**
|
||||
* Destroy the mutex and free the memory associated with the lock.
|
||||
* @param lock the mutex to destroy.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_destroy(switch_mutex_t *lock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_destroy(switch_mutex_t * lock);
|
||||
|
||||
/**
|
||||
* Acquire the lock for the given mutex. If the mutex is already locked,
|
||||
* the current thread will be put to sleep until the lock becomes available.
|
||||
* @param lock the mutex on which to acquire the lock.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_lock(switch_mutex_t *lock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_lock(switch_mutex_t * lock);
|
||||
|
||||
/**
|
||||
* Release the lock for the given mutex.
|
||||
* @param lock the mutex from which to release the lock.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_unlock(switch_mutex_t *lock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_unlock(switch_mutex_t * lock);
|
||||
|
||||
/**
|
||||
* Attempt to acquire the lock for the given mutex. If the mutex has already
|
||||
@@ -367,7 +362,7 @@ SWITCH_DECLARE(switch_status_t) switch_mutex_unlock(switch_mutex_t *lock);
|
||||
* if the return value was APR_EBUSY, for portability reasons.
|
||||
* @param lock the mutex on which to attempt the lock acquiring.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_trylock(switch_mutex_t *lock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_trylock(switch_mutex_t * lock);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -380,15 +375,14 @@ SWITCH_DECLARE(switch_status_t) switch_mutex_trylock(switch_mutex_t *lock);
|
||||
/** Opaque structure used for the rwlock */
|
||||
typedef struct apr_thread_rwlock_t switch_thread_rwlock_t;
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t **rwlock,
|
||||
switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_destroy(switch_thread_rwlock_t *rwlock);
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_thread_rwlock_pool_get(switch_thread_rwlock_t *rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_rdlock(switch_thread_rwlock_t *rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_tryrdlock(switch_thread_rwlock_t *rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_wrlock(switch_thread_rwlock_t *rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_trywrlock(switch_thread_rwlock_t *rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_unlock(switch_thread_rwlock_t *rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t ** rwlock, switch_memory_pool_t * pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_destroy(switch_thread_rwlock_t * rwlock);
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_thread_rwlock_pool_get(switch_thread_rwlock_t * rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_rdlock(switch_thread_rwlock_t * rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_tryrdlock(switch_thread_rwlock_t * rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_wrlock(switch_thread_rwlock_t * rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_trywrlock(switch_thread_rwlock_t * rwlock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_unlock(switch_thread_rwlock_t * rwlock);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -414,7 +408,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_unlock(switch_thread_rwlock
|
||||
* will be stored.
|
||||
* @param pool the pool from which to allocate the mutex.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t **cond, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t ** cond, switch_memory_pool_t * pool);
|
||||
|
||||
/**
|
||||
* Put the active calling thread to sleep until signaled to wake up. Each
|
||||
@@ -428,7 +422,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t *
|
||||
* is released while the thread is asleep, and is again acquired before
|
||||
* returning from this function.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_wait(switch_thread_cond_t *cond, switch_mutex_t *mutex);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_wait(switch_thread_cond_t * cond, switch_mutex_t * mutex);
|
||||
|
||||
/**
|
||||
* Put the active calling thread to sleep until signaled to wake up or
|
||||
@@ -446,8 +440,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_wait(switch_thread_cond_t *co
|
||||
* will wake up before this time, otherwise the error APR_TIMEUP
|
||||
* is returned.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_timedwait(switch_thread_cond_t *cond, switch_mutex_t *mutex,
|
||||
switch_interval_time_t timeout);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_timedwait(switch_thread_cond_t * cond, switch_mutex_t * mutex, switch_interval_time_t timeout);
|
||||
|
||||
/**
|
||||
* Signals a single thread, if one exists, that is blocking on the given
|
||||
@@ -456,7 +449,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_timedwait(switch_thread_cond_
|
||||
* is desired, that mutex must be locked while calling this function.
|
||||
* @param cond the condition variable on which to produce the signal.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_signal(switch_thread_cond_t *cond);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_signal(switch_thread_cond_t * cond);
|
||||
|
||||
/**
|
||||
* Signals all threads blocking on the given condition variable.
|
||||
@@ -464,13 +457,13 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_signal(switch_thread_cond_t *
|
||||
* the associated mutex. This will happen in a serialized manner.
|
||||
* @param cond the condition variable on which to produce the broadcast.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_broadcast(switch_thread_cond_t *cond);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_broadcast(switch_thread_cond_t * cond);
|
||||
|
||||
/**
|
||||
* Destroy the condition variable and free the associated memory.
|
||||
* @param cond the condition variable to destroy.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_destroy(switch_thread_cond_t *cond);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_destroy(switch_thread_cond_t * cond);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -497,20 +490,20 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_destroy(switch_thread_cond_t
|
||||
* the formatted UUID and a null terminator
|
||||
* @param uuid The UUID to format
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_uuid_format(char *buffer, const switch_uuid_t *uuid);
|
||||
SWITCH_DECLARE(void) switch_uuid_format(char *buffer, const switch_uuid_t * uuid);
|
||||
|
||||
/**
|
||||
* Generate and return a (new) UUID
|
||||
* @param uuid The resulting UUID
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_uuid_get(switch_uuid_t *uuid);
|
||||
SWITCH_DECLARE(void) switch_uuid_get(switch_uuid_t * uuid);
|
||||
|
||||
/**
|
||||
* Parse a standard-format string into a UUID
|
||||
* @param uuid The resulting UUID
|
||||
* @param uuid_str The formatted UUID
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t *uuid, const char *uuid_str);
|
||||
SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t * uuid, const char *uuid_str);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -529,8 +522,7 @@ SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t *uuid, const cha
|
||||
* @param queue_capacity maximum size of the queue
|
||||
* @param a pool to allocate queue from
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t **queue,
|
||||
unsigned int queue_capacity, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t ** queue, unsigned int queue_capacity, switch_memory_pool_t * pool);
|
||||
|
||||
/**
|
||||
* pop/get an object from the queue, blocking if the queue is already empty
|
||||
@@ -541,7 +533,7 @@ SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t **queue,
|
||||
* @returns APR_EOF if the queue has been terminated
|
||||
* @returns APR_SUCCESS on a successfull pop
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_pop(switch_queue_t *queue, void **data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_pop(switch_queue_t * queue, void **data);
|
||||
|
||||
/**
|
||||
* push/add a object to the queue, blocking if the queue is already full
|
||||
@@ -552,7 +544,7 @@ SWITCH_DECLARE(switch_status_t) switch_queue_pop(switch_queue_t *queue, void **d
|
||||
* @returns APR_EOF the queue has been terminated
|
||||
* @returns APR_SUCCESS on a successfull push
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_push(switch_queue_t *queue, void *data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_push(switch_queue_t * queue, void *data);
|
||||
|
||||
/**
|
||||
* returns the size of the queue.
|
||||
@@ -562,7 +554,7 @@ SWITCH_DECLARE(switch_status_t) switch_queue_push(switch_queue_t *queue, void *d
|
||||
* @param queue the queue
|
||||
* @returns the size of the queue
|
||||
*/
|
||||
SWITCH_DECLARE(unsigned int) switch_queue_size(switch_queue_t *queue);
|
||||
SWITCH_DECLARE(unsigned int) switch_queue_size(switch_queue_t * queue);
|
||||
|
||||
/**
|
||||
* pop/get an object to the queue, returning immediatly if the queue is empty
|
||||
@@ -574,7 +566,7 @@ SWITCH_DECLARE(unsigned int) switch_queue_size(switch_queue_t *queue);
|
||||
* @returns APR_EOF the queue has been terminated
|
||||
* @returns APR_SUCCESS on a successfull push
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_trypop(switch_queue_t *queue, void **data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_trypop(switch_queue_t * queue, void **data);
|
||||
|
||||
/**
|
||||
* push/add a object to the queue, returning immediatly if the queue is full
|
||||
@@ -586,7 +578,7 @@ SWITCH_DECLARE(switch_status_t) switch_queue_trypop(switch_queue_t *queue, void
|
||||
* @returns APR_EOF the queue has been terminated
|
||||
* @returns APR_SUCCESS on a successfull push
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_trypush(switch_queue_t *queue, void *data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_trypush(switch_queue_t * queue, void *data);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -684,17 +676,16 @@ SWITCH_DECLARE(switch_status_t) switch_queue_trypush(switch_queue_t *queue, void
|
||||
* @remark If perm is SWITCH_FPROT_OS_DEFAULT and the file is being created,
|
||||
* appropriate default permissions will be used.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t **newf, const char *fname, int32_t flag,
|
||||
switch_fileperms_t perm, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm, switch_memory_pool_t * pool);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_seek(switch_file_t *thefile, switch_seek_where_t where, int64_t *offset);
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_seek(switch_file_t * thefile, switch_seek_where_t where, int64_t *offset);
|
||||
|
||||
/**
|
||||
* Close the specified file.
|
||||
* @param file The file descriptor to close.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t *thefile);
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t * thefile);
|
||||
|
||||
/**
|
||||
* Delete the specified file.
|
||||
@@ -703,7 +694,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t *thefile);
|
||||
* @remark If the file is open, it won't be removed until all
|
||||
* instances are closed.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t * pool);
|
||||
|
||||
/**
|
||||
* Read data from the specified file.
|
||||
@@ -722,7 +713,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memo
|
||||
* @remark It is not possible for both bytes to be read and an APR_EOF
|
||||
* or other error to be returned. APR_EINTR is never returned.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_read(switch_file_t *thefile, void *buf, switch_size_t *nbytes);
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_read(switch_file_t * thefile, void *buf, switch_size_t *nbytes);
|
||||
|
||||
/**
|
||||
* Write data to the specified file.
|
||||
@@ -739,7 +730,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_read(switch_file_t *thefile, void *b
|
||||
* @remark It is possible for both bytes to be written and an error to
|
||||
* be returned. APR_EINTR is never returned.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_write(switch_file_t *thefile, const void *buf, switch_size_t *nbytes);
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_write(switch_file_t * thefile, const void *buf, switch_size_t *nbytes);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename);
|
||||
|
||||
@@ -764,21 +755,21 @@ SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename);
|
||||
typedef void *(SWITCH_THREAD_FUNC * switch_thread_start_t) (switch_thread_t *, void *);
|
||||
|
||||
//APR_DECLARE(apr_status_t) apr_threadattr_stacksize_set(apr_threadattr_t *attr, switch_size_t stacksize)
|
||||
SWITCH_DECLARE(switch_status_t) switch_threadattr_stacksize_set(switch_threadattr_t *attr, switch_size_t stacksize);
|
||||
SWITCH_DECLARE(switch_status_t) switch_threadattr_stacksize_set(switch_threadattr_t * attr, switch_size_t stacksize);
|
||||
|
||||
/**
|
||||
* Create and initialize a new threadattr variable
|
||||
* @param new_attr The newly created threadattr.
|
||||
* @param cont The pool to use
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t **new_attr, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t ** new_attr, switch_memory_pool_t * pool);
|
||||
|
||||
/**
|
||||
* Set if newly created threads should be created in detached state.
|
||||
* @param attr The threadattr to affect
|
||||
* @param on Non-zero if detached threads should be created.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_threadattr_detach_set(switch_threadattr_t *attr, int32_t on);
|
||||
SWITCH_DECLARE(switch_status_t) switch_threadattr_detach_set(switch_threadattr_t * attr, int32_t on);
|
||||
|
||||
/**
|
||||
* Create a new thread of execution
|
||||
@@ -788,9 +779,8 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_detach_set(switch_threadattr_t
|
||||
* @param data Any data to be passed to the starting function
|
||||
* @param cont The pool to use
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_thread, switch_threadattr_t *attr,
|
||||
switch_thread_start_t func, void *data,
|
||||
switch_memory_pool_t *cont);
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thread, switch_threadattr_t * attr,
|
||||
switch_thread_start_t func, void *data, switch_memory_pool_t * cont);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -856,8 +846,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* @param protocol The protocol of the socket (e.g., SWITCH_PROTO_TCP).
|
||||
* @param pool The pool to use
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t **new_sock, int family, int type,
|
||||
int protocol, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t ** new_sock, int family, int type, int protocol, switch_memory_pool_t * pool);
|
||||
|
||||
/**
|
||||
* Shutdown either reading, writing, or both sides of a socket.
|
||||
@@ -872,13 +861,13 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* @remark This does not actually close the socket descriptor, it just
|
||||
* controls which calls are still valid on the socket.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_shutdown(switch_socket_t *sock, switch_shutdown_how_e how);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_shutdown(switch_socket_t * sock, switch_shutdown_how_e how);
|
||||
|
||||
/**
|
||||
* Close a socket.
|
||||
* @param sock The socket to close
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_close(switch_socket_t *sock);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_close(switch_socket_t * sock);
|
||||
|
||||
/**
|
||||
* Bind the socket to its associated port
|
||||
@@ -887,7 +876,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* @remark This may be where we will find out if there is any other process
|
||||
* using the selected port.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_bind(switch_socket_t *sock, switch_sockaddr_t *sa);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_bind(switch_socket_t * sock, switch_sockaddr_t * sa);
|
||||
|
||||
/**
|
||||
* Listen to a bound socket for connections.
|
||||
@@ -896,7 +885,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* listen queue. If this value is less than zero, the listen
|
||||
* queue size is set to zero.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_listen(switch_socket_t *sock, int32_t backlog);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_listen(switch_socket_t * sock, int32_t backlog);
|
||||
|
||||
/**
|
||||
* Accept a new connection request
|
||||
@@ -906,8 +895,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* @param sock The socket we are listening on.
|
||||
* @param connection_pool The pool for the new socket.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t **new_sock, switch_socket_t *sock,
|
||||
switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t ** new_sock, switch_socket_t * sock, switch_memory_pool_t * pool);
|
||||
|
||||
/**
|
||||
* Issue a connection request to a socket either on the same machine
|
||||
@@ -915,12 +903,12 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* @param sock The socket we wish to use for our side of the connection
|
||||
* @param sa The address of the machine we wish to connect to.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_connect(switch_socket_t *sock, switch_sockaddr_t *sa);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_connect(switch_socket_t * sock, switch_sockaddr_t * sa);
|
||||
|
||||
SWITCH_DECLARE(uint16_t) switch_sockaddr_get_port(switch_sockaddr_t *sa);
|
||||
SWITCH_DECLARE(char *) switch_get_addr(char *buf, switch_size_t len, switch_sockaddr_t *in);
|
||||
SWITCH_DECLARE(int32_t) switch_sockaddr_get_family(switch_sockaddr_t *sa);
|
||||
SWITCH_DECLARE(switch_status_t) switch_sockaddr_ip_get(char **addr, switch_sockaddr_t *sa);
|
||||
SWITCH_DECLARE(uint16_t) switch_sockaddr_get_port(switch_sockaddr_t * sa);
|
||||
SWITCH_DECLARE(char *) switch_get_addr(char *buf, switch_size_t len, switch_sockaddr_t * in);
|
||||
SWITCH_DECLARE(int32_t) switch_sockaddr_get_family(switch_sockaddr_t * sa);
|
||||
SWITCH_DECLARE(switch_status_t) switch_sockaddr_ip_get(char **addr, switch_sockaddr_t * sa);
|
||||
|
||||
|
||||
/**
|
||||
@@ -946,9 +934,8 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* </PRE>
|
||||
* @param p The pool for the apr_sockaddr_t and associated storage.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_sockaddr_info_get(switch_sockaddr_t **sa, const char *hostname,
|
||||
int32_t family, switch_port_t port, int32_t flags,
|
||||
switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_sockaddr_info_get(switch_sockaddr_t ** sa, const char *hostname,
|
||||
int32_t family, switch_port_t port, int32_t flags, switch_memory_pool_t * pool);
|
||||
|
||||
/**
|
||||
* Send data over a network.
|
||||
@@ -967,7 +954,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* APR_EINTR is never returned.
|
||||
* </PRE>
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_send(switch_socket_t *sock, const char *buf, switch_size_t *len);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_send(switch_socket_t * sock, const char *buf, switch_size_t *len);
|
||||
|
||||
/**
|
||||
* @param sock The socket to send from
|
||||
@@ -976,8 +963,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* @param buf The data to send
|
||||
* @param len The length of the data to send
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_sendto(switch_socket_t *sock, switch_sockaddr_t *where,
|
||||
int32_t flags, const char *buf, switch_size_t *len);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_sendto(switch_socket_t * sock, switch_sockaddr_t * where, int32_t flags, const char *buf, switch_size_t *len);
|
||||
|
||||
/**
|
||||
* @param from The apr_sockaddr_t to fill in the recipient info
|
||||
@@ -987,9 +973,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* @param len The length of the available buffer
|
||||
*
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_recvfrom(switch_sockaddr_t *from,
|
||||
switch_socket_t *sock,
|
||||
int32_t flags, char *buf, size_t *len);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_recvfrom(switch_sockaddr_t * from, switch_socket_t * sock, int32_t flags, char *buf, size_t *len);
|
||||
|
||||
|
||||
/**
|
||||
@@ -1011,7 +995,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* APR_EINTR is never returned.
|
||||
* </PRE>
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_recv(switch_socket_t *sock, char *buf, switch_size_t *len);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_recv(switch_socket_t * sock, char *buf, switch_size_t *len);
|
||||
|
||||
/**
|
||||
* Setup socket options for the specified socket
|
||||
@@ -1035,7 +1019,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* </PRE>
|
||||
* @param on Value for the option.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_opt_set(switch_socket_t *sock, int32_t opt, int32_t on);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_opt_set(switch_socket_t * sock, int32_t opt, int32_t on);
|
||||
|
||||
/**
|
||||
* Setup socket timeout for the specified socket
|
||||
@@ -1048,7 +1032,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* t < 0 -- read and write calls block
|
||||
* </PRE>
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_timeout_set(switch_socket_t *sock, switch_interval_time_t t);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_timeout_set(switch_socket_t * sock, switch_interval_time_t t);
|
||||
|
||||
/**
|
||||
* Join a Multicast Group
|
||||
@@ -1059,8 +1043,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* @param source Source Address to accept transmissions from (non-NULL
|
||||
* implies Source-Specific Multicast)
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_mcast_join(switch_socket_t *sock, switch_sockaddr_t *join,
|
||||
switch_sockaddr_t *iface, switch_sockaddr_t *source);
|
||||
SWITCH_DECLARE(switch_status_t) switch_mcast_join(switch_socket_t * sock, switch_sockaddr_t * join, switch_sockaddr_t * iface, switch_sockaddr_t * source);
|
||||
|
||||
|
||||
|
||||
@@ -1101,8 +1084,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* platforms; the apr_pollset_create() call will fail with
|
||||
* APR_ENOTIMPL on platforms where it is not supported.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t **pollset,
|
||||
uint32_t size, switch_memory_pool_t *p, uint32_t flags);
|
||||
SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t ** pollset, uint32_t size, switch_memory_pool_t * p, uint32_t flags);
|
||||
|
||||
/**
|
||||
* Add a socket or file descriptor to a pollset
|
||||
@@ -1121,7 +1103,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* allowed for implementations where option (1) is impossible
|
||||
* or impractical.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_pollset_add(switch_pollset_t *pollset, const switch_pollfd_t *descriptor);
|
||||
SWITCH_DECLARE(switch_status_t) switch_pollset_add(switch_pollset_t * pollset, const switch_pollfd_t * descriptor);
|
||||
|
||||
/**
|
||||
* Poll the sockets in the poll structure
|
||||
@@ -1136,8 +1118,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
* This is a blocking call, and it will not return until either a
|
||||
* socket has been signalled, or the timeout has expired.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_poll(switch_pollfd_t *aprset,
|
||||
int32_t numsock, int32_t *nsds, switch_interval_time_t timeout);
|
||||
SWITCH_DECLARE(switch_status_t) switch_poll(switch_pollfd_t * aprset, int32_t numsock, int32_t *nsds, switch_interval_time_t timeout);
|
||||
|
||||
/*!
|
||||
\brief Create a set of file descriptors to poll
|
||||
@@ -1147,8 +1128,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
\param pool the memory pool to use
|
||||
\return SWITCH_STATUS_SUCCESS when successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t **poll, switch_socket_t *sock,
|
||||
int16_t flags, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t * pool);
|
||||
|
||||
|
||||
/** @} */
|
||||
@@ -1159,7 +1139,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_threa
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
||||
@@ -72,11 +72,8 @@ static const uint8_t SWITCH_REVERSE_BITPACKED_MASKS[] = { 255, 254, 252, 248, 24
|
||||
\param buflen the length of the storage buffer
|
||||
\param mode RFC3551 or AAL2 mode (curse you backwards folks)
|
||||
*/
|
||||
DoxyDefine(void
|
||||
switch_bitpack_init(switch_bitpack_t *pack, int32_t bitlen, switch_byte_t *buf, uint32_t buflen,
|
||||
switch_bitpack_mode_t mode))
|
||||
static inline int8_t switch_bitpack_init(switch_bitpack_t *pack, switch_byte_t bitlen, switch_byte_t *buf,
|
||||
uint32_t buflen, switch_bitpack_mode_t mode)
|
||||
DoxyDefine(void switch_bitpack_init(switch_bitpack_t *pack, int32_t bitlen, switch_byte_t * buf, uint32_t buflen, switch_bitpack_mode_t mode))
|
||||
static inline int8_t switch_bitpack_init(switch_bitpack_t *pack, switch_byte_t bitlen, switch_byte_t * buf, uint32_t buflen, switch_bitpack_mode_t mode)
|
||||
{
|
||||
if (!pack || (bitlen > SWITCH_BITS_PER_BYTE) || !buf || !buflen) {
|
||||
return -1;
|
||||
|
||||
@@ -58,8 +58,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
* \param max_len length required by the buffer
|
||||
* \return status
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t *pool, switch_buffer_t **buffer,
|
||||
switch_size_t max_len);
|
||||
SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool, switch_buffer_t **buffer, switch_size_t max_len);
|
||||
|
||||
/*! \brief Allocate a new dynamic switch_buffer
|
||||
* \param buffer returned pointer to the new buffer
|
||||
@@ -68,9 +67,7 @@ SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t *pool,
|
||||
* \param max_len length the buffer is allowed to grow to
|
||||
* \return status
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer,
|
||||
switch_size_t blocksize,
|
||||
switch_size_t start_len, switch_size_t max_len);
|
||||
SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer, switch_size_t blocksize, switch_size_t start_len, switch_size_t max_len);
|
||||
|
||||
/*! \brief Get the length of a switch_buffer_t
|
||||
* \param buffer any buffer of type switch_buffer_t
|
||||
|
||||
@@ -127,8 +127,7 @@ struct switch_caller_extension {
|
||||
\param extension_number extension number
|
||||
\return a new extension object allocated from the session's memory pool
|
||||
*/
|
||||
SWITCH_DECLARE(switch_caller_extension_t *) switch_caller_extension_new(switch_core_session_t *session,
|
||||
char *extension_name, char *extension_number);
|
||||
SWITCH_DECLARE(switch_caller_extension_t *) switch_caller_extension_new(switch_core_session_t *session, char *extension_name, char *extension_number);
|
||||
|
||||
/*!
|
||||
\brief Add an application (instruction) to the given extension
|
||||
@@ -138,8 +137,7 @@ SWITCH_DECLARE(switch_caller_extension_t *) switch_caller_extension_new(switch_c
|
||||
\param extra_data optional argument to the application
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_caller_extension_add_application(switch_core_session_t *session,
|
||||
switch_caller_extension_t *caller_extension,
|
||||
char *application_name, char *extra_data);
|
||||
switch_caller_extension_t *caller_extension, char *application_name, char *extra_data);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -166,7 +164,7 @@ SWITCH_DECLARE(char *) switch_caller_get_field_by_name(switch_caller_profile_t *
|
||||
\param destination_number destination number
|
||||
\return a new profile object allocated from the session's memory pool
|
||||
*/
|
||||
SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t *pool,
|
||||
SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t * pool,
|
||||
const char *username,
|
||||
const char *dialplan,
|
||||
const char *caller_id_name,
|
||||
@@ -174,10 +172,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
|
||||
const char *network_addr,
|
||||
const char *ani,
|
||||
const char *aniii,
|
||||
const char *rdnis,
|
||||
const char *source,
|
||||
const char *context,
|
||||
const char *destination_number);
|
||||
const char *rdnis, const char *source, const char *context, const char *destination_number);
|
||||
|
||||
/*!
|
||||
\brief Clone an existing caller profile object
|
||||
@@ -185,8 +180,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
|
||||
\param tocopy the existing profile
|
||||
*/
|
||||
|
||||
SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_clone(switch_core_session_t *session,
|
||||
switch_caller_profile_t *tocopy);
|
||||
SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_clone(switch_core_session_t *session, switch_caller_profile_t *tocopy);
|
||||
|
||||
/*!
|
||||
\brief Add headers to an existing event in regards to a specific profile
|
||||
@@ -195,8 +189,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_clone(switch_cor
|
||||
\param event the event to add the information to
|
||||
*/
|
||||
|
||||
SWITCH_DECLARE(void) switch_caller_profile_event_set_data(switch_caller_profile_t *caller_profile, char *prefix,
|
||||
switch_event_t *event);
|
||||
SWITCH_DECLARE(void) switch_caller_profile_event_set_data(switch_caller_profile_t *caller_profile, char *prefix, switch_event_t *event);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
/** @} */
|
||||
|
||||
@@ -74,9 +74,7 @@ SWITCH_DECLARE(uint8_t) switch_channel_ready(switch_channel_t *channel);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_state(switch_channel_t *channel,
|
||||
const char *file,
|
||||
const char *func,
|
||||
int line, switch_channel_state_t state);
|
||||
const char *file, const char *func, int line, switch_channel_state_t state);
|
||||
|
||||
/*!
|
||||
\brief Set the current state of a channel
|
||||
@@ -120,7 +118,7 @@ SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch
|
||||
\param pool memory_pool to use for allocation
|
||||
\return SWITCH_STATUS_SUCCESS if successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Connect a newly allocated channel to a session object and setup it's initial state
|
||||
@@ -129,9 +127,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel,
|
||||
\param state the initial state of the channel
|
||||
\param flags the initial channel flags
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel,
|
||||
switch_core_session_t *session,
|
||||
switch_channel_state_t state, uint32_t flags);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, switch_core_session_t *session, switch_channel_state_t state, uint32_t flags);
|
||||
|
||||
/*!
|
||||
\brief Fire A presence event for the channel
|
||||
@@ -152,8 +148,7 @@ SWITCH_DECLARE(void) switch_channel_uninit(switch_channel_t *channel);
|
||||
\param channel channel to assign the profile to
|
||||
\param caller_profile the profile to assign
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel,
|
||||
switch_caller_profile_t *caller_profile);
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile);
|
||||
|
||||
/*!
|
||||
\brief Retrive the given channel's caller profile
|
||||
@@ -167,8 +162,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_caller_profile(swit
|
||||
\param channel channel to assign the profile to
|
||||
\param caller_profile the profile to assign
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_set_originator_caller_profile(switch_channel_t *channel,
|
||||
switch_caller_profile_t *caller_profile);
|
||||
SWITCH_DECLARE(void) switch_channel_set_originator_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile);
|
||||
|
||||
/*!
|
||||
\brief Retrive the given channel's originator caller profile
|
||||
@@ -182,8 +176,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_originator_caller_p
|
||||
\param channel channel to assign the profile to
|
||||
\param caller_profile the profile to assign
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_set_originatee_caller_profile(switch_channel_t *channel,
|
||||
switch_caller_profile_t *caller_profile);
|
||||
SWITCH_DECLARE(void) switch_channel_set_originatee_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile);
|
||||
|
||||
/*!
|
||||
\brief Retrive the given channel's originatee caller profile
|
||||
@@ -207,8 +200,7 @@ SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel_t *channel);
|
||||
\param value the vaule of the variable
|
||||
\returns SWITCH_STATUS_SUCCESS if successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_set_variable(switch_channel_t *channel, const char *varname,
|
||||
const char *value);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_set_variable(switch_channel_t *channel, const char *varname, const char *value);
|
||||
|
||||
/*!
|
||||
\brief Set a variable on a given channel, without duplicating the value from the session pool.
|
||||
@@ -217,8 +209,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_set_variable(switch_channel_t *ch
|
||||
\param value the vaule of the variable (MUST BE ALLOCATED FROM THE SESSION POOL ALREADY)
|
||||
\returns SWITCH_STATUS_SUCCESS if successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_nodup(switch_channel_t *channel, const char *varname,
|
||||
char *value);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_nodup(switch_channel_t *channel, const char *varname, char *value);
|
||||
|
||||
/*!
|
||||
\brief Retrieve a variable from a given channel
|
||||
@@ -235,16 +226,14 @@ SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, ch
|
||||
* pool is NULL, then an internal, non-thread-safe iterator is used.
|
||||
* @remark Use switch_hash_next and switch_hash_this with this function to iterate all the channel variables
|
||||
*/
|
||||
SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel,
|
||||
switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Assign a caller extension to a given channel
|
||||
\param channel channel to assign extension to
|
||||
\param caller_extension extension to assign
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel_t *channel,
|
||||
switch_caller_extension_t *caller_extension);
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel_t *channel, switch_caller_extension_t *caller_extension);
|
||||
|
||||
/*!
|
||||
\brief Retrieve caller extension from a given channel
|
||||
@@ -282,11 +271,9 @@ SWITCH_DECLARE(void) switch_channel_set_state_flag(switch_channel_t *channel, sw
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_clear_flag(switch_channel_t *channel, switch_channel_flag_t flags);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t *channel,
|
||||
const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t *channel, const char *file, const char *func, int line);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_channel_t *channel,
|
||||
const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_channel_t *channel, const char *file, const char *func, int line);
|
||||
|
||||
/*!
|
||||
\brief Answer a channel (initiate/acknowledge a successful connection)
|
||||
@@ -309,8 +296,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan
|
||||
*/
|
||||
#define switch_channel_mark_pre_answered(channel) switch_channel_perform_mark_pre_answered(channel, __FILE__, __SWITCH_FUNC__, __LINE__)
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_ring_ready(switch_channel_t *channel,
|
||||
const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_ring_ready(switch_channel_t *channel, const char *file, const char *func, int line);
|
||||
/*!
|
||||
\brief Send Ringing message to a channel
|
||||
\param channel channel to ring
|
||||
@@ -319,14 +305,11 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_ring_ready(switch_channel
|
||||
#define switch_channel_ring_ready(channel) switch_channel_perform_ring_ready(channel, __FILE__, __SWITCH_FUNC__, __LINE__)
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel_t *channel,
|
||||
const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel_t *channel, const char *file, const char *func, int line);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_channel_t *channel,
|
||||
const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_channel_t *channel, const char *file, const char *func, int line);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_ring_ready(switch_channel_t *channel,
|
||||
const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_ring_ready(switch_channel_t *channel, const char *file, const char *func, int line);
|
||||
|
||||
/*!
|
||||
\brief Indicate progress on a channel to attempt early media
|
||||
@@ -348,16 +331,14 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_ring_ready(switch_ch
|
||||
\param state_handler table of state handler functions
|
||||
\return the index number/priority of the table negative value indicates failure
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel_t *channel,
|
||||
const switch_state_handler_table_t *state_handler);
|
||||
SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel_t *channel, const switch_state_handler_table_t *state_handler);
|
||||
|
||||
/*!
|
||||
\brief clear a state handler table from a given channel
|
||||
\param channel channel from which to clear the state handler table
|
||||
\param state_handler table of state handler functions
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_clear_state_handler(switch_channel_t *channel,
|
||||
const switch_state_handler_table_t *state_handler);
|
||||
SWITCH_DECLARE(void) switch_channel_clear_state_handler(switch_channel_t *channel, const switch_state_handler_table_t *state_handler);
|
||||
|
||||
/*!
|
||||
\brief Retrieve an state handler tablefrom a given channel at given index level
|
||||
@@ -365,8 +346,7 @@ SWITCH_DECLARE(void) switch_channel_clear_state_handler(switch_channel_t *channe
|
||||
\param index the index of the state handler table (start from 0)
|
||||
\return given channel's state handler table at given index or NULL if requested index does not exist.
|
||||
*/
|
||||
SWITCH_DECLARE(const switch_state_handler_table_t *) switch_channel_get_state_handler(switch_channel_t *channel,
|
||||
int index);
|
||||
SWITCH_DECLARE(const switch_state_handler_table_t *) switch_channel_get_state_handler(switch_channel_t *channel, int index);
|
||||
|
||||
/*!
|
||||
\brief Set private data on channel
|
||||
@@ -402,9 +382,7 @@ SWITCH_DECLARE(char *) switch_channel_get_name(switch_channel_t *channel);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_channel_t *channel,
|
||||
const char *file,
|
||||
const char *func,
|
||||
int line, switch_call_cause_t hangup_cause);
|
||||
const char *file, const char *func, int line, switch_call_cause_t hangup_cause);
|
||||
|
||||
/*!
|
||||
\brief Hangup a channel flagging it's state machine to end
|
||||
|
||||
@@ -88,13 +88,13 @@ struct switch_config {
|
||||
\param file_path path to the file
|
||||
\return 1 (true) on success 0 (false) on failure
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_config_open_file(switch_config_t *cfg, char *file_path);
|
||||
SWITCH_DECLARE(int) switch_config_open_file(switch_config_t * cfg, char *file_path);
|
||||
|
||||
/*!
|
||||
\brief Close a previously opened configuration file
|
||||
\param cfg (switch_config_t *) config handle to use
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_config_close_file(switch_config_t *cfg);
|
||||
SWITCH_DECLARE(void) switch_config_close_file(switch_config_t * cfg);
|
||||
|
||||
/*!
|
||||
\brief Retrieve next name/value pair from configuration file
|
||||
@@ -102,7 +102,7 @@ SWITCH_DECLARE(void) switch_config_close_file(switch_config_t *cfg);
|
||||
\param var pointer to aim at the new variable name
|
||||
\param val pointer to aim at the new value
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_config_next_pair(switch_config_t *cfg, char **var, char **val);
|
||||
SWITCH_DECLARE(int) switch_config_next_pair(switch_config_t * cfg, char **var, char **val);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
/** @} */
|
||||
|
||||
@@ -65,8 +65,7 @@ SWITCH_DECLARE(void) switch_console_printf(switch_text_channel_t channel, const
|
||||
/*!
|
||||
\brief A method akin to printf for dealing with api streams
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_console_stream_write(switch_stream_handle_t *handle, const char *fmt,
|
||||
...) PRINTF_FUNCTION(2, 3);
|
||||
SWITCH_DECLARE(switch_status_t) switch_console_stream_write(switch_stream_handle_t *handle, const char *fmt, ...) PRINTF_FUNCTION(2, 3);
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
|
||||
+57
-112
@@ -124,8 +124,7 @@ struct switch_core_port_allocator;
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_media_bug_add(switch_core_session_t *session,
|
||||
switch_media_bug_callback_t callback,
|
||||
void *user_data,
|
||||
switch_media_bug_flag_t flags, switch_media_bug_t **new_bug);
|
||||
void *user_data, switch_media_bug_flag_t flags, switch_media_bug_t **new_bug);
|
||||
/*!
|
||||
\brief Obtain private data from a media bug
|
||||
\param bug the bug to get the data from
|
||||
@@ -190,9 +189,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
|
||||
\return SWITCH_STATUS_SUCCESS if the operation was a success
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_new(switch_port_t start,
|
||||
switch_port_t end,
|
||||
uint8_t inc,
|
||||
switch_core_port_allocator_t **new_allocator);
|
||||
switch_port_t end, uint8_t inc, switch_core_port_allocator_t **new_allocator);
|
||||
|
||||
/*!
|
||||
\brief Get a port from the port allocator
|
||||
@@ -247,8 +244,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(void);
|
||||
///\{
|
||||
|
||||
#ifdef SWITCH_DEBUG_RWLOCKS
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_read_lock(switch_core_session_t *session,
|
||||
const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_read_lock(switch_core_session_t *session, const char *file, const char *func, int line);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@@ -264,8 +260,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_sessio
|
||||
|
||||
|
||||
#ifdef SWITCH_DEBUG_RWLOCKS
|
||||
SWITCH_DECLARE(void) switch_core_session_perform_write_lock(switch_core_session_t *session,
|
||||
const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(void) switch_core_session_perform_write_lock(switch_core_session_t *session, const char *file, const char *func, int line);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@@ -279,8 +274,7 @@ SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session_t *sessi
|
||||
#endif
|
||||
|
||||
#ifdef SWITCH_DEBUG_RWLOCKS
|
||||
SWITCH_DECLARE(void) switch_core_session_perform_rwunlock(switch_core_session_t *session,
|
||||
const char *file, const char *func, int line);
|
||||
SWITCH_DECLARE(void) switch_core_session_perform_rwunlock(switch_core_session_t *session, const char *file, const char *func, int line);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@@ -321,13 +315,13 @@ SWITCH_DECLARE(const switch_state_handler_table_t *) switch_core_get_state_handl
|
||||
\brief Create a new sub memory pool from the core's master pool
|
||||
\return SWITCH_STATUS_SUCCESS on success
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t **pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t ** pool);
|
||||
|
||||
/*!
|
||||
\brief Returns a subpool back to the main pool
|
||||
\return SWITCH_STATUS_SUCCESS on success
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t **pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t ** pool);
|
||||
|
||||
/*!
|
||||
\brief Start the session's state machine
|
||||
@@ -355,7 +349,7 @@ SWITCH_DECLARE(void *) switch_core_permanent_alloc(switch_size_t memory);
|
||||
\param memory the number of bytes to allocate
|
||||
\return a void pointer to the allocated memory
|
||||
*/
|
||||
SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t *pool, switch_size_t memory);
|
||||
SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t * pool, switch_size_t memory);
|
||||
|
||||
/*!
|
||||
\brief Allocate memory from a session's pool
|
||||
@@ -387,7 +381,7 @@ SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session_t *session
|
||||
\param todup the string to duplicate
|
||||
\return a pointer to the newly duplicated string
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t *pool, const char *todup);
|
||||
SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t * pool, const char *todup);
|
||||
|
||||
/*!
|
||||
\brief printf-style style printing routine. The data is output to a string allocated from the session
|
||||
@@ -405,7 +399,7 @@ SWITCH_DECLARE(char *) switch_core_session_sprintf(switch_core_session_t *sessio
|
||||
\param ... The arguments to use while printing the data
|
||||
\return The new string
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t *pool, const char *fmt, ...);
|
||||
SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t * pool, const char *fmt, ...);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the memory pool from a session
|
||||
@@ -426,7 +420,7 @@ SWITCH_DECLARE(switch_memory_pool_t *) switch_core_session_get_pool(switch_core_
|
||||
\return the newly created session
|
||||
*/
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface_t
|
||||
*endpoint_interface, switch_memory_pool_t **pool);
|
||||
*endpoint_interface, switch_memory_pool_t ** pool);
|
||||
|
||||
/*!
|
||||
\brief Destroy a session and return the memory pool to the core
|
||||
@@ -447,8 +441,7 @@ SWITCH_DECLARE(uint32_t) switch_core_session_count(void);
|
||||
\param pool the pool to use
|
||||
\return the newly created session
|
||||
*/
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name,
|
||||
switch_memory_pool_t **pool);
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t ** pool);
|
||||
|
||||
/*!
|
||||
\brief Launch the session thread (state machine) on a given session
|
||||
@@ -482,9 +475,7 @@ SWITCH_DECLARE(char *) switch_core_session_get_uuid(switch_core_session_t *sessi
|
||||
SWITCH_DECLARE(char *) switch_core_get_uuid(void);
|
||||
|
||||
#ifdef SWITCH_DEBUG_RWLOCKS
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_locate(char *uuid_str,
|
||||
const char *file,
|
||||
const char *func, int line);
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_locate(char *uuid_str, const char *file, const char *func, int line);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@@ -525,8 +516,7 @@ SWITCH_DECLARE(void) switch_core_session_hupall(switch_call_cause_t cause);
|
||||
\param message the switch_core_session_message_t object to send
|
||||
\return the status returned by the message handler
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str,
|
||||
switch_core_session_message_t *message);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str, switch_core_session_message_t *message);
|
||||
|
||||
/*!
|
||||
\brief Queue a message on a session
|
||||
@@ -534,8 +524,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str,
|
||||
\param message the message to queue
|
||||
\return SWITCH_STATUS_SUCCESS if the message was queued
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_message(switch_core_session_t *session,
|
||||
switch_core_session_message_t *message);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_message(switch_core_session_t *session, switch_core_session_message_t *message);
|
||||
|
||||
/*!
|
||||
\brief Queue an indication message on a session
|
||||
@@ -543,8 +532,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_queue_message(switch_core_se
|
||||
\param indication the indication message to queue
|
||||
\return SWITCH_STATUS_SUCCESS if the message was queued
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_indication(switch_core_session_t *session,
|
||||
switch_core_session_message_types_t indication);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_indication(switch_core_session_t *session, switch_core_session_message_types_t indication);
|
||||
|
||||
/*!
|
||||
\brief DE-Queue an message on a given session
|
||||
@@ -552,8 +540,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_queue_indication(switch_core
|
||||
\param message the de-queued message
|
||||
\return the SWITCH_STATUS_SUCCESS if the message was de-queued
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_message(switch_core_session_t *session,
|
||||
switch_core_session_message_t **message);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_message(switch_core_session_t *session, switch_core_session_message_t **message);
|
||||
|
||||
/*!
|
||||
\brief Flush a message queue on a given session
|
||||
@@ -576,8 +563,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(char *uuid_str, s
|
||||
\param event the event to receive
|
||||
\return the status returned by the handler
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_receive_event(switch_core_session_t *session,
|
||||
switch_event_t **event);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_receive_event(switch_core_session_t *session, switch_event_t **event);
|
||||
|
||||
/*!
|
||||
\brief Retrieve private user data from a session
|
||||
@@ -623,8 +609,7 @@ SWITCH_DECLARE(int) switch_core_session_get_stream_count(switch_core_session_t *
|
||||
\param func a function to execute in the thread
|
||||
\param obj an arguement
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_session_launch_thread(switch_core_session_t *session,
|
||||
void *(*func) (switch_thread_t *, void *), void *obj);
|
||||
SWITCH_DECLARE(void) switch_core_session_launch_thread(switch_core_session_t *session, void *(*func) (switch_thread_t *, void *), void *obj);
|
||||
|
||||
/*!
|
||||
\brief Signal a thread using a thread session to terminate
|
||||
@@ -638,8 +623,7 @@ SWITCH_DECLARE(void) switch_core_thread_session_end(switch_core_thread_session_t
|
||||
\param stream_id which logical media channel to use
|
||||
\param thread_session the thread_session to use
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session,
|
||||
switch_core_thread_session_t *thread_session, int stream_id);
|
||||
SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session, switch_core_thread_session_t *thread_session, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Request an outgoing session spawned from an existing session using a desired endpoing module
|
||||
@@ -653,8 +637,7 @@ SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session,
|
||||
SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
|
||||
char *endpoint_name,
|
||||
switch_caller_profile_t *caller_profile,
|
||||
switch_core_session_t **new_session,
|
||||
switch_memory_pool_t **pool);
|
||||
switch_core_session_t **new_session, switch_memory_pool_t ** pool);
|
||||
|
||||
/*!
|
||||
\brief Answer the channel of a given session
|
||||
@@ -669,8 +652,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_answer_channel(switch_core_s
|
||||
\param message the message to recieve
|
||||
\return the status returned by the message handler
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_receive_message(switch_core_session_t *session,
|
||||
switch_core_session_message_t *message);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_receive_message(switch_core_session_t *session, switch_core_session_message_t *message);
|
||||
|
||||
/*!
|
||||
\brief Queue an event on a given session
|
||||
@@ -694,8 +676,7 @@ SWITCH_DECLARE(int32_t) switch_core_session_event_count(switch_core_session_t *s
|
||||
\param event the de-queued event
|
||||
\return the SWITCH_STATUS_SUCCESS if the event was de-queued
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_event(switch_core_session_t *session,
|
||||
switch_event_t **event);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_event(switch_core_session_t *session, switch_event_t **event);
|
||||
|
||||
/*!
|
||||
\brief Queue a private event on a given session
|
||||
@@ -703,8 +684,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_event(switch_core_se
|
||||
\param event the event to queue
|
||||
\return the status returned by the message handler
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_private_event(switch_core_session_t *session,
|
||||
switch_event_t **event);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_private_event(switch_core_session_t *session, switch_event_t **event);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -720,8 +700,7 @@ SWITCH_DECLARE(int32_t) switch_core_session_private_event_count(switch_core_sess
|
||||
\param event the de-queued event
|
||||
\return the SWITCH_STATUS_SUCCESS if the event was de-queued
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_private_event(switch_core_session_t *session,
|
||||
switch_event_t **event);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_private_event(switch_core_session_t *session, switch_event_t **event);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -732,8 +711,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_private_event(switch
|
||||
\param stream_id which logical media channel to use
|
||||
\return SWITCH_STATUS_SUCCESS a the frame was read
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame,
|
||||
int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Reset the buffers and resampler on a session
|
||||
@@ -749,14 +727,11 @@ SWITCH_DECLARE(void) switch_core_session_reset(switch_core_session_t *session);
|
||||
\param stream_id which logical media channel to use
|
||||
\return SWITCH_STATUS_SUCCESS a the frame was written
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_session_t *session, switch_frame_t *frame,
|
||||
int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_core_session_t *session,
|
||||
const char *file,
|
||||
const char *func,
|
||||
int line, switch_signal_t sig);
|
||||
const char *file, const char *func, int line, switch_signal_t sig);
|
||||
/*!
|
||||
\brief Send a signal to a channel
|
||||
\param session session to send signal to
|
||||
@@ -772,8 +747,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_
|
||||
\param stream_id which logical media channel to use
|
||||
\return SWITCH_STATUS_SUCCESS if data is available for read within timeframe specified
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_read(switch_core_session_t *session, int timeout,
|
||||
int stream_id);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_read(switch_core_session_t *session, int timeout, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Wait for a session to be ready for output
|
||||
@@ -782,8 +756,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_read(switch_core_ses
|
||||
\param stream_id which logical media channel to use
|
||||
\return SWITCH_STATUS_SUCCESS if the session is available for write within timeframe specified
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_write(switch_core_session_t *session, int timeout,
|
||||
int stream_id);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_write(switch_core_session_t *session, int timeout, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Send DTMF to a session
|
||||
@@ -805,14 +778,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(switch_core_sessio
|
||||
\param pool the pool to use for the new hash
|
||||
\return SWITCH_STATUS_SUCCESS if the hash is created
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t **hash, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t ** hash, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Destroy an existing hash table
|
||||
\param hash the hash to destroy
|
||||
\return SWITCH_STATUS_SUCCESS if the hash is destroyed
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_destroy(switch_hash_t *hash);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_destroy(switch_hash_t * hash);
|
||||
|
||||
/*!
|
||||
\brief Insert data into a hash
|
||||
@@ -822,7 +795,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_destroy(switch_hash_t *hash);
|
||||
\return SWITCH_STATUS_SUCCESS if the data is added
|
||||
\note the string key must be a constant or a dynamic string
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert(switch_hash_t *hash, const char *key, const void *data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert(switch_hash_t * hash, const char *key, const void *data);
|
||||
|
||||
/*!
|
||||
\brief Insert data into a hash with dynamicly allocated key name
|
||||
@@ -831,7 +804,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_insert(switch_hash_t *hash, con
|
||||
\param data the data to add
|
||||
\return SWITCH_STATUS_SUCCESS if the data is added
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert_dup(switch_hash_t *hash, const char *key, const void *data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert_dup(switch_hash_t * hash, const char *key, const void *data);
|
||||
|
||||
/*!
|
||||
\brief Delete data from a hash based on desired key
|
||||
@@ -839,7 +812,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_insert_dup(switch_hash_t *hash,
|
||||
\param key the key from which to delete the data
|
||||
\return SWITCH_STATUS_SUCCESS if the data is deleted
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, const char *key);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t * hash, const char *key);
|
||||
|
||||
/*!
|
||||
\brief Retrieve data from a given hash
|
||||
@@ -847,7 +820,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, con
|
||||
\param key the key to retrieve
|
||||
\return a pointer to the data held in the key
|
||||
*/
|
||||
SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t *hash, const char *key);
|
||||
SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t * hash, const char *key);
|
||||
///\}
|
||||
|
||||
///\defgroup timer Timer Functions
|
||||
@@ -862,8 +835,7 @@ SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t *hash, const char *ke
|
||||
\param pool the memory pool to use for allocation
|
||||
\return
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval,
|
||||
int samples, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Wait for one cycle on an existing timer
|
||||
@@ -916,9 +888,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec,
|
||||
uint32_t rate,
|
||||
int ms,
|
||||
int channels,
|
||||
uint32_t flags,
|
||||
const switch_codec_settings_t *codec_settings,
|
||||
switch_memory_pool_t *pool);
|
||||
uint32_t flags, const switch_codec_settings_t *codec_settings, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Encode data using a codec handle
|
||||
@@ -939,9 +909,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_encode(switch_codec_t *codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate,
|
||||
void *encoded_data,
|
||||
uint32_t * encoded_data_len,
|
||||
uint32_t * encoded_rate, unsigned int *flag);
|
||||
void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag);
|
||||
|
||||
/*!
|
||||
\brief Decode data using a codec handle
|
||||
@@ -962,9 +930,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_decode(switch_codec_t *codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate,
|
||||
void *decoded_data,
|
||||
uint32_t * decoded_data_len,
|
||||
uint32_t * decoded_rate, unsigned int *flag);
|
||||
void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag);
|
||||
|
||||
/*!
|
||||
\brief Destroy an initalized codec handle
|
||||
@@ -979,8 +945,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_destroy(switch_codec_t *codec)
|
||||
\param codec the codec to add
|
||||
\return SWITCH_STATUS_SUCCESS if successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(switch_core_session_t *session,
|
||||
switch_codec_t *codec);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(switch_core_session_t *session, switch_codec_t *codec);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the read codec from a given session
|
||||
@@ -995,8 +960,7 @@ SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_read_codec(switch_core_
|
||||
\param codec the codec to add
|
||||
\return SWITCH_STATUS_SUCCESS if successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_set_write_codec(switch_core_session_t *session,
|
||||
switch_codec_t *codec);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_set_write_codec(switch_core_session_t *session, switch_codec_t *codec);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the write codec from a given session
|
||||
@@ -1024,7 +988,7 @@ SWITCH_DECLARE(switch_core_db_t *) switch_core_db_open_file(char *filename);
|
||||
\return SWITCH_STATUS_SUCCESS if successful
|
||||
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t *db, char *sql, uint32_t retries);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t * db, char *sql, uint32_t retries);
|
||||
|
||||
/*!
|
||||
\brief perform a test query then perform a reactive query if the first one fails
|
||||
@@ -1032,7 +996,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db
|
||||
\param test_sql the test sql
|
||||
\param reactive_sql the reactive sql
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t *db, char *test_sql, char *reactive_sql);
|
||||
SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t * db, char *test_sql, char *reactive_sql);
|
||||
|
||||
#define SWITCH_CORE_DB "core"
|
||||
/*!
|
||||
@@ -1057,9 +1021,7 @@ SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t *db, char *te
|
||||
\note the loadable module used is chosen based on the file extension
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh,
|
||||
char *file_path,
|
||||
uint8_t channels,
|
||||
uint32_t rate, unsigned int flags, switch_memory_pool_t *pool);
|
||||
char *file_path, uint8_t channels, uint32_t rate, unsigned int flags, switch_memory_pool_t * pool);
|
||||
/*!
|
||||
\brief Read media from a file handle
|
||||
\param fh the file handle to read from (must be initilized by you memset all 0 for read, fill in channels and rate for write)
|
||||
@@ -1086,8 +1048,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_write(switch_file_handle_t *fh,
|
||||
\param whence the indicator (see traditional seek)
|
||||
\return SWITCH_STATUS_SUCCESS with cur_pos adjusted to new position
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_seek(switch_file_handle_t *fh, unsigned int *cur_pos, int64_t samples,
|
||||
int whence);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_seek(switch_file_handle_t *fh, unsigned int *cur_pos, int64_t samples, int whence);
|
||||
|
||||
/*!
|
||||
\brief Set metadata to the desired string
|
||||
@@ -1096,8 +1057,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_seek(switch_file_handle_t *fh,
|
||||
\param string the string to add
|
||||
\return SWITCH_STATUS_SUCCESS with cur_pos adjusted to new position
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_set_string(switch_file_handle_t *fh, switch_audio_col_t col,
|
||||
const char *string);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_set_string(switch_file_handle_t *fh, switch_audio_col_t col, const char *string);
|
||||
|
||||
/*!
|
||||
\brief get metadata of the desired string
|
||||
@@ -1106,8 +1066,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_set_string(switch_file_handle_t
|
||||
\param string pointer to the string to fetch
|
||||
\return SWITCH_STATUS_SUCCESS with cur_pos adjusted to new position
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_get_string(switch_file_handle_t *fh, switch_audio_col_t col,
|
||||
const char **string);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_get_string(switch_file_handle_t *fh, switch_audio_col_t col, const char **string);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -1133,9 +1092,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh)
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh,
|
||||
char *module_name,
|
||||
char *voice_name,
|
||||
unsigned int rate,
|
||||
switch_speech_flag_t *flags, switch_memory_pool_t *pool);
|
||||
char *voice_name, unsigned int rate, switch_speech_flag_t *flags, switch_memory_pool_t * pool);
|
||||
/*!
|
||||
\brief Feed text to the TTS module
|
||||
\param sh the speech handle to feed
|
||||
@@ -1143,8 +1100,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_speech_open(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_feed_tts(switch_speech_handle_t *sh, char *text,
|
||||
switch_speech_flag_t *flags);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags);
|
||||
|
||||
/*!
|
||||
\brief Flush TTS audio on a given handle
|
||||
@@ -1186,9 +1142,7 @@ SWITCH_DECLARE(void) switch_core_speech_float_param_tts(switch_speech_handle_t *
|
||||
\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,
|
||||
uint32_t * rate, switch_speech_flag_t *flags);
|
||||
void *data, switch_size_t *datalen, uint32_t * rate, switch_speech_flag_t *flags);
|
||||
/*!
|
||||
\brief Close an open speech handle
|
||||
\param sh the speech handle to close
|
||||
@@ -1211,9 +1165,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_speech_close(switch_speech_handle_t
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
|
||||
char *module_name,
|
||||
char *codec,
|
||||
int rate,
|
||||
char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool);
|
||||
char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Close an asr handle
|
||||
@@ -1231,8 +1183,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_close(switch_asr_handle_t *ah, s
|
||||
\param flags flags to influence behaviour
|
||||
\return SWITCH_STATUS_SUCCESS
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_feed(switch_asr_handle_t *ah, void *data, unsigned int len,
|
||||
switch_asr_flag_t *flags);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_feed(switch_asr_handle_t *ah, void *data, unsigned int len, switch_asr_flag_t *flags);
|
||||
|
||||
/*!
|
||||
\brief Check an asr handle for results
|
||||
@@ -1249,8 +1200,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_check_results(switch_asr_handle_
|
||||
\param flags flags to influence behaviour
|
||||
\return SWITCH_STATUS_SUCCESS
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_get_results(switch_asr_handle_t *ah, char **xmlstr,
|
||||
switch_asr_flag_t *flags);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_get_results(switch_asr_handle_t *ah, char **xmlstr, switch_asr_flag_t *flags);
|
||||
|
||||
/*!
|
||||
\brief Load a grammar to an asr handle
|
||||
@@ -1300,9 +1250,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_resume(switch_asr_handle_t *ah);
|
||||
\return SWITCH_STATUS_SUCCESS if the handle is opened
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_directory_open(switch_directory_handle_t *dh,
|
||||
char *module_name,
|
||||
char *source,
|
||||
char *dsn, char *passwd, switch_memory_pool_t *pool);
|
||||
char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Query a directory handle
|
||||
@@ -1362,9 +1310,7 @@ SWITCH_DECLARE(switch_bool_t) switch_core_ready(void);
|
||||
\param datalen size in bytes of data.
|
||||
\return SUCCESS on sucess.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_management_exec(char *relative_oid,
|
||||
switch_management_action_t action,
|
||||
char *data, switch_size_t datalen);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_management_exec(char *relative_oid, switch_management_action_t action, char *data, switch_size_t datalen);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -1414,8 +1360,7 @@ SWITCH_DECLARE(FILE *) switch_core_get_console(void);
|
||||
/*!
|
||||
\brief Launch a thread
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_launch_thread(void *(*func) (switch_thread_t *, void *), void *obj,
|
||||
switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(void) switch_core_launch_thread(void *(*func) (switch_thread_t *, void *), void *obj, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Initiate Globals
|
||||
|
||||
@@ -50,7 +50,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
* Each open database is represented by an instance of the
|
||||
* following opaque structure.
|
||||
*/
|
||||
typedef struct sqlite3 switch_core_db_t;
|
||||
typedef struct sqlite3 switch_core_db_t;
|
||||
typedef struct sqlite3_stmt switch_core_db_stmt_t;
|
||||
|
||||
typedef int (*switch_core_db_callback_func_t) (void *pArg, int argc, char **argv, char **columnNames);
|
||||
@@ -82,7 +82,7 @@ typedef void (*switch_core_db_destructor_type_t) (void *);
|
||||
* this routine is called. Otherwise, SWITCH_CORE_DB_BUSY is returned and the
|
||||
* database connection remains open.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t *db);
|
||||
SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t * db);
|
||||
|
||||
/**
|
||||
* Open the database file "filename". The "filename" is UTF-8
|
||||
@@ -99,7 +99,7 @@ SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t *db);
|
||||
* with the switch_core_db_t* handle should be released by passing it to
|
||||
* switch_core_db_close() when it is no longer required.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t **ppDb);
|
||||
SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t ** ppDb);
|
||||
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -164,7 +164,7 @@ SWITCH_DECLARE(int) switch_core_db_column_count(switch_core_db_stmt_t *pStmt);
|
||||
* The string "not an error" is returned when the most recent API call was
|
||||
* successful.
|
||||
*/
|
||||
SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t *db);
|
||||
SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t * db);
|
||||
|
||||
/**
|
||||
* A function to executes one or more statements of SQL.
|
||||
@@ -206,9 +206,7 @@ SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t *db);
|
||||
* behavior can be modified somewhat using the sswitch_core_db_busy_handler()
|
||||
* and switch_core_db_busy_timeout() functions below.)
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t *db,
|
||||
const char *sql,
|
||||
switch_core_db_callback_func_t callback, void *data, char **errmsg);
|
||||
SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t * db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg);
|
||||
|
||||
/**
|
||||
* This function is called to delete a compiled
|
||||
@@ -248,9 +246,7 @@ SWITCH_DECLARE(int) switch_core_db_finalize(switch_core_db_stmt_t *pStmt);
|
||||
*
|
||||
* On success, SWITCH_CORE_DB_OK is returned. Otherwise an error code is returned.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t *db,
|
||||
const char *zSql,
|
||||
int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail);
|
||||
SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t * db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail);
|
||||
|
||||
/**
|
||||
* After an SQL query has been compiled with a call to either
|
||||
@@ -367,8 +363,7 @@ SWITCH_DECLARE(int) switch_core_db_bind_int64(switch_core_db_stmt_t *pStmt, int
|
||||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_bind_text(switch_core_db_stmt_t *pStmt, int i, const char *zData, int nData,
|
||||
switch_core_db_destructor_type_t xDel);
|
||||
SWITCH_DECLARE(int) switch_core_db_bind_text(switch_core_db_stmt_t *pStmt, int i, const char *zData, int nData, switch_core_db_destructor_type_t xDel);
|
||||
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
@@ -401,7 +396,7 @@ SWITCH_DECLARE(int) switch_core_db_bind_double(switch_core_db_stmt_t *pStmt, int
|
||||
*
|
||||
* This function is similar to the mysql_insert_id() function from MySQL.
|
||||
*/
|
||||
SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t *db);
|
||||
SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t * db);
|
||||
|
||||
/**
|
||||
* This next routine is really just a wrapper around switch_core_db_exec().
|
||||
@@ -444,7 +439,7 @@ SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t *db);
|
||||
*
|
||||
* The return value of this routine is the same as from switch_core_db_exec().
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t *db, /* An open database */
|
||||
SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t * db, /* An open database */
|
||||
const char *sql, /* SQL to be executed */
|
||||
char ***resultp, /* Result written to a char *[] that this points to */
|
||||
int *nrow, /* Number of result rows written here */
|
||||
|
||||
@@ -47,15 +47,12 @@ typedef struct switch_io_event_hook_send_dtmf switch_io_event_hook_send_dtmf_t;
|
||||
typedef struct switch_io_event_hook_state_change switch_io_event_hook_state_change_t;
|
||||
|
||||
|
||||
typedef switch_status_t (*switch_outgoing_channel_hook_t) (switch_core_session_t *, switch_caller_profile_t *,
|
||||
switch_core_session_t *);
|
||||
typedef switch_status_t (*switch_outgoing_channel_hook_t) (switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t *);
|
||||
typedef switch_status_t (*switch_answer_channel_hook_t) (switch_core_session_t *);
|
||||
typedef switch_status_t (*switch_receive_message_hook_t) (switch_core_session_t *, switch_core_session_message_t *);
|
||||
typedef switch_status_t (*switch_receive_event_hook_t) (switch_core_session_t *, switch_event_t *);
|
||||
typedef switch_status_t (*switch_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t,
|
||||
int);
|
||||
typedef switch_status_t (*switch_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t,
|
||||
int);
|
||||
typedef switch_status_t (*switch_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_kill_channel_hook_t) (switch_core_session_t *, int);
|
||||
typedef switch_status_t (*switch_waitfor_read_hook_t) (switch_core_session_t *, int, int);
|
||||
typedef switch_status_t (*switch_waitfor_write_hook_t) (switch_core_session_t *, int, int);
|
||||
@@ -180,9 +177,7 @@ extern switch_io_event_hooks_t switch_core_session_get_event_hooks(switch_core_s
|
||||
\param outgoing_channel hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_outgoing_channel(switch_core_session_t *session,
|
||||
switch_outgoing_channel_hook_t
|
||||
outgoing_channel);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_outgoing_channel(switch_core_session_t *session, switch_outgoing_channel_hook_t outgoing_channel);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session answers a channel
|
||||
@@ -190,8 +185,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_outgoing_channel(swit
|
||||
\param answer_channel hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_answer_channel(switch_core_session_t *session,
|
||||
switch_answer_channel_hook_t answer_channel);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_answer_channel(switch_core_session_t *session, switch_answer_channel_hook_t answer_channel);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session sends a message
|
||||
@@ -199,9 +193,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_answer_channel(switch
|
||||
\param receive_message hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_receive_message(switch_core_session_t *session,
|
||||
switch_receive_message_hook_t
|
||||
receive_message);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_receive_message(switch_core_session_t *session, switch_receive_message_hook_t receive_message);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session reads a frame
|
||||
@@ -209,8 +201,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_receive_message(switc
|
||||
\param read_frame hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_read_frame(switch_core_session_t *session,
|
||||
switch_read_frame_hook_t read_frame);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_read_frame(switch_core_session_t *session, switch_read_frame_hook_t read_frame);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session writes a frame
|
||||
@@ -218,8 +209,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_read_frame(switch_cor
|
||||
\param write_frame hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_write_frame(switch_core_session_t *session,
|
||||
switch_write_frame_hook_t write_frame);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_write_frame(switch_core_session_t *session, switch_write_frame_hook_t write_frame);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session kills a channel
|
||||
@@ -227,8 +217,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_write_frame(switch_co
|
||||
\param kill_channel hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_kill_channel(switch_core_session_t *session,
|
||||
switch_kill_channel_hook_t kill_channel);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_kill_channel(switch_core_session_t *session, switch_kill_channel_hook_t kill_channel);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session waits for a read event
|
||||
@@ -236,8 +225,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_kill_channel(switch_c
|
||||
\param waitfor_read hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_waitfor_read(switch_core_session_t *session,
|
||||
switch_waitfor_read_hook_t waitfor_read);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_waitfor_read(switch_core_session_t *session, switch_waitfor_read_hook_t waitfor_read);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session waits for a write event
|
||||
@@ -245,8 +233,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_waitfor_read(switch_c
|
||||
\param waitfor_write hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_waitfor_write(switch_core_session_t *session,
|
||||
switch_waitfor_write_hook_t waitfor_write);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_waitfor_write(switch_core_session_t *session, switch_waitfor_write_hook_t waitfor_write);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session sends dtmf
|
||||
@@ -254,8 +241,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_waitfor_write(switch_
|
||||
\param send_dtmf hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_send_dtmf(switch_core_session_t *session,
|
||||
switch_send_dtmf_hook_t send_dtmf);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_send_dtmf(switch_core_session_t *session, switch_send_dtmf_hook_t send_dtmf);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session receives a state change signal
|
||||
@@ -263,8 +249,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_send_dtmf(switch_core
|
||||
\param state_change hook to bind
|
||||
\return SWITCH_STATUS_SUCCESS on suceess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_state_change(switch_core_session_t *session,
|
||||
switch_answer_channel_hook_t state_change);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_state_change(switch_core_session_t *session, switch_answer_channel_hook_t state_change);
|
||||
///\}
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
|
||||
@@ -123,7 +123,7 @@ struct switch_event_node {
|
||||
\param pool the memory pool to use for the event system (creates a new one if NULL)
|
||||
\return SWITCH_STATUS_SUCCESS when complete
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Stop the eventing system
|
||||
@@ -138,8 +138,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void);
|
||||
\param subclass_name the subclass name for custom event (only valid when event_id is SWITCH_EVENT_CUSTOM)
|
||||
\return SWITCH_STATUS_SUCCESS on success
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_create_subclass(switch_event_t **event, switch_event_types_t event_id,
|
||||
const char *subclass_name);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_create_subclass(switch_event_t **event, switch_event_types_t event_id, const char *subclass_name);
|
||||
|
||||
/*!
|
||||
\brief Set the priority of an event
|
||||
@@ -173,8 +172,7 @@ SWITCH_DECLARE(char *) switch_event_get_body(switch_event_t *event);
|
||||
\return SWITCH_STATUS_SUCCESS if the header was added
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_add_header(switch_event_t *event, switch_stack_t stack,
|
||||
const char *header_name, const char *fmt,
|
||||
...) PRINTF_FUNCTION(4, 5);
|
||||
const char *header_name, const char *fmt, ...) PRINTF_FUNCTION(4, 5);
|
||||
|
||||
/*!
|
||||
\brief Destroy an event
|
||||
@@ -199,8 +197,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_dup(switch_event_t **event, switch_
|
||||
\param user_data optional private data to pass to the event handlers
|
||||
\return
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event,
|
||||
void *user_data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event, void *user_data);
|
||||
|
||||
/*!
|
||||
\brief Bind an event callback to a specific event
|
||||
@@ -211,8 +208,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun
|
||||
\param user_data optional user specific data to pass whenever the callback is invoked
|
||||
\return SWITCH_STATUS_SUCCESS if the event was binded
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name,
|
||||
switch_event_callback_t callback, void *user_data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, void *user_data);
|
||||
|
||||
/*!
|
||||
\brief Render the name of an event id enumeration
|
||||
@@ -270,8 +266,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_running(void);
|
||||
\return SWITCH_STATUS_SUCCESS if the body was added to the event
|
||||
\note the body parameter can be shadowed by the switch_event_reserve_subclass_detailed function
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_add_body(switch_event_t *event, const char *fmt, ...) PRINTF_FUNCTION(2,
|
||||
3);
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_add_body(switch_event_t *event, const char *fmt, ...) PRINTF_FUNCTION(2, 3);
|
||||
|
||||
|
||||
/*!
|
||||
|
||||
+50
-91
@@ -85,8 +85,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
|
||||
\param timeout a timeout in milliseconds
|
||||
\return SWITCH_STATUS_SUCCESS to keep the collection moving.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_session_t *session,
|
||||
switch_input_args_t *args, uint32_t timeout);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_session_t *session, switch_input_args_t *args, uint32_t timeout);
|
||||
|
||||
/*!
|
||||
\brief Wait for specified number of DTMF digits, untile terminator is received or until the channel hangs up.
|
||||
@@ -102,9 +101,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_s
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_session_t *session,
|
||||
char *buf,
|
||||
uint32_t buflen,
|
||||
uint32_t maxdigits,
|
||||
const char *terminators,
|
||||
char *terminator, uint32_t timeout);
|
||||
uint32_t maxdigits, const char *terminators, char *terminator, uint32_t timeout);
|
||||
|
||||
/*!
|
||||
\brief Engage background Speech detection on a session
|
||||
@@ -117,9 +114,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *session,
|
||||
char *mod_name,
|
||||
char *grammar,
|
||||
char *path, char *dest, switch_asr_handle_t *ah);
|
||||
char *mod_name, char *grammar, char *path, char *dest, switch_asr_handle_t *ah);
|
||||
|
||||
/*!
|
||||
\brief Stop background Speech detection on a session
|
||||
@@ -149,8 +144,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_resume_detect_speech(switch_core_sess
|
||||
\param path the grammar path
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_load_grammar(switch_core_session_t *session, char *grammar,
|
||||
char *path);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_load_grammar(switch_core_session_t *session, char *grammar, char *path);
|
||||
|
||||
/*!
|
||||
\brief Unload a grammar on a background speech detection handle
|
||||
@@ -167,8 +161,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_c
|
||||
\param fh file handle to use (NULL for builtin one)
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t *session, char *file,
|
||||
switch_file_handle_t *fh);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t *session, char *file, switch_file_handle_t *fh);
|
||||
|
||||
/*!
|
||||
\brief Stop Recording a session
|
||||
@@ -192,8 +185,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_stop_inband_dtmf_session(switch_core_
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
\note passing a NULL dtmf_callback nad a not NULL buf indicates to copy any dtmf to buf and stop playback.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *session,
|
||||
switch_file_handle_t *fh, char *file, switch_input_args_t *args);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *session, switch_file_handle_t *fh, char *file, switch_input_args_t *args);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -209,8 +201,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
|
||||
\note passing a NULL dtmf_callback nad a not NULL buf indicates to copy any dtmf to buf and stop recording.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *session,
|
||||
switch_file_handle_t *fh,
|
||||
char *file, switch_input_args_t *args, uint32_t limit);
|
||||
switch_file_handle_t *fh, char *file, switch_input_args_t *args, uint32_t limit);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -236,15 +227,11 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
|
||||
uint32_t timeout,
|
||||
char *valid_terminators,
|
||||
char *audio_file,
|
||||
char *bad_input_audio_file,
|
||||
void *digit_buffer,
|
||||
uint32_t digit_buffer_length, char *digits_regex);
|
||||
char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length, char *digits_regex);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session_t *session,
|
||||
switch_speech_handle_t *sh,
|
||||
switch_codec_t *codec,
|
||||
switch_timer_t *timer,
|
||||
char *text, switch_input_args_t *args);
|
||||
switch_codec_t *codec, switch_timer_t *timer, char *text, switch_input_args_t *args);
|
||||
|
||||
/*!
|
||||
\brief Speak given text with given tts engine
|
||||
@@ -259,9 +246,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *session,
|
||||
char *tts_name,
|
||||
char *voice_name,
|
||||
uint32_t rate, char *text, switch_input_args_t *args);
|
||||
char *tts_name, char *voice_name, uint32_t rate, char *text, switch_input_args_t *args);
|
||||
|
||||
/*!
|
||||
\brief Make an outgoing call
|
||||
@@ -282,9 +267,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
char *bridgeto,
|
||||
uint32_t timelimit_sec,
|
||||
const switch_state_handler_table_t *table,
|
||||
char *cid_name_override,
|
||||
char *cid_num_override,
|
||||
switch_caller_profile_t *caller_profile_override);
|
||||
char *cid_name_override, char *cid_num_override, switch_caller_profile_t *caller_profile_override);
|
||||
|
||||
/*!
|
||||
\brief Bridge Audio from one session to another
|
||||
@@ -297,8 +280,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
|
||||
switch_core_session_t *peer_session,
|
||||
switch_input_callback_function_t dtmf_callback,
|
||||
void *session_data, void *peer_session_data);
|
||||
switch_input_callback_function_t dtmf_callback, void *session_data, void *peer_session_data);
|
||||
|
||||
/*!
|
||||
\brief Bridge Signalling from one session to another
|
||||
@@ -306,8 +288,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
|
||||
\param peer_session the other session
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *session,
|
||||
switch_core_session_t *peer_session);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *session, switch_core_session_t *peer_session);
|
||||
|
||||
/*!
|
||||
\brief Transfer an existing session to another location
|
||||
@@ -316,8 +297,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *
|
||||
\param dialplan the new dialplan (OPTIONAL, may be NULL)
|
||||
\param context the new context (OPTIONAL, may be NULL)
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_t *session, char *extension,
|
||||
char *dialplan, char *context);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_t *session, char *extension, char *dialplan, char *context);
|
||||
|
||||
/*!
|
||||
\brief Transfer an existing session to another location in the future
|
||||
@@ -328,8 +308,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
|
||||
\param context the new context (OPTIONAL, may be NULL)
|
||||
\return the id of the task
|
||||
*/
|
||||
SWITCH_DECLARE(uint32_t) switch_ivr_schedule_transfer(time_t runtime, char *uuid, char *extension, char *dialplan,
|
||||
char *context);
|
||||
SWITCH_DECLARE(uint32_t) switch_ivr_schedule_transfer(time_t runtime, char *uuid, char *extension, char *dialplan, char *context);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -340,8 +319,7 @@ SWITCH_DECLARE(uint32_t) switch_ivr_schedule_transfer(time_t runtime, char *uuid
|
||||
\param bleg hangup up the B-Leg if possible
|
||||
\return the id of the task
|
||||
*/
|
||||
SWITCH_DECLARE(uint32_t) switch_ivr_schedule_hangup(time_t runtime, char *uuid, switch_call_cause_t cause,
|
||||
switch_bool_t bleg);
|
||||
SWITCH_DECLARE(uint32_t) switch_ivr_schedule_hangup(time_t runtime, char *uuid, switch_call_cause_t cause, switch_bool_t bleg);
|
||||
|
||||
/*!
|
||||
\brief Bridge two existing sessions
|
||||
@@ -403,8 +381,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_unhold(switch_core_session_t *session
|
||||
\param flags flags to send to the request (SMF_ECHO_BRIDGED to send the broadcast to both sides of the call)
|
||||
\return the id of the task
|
||||
*/
|
||||
SWITCH_DECLARE(uint32_t) switch_ivr_schedule_broadcast(time_t runtime, char *uuid, char *path,
|
||||
switch_media_flag_t flags);
|
||||
SWITCH_DECLARE(uint32_t) switch_ivr_schedule_broadcast(time_t runtime, char *uuid, char *path, switch_media_flag_t flags);
|
||||
|
||||
/*!
|
||||
\brief Signal the session to broadcast audio
|
||||
@@ -422,8 +399,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_broadcast(char *uuid, char *path, swi
|
||||
\param var the name of the variable to transfer (NULL for all)
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_transfer_variable(switch_core_session_t *sessa, switch_core_session_t *sessb,
|
||||
char *var);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_transfer_variable(switch_core_session_t *sessa, switch_core_session_t *sessb, char *var);
|
||||
|
||||
|
||||
/******************************************************************************************************/
|
||||
@@ -438,15 +414,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_transfer_variable(switch_core_session
|
||||
\param parser a pointer to the object pointer
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t *pool,
|
||||
switch_ivr_digit_stream_parser_t **parser);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t * pool, switch_ivr_digit_stream_parser_t ** parser);
|
||||
|
||||
/*!
|
||||
\brief Destroy a digit stream parser object
|
||||
\param parser a pointer to the parser object
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_destroy(switch_ivr_digit_stream_parser_t *parser);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_destroy(switch_ivr_digit_stream_parser_t * parser);
|
||||
|
||||
/*!
|
||||
\brief Create a new digit stream object
|
||||
@@ -454,15 +429,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_destroy(switch_iv
|
||||
\param stream a pointer to the stream object pointer
|
||||
\return NULL if no match found or consumer data that was associated with a given digit string when matched
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_new(switch_ivr_digit_stream_parser_t *parser,
|
||||
switch_ivr_digit_stream_t **stream);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_new(switch_ivr_digit_stream_parser_t * parser, switch_ivr_digit_stream_t ** stream);
|
||||
|
||||
/*!
|
||||
\brief Destroys a digit stream object
|
||||
\param stream a pointer to the stream object
|
||||
\return NULL if no match found or consumer data that was associated with a given digit string when matched
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_destroy(switch_ivr_digit_stream_t *stream);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_destroy(switch_ivr_digit_stream_t * stream);
|
||||
|
||||
/*!
|
||||
\brief Set a digit string to action mapping
|
||||
@@ -471,8 +445,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_destroy(switch_ivr_digit
|
||||
\param data consumer data attached to this digit string
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_event(switch_ivr_digit_stream_parser_t *parser,
|
||||
char *digits, void *data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_event(switch_ivr_digit_stream_parser_t * parser, char *digits, void *data);
|
||||
|
||||
/*!
|
||||
\brief Delete a string to action mapping
|
||||
@@ -480,8 +453,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_event(switch_
|
||||
\param digits the digit string to be removed from the map
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_del_event(switch_ivr_digit_stream_parser_t *parser,
|
||||
char *digits);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_del_event(switch_ivr_digit_stream_parser_t * parser, char *digits);
|
||||
|
||||
/*!
|
||||
\brief Feed digits collected into the stream for event match testing
|
||||
@@ -489,15 +461,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_del_event(switch_
|
||||
\param digit a digit to collect and test against the map of digit strings
|
||||
\return NULL if no match found or consumer data that was associated with a given digit string when matched
|
||||
*/
|
||||
SWITCH_DECLARE(void *) switch_ivr_digit_stream_parser_feed(switch_ivr_digit_stream_parser_t *parser,
|
||||
switch_ivr_digit_stream_t *stream, char digit);
|
||||
SWITCH_DECLARE(void *) switch_ivr_digit_stream_parser_feed(switch_ivr_digit_stream_parser_t * parser, switch_ivr_digit_stream_t * stream, char digit);
|
||||
|
||||
/*!
|
||||
\brief Reset the collected digit stream to nothing
|
||||
\param stream a pointer to the parser stream object created by switch_ivr_digit_stream_new
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_reset(switch_ivr_digit_stream_t *stream);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_reset(switch_ivr_digit_stream_t * stream);
|
||||
|
||||
/*!
|
||||
\brief Set a digit string terminator
|
||||
@@ -505,8 +476,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_reset(switch_ivr_digit_s
|
||||
\param digit the terminator digit
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(switch_ivr_digit_stream_parser_t *parser,
|
||||
char digit);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(switch_ivr_digit_stream_parser_t * parser, char digit);
|
||||
|
||||
|
||||
/******************************************************************************************************/
|
||||
@@ -541,8 +511,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(sw
|
||||
SWITCH_IVR_ACTION_NOOP, /* No operation */
|
||||
} switch_ivr_action_t;
|
||||
struct switch_ivr_menu;
|
||||
typedef switch_ivr_action_t switch_ivr_menu_action_function_t(struct switch_ivr_menu *, char *, char *, size_t,
|
||||
void *);
|
||||
typedef switch_ivr_action_t switch_ivr_menu_action_function_t(struct switch_ivr_menu *, char *, char *, size_t, void *);
|
||||
typedef struct switch_ivr_menu switch_ivr_menu_t;
|
||||
typedef struct switch_ivr_menu_action switch_ivr_menu_action_t;
|
||||
/******************************************************************************************************/
|
||||
@@ -563,17 +532,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(sw
|
||||
*\param pool memory pool (NULL to create one)
|
||||
*\return SWITCH_STATUS_SUCCESS if the menu was created
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t **new_menu,
|
||||
switch_ivr_menu_t *main,
|
||||
const char *name,
|
||||
const char *greeting_sound,
|
||||
const char *short_greeting_sound,
|
||||
const char *exit_sound,
|
||||
const char *invalid_sound,
|
||||
const char *tts_engine,
|
||||
const char *tts_voice,
|
||||
const char *phrase_lang,
|
||||
int timeout, int max_failures, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t ** new_menu,
|
||||
switch_ivr_menu_t * main,
|
||||
const char *name,
|
||||
const char *greeting_sound,
|
||||
const char *short_greeting_sound,
|
||||
const char *exit_sound,
|
||||
const char *invalid_sound,
|
||||
const char *tts_engine,
|
||||
const char *tts_voice,
|
||||
const char *phrase_lang, int timeout, int max_failures, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
*\brief switch_ivr_menu_bind_action: Bind a keystroke to an action.
|
||||
@@ -583,9 +551,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(sw
|
||||
*\param bind KeyStrokes to bind the action to.
|
||||
*\return SWUTCH_STATUS_SUCCESS if the action was binded
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_bind_action(switch_ivr_menu_t *menu,
|
||||
switch_ivr_action_t ivr_action, const char *arg,
|
||||
const char *bind);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_bind_action(switch_ivr_menu_t * menu, switch_ivr_action_t ivr_action, const char *arg, const char *bind);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -599,9 +565,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(sw
|
||||
*\note The function returns an switch_ivr_action_t enum of what you want to do. and looks to your buffer for args.
|
||||
*\return SWUTCH_STATUS_SUCCESS if the function was binded
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_bind_function(switch_ivr_menu_t *menu,
|
||||
switch_ivr_menu_action_function_t * function,
|
||||
const char *arg, const char *bind);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_bind_function(switch_ivr_menu_t * menu,
|
||||
switch_ivr_menu_action_function_t * function, const char *arg, const char *bind);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -612,15 +577,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(sw
|
||||
*\param obj A void pointer to an object you want to make avaliable to your callback functions that you may have binded with switch_ivr_menu_bind_function.
|
||||
*\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *session, switch_ivr_menu_t *stack,
|
||||
char *name, void *obj);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *session, switch_ivr_menu_t * stack, char *name, void *obj);
|
||||
|
||||
/*!
|
||||
*\brief free a stack of menu objects.
|
||||
*\param stack The top level menu you wish to destroy.
|
||||
*\return SWITCH_STATUS_SUCCESS if the object was a top level menu and it was freed
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_free(switch_ivr_menu_t *stack);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_free(switch_ivr_menu_t * stack);
|
||||
|
||||
struct switch_ivr_menu_xml_ctx;
|
||||
typedef struct switch_ivr_menu_xml_ctx switch_ivr_menu_xml_ctx_t;
|
||||
@@ -632,9 +596,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(sw
|
||||
*\param xml_menu The xml Menu source of the menu to be created
|
||||
*\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_xml_ctx_t *xml_menu_ctx,
|
||||
switch_ivr_menu_t **menu_stack,
|
||||
switch_xml_t xml_menus, switch_xml_t xml_menu);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_xml_ctx_t * xml_menu_ctx,
|
||||
switch_ivr_menu_t ** menu_stack, switch_xml_t xml_menus, switch_xml_t xml_menu);
|
||||
|
||||
/*!
|
||||
*\param xml_menu_ctx The XML menu parser context previously created by switch_ivr_menu_stack_xml_init
|
||||
@@ -642,24 +605,20 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(sw
|
||||
*\param function The menu function callback that will be executed when menu digits are bound to this name
|
||||
*\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_add_custom(switch_ivr_menu_xml_ctx_t *xml_menu_ctx,
|
||||
char *name,
|
||||
switch_ivr_menu_action_function_t * function);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_add_custom(switch_ivr_menu_xml_ctx_t * xml_menu_ctx,
|
||||
char *name, switch_ivr_menu_action_function_t * function);
|
||||
|
||||
/*!
|
||||
*\param xml_menu_ctx A pointer of a XML menu parser context to be created
|
||||
*\param pool memory pool (NULL to create one)
|
||||
*\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_xml_ctx_t **xml_menu_ctx,
|
||||
switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_xml_ctx_t ** xml_menu_ctx, switch_memory_pool_t * pool);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session,
|
||||
char *macro_name,
|
||||
char *data, char *lang, switch_input_args_t *args);
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session, char *macro_name, char *data, char *lang, switch_input_args_t *args);
|
||||
/** @} */
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
||||
@@ -204,8 +204,7 @@ SWITCH_DECLARE(switch_management_interface_t *) switch_loadable_module_get_manag
|
||||
\param arraylen the max size in elements of the array
|
||||
\return the number of elements added to the array
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool,
|
||||
const switch_codec_implementation_t **array, int arraylen);
|
||||
SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t * pool, const switch_codec_implementation_t **array, int arraylen);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -217,8 +216,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool
|
||||
\return the number of elements added to the array
|
||||
\note this function only considers codecs that are listed in the "prefs" array and ignores the rest.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_implementation_t **array,
|
||||
int arraylen, char **prefs, int preflen);
|
||||
SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_implementation_t **array, int arraylen, char **prefs, int preflen);
|
||||
|
||||
/*!
|
||||
\brief Execute a registered API command
|
||||
@@ -228,8 +226,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
|
||||
\param stream stream for output
|
||||
\return the status returned by the API call
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_api_execute(char *cmd, char *arg, switch_core_session_t *session,
|
||||
switch_stream_handle_t *stream);
|
||||
SWITCH_DECLARE(switch_status_t) switch_api_execute(char *cmd, char *arg, switch_core_session_t *session, switch_stream_handle_t *stream);
|
||||
|
||||
|
||||
|
||||
@@ -249,8 +246,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, ch
|
||||
\param filename the path to the module's dll or so file
|
||||
\return SWITCH_STATUS_SUCCESS on a successful load
|
||||
*/
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface,
|
||||
char *filename);
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename);
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_reload(void);
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_pause(void);
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_resume(void);
|
||||
|
||||
@@ -74,7 +74,7 @@ typedef switch_status_t (*switch_log_function_t) (const switch_log_node_t *node,
|
||||
\param pool the memory pool to use
|
||||
\note to be called at application startup by the core
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Shut down the logging engine
|
||||
|
||||
@@ -80,8 +80,7 @@ struct switch_io_event_hooks;
|
||||
/*! \brief A table of i/o routines that an endpoint interface can implement */
|
||||
struct switch_io_routines {
|
||||
/*! creates an outgoing session from given session, caller profile */
|
||||
switch_call_cause_t (*outgoing_channel) (switch_core_session_t *, switch_caller_profile_t *,
|
||||
switch_core_session_t **, switch_memory_pool_t **);
|
||||
switch_call_cause_t (*outgoing_channel) (switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t **);
|
||||
/*! answers the given session's channel */
|
||||
switch_status_t (*answer_channel) (switch_core_session_t *);
|
||||
/*! read a frame from a session */
|
||||
@@ -278,16 +277,13 @@ struct switch_speech_interface {
|
||||
/*! the name of the interface */
|
||||
const char *interface_name;
|
||||
/*! function to open the speech interface */
|
||||
switch_status_t (*speech_open) (switch_speech_handle_t *sh,
|
||||
char *voice_name, int rate, switch_speech_flag_t *flags);
|
||||
switch_status_t (*speech_open) (switch_speech_handle_t *sh, char *voice_name, int rate, switch_speech_flag_t *flags);
|
||||
/*! function to close the speech interface */
|
||||
switch_status_t (*speech_close) (switch_speech_handle_t *, switch_speech_flag_t *flags);
|
||||
/*! function to feed audio to the ASR */
|
||||
switch_status_t (*speech_feed_tts) (switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags);
|
||||
/*! function to read audio from the TTS */
|
||||
switch_status_t (*speech_read_tts) (switch_speech_handle_t *sh,
|
||||
void *data,
|
||||
switch_size_t *datalen, uint32_t * rate, switch_speech_flag_t *flags);
|
||||
switch_status_t (*speech_read_tts) (switch_speech_handle_t *sh, void *data, switch_size_t *datalen, uint32_t * rate, switch_speech_flag_t *flags);
|
||||
void (*speech_flush_tts) (switch_speech_handle_t *sh);
|
||||
void (*speech_text_param_tts) (switch_speech_handle_t *sh, char *param, char *val);
|
||||
void (*speech_numeric_param_tts) (switch_speech_handle_t *sh, char *param, int val);
|
||||
@@ -339,8 +335,7 @@ struct switch_management_interface {
|
||||
/*! the name of the interface */
|
||||
const char *relative_oid;
|
||||
/*! function to open the directory interface */
|
||||
switch_status_t (*management_function) (char *relative_oid, switch_management_action_t action, char *data,
|
||||
switch_size_t datalen);
|
||||
switch_status_t (*management_function) (char *relative_oid, switch_management_action_t action, char *data, switch_size_t datalen);
|
||||
const struct switch_management_interface *next;
|
||||
};
|
||||
|
||||
@@ -468,17 +463,13 @@ struct switch_codec_implementation {
|
||||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate,
|
||||
void *encoded_data,
|
||||
uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag);
|
||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag);
|
||||
/*! function to decode encoded data into raw data */
|
||||
switch_status_t (*decode) (switch_codec_t *codec,
|
||||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate,
|
||||
void *decoded_data,
|
||||
uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag);
|
||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag);
|
||||
/*! deinitalize a codec handle using this implementation */
|
||||
switch_status_t (*destroy) (switch_codec_t *);
|
||||
const struct switch_codec_implementation *next;
|
||||
|
||||
@@ -74,7 +74,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
#undef inline
|
||||
#define inline __inline
|
||||
#ifndef uint32_t
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
@@ -166,9 +166,9 @@ typedef int gid_t;
|
||||
#define PRINTF_FUNCTION(fmtstr,vars)
|
||||
#endif
|
||||
#ifdef SWITCH_INT32
|
||||
typedef SWITCH_INT32 switch_int32_t;
|
||||
typedef SWITCH_INT32 switch_int32_t;
|
||||
#else
|
||||
typedef int32_t switch_int32_t;
|
||||
typedef int32_t switch_int32_t;
|
||||
#endif
|
||||
|
||||
#ifdef SWITCH_SIZE_T
|
||||
|
||||
@@ -40,22 +40,16 @@ SWITCH_BEGIN_EXTERN_C
|
||||
* @ingroup FREESWITCH
|
||||
* @{
|
||||
*/
|
||||
typedef struct real_pcre switch_regex_t;
|
||||
typedef struct real_pcre switch_regex_t;
|
||||
|
||||
SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern,
|
||||
int options,
|
||||
const char **errorptr,
|
||||
int *erroroffset, const unsigned char *tables);
|
||||
SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern, int options, const char **errorptr, int *erroroffset, const unsigned char *tables);
|
||||
|
||||
SWITCH_DECLARE(int) switch_regex_copy_substring(const char *subject,
|
||||
int *ovector,
|
||||
int stringcount, int stringnumber, char *buffer, int size);
|
||||
SWITCH_DECLARE(int) switch_regex_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int size);
|
||||
|
||||
SWITCH_DECLARE(void) switch_regex_free(void *data);
|
||||
|
||||
SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t **new_re, int *ovector,
|
||||
uint32_t olen);
|
||||
SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_count, char *data, char *field_data,
|
||||
SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t ** new_re, int *ovector, uint32_t olen);
|
||||
SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t * re, int match_count, char *data, char *field_data,
|
||||
char *substituted, uint32_t len, int *ovector);
|
||||
|
||||
/*!
|
||||
|
||||
@@ -85,9 +85,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
\return SWITCH_STATUS_SUCCESS if the handle was created
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t **new_resampler,
|
||||
int from_rate,
|
||||
switch_size_t from_size,
|
||||
int to_rate, uint32_t to_size, switch_memory_pool_t *pool);
|
||||
int from_rate, switch_size_t from_size, int to_rate, uint32_t to_size, switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Destroy an existing resampler handle
|
||||
@@ -105,8 +103,7 @@ SWITCH_DECLARE(void) switch_resample_destroy(switch_audio_resampler_t *resampler
|
||||
\param last parameter denoting the last sample is being resampled
|
||||
\return the used size of dst
|
||||
*/
|
||||
SWITCH_DECLARE(uint32_t) switch_resample_process(switch_audio_resampler_t *resampler, float *src, int srclen,
|
||||
float *dst, uint32_t dstlen, int last);
|
||||
SWITCH_DECLARE(uint32_t) switch_resample_process(switch_audio_resampler_t *resampler, float *src, int srclen, float *dst, uint32_t dstlen, int last);
|
||||
|
||||
/*!
|
||||
\brief Convert an array of floats to an array of shorts
|
||||
|
||||
+10
-23
@@ -44,15 +44,14 @@ SWITCH_BEGIN_EXTERN_C
|
||||
///\ingroup core1
|
||||
///\{
|
||||
typedef void (*switch_rtp_invalid_handler_t) (switch_rtp_t *rtp_session,
|
||||
switch_socket_t *sock,
|
||||
void *data, switch_size_t datalen, switch_sockaddr_t *from_addr);
|
||||
switch_socket_t * sock, void *data, switch_size_t datalen, switch_sockaddr_t * from_addr);
|
||||
|
||||
/*!
|
||||
\brief Initilize the RTP System
|
||||
\param pool the memory pool to use for long term allocations
|
||||
\note Generally called by the core_init
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t * pool);
|
||||
|
||||
/*!
|
||||
\brief Request a new port to be used for media
|
||||
@@ -77,9 +76,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
|
||||
switch_payload_t payload,
|
||||
uint32_t samples_per_interval,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags,
|
||||
char *crypto_key,
|
||||
char *timer_name, const char **err, switch_memory_pool_t *pool);
|
||||
switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t * pool);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -105,9 +102,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(char *rx_host,
|
||||
switch_payload_t payload,
|
||||
uint32_t samples_per_interval,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags,
|
||||
char *crypto_key,
|
||||
char *timer_name, const char **err, switch_memory_pool_t *pool);
|
||||
switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t * pool);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -117,8 +112,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(char *rx_host,
|
||||
\param port the remote port
|
||||
\param err pointer for error messages
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_session, char *host, switch_port_t port,
|
||||
const char **err);
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err);
|
||||
|
||||
/*!
|
||||
\brief Assign a local address to the RTP session
|
||||
@@ -128,8 +122,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_
|
||||
\param err pointer for error messages
|
||||
\note this call also binds the RTP session's socket to the new address
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_session, char *host, switch_port_t port,
|
||||
const char **err);
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err);
|
||||
|
||||
/*!
|
||||
\brief Kill the socket on an existing RTP session
|
||||
@@ -190,8 +183,7 @@ SWITCH_DECLARE(switch_socket_t *) switch_rtp_get_rtp_socket(switch_rtp_t *rtp_se
|
||||
\param rtp_session the RTP session to set the samples per interval on
|
||||
\param samples_per_interval the new default samples per interval
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_rtp_set_default_samples_per_interval(switch_rtp_t *rtp_session,
|
||||
uint16_t samples_per_interval);
|
||||
SWITCH_DECLARE(void) switch_rtp_set_default_samples_per_interval(switch_rtp_t *rtp_session, uint16_t samples_per_interval);
|
||||
|
||||
/*!
|
||||
\brief Get the default samples per interval for a given RTP session
|
||||
@@ -277,9 +269,7 @@ SWITCH_DECLARE(switch_size_t) switch_rtp_dequeue_dtmf(switch_rtp_t *rtp_session,
|
||||
\return the number of bytes read
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read(switch_rtp_t *rtp_session,
|
||||
void **data,
|
||||
uint32_t * datalen,
|
||||
switch_payload_t *payload_type, switch_frame_flag_t *flags);
|
||||
void **data, uint32_t * datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags);
|
||||
|
||||
/*!
|
||||
\brief Read data from a given RTP session without copying
|
||||
@@ -298,8 +288,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp
|
||||
\param flags frame flags
|
||||
\return the number of bytes written
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint32_t ts,
|
||||
switch_frame_flag_t *flags);
|
||||
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint32_t ts, switch_frame_flag_t *flags);
|
||||
|
||||
/*!
|
||||
\brief Enable VAD on an RTP Session
|
||||
@@ -344,9 +333,7 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_fra
|
||||
SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session,
|
||||
void *data,
|
||||
uint16_t datalen,
|
||||
uint8_t m,
|
||||
switch_payload_t payload,
|
||||
uint32_t ts, uint16_t mseq, uint32_t ssrc, switch_frame_flag_t *flags);
|
||||
uint8_t m, switch_payload_t payload, uint32_t ts, uint16_t mseq, uint32_t ssrc, switch_frame_flag_t *flags);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the SSRC from a given RTP session
|
||||
|
||||
@@ -62,9 +62,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
*/
|
||||
SWITCH_DECLARE(uint32_t) switch_scheduler_add_task(time_t task_runtime,
|
||||
switch_scheduler_func_t func,
|
||||
char *desc,
|
||||
char *group,
|
||||
uint32_t cmd_id, void *cmd_arg, switch_scheduler_flag_t flags);
|
||||
char *desc, char *group, uint32_t cmd_id, void *cmd_arg, switch_scheduler_flag_t flags);
|
||||
|
||||
/*!
|
||||
\brief Delete a scheduled task
|
||||
|
||||
+183
-100
@@ -51,7 +51,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
* Each open sqlite database is represented by an instance of the
|
||||
* following opaque structure.
|
||||
*/
|
||||
typedef sqlite3 switch_core_db_t;
|
||||
typedef sqlite3 switch_core_db_t;
|
||||
typedef sqlite3_stmt switch_core_db_stmt_t;
|
||||
/**
|
||||
* Aggregate functions use the following routine to allocate
|
||||
@@ -63,14 +63,16 @@ typedef sqlite3_stmt switch_core_db_stmt_t;
|
||||
*
|
||||
* The buffer allocated is freed automatically by SQLite.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_aggregate_context(sqlite3_context *, int nBytes);)
|
||||
DoxyDefine(void *switch_core_db_aggregate_context(sqlite3_context *, int nBytes);
|
||||
)
|
||||
#define switch_core_db_aggregate_context sqlite3_aggregate_context
|
||||
/**
|
||||
* /return the number of calls to xStep for a particular
|
||||
* aggregate function instance. The current call to xStep counts so this
|
||||
* routine always returns at least 1.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_aggregate_count(sqlite3_context *);)
|
||||
DoxyDefine(int switch_core_db_aggregate_count(sqlite3_context *);
|
||||
)
|
||||
#define switch_core_db_aggregate_count sqlite3_aggregate_count
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
@@ -100,7 +102,8 @@ DoxyDefine(int switch_core_db_aggregate_count(sqlite3_context *);)
|
||||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_blob(sqlite3_stmt *, int, const void *, int n, void (*)(void *));)
|
||||
DoxyDefine(int switch_core_db_bind_blob(sqlite3_stmt *, int, const void *, int n, void (*)(void *));
|
||||
)
|
||||
#define switch_core_db_bind_blob sqlite3_bind_blob
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
@@ -122,7 +125,8 @@ DoxyDefine(int switch_core_db_bind_blob(sqlite3_stmt *, int, const void *, int n
|
||||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_double(sqlite3_stmt *, int, double);)
|
||||
DoxyDefine(int switch_core_db_bind_double(sqlite3_stmt *, int, double);
|
||||
)
|
||||
#define switch_core_db_bind_double sqlite3_bind_double
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
@@ -144,7 +148,8 @@ DoxyDefine(int switch_core_db_bind_double(sqlite3_stmt *, int, double);)
|
||||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_int(sqlite3_stmt *, int, int);)
|
||||
DoxyDefine(int switch_core_db_bind_int(sqlite3_stmt *, int, int);
|
||||
)
|
||||
#define switch_core_db_bind_int sqlite3_bind_int
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
@@ -166,7 +171,8 @@ DoxyDefine(int switch_core_db_bind_int(sqlite3_stmt *, int, int);)
|
||||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_int64(sqlite3_stmt *, int, sqlite_int64);)
|
||||
DoxyDefine(int switch_core_db_bind_int64(sqlite3_stmt *, int, sqlite_int64);
|
||||
)
|
||||
#define switch_core_db_bind_int64 sqlite3_bind_int64
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
@@ -188,7 +194,8 @@ DoxyDefine(int switch_core_db_bind_int64(sqlite3_stmt *, int, sqlite_int64);)
|
||||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_null(sqlite3_stmt *, int);)
|
||||
DoxyDefine(int switch_core_db_bind_null(sqlite3_stmt *, int);
|
||||
)
|
||||
#define switch_core_db_bind_null sqlite3_bind_null
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
@@ -218,7 +225,8 @@ DoxyDefine(int switch_core_db_bind_null(sqlite3_stmt *, int);)
|
||||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_text(sqlite3_stmt *, int, const char *, int n, void (*)(void *));)
|
||||
DoxyDefine(int switch_core_db_bind_text(sqlite3_stmt *, int, const char *, int n, void (*)(void *));
|
||||
)
|
||||
#define switch_core_db_bind_text sqlite3_bind_text
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
@@ -248,7 +256,8 @@ DoxyDefine(int switch_core_db_bind_text(sqlite3_stmt *, int, const char *, int n
|
||||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_text16(sqlite3_stmt *, int, const void *, int, void (*)(void *));)
|
||||
DoxyDefine(int switch_core_db_bind_text16(sqlite3_stmt *, int, const void *, int, void (*)(void *));
|
||||
)
|
||||
#define switch_core_db_bind_text16 sqlite3_bind_text16
|
||||
/**
|
||||
* In the SQL strings input to switch_core_db_prepare(),
|
||||
@@ -270,20 +279,23 @@ DoxyDefine(int switch_core_db_bind_text16(sqlite3_stmt *, int, const void *, int
|
||||
* an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are
|
||||
* interpreted as NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_value(sqlite3_stmt *, int, const sqlite3_value *);)
|
||||
DoxyDefine(int switch_core_db_bind_value(sqlite3_stmt *, int, const sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_bind_value sqlite3_bind_value
|
||||
/**
|
||||
* @return The number of parameters in a compiled SQL statement.
|
||||
* @remark This routine was added to support DBD::SQLite.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_parameter_count(sqlite3_stmt *);)
|
||||
DoxyDefine(int switch_core_db_bind_parameter_count(sqlite3_stmt *);
|
||||
)
|
||||
#define switch_core_db_bind_parameter_count sqlite3_bind_parameter_count
|
||||
/**
|
||||
* @return the index of a parameter with the given name. If no parameter with the
|
||||
* given name is found, return 0.
|
||||
* @remark The name must match exactly.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_bind_parameter_index(sqlite3_stmt *, const char *zName);)
|
||||
DoxyDefine(int switch_core_db_bind_parameter_index(sqlite3_stmt *, const char *zName);
|
||||
)
|
||||
#define switch_core_db_bind_parameter_index sqlite3_bind_parameter_index
|
||||
/**
|
||||
* @return the name of the i-th parameter.
|
||||
@@ -292,7 +304,8 @@ DoxyDefine(int switch_core_db_bind_parameter_index(sqlite3_stmt *, const char *z
|
||||
* $VVV the complete text of the parameter name is returned, including
|
||||
* the initial ":" or "$". NULL is returned if the index is out of range.
|
||||
*/
|
||||
DoxyDefine(const char *switch_core_db_bind_parameter_name(sqlite3_stmt *, int);)
|
||||
DoxyDefine(const char *switch_core_db_bind_parameter_name(sqlite3_stmt *, int);
|
||||
)
|
||||
#define switch_core_db_bind_parameter_name sqlite3_bind_parameter_name
|
||||
/**
|
||||
* This routine identifies a callback function that is invoked
|
||||
@@ -316,7 +329,8 @@ DoxyDefine(const char *switch_core_db_bind_parameter_name(sqlite3_stmt *, int);)
|
||||
* data structures out from under the executing query and will
|
||||
* probably result in a coredump.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_busy_handler(switch_core_db *, int (*)(void *, int), void *);)
|
||||
DoxyDefine(int switch_core_db_busy_handler(switch_core_db *, int (*)(void *, int), void *);
|
||||
)
|
||||
#define switch_core_db_busy_handler sqlite3_busy_handler
|
||||
/**
|
||||
* This routine sets a busy handler that sleeps for a while when a
|
||||
@@ -328,7 +342,8 @@ DoxyDefine(int switch_core_db_busy_handler(switch_core_db *, int (*)(void *, int
|
||||
* Calling this routine with an argument less than or equal to zero
|
||||
* turns off all busy handlers.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_busy_timeout(switch_core_db *, int ms);)
|
||||
DoxyDefine(int switch_core_db_busy_timeout(switch_core_db *, int ms);
|
||||
)
|
||||
#define switch_core_db_busy_timeout sqlite3_busy_timeout
|
||||
/**
|
||||
* This function returns the number of database rows that were changed
|
||||
@@ -350,7 +365,8 @@ DoxyDefine(int switch_core_db_busy_timeout(switch_core_db *, int ms);)
|
||||
* table. To get an accurate count of the number of rows deleted, use
|
||||
* "DELETE FROM table WHERE 1" instead.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_changes(switch_core_db *);)
|
||||
DoxyDefine(int switch_core_db_changes(switch_core_db *);
|
||||
)
|
||||
#define switch_core_db_changes sqlite3_changes
|
||||
/**
|
||||
* A function to close the database.
|
||||
@@ -363,7 +379,8 @@ DoxyDefine(int switch_core_db_changes(switch_core_db *);)
|
||||
* this routine is called. Otherwise, SQLITE_BUSY is returned and the
|
||||
* database connection remains open.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_close(switch_core_db *);)
|
||||
DoxyDefine(int switch_core_db_close(switch_core_db *);
|
||||
)
|
||||
#define switch_core_db_close sqlite3_close
|
||||
/**
|
||||
* To avoid having to register all collation sequences before a database
|
||||
@@ -384,9 +401,9 @@ DoxyDefine(int switch_core_db_close(switch_core_db *);)
|
||||
* The collation sequence is returned to SQLite by a collation-needed
|
||||
* callback using the sqlite3_create_collation() API, described above.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_collation_needed(switch_core_db *,
|
||||
void *, void (*)(void *, switch_core_db *, int eTextRep, const char *)
|
||||
);)
|
||||
DoxyDefine(int switch_core_db_collation_needed(switch_core_db *, void *, void (*)(void *, switch_core_db *, int eTextRep, const char *)
|
||||
);
|
||||
)
|
||||
#define switch_core_db_collation_needed sqlite3_collation_needed
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -429,7 +446,8 @@ DoxyDefine(int switch_core_db_collation_needed(switch_core_db *,
|
||||
*
|
||||
* @return the value of a BLOB.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_column_blob(sqlite3_stmt * stmt, int iCol);)
|
||||
DoxyDefine(const void *switch_core_db_column_blob(sqlite3_stmt * stmt, int iCol);
|
||||
)
|
||||
#define switch_core_db_column_blob sqlite3_column_blob
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -472,7 +490,8 @@ DoxyDefine(const void *switch_core_db_column_blob(sqlite3_stmt * stmt, int iCol)
|
||||
* TEXT value represented as UTF-8. The "\000" terminator is included in the
|
||||
* byte count for TEXT values.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_bytes(sqlite3_stmt *, int iCol);)
|
||||
DoxyDefine(int switch_core_db_column_bytes(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
#define switch_core_db_column_bytes sqlite3_column_bytes
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -515,7 +534,8 @@ DoxyDefine(int switch_core_db_column_bytes(sqlite3_stmt *, int iCol);)
|
||||
* TEXT value represented as UTF-16. The "\u0000" terminator is included in
|
||||
* the byte count for TEXT values.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_bytes16(sqlite3_stmt *, int iCol);)
|
||||
DoxyDefine(int switch_core_db_column_bytes16(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
#define switch_core_db_column_bytes16 sqlite3_column_bytes16
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -556,7 +576,8 @@ DoxyDefine(int switch_core_db_column_bytes16(sqlite3_stmt *, int iCol);)
|
||||
*
|
||||
* Return a FLOAT value.
|
||||
*/
|
||||
DoxyDefine(double switch_core_db_column_double(sqlite3_stmt *, int iCol);)
|
||||
DoxyDefine(double switch_core_db_column_double(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
#define switch_core_db_column_double sqlite3_column_double
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -598,7 +619,8 @@ DoxyDefine(double switch_core_db_column_double(sqlite3_stmt *, int iCol);)
|
||||
* Return an INTEGER value in the host computer's native integer representation.
|
||||
* This might be either a 32- or 64-bit integer depending on the host.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol);)
|
||||
DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
#define switch_core_db_column_int sqlite3_column_int
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -639,7 +661,8 @@ DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol);)
|
||||
*
|
||||
* Return an INTEGER value as a 64-bit signed integer.
|
||||
*/
|
||||
DoxyDefine(sqlite_int64 switch_core_db_column_int64(sqlite3_stmt *, int iCol);)
|
||||
DoxyDefine(sqlite_int64 switch_core_db_column_int64(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
#define switch_core_db_column_int64 sqlite3_column_int64
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -680,7 +703,8 @@ DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol);)
|
||||
*
|
||||
* Return the value as UTF-8 text.
|
||||
*/
|
||||
DoxyDefine(const unsigned char *switch_core_db_column_text(sqlite3_stmt *, int iCol);)
|
||||
DoxyDefine(const unsigned char *switch_core_db_column_text(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
#define switch_core_db_column_text sqlite3_column_text
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -721,7 +745,8 @@ DoxyDefine(const unsigned char *switch_core_db_column_text(sqlite3_stmt *, int i
|
||||
*
|
||||
* Return the value as UTF-16 text.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_column_text16(sqlite3_stmt *, int iCol);)
|
||||
DoxyDefine(const void *switch_core_db_column_text16(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
#define switch_core_db_column_text16 sqlite3_column_text16
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
@@ -763,21 +788,24 @@ DoxyDefine(const void *switch_core_db_column_text16(sqlite3_stmt *, int iCol);)
|
||||
* ReturnS the datatype of the result. This is one of
|
||||
* SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_type(sqlite3_stmt *, int iCol);)
|
||||
DoxyDefine(int switch_core_db_column_type(sqlite3_stmt *, int iCol);
|
||||
)
|
||||
#define switch_core_db_column_type sqlite3_column_type
|
||||
/**
|
||||
* The first parameter is a compiled SQL statement. This function returns
|
||||
* the column heading for the Nth column of that statement, where N is the
|
||||
* second function parameter. The string returned is UTF-8.
|
||||
*/
|
||||
DoxyDefine(const char *switch_core_db_column_name(sqlite3_stmt *, int);)
|
||||
DoxyDefine(const char *switch_core_db_column_name(sqlite3_stmt *, int);
|
||||
)
|
||||
#define switch_core_db_column_name sqlite3_column_name
|
||||
/**
|
||||
* Return the number of columns in the result set returned by the compiled
|
||||
* SQL statement. This routine returns 0 if pStmt is an SQL statement
|
||||
* that does not return data (for example an UPDATE).
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_column_count(sqlite3_stmt * pStmt);)
|
||||
DoxyDefine(int switch_core_db_column_count(sqlite3_stmt * pStmt);
|
||||
)
|
||||
#define switch_core_db_column_count sqlite3_column_count
|
||||
/**
|
||||
* The first parameter is a compiled SQL statement. If this statement
|
||||
@@ -797,7 +825,8 @@ DoxyDefine(int switch_core_db_column_count(sqlite3_stmt * pStmt);)
|
||||
* result column (i==1), and a NULL pointer for the first result column
|
||||
* (i==0).
|
||||
*/
|
||||
DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i);)
|
||||
DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i);
|
||||
)
|
||||
#define switch_core_db_column_decltype sqlite3_column_decltype
|
||||
/**
|
||||
* The first parameter is a compiled SQL statement. If this statement
|
||||
@@ -817,7 +846,8 @@ DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i);)
|
||||
* result column (i==1), and a NULL pointer for the first result column
|
||||
* (i==0).
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt *, int);)
|
||||
DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt *, int);
|
||||
)
|
||||
#define switch_core_db_column_decltype16 sqlite3_column_decltype16
|
||||
/**
|
||||
* Register a callback function to be invoked whenever a new transaction
|
||||
@@ -832,7 +862,8 @@ DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt *, int);)
|
||||
*
|
||||
****** THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_commit_hook(switch_core_db *, int (*)(void *), void *);)
|
||||
DoxyDefine(void *switch_core_db_commit_hook(switch_core_db *, int (*)(void *), void *);
|
||||
)
|
||||
#define switch_core_db_commit_hook sqlite3_commit_hook
|
||||
/**
|
||||
* This functions return true if the given input string comprises
|
||||
@@ -843,7 +874,8 @@ DoxyDefine(void *switch_core_db_commit_hook(switch_core_db *, int (*)(void *), v
|
||||
* and comments is a semicolon, then return true. otherwise return
|
||||
* false.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_complete(const char *sql);)
|
||||
DoxyDefine(int switch_core_db_complete(const char *sql);
|
||||
)
|
||||
#define switch_core_db_complete sqlite3_complete
|
||||
/**
|
||||
* This function is used to add new collation sequences to the
|
||||
@@ -871,10 +903,9 @@ DoxyDefine(int switch_core_db_complete(const char *sql);)
|
||||
* string. i.e. (STRING1 - STRING2).
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_create_collation(switch_core_db *,
|
||||
const char *zName,
|
||||
int eTextRep,
|
||||
void *, int (*xCompare) (void *, int, const void *, int, const void *)
|
||||
);)
|
||||
const char *zName, int eTextRep, void *, int (*xCompare) (void *, int, const void *, int, const void *)
|
||||
);
|
||||
)
|
||||
#define switch_core_db_create_collation sqlite3_create_collation
|
||||
/**
|
||||
* The following function is used to add user functions or aggregates
|
||||
@@ -915,9 +946,9 @@ DoxyDefine(int switch_core_db_create_function(switch_core_db *,
|
||||
int eTextRep,
|
||||
void *,
|
||||
void (*xFunc) (sqlite3_context *, int, sqlite3_value **),
|
||||
void (*xStep) (sqlite3_context *, int, sqlite3_value **),
|
||||
void (*xFinal) (sqlite3_context *)
|
||||
);)
|
||||
void (*xStep) (sqlite3_context *, int, sqlite3_value **), void (*xFinal) (sqlite3_context *)
|
||||
);
|
||||
)
|
||||
#define switch_core_db_create_function sqlite3_create_function
|
||||
/**
|
||||
* Return the number of values in the current row of the result set.
|
||||
@@ -928,7 +959,8 @@ DoxyDefine(int switch_core_db_create_function(switch_core_db *,
|
||||
* error code, or before switch_core_db_step() has been called on a
|
||||
* compiled SQL statement, this routine returns zero.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt);)
|
||||
DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt);
|
||||
)
|
||||
#define switch_core_db_data_count sqlite3_data_count
|
||||
/**
|
||||
* Return the sqlite3* database handle to which the prepared statement given
|
||||
@@ -936,7 +968,8 @@ DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt);)
|
||||
* the first argument to the switch_core_db_prepare() that was used to create
|
||||
* the statement in the first place.
|
||||
*/
|
||||
DoxyDefine(switch_core_db * switch_core_db_db_handle(sqlite3_stmt *);)
|
||||
DoxyDefine(switch_core_db * switch_core_db_db_handle(sqlite3_stmt *);
|
||||
)
|
||||
#define switch_core_db_db_handle sqlite3_db_handle
|
||||
/**
|
||||
** Return the error code for the most recent switch_core_db_* API call associated
|
||||
@@ -953,7 +986,8 @@ DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt);)
|
||||
** code returned by this function is associated with the same error as
|
||||
** the strings returned by sqlite3_errmsg() and sqlite3_errmsg16().
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_errcode(switch_core_db * db);)
|
||||
DoxyDefine(int switch_core_db_errcode(switch_core_db * db);
|
||||
)
|
||||
#define switch_core_db_errcode sqlite3_errcode
|
||||
/**
|
||||
* Return a pointer to a UTF-8 encoded string describing in english the
|
||||
@@ -963,7 +997,8 @@ DoxyDefine(int switch_core_db_errcode(switch_core_db * db);)
|
||||
* The string "not an error" is returned when the most recent API call was
|
||||
* successful.
|
||||
*/
|
||||
DoxyDefine(const char *switch_core_db_errmsg(switch_core_db *);)
|
||||
DoxyDefine(const char *switch_core_db_errmsg(switch_core_db *);
|
||||
)
|
||||
#define switch_core_db_errmsg sqlite3_errmsg
|
||||
/**
|
||||
* A function to executes one or more statements of SQL.
|
||||
@@ -1010,7 +1045,8 @@ DoxyDefine(int switch_core_db_exec(switch_core_db *, /* An open database */
|
||||
sqlite3_callback, /* Callback function */
|
||||
void *, /* 1st argument to callback function */
|
||||
char **errmsg /* Error msg written here */
|
||||
);)
|
||||
);
|
||||
)
|
||||
#define switch_core_db_exec sqlite3_exec
|
||||
/**
|
||||
* Return TRUE (non-zero) if the statement supplied as an argument needs
|
||||
@@ -1021,7 +1057,8 @@ DoxyDefine(int switch_core_db_exec(switch_core_db *, /* An open database */
|
||||
* added or changed.
|
||||
*
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_expired(sqlite3_stmt *);)
|
||||
DoxyDefine(int switch_core_db_expired(sqlite3_stmt *);
|
||||
)
|
||||
#define switch_core_db_expired sqlite3_expired
|
||||
/**
|
||||
* This function is called to delete a compiled
|
||||
@@ -1037,12 +1074,14 @@ DoxyDefine(int switch_core_db_expired(sqlite3_stmt *);)
|
||||
* rolled back and transactions cancelled, depending on the circumstances,
|
||||
* and the result code returned will be SQLITE_ABORT.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_finalize(sqlite3_stmt * pStmt);)
|
||||
DoxyDefine(int switch_core_db_finalize(sqlite3_stmt * pStmt);
|
||||
)
|
||||
#define switch_core_db_finalize sqlite3_finalize
|
||||
/**
|
||||
* Call this routine to free the memory that sqlite3_get_table() allocated.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_free_table(char **result);)
|
||||
DoxyDefine(void switch_core_db_free_table(char **result);
|
||||
)
|
||||
#define switch_core_db_free_table sqlite3_free_table
|
||||
/**
|
||||
* Test to see whether or not the database connection is in autocommit
|
||||
@@ -1050,7 +1089,8 @@ DoxyDefine(void switch_core_db_free_table(char **result);)
|
||||
* by default. Autocommit is disabled by a BEGIN statement and reenabled
|
||||
* by the next COMMIT or ROLLBACK.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_get_autocommit(switch_core_db *);)
|
||||
DoxyDefine(int switch_core_db_get_autocommit(switch_core_db *);
|
||||
)
|
||||
#define switch_core_db_get_autocommit sqlite3_get_autocommit
|
||||
/**
|
||||
* The following function may be used by scalar user functions to
|
||||
@@ -1071,7 +1111,8 @@ DoxyDefine(int switch_core_db_get_autocommit(switch_core_db *);)
|
||||
* expressions that are constant at compile time. This includes literal
|
||||
* values and SQL variables.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_get_auxdata(sqlite3_context *, int);)
|
||||
DoxyDefine(void *switch_core_db_get_auxdata(sqlite3_context *, int);
|
||||
)
|
||||
#define switch_core_db_get_auxdata sqlite3_get_auxdata
|
||||
/**
|
||||
* The following function may be used by scalar user functions to
|
||||
@@ -1094,7 +1135,8 @@ DoxyDefine(void *switch_core_db_get_auxdata(sqlite3_context *, int);)
|
||||
* expressions that are constant at compile time. This includes literal
|
||||
* values and SQL variables.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_set_auxdata(sqlite3_context *, int, void *, void (*)(void *));)
|
||||
DoxyDefine(void switch_core_db_set_auxdata(sqlite3_context *, int, void *, void (*)(void *));
|
||||
)
|
||||
#define switch_core_db_set_auxdata sqlite3_set_auxdata
|
||||
/**
|
||||
* This next routine is really just a wrapper around sqlite3_exec().
|
||||
@@ -1143,7 +1185,8 @@ DoxyDefine(int switch_core_db_get_table(switch_core_db *, /* An open database */
|
||||
int *nrow, /* Number of result rows written here */
|
||||
int *ncolumn, /* Number of result columns written here */
|
||||
char **errmsg /* Error msg written here */
|
||||
);)
|
||||
);
|
||||
)
|
||||
#define switch_core_db_get_table sqlite3_get_table
|
||||
/**
|
||||
* This function is called to recover from a malloc() failure that occured
|
||||
@@ -1164,7 +1207,8 @@ DoxyDefine(int switch_core_db_get_table(switch_core_db *, /* An open database */
|
||||
* This functionality can be omitted from a build by defining the
|
||||
* SQLITE_OMIT_GLOBALRECOVER at compile time.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_global_recover();)
|
||||
DoxyDefine(int switch_core_db_global_recover();
|
||||
)
|
||||
#define switch_core_db_global_recover sqlite3_global_recover
|
||||
/** This function causes any pending database operation to abort and
|
||||
* return at its earliest opportunity. This routine is typically
|
||||
@@ -1172,7 +1216,8 @@ DoxyDefine(int switch_core_db_global_recover();)
|
||||
* or Ctrl-C where the user wants a long query operation to halt
|
||||
* immediately.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_interrupt(switch_core_db *);)
|
||||
DoxyDefine(void switch_core_db_interrupt(switch_core_db *);
|
||||
)
|
||||
#define switch_core_db_interrupt sqlite3_interrupt
|
||||
/**
|
||||
* Each entry in an SQLite table has a unique integer key. (The key is
|
||||
@@ -1183,7 +1228,8 @@ DoxyDefine(void switch_core_db_interrupt(switch_core_db *);)
|
||||
*
|
||||
* This function is similar to the mysql_insert_id() function from MySQL.
|
||||
*/
|
||||
DoxyDefine(sqlite_int64 switch_core_db_last_insert_rowid(switch_core_db *);)
|
||||
DoxyDefine(sqlite_int64 switch_core_db_last_insert_rowid(switch_core_db *);
|
||||
)
|
||||
#define switch_core_db_last_insert_rowid sqlite3_last_insert_rowid
|
||||
/**
|
||||
* Open the sqlite database file "filename". The "filename" is UTF-8
|
||||
@@ -1202,7 +1248,8 @@ DoxyDefine(void switch_core_db_interrupt(switch_core_db *);)
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_open(const char *filename, /* Database filename (UTF-8) */
|
||||
switch_core_db ** ppDb /* OUT: SQLite db handle */
|
||||
);)
|
||||
);
|
||||
)
|
||||
#define switch_core_db_open sqlite3_open
|
||||
/**
|
||||
* To execute an SQL query, it must first be compiled into a byte-code
|
||||
@@ -1226,12 +1273,13 @@ DoxyDefine(int switch_core_db_open(const char *filename, /* Database filename (U
|
||||
*
|
||||
* On success, SQLITE_OK is returned. Otherwise an error code is returned.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_prepare(sqlite3 * db, /* Database handle */
|
||||
DoxyDefine(int switch_core_db_prepare(sqlite3 *db, /* Database handle */
|
||||
const char *zSql, /* SQL statement, UTF-8 encoded */
|
||||
int nBytes, /* Length of zSql in bytes. */
|
||||
sqlite3_stmt ** ppStmt, /* OUT: Statement handle */
|
||||
const char **pzTail /* OUT: Pointer to unused portion of zSql */
|
||||
);)
|
||||
);
|
||||
)
|
||||
#define switch_core_db_prepare sqlite3_prepare
|
||||
/**
|
||||
* Register a function for tracing SQL command evaluation. The function registered by
|
||||
@@ -1241,8 +1289,8 @@ DoxyDefine(int switch_core_db_prepare(sqlite3 * db, /* Database handle */
|
||||
* The sqlite3_profile() API is currently considered experimental and
|
||||
* is subject to change.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_profile(switch_core_db *,
|
||||
void (*xProfile) (void *, const char *, sqlite_uint64), void *);)
|
||||
DoxyDefine(void *switch_core_db_profile(switch_core_db *, void (*xProfile) (void *, const char *, sqlite_uint64), void *);
|
||||
)
|
||||
#define switch_core_db_profile sqlite3_profile
|
||||
/**
|
||||
* This routine configures a callback function - the progress callback - that
|
||||
@@ -1270,7 +1318,8 @@ DoxyDefine(void *switch_core_db_profile(switch_core_db *,
|
||||
*
|
||||
****** THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_progress_handler(switch_core_db *, int, int (*)(void *), void *);)
|
||||
DoxyDefine(void switch_core_db_progress_handler(switch_core_db *, int, int (*)(void *), void *);
|
||||
)
|
||||
#define switch_core_db_progress_handler sqlite3_progress_handler
|
||||
/**
|
||||
* The switch_core_db_reset() function is called to reset a compiled SQL
|
||||
@@ -1279,79 +1328,92 @@ DoxyDefine(void switch_core_db_progress_handler(switch_core_db *, int, int (*)(v
|
||||
* Any SQL statement variables that had values bound to them using
|
||||
* the switch_core_db_bind_*() API retain their values.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_reset(sqlite3_stmt * pStmt);)
|
||||
DoxyDefine(int switch_core_db_reset(sqlite3_stmt * pStmt);
|
||||
)
|
||||
#define switch_core_db_reset sqlite3_reset
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_blob(sqlite3_context *, const void *, int, void (*)(void *));)
|
||||
DoxyDefine(void switch_core_db_result_blob(sqlite3_context *, const void *, int, void (*)(void *));
|
||||
)
|
||||
#define switch_core_db_result_blob sqlite3_result_blob
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_double(sqlite3_context *, double);)
|
||||
DoxyDefine(void switch_core_db_result_double(sqlite3_context *, double);
|
||||
)
|
||||
#define switch_core_db_result_double sqlite3_result_double
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_error(sqlite3_context *, const char *, int);)
|
||||
DoxyDefine(void switch_core_db_result_error(sqlite3_context *, const char *, int);
|
||||
)
|
||||
#define switch_core_db_result_error sqlite3_result_error
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_error16(sqlite3_context *, const void *, int);)
|
||||
DoxyDefine(void switch_core_db_result_error16(sqlite3_context *, const void *, int);
|
||||
)
|
||||
#define switch_core_db_result_error16 sqlite3_result_error16
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_int(sqlite3_context *, int);)
|
||||
DoxyDefine(void switch_core_db_result_int(sqlite3_context *, int);
|
||||
)
|
||||
#define switch_core_db_result_int sqlite3_result_int
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_int64(sqlite3_context *, sqlite_int64);)
|
||||
DoxyDefine(void switch_core_db_result_int64(sqlite3_context *, sqlite_int64);
|
||||
)
|
||||
#define switch_core_db_result_int64 sqlite3_result_int64
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_null(sqlite3_context *);)
|
||||
DoxyDefine(void switch_core_db_result_null(sqlite3_context *);
|
||||
)
|
||||
#define switch_core_db_result_null sqlite3_result_null
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_text(sqlite3_context *, const char *, int, void (*)(void *));)
|
||||
DoxyDefine(void switch_core_db_result_text(sqlite3_context *, const char *, int, void (*)(void *));
|
||||
)
|
||||
#define switch_core_db_result_text sqlite3_result_text
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_text16(sqlite3_context *, const void *, int, void (*)(void *));)
|
||||
DoxyDefine(void switch_core_db_result_text16(sqlite3_context *, const void *, int, void (*)(void *));
|
||||
)
|
||||
#define switch_core_db_result_text16 sqlite3_result_text16
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_text16le(sqlite3_context *, const void *, int, void (*)(void *));)
|
||||
DoxyDefine(void switch_core_db_result_text16le(sqlite3_context *, const void *, int, void (*)(void *));
|
||||
)
|
||||
#define switch_core_db_result_text16le sqlite3_result_text16le
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_text16be(sqlite3_context *, const void *, int, void (*)(void *));)
|
||||
DoxyDefine(void switch_core_db_result_text16be(sqlite3_context *, const void *, int, void (*)(void *));
|
||||
)
|
||||
#define switch_core_db_result_text16be sqlite3_result_text16be
|
||||
/**
|
||||
* User-defined functions invoke this routine in order to
|
||||
* set their return value.
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_result_value(sqlite3_context *, sqlite3_value *);)
|
||||
DoxyDefine(void switch_core_db_result_value(sqlite3_context *, sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_result_value sqlite3_result_value
|
||||
/**
|
||||
* This routine registers a callback with the SQLite library. The
|
||||
@@ -1362,8 +1424,8 @@ DoxyDefine(void switch_core_db_result_value(sqlite3_context *, sqlite3_value *);
|
||||
* if the column should be treated as a NULL value.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_set_authorizer(switch_core_db *,
|
||||
int (*xAuth) (void *, int, const char *, const char *, const char *,
|
||||
const char *), void *pUserData);)
|
||||
int (*xAuth) (void *, int, const char *, const char *, const char *, const char *), void *pUserData);
|
||||
)
|
||||
#define switch_core_db_set_authorizer sqlite3_set_authorizer
|
||||
/**
|
||||
* After an SQL query has been compiled with a call to either
|
||||
@@ -1397,7 +1459,8 @@ DoxyDefine(int switch_core_db_set_authorizer(switch_core_db *,
|
||||
* SQLITE_DONE. Or it could be the case the the same database connection
|
||||
* is being used simulataneously by two or more threads.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_step(sqlite3_stmt *);)
|
||||
DoxyDefine(int switch_core_db_step(sqlite3_stmt *);
|
||||
)
|
||||
#define switch_core_db_step sqlite3_step
|
||||
/**
|
||||
* If the following global variable is made to point to a
|
||||
@@ -1409,7 +1472,8 @@ DoxyDefine(int switch_core_db_step(sqlite3_stmt *);)
|
||||
* Once switch_core_db_open() has been called, changing this variable will invalidate
|
||||
* the current temporary database, if any.
|
||||
*/
|
||||
DoxyDefine(extern char *switch_core_db_temp_directory;)
|
||||
DoxyDefine(extern char *switch_core_db_temp_directory;
|
||||
)
|
||||
#define switch_core_db_temp_directory sqlite3_temp_directory
|
||||
/**
|
||||
* This function returns the number of database rows that have been
|
||||
@@ -1427,14 +1491,16 @@ DoxyDefine(int switch_core_db_step(sqlite3_stmt *);)
|
||||
* table. To get an accurate count of the number of rows deleted, use
|
||||
* "DELETE FROM table WHERE 1" instead.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_total_changes(switch_core_db *);)
|
||||
DoxyDefine(int switch_core_db_total_changes(switch_core_db *);
|
||||
)
|
||||
#define switch_core_db_total_changes sqlite3_total_changes
|
||||
/**
|
||||
* Register a function for tracing SQL command evaluation. The function
|
||||
* registered is invoked at the first switch_core_db_step()
|
||||
* for the evaluation of an SQL statement.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_trace(switch_core_db *, void (*xTrace) (void *, const char *), void *);)
|
||||
DoxyDefine(void *switch_core_db_trace(switch_core_db *, void (*xTrace) (void *, const char *), void *);
|
||||
)
|
||||
#define switch_core_db_trace sqlite3_trace
|
||||
/**
|
||||
* Move all bindings from the first prepared statement over to the second.
|
||||
@@ -1443,14 +1509,16 @@ DoxyDefine(void *switch_core_db_trace(switch_core_db *, void (*xTrace) (void *,
|
||||
* the second prepared statement then all of the bindings transfered over
|
||||
* to the second statement before the first statement is finalized.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_transfer_bindings(sqlite3_stmt *, sqlite3_stmt *);)
|
||||
DoxyDefine(int switch_core_db_transfer_bindings(sqlite3_stmt *, sqlite3_stmt *);
|
||||
)
|
||||
#define switch_core_db_transfer_bindings sqlite3_transfer_bindings
|
||||
/**
|
||||
* The pUserData parameter to the switch_core_db_create_function()
|
||||
* routine used to register user functions is available to
|
||||
* the implementation of the function using this call.
|
||||
*/
|
||||
DoxyDefine(void *switch_core_db_user_data(sqlite3_context *);)
|
||||
DoxyDefine(void *switch_core_db_user_data(sqlite3_context *);
|
||||
)
|
||||
#define switch_core_db_user_data sqlite3_user_data
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1460,7 +1528,8 @@ DoxyDefine(void *switch_core_db_user_data(sqlite3_context *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_value_blob(sqlite3_value *);)
|
||||
DoxyDefine(const void *switch_core_db_value_blob(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_blob sqlite3_value_blob
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1470,7 +1539,8 @@ DoxyDefine(const void *switch_core_db_value_blob(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_value_bytes(sqlite3_value *);)
|
||||
DoxyDefine(int switch_core_db_value_bytes(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_bytes sqlite3_value_bytes
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1480,7 +1550,8 @@ DoxyDefine(int switch_core_db_value_bytes(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_value_bytes16(sqlite3_value *);)
|
||||
DoxyDefine(int switch_core_db_value_bytes16(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_bytes16 sqlite3_value_bytes16
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1490,7 +1561,8 @@ DoxyDefine(int switch_core_db_value_bytes16(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(double switch_core_db_value_double(sqlite3_value *);)
|
||||
DoxyDefine(double switch_core_db_value_double(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_double sqlite3_value_double
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1500,7 +1572,8 @@ DoxyDefine(double switch_core_db_value_double(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_value_int(sqlite3_value *);)
|
||||
DoxyDefine(int switch_core_db_value_int(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_int sqlite3_value_int
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1510,7 +1583,8 @@ DoxyDefine(int switch_core_db_value_int(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(sqlite_int64 switch_core_db_value_int64(sqlite3_value *);)
|
||||
DoxyDefine(sqlite_int64 switch_core_db_value_int64(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_int64 sqlite3_value_int64
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1520,7 +1594,8 @@ DoxyDefine(int switch_core_db_value_int(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const unsigned char *switch_core_db_value_text(sqlite3_value *);)
|
||||
DoxyDefine(const unsigned char *switch_core_db_value_text(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_text sqlite3_value_text
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1530,7 +1605,8 @@ DoxyDefine(const unsigned char *switch_core_db_value_text(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_value_text16(sqlite3_value *);)
|
||||
DoxyDefine(const void *switch_core_db_value_text16(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_text16 sqlite3_value_text16
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1540,7 +1616,8 @@ DoxyDefine(const void *switch_core_db_value_text16(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_value_text16be(sqlite3_value *);)
|
||||
DoxyDefine(const void *switch_core_db_value_text16be(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_text16be sqlite3_value_text16be
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1550,7 +1627,8 @@ DoxyDefine(const void *switch_core_db_value_text16be(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(const void *switch_core_db_value_text16le(sqlite3_value *);)
|
||||
DoxyDefine(const void *switch_core_db_value_text16le(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_text16le sqlite3_value_text16le
|
||||
/**
|
||||
* returns information about parameters to
|
||||
@@ -1560,7 +1638,8 @@ DoxyDefine(const void *switch_core_db_value_text16le(sqlite3_value *);)
|
||||
* sqlite3_value* pointer instead of an sqlite3_stmt* and an integer
|
||||
* column number.
|
||||
*/
|
||||
DoxyDefine(int switch_core_db_value_type(sqlite3_value *);)
|
||||
DoxyDefine(int switch_core_db_value_type(sqlite3_value *);
|
||||
)
|
||||
#define switch_core_db_value_type sqlite3_value_type
|
||||
/**
|
||||
* This routine is a variant of the "sprintf()" from the
|
||||
@@ -1603,7 +1682,8 @@ DoxyDefine(int switch_core_db_value_type(sqlite3_value *);)
|
||||
* should always use %q instead of %s when inserting text into a string
|
||||
* literal.
|
||||
*/
|
||||
DoxyDefine(char *switch_core_db_mprintf(const char *, ...);)
|
||||
DoxyDefine(char *switch_core_db_mprintf(const char *, ...);
|
||||
)
|
||||
#define switch_core_db_mprintf sqlite3_mprintf
|
||||
#define switch_mprintf sqlite3_mprintf
|
||||
/**
|
||||
@@ -1647,7 +1727,8 @@ DoxyDefine(char *switch_core_db_mprintf(const char *, ...);)
|
||||
* should always use %q instead of %s when inserting text into a string
|
||||
* literal.
|
||||
*/
|
||||
DoxyDefine(char *switch_core_db_vmprintf(const char *, va_list);)
|
||||
DoxyDefine(char *switch_core_db_vmprintf(const char *, va_list);
|
||||
)
|
||||
#define switch_core_db_vmprintf sqlite3_vmprintf
|
||||
/**
|
||||
* This routine is a variant of the "sprintf()" from the
|
||||
@@ -1690,12 +1771,14 @@ DoxyDefine(char *switch_core_db_vmprintf(const char *, va_list);)
|
||||
* should always use %q instead of %s when inserting text into a string
|
||||
* literal.
|
||||
*/
|
||||
DoxyDefine(char *switch_core_db_snprintf(int, char *, const char *, ...);)
|
||||
DoxyDefine(char *switch_core_db_snprintf(int, char *, const char *, ...);
|
||||
)
|
||||
#define switch_core_db_snprintf sqlite3_snprintf
|
||||
/**
|
||||
* call this routine to free memory malloced by a call to switch_core_db_mprintf, switch_core_db_vmprintf, or switch_core_db_snprintf
|
||||
*/
|
||||
DoxyDefine(void switch_core_db_free(char *z);)
|
||||
DoxyDefine(void switch_core_db_free(char *z);
|
||||
)
|
||||
#define switch_core_db_free sqlite3_free
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
@@ -136,7 +136,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
|
||||
\param len the length of the data
|
||||
\return a stun packet pointer to buf to use as an access point
|
||||
*/
|
||||
SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t * buf, uint32_t len);
|
||||
SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, uint32_t len);
|
||||
|
||||
/*!
|
||||
\brief Obtain a printable string form of a given value
|
||||
@@ -154,8 +154,7 @@ SWITCH_DECLARE(const char *) switch_stun_value_to_name(int32_t type, uint32_t va
|
||||
\param port the port
|
||||
\return true or false
|
||||
*/
|
||||
SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_get_mapped_address(switch_stun_packet_attribute_t *attribute,
|
||||
char *ipstr, uint16_t * port);
|
||||
SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_get_mapped_address(switch_stun_packet_attribute_t *attribute, char *ipstr, uint16_t * port);
|
||||
|
||||
/*!
|
||||
\brief Extract a username from a packet attribute
|
||||
@@ -164,8 +163,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_get_mapped_address(switch_s
|
||||
\param len the maximum size of the username buffer
|
||||
\return a pointer to the username or NULL
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_stun_packet_attribute_get_username(switch_stun_packet_attribute_t *attribute,
|
||||
char *username, uint16_t len);
|
||||
SWITCH_DECLARE(char *) switch_stun_packet_attribute_get_username(switch_stun_packet_attribute_t *attribute, char *username, uint16_t len);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -175,8 +173,7 @@ SWITCH_DECLARE(char *) switch_stun_packet_attribute_get_username(switch_stun_pac
|
||||
\param buf a pointer to data to use for the packet
|
||||
\return a pointer to a ready-to-use stun packet
|
||||
*/
|
||||
SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type,
|
||||
char *id, uint8_t * buf);
|
||||
SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type, char *id, uint8_t *buf);
|
||||
|
||||
/*!
|
||||
\brief Add a username packet attribute
|
||||
@@ -185,8 +182,7 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_st
|
||||
\param ulen the length of the username
|
||||
\return true or false
|
||||
*/
|
||||
SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_username(switch_stun_packet_t *packet, char *username,
|
||||
uint16_t ulen);
|
||||
SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_username(switch_stun_packet_t *packet, char *username, uint16_t ulen);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -196,8 +192,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_username(switch_stun_pa
|
||||
\param port the port of the mapped address
|
||||
\return true or false
|
||||
*/
|
||||
SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_binded_address(switch_stun_packet_t *packet, char *ipstr,
|
||||
uint16_t port);
|
||||
SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_binded_address(switch_stun_packet_t *packet, char *ipstr, uint16_t port);
|
||||
|
||||
/*!
|
||||
\brief Perform a stun lookup
|
||||
@@ -210,9 +205,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_binded_address(switch_s
|
||||
\return SUCCESS or FAIL
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip,
|
||||
switch_port_t *port,
|
||||
char *stunip,
|
||||
switch_port_t stunport, char **err, switch_memory_pool_t *pool);
|
||||
switch_port_t *port, char *stunip, switch_port_t stunport, char **err, switch_memory_pool_t * pool);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||
#define SWITCH_SPEECH_KEY "speech"
|
||||
#define SWITCH_UUID_BRIDGE "uuid_bridge"
|
||||
#define SWITCH_BITS_PER_BYTE 8
|
||||
typedef uint8_t switch_byte_t;
|
||||
typedef uint8_t switch_byte_t;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_FALSE = 0,
|
||||
@@ -976,11 +976,9 @@ typedef void (*switch_scheduler_func_t) (switch_scheduler_task_t *task);
|
||||
typedef switch_status_t (*switch_state_handler_t) (switch_core_session_t *);
|
||||
typedef struct switch_stream_handle switch_stream_handle_t;
|
||||
typedef switch_status_t (*switch_stream_handle_write_function_t) (switch_stream_handle_t *handle, const char *fmt, ...);
|
||||
typedef switch_status_t (*switch_api_function_t) (char *in, switch_core_session_t *session,
|
||||
switch_stream_handle_t *stream);
|
||||
typedef switch_status_t (*switch_api_function_t) (char *in, switch_core_session_t *session, switch_stream_handle_t *stream);
|
||||
typedef switch_status_t (*switch_input_callback_function_t) (switch_core_session_t *session, void *input,
|
||||
switch_input_type_t input_type, void *buf,
|
||||
unsigned int buflen);
|
||||
switch_input_type_t input_type, void *buf, unsigned int buflen);
|
||||
typedef struct switch_say_interface switch_say_interface_t;
|
||||
typedef struct {
|
||||
switch_input_callback_function_t input_callback;
|
||||
@@ -988,9 +986,7 @@ typedef struct {
|
||||
uint32_t buflen;
|
||||
} switch_input_args_t;
|
||||
typedef switch_status_t (*switch_say_callback_t) (switch_core_session_t *session,
|
||||
char *tosay,
|
||||
switch_say_type_t type,
|
||||
switch_say_method_t method, switch_input_args_t *args);
|
||||
char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args);
|
||||
typedef switch_status_t (*switch_module_load_t) (switch_loadable_module_interface_t **, char *);
|
||||
typedef switch_status_t (*switch_module_reload_t) (void);
|
||||
typedef switch_status_t (*switch_module_pause_t) (void);
|
||||
@@ -1001,9 +997,7 @@ typedef switch_status_t (*switch_module_shutdown_t) (void);
|
||||
typedef struct switch_xml *switch_xml_t;
|
||||
typedef struct switch_core_time_duration switch_core_time_duration_t;
|
||||
typedef switch_xml_t(*switch_xml_search_function_t) (const char *section,
|
||||
const char *tag_name,
|
||||
const char *key_name,
|
||||
const char *key_value, const char *params, void *user_data);
|
||||
const char *tag_name, const char *key_name, const char *key_value, const char *params, void *user_data);
|
||||
|
||||
/* things we don't deserve to know about */
|
||||
/*! \brief A channel */
|
||||
|
||||
@@ -219,7 +219,7 @@ SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char
|
||||
\param esc the escape character
|
||||
\return the escaped string
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t *pool, char *in, char *delim, char esc);
|
||||
SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t * pool, char *in, char *delim, char esc);
|
||||
|
||||
/*!
|
||||
\brief Wait for a socket
|
||||
@@ -227,7 +227,7 @@ SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t *pool, char *in,
|
||||
\param ms the number of milliseconds to wait
|
||||
\return the requested condition
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_socket_waitfor(switch_pollfd_t *poll, int ms);
|
||||
SWITCH_DECLARE(int) switch_socket_waitfor(switch_pollfd_t * poll, int ms);
|
||||
|
||||
/*!
|
||||
\brief Create a pointer to the file name in a given file path eliminating the directory name
|
||||
@@ -236,8 +236,7 @@ SWITCH_DECLARE(int) switch_socket_waitfor(switch_pollfd_t *poll, int ms);
|
||||
SWITCH_DECLARE(const char *) switch_cut_path(const char *in);
|
||||
|
||||
SWITCH_DECLARE(char *) switch_string_replace(const char *string, const char *search, const char *replace);
|
||||
SWITCH_DECLARE(switch_status_t) switch_string_match(const char *string, size_t string_len, const char *search,
|
||||
size_t search_len);
|
||||
SWITCH_DECLARE(switch_status_t) switch_string_match(const char *string, size_t string_len, const char *search, size_t search_len);
|
||||
|
||||
#define SWITCH_READ_ACCEPTABLE(status) (status == SWITCH_STATUS_SUCCESS || status == SWITCH_STATUS_BREAK)
|
||||
SWITCH_DECLARE(size_t) switch_url_encode(char *url, char *buf, size_t len);
|
||||
|
||||
@@ -137,8 +137,7 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_child(switch_xml_t xml, const char *name
|
||||
///\param attrname the attribute name
|
||||
///\param value the value
|
||||
///\return an xml node or NULL
|
||||
SWITCH_DECLARE(switch_xml_t) switch_xml_find_child(switch_xml_t node, const char *childname, const char *attrname,
|
||||
const char *value);
|
||||
SWITCH_DECLARE(switch_xml_t) switch_xml_find_child(switch_xml_t node, const char *childname, const char *attrname, const char *value);
|
||||
|
||||
///\brief returns the next tag of the same name in the same section and depth or NULL
|
||||
///\ if not found
|
||||
@@ -292,7 +291,7 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_root(uint8_t reload, const char **e
|
||||
///\param pool a memory pool to use
|
||||
///\param err a pointer to set error strings
|
||||
///\return SWITCH_STATUS_SUCCESS if successful
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t *pool, const char **err);
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t * pool, const char **err);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_destroy(void);
|
||||
@@ -313,9 +312,7 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_root(void);
|
||||
///\return SWITCH_STATUS_SUCCESS if successful root and node will be assigned
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_locate(const char *section,
|
||||
const char *tag_name,
|
||||
const char *key_name,
|
||||
const char *key_value,
|
||||
switch_xml_t * root, switch_xml_t * node, const char *params);
|
||||
const char *key_name, const char *key_value, switch_xml_t * root, switch_xml_t * node, const char *params);
|
||||
|
||||
///\brief open a config in the core registry
|
||||
///\param file_path the name of the config section e.g. modules.conf
|
||||
@@ -330,8 +327,7 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_cfg(const char *file_path, switch_x
|
||||
///\param user_data a pointer to private data to be used during the callback
|
||||
///\return SWITCH_STATUS_SUCCESS if successful
|
||||
///\note gateway functions will be executed in the order they were binded until a success is found else the root registry will be used
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_bind_search_function(switch_xml_search_function_t function,
|
||||
switch_xml_section_t sections, void *user_data);
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_bind_search_function(switch_xml_search_function_t function, switch_xml_section_t sections, void *user_data);
|
||||
|
||||
///\brief parse a string for a list of sections
|
||||
///\param str a | delimited list of section names
|
||||
|
||||
Reference in New Issue
Block a user