Commit ac7777e0 authored by Pekka Pessi's avatar Pekka Pessi

Added nua_unpublish()

darcs-hash:20050929110652-65a35-726305f08dcecde12f10011553d40bf1e33b763e.gz
parent 3d86d7a2
......@@ -1088,10 +1088,10 @@ void nua_refer(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
/** Send PUBLISH request to publication server.
*
* Request status will be delivered to the application using
* #nua_r_publish event. When successful the publication will
* be updated periodically. The handle used for publication
* cannot be used for any other purposes.
* Request status will be delivered to the application using #nua_r_publish
* event. When successful the publication will be updated periodically until
* nua_unpublish() is called or handle is destroyed. The handle used for
* publication cannot be used for any other purposes.
*
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
......@@ -1111,6 +1111,30 @@ void nua_publish(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
NUA_SIGNAL(nh, nua_r_publish, tag, value);
}
/** Send un-PUBLISH request to publication server.
*
* Request status will be delivered to the application using
* #nua_r_publish event. The handle used for un-publication
* cannot be used for any other purposes.
*
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
*
* @return
* nothing
*
* @par Related Tags:
* #NUTAG_URL \n
* Tags in <sip_tag.h>
*
* @par Events:
* #nua_r_publish
*/
void nua_unpublish(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
{
NUA_SIGNAL(nh, nua_r_unpublish, tag, value);
}
/** Send an INFO request.
*
* INFO is used to send call related information like DTMF
......
......@@ -109,6 +109,7 @@ typedef enum nua_event_e {
nua_r_options, /**< Answer to outgoing OPTIONS */
nua_r_refer, /**< Answer to outgoing REFER */
nua_r_publish, /**< Answer to outgoing PUBLISH */
nua_r_unpublish, /**< Answer to outgoing un-PUBLISH */
nua_r_info, /**< Answer to outgoing INFO */
nua_r_update, /**< Answer to outgoing UPDATE */
nua_r_message, /**< Answer to outgoing MESSAGE */
......
......@@ -689,6 +689,7 @@ void ua_signal(nua_t *nua, su_msg_r msg, event_t *e)
ua_refer(nua, nh, e->e_event, tags);
break;
case nua_r_publish:
case nua_r_unpublish:
ua_publish(nua, nh, e->e_event, tags);
break;
case nua_r_info:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment