Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Pubsub body generator. More...
#include <res_pjsip_pubsub.h>
Data Fields | |
void *(* | allocate_body )(void *data) |
allocate body structure. More... | |
const char * | body_type |
void(* | destroy_body )(void *body) |
Deallocate resources created for the body. More... | |
int(* | generate_body_content )(void *body, void *data) |
Add content to the body of a SIP request. More... | |
struct { | |
struct ast_sip_pubsub_body_generator * next | |
} | list |
const char * | subtype |
Content subtype In "plain/text", "text" is the subtype. More... | |
void(* | to_string )(void *body, struct ast_str **str) |
Convert the body to a string. More... | |
const char * | type |
Content type In "plain/text", "plain" is the type. More... | |
Pubsub body generator.
A body generator is responsible for taking Asterisk content and converting it into a body format to be placed in an outbound SIP NOTIFY or PUBLISH request.
Definition at line 635 of file res_pjsip_pubsub.h.
void *(* allocate_body) (void *data) |
allocate body structure.
Body generators will have this method called when a NOTIFY or PUBLISH body needs to be created. The type returned depends on the type of content being produced for the body. The data parameter is provided by the subscription handler and will vary between different event types.
data | The subscription data provided by the event handler |
non-NULL | The allocated body |
NULL | Failure |
Definition at line 661 of file res_pjsip_pubsub.h.
Referenced by ast_sip_pubsub_generate_body_content().
const char* body_type |
Type of data the body generator takes as input
Definition at line 647 of file res_pjsip_pubsub.h.
Referenced by ast_sip_pubsub_generate_body_content(), and find_body_generator().
void(* destroy_body) (void *body) |
Deallocate resources created for the body.
Optional callback to destroy resources allocated for the message body.
body | Body to be destroyed |
Definition at line 689 of file res_pjsip_pubsub.h.
Referenced by ast_sip_pubsub_generate_body_content().
int(* generate_body_content) (void *body, void *data) |
Add content to the body of a SIP request.
The body of the request has already been allocated by the body generator's allocate_body callback.
body | The body of the SIP request. The type is determined by the content type. |
data | The subscription data used to populate the body. The type is determined by the content type. |
Definition at line 673 of file res_pjsip_pubsub.h.
Referenced by ast_sip_pubsub_generate_body_content().
struct { ... } list |
struct ast_sip_pubsub_body_generator* next |
Definition at line 690 of file res_pjsip_pubsub.h.
const char* subtype |
Content subtype In "plain/text", "text" is the subtype.
Definition at line 645 of file res_pjsip_pubsub.h.
Referenced by ast_sip_pubsub_generate_body_content(), ast_sip_pubsub_register_body_generator(), find_body_generator(), find_body_generator_accept(), find_body_generator_type_subtype(), and find_body_generator_type_subtype_nolock().
Convert the body to a string.
body | The request body. |
str | The converted string form of the request body |
Definition at line 680 of file res_pjsip_pubsub.h.
Referenced by ast_sip_pubsub_generate_body_content().
const char* type |
Content type In "plain/text", "plain" is the type.
Definition at line 640 of file res_pjsip_pubsub.h.
Referenced by ast_sip_pubsub_generate_body_content(), ast_sip_pubsub_register_body_generator(), find_body_generator(), and Property::load().