summaryrefslogtreecommitdiffstats
path: root/tinySIP/include/tinysip/tsip_action.h
diff options
context:
space:
mode:
Diffstat (limited to 'tinySIP/include/tinysip/tsip_action.h')
-rwxr-xr-xtinySIP/include/tinysip/tsip_action.h167
1 files changed, 82 insertions, 85 deletions
diff --git a/tinySIP/include/tinysip/tsip_action.h b/tinySIP/include/tinysip/tsip_action.h
index 868421a..15f30a1 100755
--- a/tinySIP/include/tinysip/tsip_action.h
+++ b/tinySIP/include/tinysip/tsip_action.h
@@ -2,19 +2,19 @@
* Copyright (C) 2010-2011 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org>
-*
+*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
-*
+*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-*
+*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
@@ -41,80 +41,78 @@
TSIP_BEGIN_DECLS
-typedef uint64_t tsip_action_id_t;
+typedef uint64_t tsip_action_id_t;
#define TSIP_ACTION_INVALID_ID 0
#define TSIP_ACTION_INVALID_HANDLE tsk_null
/** List of all supported actions */
-typedef enum tsip_action_type_e
-{
- //! Used as configuration action
- tsip_atype_config,
- tsip_atype_dtmf_send,
-
- /* === REGISTER == */
- tsip_atype_register, /**< Sends SIP REGISTER request */
- //! Unregister by sending SIP REGISTER request with expires value equals to zero
+typedef enum tsip_action_type_e {
+ //! Used as configuration action
+ tsip_atype_config,
+ tsip_atype_dtmf_send,
+
+ /* === REGISTER == */
+ tsip_atype_register, /**< Sends SIP REGISTER request */
+ //! Unregister by sending SIP REGISTER request with expires value equals to zero
#define tsip_atype_unregister tsip_atype_hangup
-
- /* === SUBSCRIBE === */
- tsip_atype_subscribe, /**< Sends SIP SUBSCRIBE request */
- //! Unsubsribe by sending SIP SUBSCRIBE request with expires value equals to zero
+
+ /* === SUBSCRIBE === */
+ tsip_atype_subscribe, /**< Sends SIP SUBSCRIBE request */
+ //! Unsubsribe by sending SIP SUBSCRIBE request with expires value equals to zero
#define tsip_atype_unsubscribe tsip_atype_hangup
- /* === MESSAGE === */
- tsip_atype_message_send, /**< Sends SIP MESSAGE request */
+ /* === MESSAGE === */
+ tsip_atype_message_send, /**< Sends SIP MESSAGE request */
- /* === INFO === */
- tsip_atype_info_send, /**< Sends SIP INFO request */
+ /* === INFO === */
+ tsip_atype_info_send, /**< Sends SIP INFO request */
- /* === PUBLISH === */
- tsip_atype_publish, /**< Sends SIP PUBLISH request */
- //! Unpublish by sending SIP PUBLISH request with expires value equals to zero
+ /* === PUBLISH === */
+ tsip_atype_publish, /**< Sends SIP PUBLISH request */
+ //! Unpublish by sending SIP PUBLISH request with expires value equals to zero
#define tsip_atype_unpublish tsip_atype_hangup
-
- /* === OPTIONS === */
- tsip_atype_options_send, /**< Sends SIP OPTIONS request */
-
- /* === INVITE === */
- tsip_atype_invite, /**< Sends SIP INVITE/reINVITE request */
- tsip_atype_hold, /**< Puts the session on hold state */
- tsip_atype_resume, /**< Resumes a previously held session */
- tsip_atype_ect, /**< Transfer the call */
- tsip_atype_ect_accept, /**< Accept call transfer request */
- tsip_atype_ect_reject, /**< Reject call transfer request */
- tsip_atype_ect_lnotify, /**< Intra-Dialog notify. Never called by the end-user */
- tsip_atype_lmessage, /**< Large message (MSRP). The session must be connected */
+
+ /* === OPTIONS === */
+ tsip_atype_options_send, /**< Sends SIP OPTIONS request */
+
+ /* === INVITE === */
+ tsip_atype_invite, /**< Sends SIP INVITE/reINVITE request */
+ tsip_atype_hold, /**< Puts the session on hold state */
+ tsip_atype_resume, /**< Resumes a previously held session */
+ tsip_atype_ect, /**< Transfer the call */
+ tsip_atype_ect_accept, /**< Accept call transfer request */
+ tsip_atype_ect_reject, /**< Reject call transfer request */
+ tsip_atype_ect_lnotify, /**< Intra-Dialog notify. Never called by the end-user */
+ tsip_atype_lmessage, /**< Large message (MSRP). The session must be connected */
#define tsip_atype_bye tsip_atype_hangup
- /* === common === */
- //! Accept incoming call (INVITE) or message (SIP MESSAGE)
- tsip_atype_accept,
- //! Reject incoming call (INVITE) or message (SIP MESSAGE)
+ /* === common === */
+ //! Accept incoming call (INVITE) or message (SIP MESSAGE)
+ tsip_atype_accept,
+ //! Reject incoming call (INVITE) or message (SIP MESSAGE)
#define tsip_atype_reject tsip_atype_hangup
- //! Cancel an outgoing request
- tsip_atype_cancel,
- //! Hangup any SIP dialog (BYE, unREGISTER, unSUBSCRIBE ...). If the dialog is in early state, then it will be canceled.
- tsip_atype_hangup,
- //! Shutdown a SIP dialog. Should only be called by the stack.
- tsip_atype_shutdown,
- //! Signal transport error. Should only be called by the stack.
- tsip_atype_transport_error,
+ //! Cancel an outgoing request
+ tsip_atype_cancel,
+ //! Hangup any SIP dialog (BYE, unREGISTER, unSUBSCRIBE ...). If the dialog is in early state, then it will be canceled.
+ tsip_atype_hangup,
+ //! Shutdown a SIP dialog. Should only be called by the stack.
+ tsip_atype_shutdown,
+ //! Signal transport error. Should only be called by the stack.
+ tsip_atype_transport_error,
}
tsip_action_type_t;
/* internal enum used to pass parameters from the application layer to the stack */
-typedef enum tsip_action_param_type_e
-{
- aptype_null = 0,
-
- aptype_header,
- aptype_config,
- aptype_payload,
- aptype_resp_line,
- aptype_media_type,
- aptype_media,
+typedef enum tsip_action_param_type_e {
+ aptype_null = 0,
+
+ aptype_header,
+ aptype_config,
+ aptype_payload,
+ aptype_resp_line,
+ aptype_media_type,
+ aptype_media,
}
tsip_action_param_type_t;
@@ -127,32 +125,31 @@ tsip_action_param_type_t;
#define TSIP_ACTION_SET_NULL() aptype_null
/* private action object. public api should use tsip_action_handle_t. */
-typedef struct tsip_action_s
-{
- TSK_DECLARE_OBJECT;
-
- tsip_action_type_t type;
- tsk_params_L_t *headers;
- tsk_buffer_t* payload;
-
- struct{
- short code;
- char* phrase;
- } line_resp;
-
- struct{
- tmedia_type_t type;
- tmedia_params_L_t *params;
- } media;
-
- struct{
- int volume; // useless (manager will always use "10")
- int event;
- } dtmf;
-
- struct{
- char* to;
- } ect;
+typedef struct tsip_action_s {
+ TSK_DECLARE_OBJECT;
+
+ tsip_action_type_t type;
+ tsk_params_L_t *headers;
+ tsk_buffer_t* payload;
+
+ struct {
+ short code;
+ char* phrase;
+ } line_resp;
+
+ struct {
+ tmedia_type_t type;
+ tmedia_params_L_t *params;
+ } media;
+
+ struct {
+ int volume; // useless (manager will always use "10")
+ int event;
+ } dtmf;
+
+ struct {
+ char* to;
+ } ect;
}
tsip_action_t;
OpenPOWER on IntegriCloud