git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10244 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-11-05 00:20:30 +00:00
parent 71f94e0ee5
commit c217d45cf0
11 changed files with 114 additions and 33 deletions
-3
View File
@@ -52,9 +52,6 @@
#include <apr_general.h>
#include <apr_portable.h>
typedef apr_os_thread_t switch_thread_id_t;
#define switch_thread_self apr_os_thread_current
#ifdef HAVE_MLOCKALL
#include <sys/mman.h>
+10
View File
@@ -40,6 +40,16 @@
#define SWITCH_APR_H
SWITCH_BEGIN_EXTERN_C
#ifdef WIN32
typedef HANDLE switch_thread_id_t;
#else
typedef pthread_t switch_thread_id_t;
#endif
SWITCH_DECLARE(switch_thread_id_t) switch_thread_self(void);
/*
The pieces of apr we allow ppl to pass around between modules we typedef into our namespace and wrap all the functions
any other apr code should be as hidden as possible.
+13 -2
View File
@@ -89,6 +89,9 @@ struct switch_core_session_message {
switch_size_t pointer_reply_size;
/*! message flags */
switch_core_session_message_flag_t flags;
const char *_file;
const char *_func;
int _line;
};
/*! \brief A generic object to pass as a thread's session object to allow mutiple arguements and a pool */
@@ -777,7 +780,11 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_resurrect_channel(_In_z_
\param message the message to recieve
\return the status returned by the message handler
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_receive_message(_In_ switch_core_session_t *session, _In_ switch_core_session_message_t *message);
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(_In_ switch_core_session_t *session,
_In_ switch_core_session_message_t *message,
const char *file, const char *func, int line);
#define switch_core_session_receive_message(_session, _message) switch_core_session_perform_receive_message(_session, _message, \
__FILE__, __SWITCH_FUNC__, __LINE__)
/*!
\brief Queue an event on a given session
@@ -927,7 +934,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_recv_dtmf(_In_ switch_core_s
\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(_Out_ switch_hash_t **hash, _In_ switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_core_hash_init_case(_Out_ switch_hash_t **hash, _In_ switch_memory_pool_t *pool, switch_bool_t case_sensitive);
#define switch_core_hash_init(_hash, _pool) switch_core_hash_init_case(_hash, _pool, SWITCH_TRUE);
#define switch_core_hash_init_nocase(_hash, _pool) switch_core_hash_init_case(_hash, _pool, SWITCH_FALSE);
/*!
\brief Destroy an existing hash table
+2 -1
View File
@@ -565,7 +565,8 @@ typedef enum {
SWITCH_MESSAGE_INDICATE_DEFLECT,
SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ,
SWITCH_MESSAGE_INDICATE_DISPLAY,
SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY
SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY,
SWITCH_MESSAGE_INVALID
} switch_core_session_message_types_t;