29#include <pjsip_simple.h> 
   54              state_data->
pool, body, 
"tuple"))) {
 
   60        state_data->
pool, 
node, 
"id", 
"digium-presence");
 
   63              state_data->
pool, 
node, 
"status"))) {
 
   69              state_data->
pool, 
node, 
"digium_presence"))) {
 
   76        pj_strdup2(state_data->
pool, &
node->content, sanitized);
 
   86            state_data->
pool, 
node, 
"subtype", sanitized);
 
 
   93    .
type = 
"application",
 
   94    .subtype = 
"pidf+xml",
 
 
  117    .
requires = 
"res_pjsip,res_pjsip_pubsub",
 
Asterisk main include file. File version handling, generic pbx functions.
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODPRI_CHANNEL_DEPEND
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Presence state management.
const char * ast_presence_state2str(enum ast_presence_state state)
Convert presence state to text string for output.
static int load_module(void)
static struct ast_sip_pubsub_body_supplement pidf_supplement
static int unload_module(void)
static int pidf_supplement_body(void *body, void *data)
void ast_sip_sanitize_xml(const char *input, char *output, size_t len)
Replace offensive XML characters with XML entities.
pj_xml_node * ast_sip_presence_xml_create_node(pj_pool_t *pool, pj_xml_node *parent, const char *name)
Create XML node.
pj_xml_attr * ast_sip_presence_xml_create_attr(pj_pool_t *pool, pj_xml_node *node, const char *name, const char *value)
Create XML attribute.
void ast_sip_pubsub_unregister_body_supplement(struct ast_sip_pubsub_body_supplement *supplement)
Unregister a body generator with the pubsub core.
int ast_sip_pubsub_register_body_supplement(struct ast_sip_pubsub_body_supplement *supplement)
Register a body generator with the pubsub core.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
structure used for presence XML bodies
enum ast_presence_state presence_state
const char * type
Content type In "plain/text", "plain" is the type.