| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
| Data Structures | |
| struct | ast_msg_data_attribute | 
| Functions | |
| struct ast_msg_data * | ast_msg_data_alloc (enum ast_msg_data_source_type source, struct ast_msg_data_attribute attributes[], size_t count) | 
| Allocates an ast_msg_data structure. | |
| struct ast_msg_data * | ast_msg_data_alloc2 (enum ast_msg_data_source_type source_type, const char *to, const char *from, const char *content_type, const char *body) | 
| Allocates an ast_msg_data structure. | |
| struct ast_msg_data * | ast_msg_data_dup (struct ast_msg_data *msg) | 
| Clone an ast_msg_data structure. | |
| const char * | ast_msg_data_get_attribute (struct ast_msg_data *msg, enum ast_msg_data_attribute_type attribute_type) | 
| Get attribute from ast_msg_data. | |
| size_t | ast_msg_data_get_length (struct ast_msg_data *msg) | 
| Get length of the structure. | |
| enum ast_msg_data_source_type | ast_msg_data_get_source_type (struct ast_msg_data *msg) | 
| Get "source type" from ast_msg_data. | |
| int | ast_msg_data_queue_frame (struct ast_channel *channel, struct ast_msg_data *msg) | 
| Queue an AST_FRAME_TEXT_DATA frame containing an ast_msg_data structure. | |
The Enhanced Messaging framework allows attributes, such as "From", "To" and "Content-Type" to be attached to the message by the incoming channel tech which can then be used by the outgoing channel tech to construct the appropriate technology-specific outgoing message.
| Enumerator | |
|---|---|
| AST_MSG_DATA_ATTR_TO | |
| AST_MSG_DATA_ATTR_FROM | |
| AST_MSG_DATA_ATTR_CONTENT_TYPE | |
| AST_MSG_DATA_ATTR_BODY | |
| __AST_MSG_DATA_ATTR_LAST | |
| Enumerator | |
|---|---|
| AST_MSG_DATA_SOURCE_TYPE_UNKNOWN | |
| AST_MSG_DATA_SOURCE_TYPE_T140 | |
| AST_MSG_DATA_SOURCE_TYPE_IN_DIALOG | |
| AST_MSG_DATA_SOURCE_TYPE_OUT_OF_DIALOG | |
| __AST_MSG_DATA_SOURCE_TYPE_LAST | |
Definition at line 446 of file message.h.
| struct ast_msg_data * ast_msg_data_alloc | ( | enum ast_msg_data_source_type | source, | 
| struct ast_msg_data_attribute | attributes[], | ||
| size_t | count | ||
| ) | 
Allocates an ast_msg_data structure.
| source | The source type of the message | 
| attributes | A pointer to an array of ast_msg_data_attribute structures | 
| count | The number of elements in the array | 
Definition at line 1458 of file main/message.c.
References __AST_MSG_DATA_ATTR_LAST, ast_assert, ast_calloc, ast_copy_string(), ATTRIBUTE_UNSET, attribute_value_offsets, buf, len(), length, NULL, source, ast_msg_data_attribute::type, ast_msg_data_attribute::value, and value.
Referenced by ast_msg_data_alloc2(), ast_sendtext(), chan_pjsip_sendtext(), incoming_in_dialog_request(), send_message(), and sendtext_exec().
| struct ast_msg_data * ast_msg_data_alloc2 | ( | enum ast_msg_data_source_type | source_type, | 
| const char * | to, | ||
| const char * | from, | ||
| const char * | content_type, | ||
| const char * | body | ||
| ) | 
Allocates an ast_msg_data structure.
| source_type | The source type of the message | 
| to | Where the message is sent to | 
| from | Where the message is sent from | 
| content_type | Content type of the body | 
| body | The message body | 
Definition at line 1509 of file main/message.c.
References ARRAY_LEN, ast_msg_data_alloc(), AST_MSG_DATA_ATTR_BODY, AST_MSG_DATA_ATTR_CONTENT_TYPE, AST_MSG_DATA_ATTR_FROM, AST_MSG_DATA_ATTR_TO, S_OR, and ast_msg_data_attribute::type.
Referenced by queue_sendtext_data().
| struct ast_msg_data * ast_msg_data_dup | ( | struct ast_msg_data * | msg | ) | 
Clone an ast_msg_data structure.
| msg | The message to clone | 
Definition at line 1535 of file main/message.c.
References ast_assert, ast_malloc, length, and NULL.
Referenced by sendtext_data_create().
| const char * ast_msg_data_get_attribute | ( | struct ast_msg_data * | msg, | 
| enum ast_msg_data_attribute_type | attribute_type | ||
| ) | 
Get attribute from ast_msg_data.
| msg | Pointer to ast_msg_data structure | 
| attribute_type | One of ast_msg_data_attribute_type | 
Definition at line 1573 of file main/message.c.
References ast_assert, ATTRIBUTE_UNSET, attribute_value_offsets, buf, and NULL.
Referenced by ast_bridge_channel_queue_frame(), ast_sendtext_data(), bridge_channel_handle_write(), chan_pjsip_sendtext_data(), incoming_in_dialog_request(), sendtext(), and softmix_bridge_write_text().
| size_t ast_msg_data_get_length | ( | struct ast_msg_data * | msg | ) | 
Get length of the structure.
| msg | Pointer to ast_msg_data structure | 
Definition at line 1553 of file main/message.c.
References ast_assert, length, and NULL.
Referenced by queue_sendtext_data(), and send_message().
| enum ast_msg_data_source_type ast_msg_data_get_source_type | ( | struct ast_msg_data * | msg | ) | 
Get "source type" from ast_msg_data.
| msg | Pointer to ast_msg_data structure | 
Definition at line 1563 of file main/message.c.
References ast_assert, AST_MSG_DATA_SOURCE_TYPE_UNKNOWN, NULL, and source.
| int ast_msg_data_queue_frame | ( | struct ast_channel * | channel, | 
| struct ast_msg_data * | msg | ||
| ) | 
Queue an AST_FRAME_TEXT_DATA frame containing an ast_msg_data structure.
| channel | The channel on which to queue the frame | 
| msg | Pointer to ast_msg_data structure | 
| -1 | Error | 
| 0 | Success | 
Definition at line 1588 of file main/message.c.
References ast_assert, AST_FRAME_TEXT_DATA, ast_queue_frame(), ast_frame::data, ast_frame::datalen, ast_frame::frametype, length, NULL, and ast_frame::ptr.
Referenced by incoming_in_dialog_request().