diff options
Diffstat (limited to 'pjsip/include/pjsip-simple/publish.h')
-rw-r--r-- | pjsip/include/pjsip-simple/publish.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/pjsip/include/pjsip-simple/publish.h b/pjsip/include/pjsip-simple/publish.h index ebbd1cf1..3c7c7d55 100644 --- a/pjsip/include/pjsip-simple/publish.h +++ b/pjsip/include/pjsip-simple/publish.h @@ -78,7 +78,9 @@ struct pjsip_publishc_cbparam int code; /**< SIP status code received. */ pj_str_t reason; /**< SIP reason phrase received. */ pjsip_rx_data *rdata; /**< The complete received response. */ - int expiration;/**< Next expiration interval. */ + int expiration;/**< Next expiration interval. If the + value is -1, it means the session + will not renew itself. */ }; @@ -190,6 +192,25 @@ PJ_DECL(pj_status_t) pjsip_publishc_set_route_set(pjsip_publishc *pubc, /** + * Set list of headers to be added to each PUBLISH request generated by + * the client publication session. Note that application can also add + * the headers to the request after calling #pjsip_publishc_publish() + * or #pjsip_publishc_unpublish(), but the benefit of this function is + * the headers will also be added to requests generated internally by + * the session, such as during session renewal/refresh. + * + * Note that calling this function will clear the previously added list + * of headers. + * + * @param pubc The client publication structure. + * @param hdr_list The list of headers. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjsip_publishc_set_headers(pjsip_publishc *pubc, + const pjsip_hdr *hdr_list); + +/** * Create PUBLISH request for the specified client publication structure. * Application can use this function to both create initial publication * or to modify existing publication. |