Asterisk - The Open Source Telephony Project
18.5.0
|
Callbacks that publication handlers will define. More...
#include <res_pjsip_pubsub.h>
Data Fields | |
const char * | event_name |
The name of the event this handler deals with. More... | |
int(* | new_publication )(struct ast_sip_endpoint *endpoint, const char *resource, const char *event_configuration) |
Called when a PUBLISH to establish a new publication arrives. More... | |
struct { | |
struct ast_sip_publish_handler * next | |
} | next |
int(* | publication_state_change )(struct ast_sip_publication *pub, pjsip_msg_body *body, enum ast_sip_publish_state state) |
Published resource has changed states. More... | |
struct ao2_container * | publications |
Publications. More... | |
void(* | publish_expire )(struct ast_sip_publication *pub) |
Called when a publication has reached its expiration. More... | |
Callbacks that publication handlers will define.
Definition at line 49 of file res_pjsip_pubsub.h.
const char* event_name |
The name of the event this handler deals with.
Definition at line 51 of file res_pjsip_pubsub.h.
Referenced by ast_sip_register_publish_handler(), find_pub_handler(), load_module(), and publish_request_initial().
int(* new_publication) (struct ast_sip_endpoint *endpoint, const char *resource, const char *event_configuration) |
Called when a PUBLISH to establish a new publication arrives.
endpoint | The endpoint from whom the PUBLISH arrived. |
resource | The resource whose state is being published. |
event_configuration | The name of the event type configuration to use for this resource. |
Definition at line 64 of file res_pjsip_pubsub.h.
Referenced by publish_request_initial().
struct ast_sip_publish_handler* next |
Definition at line 90 of file res_pjsip_pubsub.h.
Referenced by ast_sip_unregister_publish_handler(), find_pub_handler(), and sub_add_handler().
struct { ... } next |
int(* publication_state_change) (struct ast_sip_publication *pub, pjsip_msg_body *body, enum ast_sip_publish_state state) |
Published resource has changed states.
The state parameter can be used to take further action. For instance, if the state is AST_SIP_PUBLISH_STATE_INITIALIZED, then this is the initial PUBLISH request. This is a good time to set up datastores on the publication or any other initial needs.
AST_SIP_PUBLISH_STATE_TERMINATED is used when the remote end is terminating its publication. This is a good opportunity to free any resources associated with the publication.
AST_SIP_PUBLISH_STATE_ACTIVE is used when a publication that modifies state arrives.
pub | The publication whose state has changed |
body | The body of the inbound PUBLISH |
state | The state of the publication |
Definition at line 88 of file res_pjsip_pubsub.h.
Referenced by publish_request_initial(), and pubsub_on_rx_publish_request().
struct ao2_container* publications |
Publications.
Definition at line 54 of file res_pjsip_pubsub.h.
Referenced by ast_sip_register_publish_handler(), ast_sip_unregister_publish_handler(), publish_expire(), and pubsub_on_rx_publish_request().
void(* publish_expire) (struct ast_sip_publication *pub) |
Called when a publication has reached its expiration.
Definition at line 68 of file res_pjsip_pubsub.h.