refactoring and general improvement (do a make sure)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3035 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-10-12 00:59:09 +00:00
parent dfb9845d85
commit ba46200539
9 changed files with 455 additions and 72 deletions
+18
View File
@@ -83,6 +83,8 @@ struct switch_core_session_message {
void *pointer_reply;
/*! optional arbitrary pointer reply's size */
switch_size_t pointer_reply_size;
/*! message flags */
switch_core_session_message_flag_t flags;
};
/*! \brief A generic object to pass as a thread's session object to allow mutiple arguements and a pool */
@@ -421,6 +423,22 @@ SWITCH_DECLARE(void) switch_core_session_hupall(switch_call_cause_t cause);
*/
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
\param session the session to queue the message to
\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);
/*!
\brief DE-Queue an message on a given session
\param session the session to de-queue the message on
\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);
/*!
\brief Queue an event on another session using its uuid
\param uuid_str the unique id of the session you want to send a message to
+9 -1
View File
@@ -247,7 +247,8 @@ typedef enum {
SWITCH_MESSAGE_INDICATE_PROGRESS,
SWITCH_MESSAGE_INDICATE_BRIDGE,
SWITCH_MESSAGE_INDICATE_UNBRIDGE,
SWITCH_MESSAGE_INDICATE_TRANSFER
SWITCH_MESSAGE_INDICATE_TRANSFER,
SWITCH_MESSAGE_INDICATE_RINGING
} switch_core_session_message_types_t;
@@ -348,6 +349,10 @@ typedef enum {
SWITCH_CHANNEL_ID_EVENT
} switch_text_channel_t;
typedef enum {
SCSMF_DYNAMIC = (1 << 0)
} switch_core_session_message_flag_t;
#define SWITCH_UUID_FORMATTED_LENGTH APR_UUID_FORMATTED_LENGTH
#define SWITCH_CHANNEL_LOG SWITCH_CHANNEL_ID_LOG, __FILE__, __FUNCTION__, __LINE__
#define SWITCH_CHANNEL_LOG_CLEAN SWITCH_CHANNEL_ID_LOG_CLEAN, __FILE__, __FUNCTION__, __LINE__
@@ -610,6 +615,7 @@ typedef enum {
SWITCH_EVENT_MODULE_LOAD - Module was loaded
SWITCH_EVENT_DTMF - DTMF was sent
SWITCH_EVENT_MESSAGE - A Basic Message
SWITCH_EVENT_PRESENCE - Presence Info
SWITCH_EVENT_CODEC - Codec Change
SWITCH_EVENT_BACKGROUND_JOB - Background Job
SWITCH_EVENT_ALL - All events at once
@@ -644,6 +650,8 @@ typedef enum {
SWITCH_EVENT_MODULE_LOAD,
SWITCH_EVENT_DTMF,
SWITCH_EVENT_MESSAGE,
SWITCH_EVENT_PRESENCE_IN,
SWITCH_EVENT_PRESENCE_OUT,
SWITCH_EVENT_CODEC,
SWITCH_EVENT_BACKGROUND_JOB,
SWITCH_EVENT_ALL