ast_sip_publish_handler Struct Reference

Callbacks that publication handlers will define. More...

#include <res_pjsip_pubsub.h>

Collaboration diagram for ast_sip_publish_handler:

Collaboration graph
[legend]

Data Fields

const char * event_name
 The name of the event this handler deals with.
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.
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.
struct ao2_containerpublications
 Publications.
void(* publish_expire )(struct ast_sip_publication *pub)
 Called when a publication has reached its expiration.

Detailed Description

Callbacks that publication handlers will define.

Definition at line 49 of file res_pjsip_pubsub.h.


Field Documentation

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.

Parameters:
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.
Returns:
Response code for the incoming PUBLISH

Referenced by publish_request_initial().

struct { ... } next

struct ast_sip_publish_handler* next [read]

Definition at line 90 of file res_pjsip_pubsub.h.

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.

Parameters:
pub The publication whose state has changed
body The body of the inbound PUBLISH
state The state of the publication

Referenced by publish_request_initial(), and pubsub_on_rx_publish_request().

struct ao2_container* publications [read]

void(* publish_expire)(struct ast_sip_publication *pub)

Called when a publication has reached its expiration.


The documentation for this struct was generated from the following file:

Generated on Thu Apr 16 06:35:37 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6