Commit 80c62367 authored by Pekka Pessi's avatar Pekka Pessi

Updated documentation in nea, nua, nta, sip and tport modules.

darcs-hash:20051129130659-65a35-df63c778a173581c3fc86ee1c91d32184adaf279.gz
parent 3aa4555c
......@@ -52,14 +52,6 @@
#include <nea_tag.h>
#endif
#ifndef NEA_DLL
#ifndef WIN32
#define NEA_DLL
#else
#define NEA_DLL __declspec(dllimport)
#endif
#endif
/** Event notifier object. */
typedef struct nea_server_s nea_server_t;
......@@ -147,64 +139,6 @@ nea_server_t *nea_server_create(nta_agent_t *agent,
tag_type_t tag, tag_value_t value,
...);
/** Specify the minimum duration of a subscription (by default, 15 minutes) */
#define NEATAG_MIN_EXPIRES(x) neatag_min_expires, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_min_expires;
#define NEATAG_MIN_EXPIRES_REF(x) neatag_min_expires_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_min_expires_ref;
#define NEATAG_MINSUB(x) neatag_min_expires, tag_uint_v((x))
#define NEATAG_MINSUB_REF(x) neatag_min_expires_ref, tag_uint_vr((&x))
/** Specify the default duration of a subscription (by default, 60 minutes) */
#define NEATAG_EXPIRES(x) neatag_expires, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_expires;
#define NEATAG_EXPIRES_REF(x) neatag_expires_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_expires_ref;
/** Specify the maximum duration of a subscription (by default, 24 hours) */
#define NEATAG_MAX_EXPIRES(x) neatag_max_expires, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_max_expires;
#define NEATAG_MAX_EXPIRES_REF(x) neatag_max_expires_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_max_expires_ref;
/** Indicate/require support for "eventlist" feature. */
#define NEATAG_EVENTLIST(x) neatag_eventlist, tag_bool_v((x))
NEA_DLL extern tag_typedef_t neatag_eventlist;
#define NEATAG_EVENTLIST_REF(x) neatag_eventlist_ref, tag_bool_vr((&x))
NEA_DLL extern tag_typedef_t neatag_eventlist_ref;
/** Specify the default throttle value for subscription. */
#define NEATAG_THROTTLE(x) neatag_throttle, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_throttle;
#define NEATAG_THROTTLE_REF(x) neatag_throttle_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_throttle_ref;
/** Specify the minimum throttle value for subscription. */
#define NEATAG_MINTHROTTLE(x) neatag_minthrottle, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_minthrottle;
#define NEATAG_MINTHROTTLE_REF(x) neatag_minthrottle_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_minthrottle_ref;
/** Specify dialog handle */
#define NEATAG_DIALOG(x) neatag_dialog, tag_ptr_v((x))
NEA_DLL extern tag_typedef_t neatag_dialog;
#define NEATAG_DIALOG_REF(x) neatag_dialog_ref, tag_ptr_vr((&x), (x))
NEA_DLL extern tag_typedef_t neatag_dialog_ref;
#define NEATAG_SUB(x) neatag_sub, tag_ptr_v((x))
NEA_DLL extern tag_typedef_t neatag_sub;
#define NEATAG_SUB_REF(x) neatag_sub_ref, tag_ptr_vr((&x), (x))
NEA_DLL extern tag_typedef_t neatag_sub_ref;
/** Shutdown an event server */
int nea_server_shutdown(nea_server_t *nes, int retry_after);
......@@ -307,48 +241,6 @@ int nea_sub_version(nea_sub_t *, unsigned);
/** Return time until next notification can be sent */
unsigned nea_sub_pending(nea_sub_t const *);
/** Send fake content for this subscriber */
#define NEATAG_FAKE(x) neatag_fake, tag_bool_v((x))
NEA_DLL extern tag_typedef_t neatag_fake;
#define NEATAG_FAKE_REF(x) neatag_fake_ref, tag_bool_vr((&x))
NEA_DLL extern tag_typedef_t neatag_fake_ref;
/** Specify reason for termination */
#define NEATAG_REASON(x) neatag_reason, tag_str_v((x))
NEA_DLL extern tag_typedef_t neatag_reason;
#define NEATAG_REASON_REF(x) neatag_reason_ref, tag_str_vr((&x))
NEA_DLL extern tag_typedef_t neatag_reason_ref;
/** Specify retry-after for termination */
#define NEATAG_RETRY_AFTER(x) neatag_retry_after, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_retry_after;
#define NEATAG_RETRY_AFTER_REF(x) neatag_retry_after_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_retry_after_ref;
/** Specify extended state for subscription-state */
#define NEATAG_EXSTATE(x) neatag_exstate, tag_str_v((x))
NEA_DLL extern tag_typedef_t neatag_exstate;
#define NEATAG_EXSTATE_REF(x) neatag_exstate_ref, tag_str_vr((&x))
NEA_DLL extern tag_typedef_t neatag_exstate_ref;
/** Do not try to conform pre-3265 notifiers/watchers */
#define NEATAG_STRICT_3265(x) neatag_strict_3265, tag_bool_v((x))
NEA_DLL extern tag_typedef_t neatag_strict_3265;
#define NEATAG_STRICT_3265_REF(x) neatag_strict_3265_ref, tag_bool_vr((&x))
NEA_DLL extern tag_typedef_t neatag_strict_3265_ref;
/** Version number of content */
#define NEATAG_VERSION(x) neatag_version, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_version;
#define NEATAG_VERSION_REF(x) neatag_version_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_version_ref;
#if 0
/** Do a remote qauth.
*
......
......@@ -343,6 +343,12 @@ void nea_subnode_init(nea_subnode_t *sn, nea_sub_t *s, sip_time_t now)
*
* <dt>NEATAG_THROTTLE()
* <dd>Default value for event throttle (by default, 5 seconds).
* Throttle determines the minimum interval betweeen notifications. Note
* that the notification indicating that the subscription has terminated
* will be sent regardless of throttle.
*
* The default throttle value is used if the subscriber does not include
* a throttle parameter in @ref sip_event "Event" header of SUBSCRIBE request.
*
* <dt>NEATAG_MINTHROTTLE()
* <dd>Minimum allowed throttle value (by default, 5 seconds).
......@@ -601,7 +607,59 @@ void nea_server_destroy(nea_server_t *nes)
/* ----------------------------------------------------------------- */
/** Update server payload.
/**Update server payload.
*
* A nea event server has typed content that is delivered to the
* subscribers. Different content types are each assigned a separate primary
* view. There can be also primary views with "fake" content, content
* delivered to politely blocked subscribers.
*
* In addition to primary views, there can be secondary views, views
* assigned to a single subscriber only.
*
* @TAGS
* The following tagged arguments are accepted:
* <dl>
*
* <dt>SIPTAG_PAYLOAD() or SIPTAG_PAYLOAD_STR()
* <dd>Updated event content.
*
* <dt>SIPTAG_CONTENT_TYPE() or SIPTAG_CONTENT_TYPE_STR().
* <dd>MIME type of the content.
*
* <dt>NEATAG_FAKE(fak)
* <dd>If @a fake is true, 'fake' view is updated.
*
* <dt>NEATAG_VIEW(view)
* <dd>If included in tagged arguments, @a view is * updated. Used when
* updating secondary view.
*
* <dt>NEATAG_VERSION(version)
* <dd>The application-provided @a version for
* event content. After updated content has been sent to subscriber, @a
* version is copied to subscriber information structure.
*
* <dt>NEATAG_EVMAGIC(context)
* <dd>Application-provided @a context pointer.
* The @a context pointer is returned by nea_view_magic() function.
*
* <dt>NEATAG_RELIABLE(reliable)
* <dd>The @a reliable flag determines how overlapping updates are handled.
* If @a reliable is true, all updates are delivered to the subscribers.
*
* <dt>NEATAG_THROTTLE(throttl)
* <dd>Default value for event throttle for updated event view. Throttle
* determines the minimum interval in seconds betweeen notifications. Note
* that the notification indicating that the subscription has terminated
* will be sent regardless of throttle.
*
* The default throttle value is used if the subscriber does not include
* a throttle parameter in @ref sip_event "Event" header of SUBSCRIBE request.
*
* <dt>NEATAG_MINTHROTTLE()
* <dd>Minimum allowed throttle value for updated event view.
*
* </dl>
*
* @retval -1 upon an error.
* @retval 0 if event document was not updated.
......@@ -679,6 +737,9 @@ int nea_view_update(nea_server_t *nes,
ta_end(ta);
if (min_throttle < throttle)
min_throttle = throttle;
if (ct == NULL && cts == NULL)
return -1;
......@@ -2155,7 +2216,31 @@ int nea_sub_version(nea_sub_t *s, unsigned version)
return 0;
}
/** Authorize a subscription */
/** Authorize a subscription.
*
* Application can modify the subscription state and authorize the user.
* The subscription state has following simple state diagram:
*
* @code
* +---------------+ +------------------+
* | | | |
* +-----------+ | +---------+ V | +------------+ V +------------+
* | embryonic |-+->| pending |--+-+->| authorized |--+->| terminated |
* +-----------+ +---------+ +------------+ +------------+
*
* @endcode
*
* @TAGS
* IF NEATAG_VIEW(view) is included in tagged arguments, @a view is assigned
* to the subscriber and the content from the view is delivered to the
* subscriber.
*
* If NEATAG_FAKE(1) is included in tags, content marked as 'fake' is
* delivered to the subscriber.
*
* @retval 0 if successful
* @retval -1 upon an error
*/
int nea_sub_auth(nea_sub_t *s,
nea_state_t state,
tag_type_t tag, tag_value_t value, ...)
......@@ -2171,6 +2256,8 @@ int nea_sub_auth(nea_sub_t *s,
return -1;
if (state == nea_embryonic)
return -1;
if (state < s->s_state)
return -1;
ta_start(ta, tag, value);
......
......@@ -28,7 +28,6 @@
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Tue Jul 24 22:28:34 2001 ppessi
* @date Last modified: Wed Jul 20 20:35:27 2005 kaiv
*/
#include "config.h"
......@@ -57,7 +56,6 @@ tag_typedef_t neatag_exstate = STRTAG_TYPEDEF(exstate);
tag_typedef_t neatag_version = INTTAG_TYPEDEF(version);
tag_typedef_t neatag_view = PTRTAG_TYPEDEF(view);
tag_typedef_t neatag_evmagic = PTRTAG_TYPEDEF(evmagic);
tag_typedef_t neatag_sub = PTRTAG_TYPEDEF(sub);
tag_typedef_t neatag_reliable = BOOLTAG_TYPEDEF(reliable);
tag_typedef_t neatag_sub = PTRTAG_TYPEDEF(sub);
......
......@@ -46,6 +46,14 @@
#include <nta_tag.h>
#endif
#ifndef NEA_DLL
#ifndef WIN32
#define NEA_DLL
#else
#define NEA_DLL __declspec(dllimport)
#endif
#endif
/** Event states */
typedef enum {
nea_extended = -1,
......@@ -55,14 +63,110 @@ typedef enum {
nea_terminated
} nea_state_t;
/** Specify the minimum duration of a subscription (by default, 15 minutes) */
#define NEATAG_MIN_EXPIRES(x) neatag_min_expires, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_min_expires;
/** List of all NEA tags. */
/* extern tag_type_t nea_tag_list[]; */
#define NEATAG_MIN_EXPIRES_REF(x) neatag_min_expires_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_min_expires_ref;
#define NEATAG_MINSUB(x) neatag_min_expires, tag_uint_v((x))
#define NEATAG_MINSUB_REF(x) neatag_min_expires_ref, tag_uint_vr((&x))
/** Specify the default duration of a subscription (by default, 60 minutes) */
#define NEATAG_EXPIRES(x) neatag_expires, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_expires;
#define NEATAG_EXPIRES_REF(x) neatag_expires_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_expires_ref;
/** Specify the maximum duration of a subscription (by default, 24 hours) */
#define NEATAG_MAX_EXPIRES(x) neatag_max_expires, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_max_expires;
#define NEATAG_MAX_EXPIRES_REF(x) neatag_max_expires_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_max_expires_ref;
/** Indicate/require support for "eventlist" feature. */
#define NEATAG_EVENTLIST(x) neatag_eventlist, tag_bool_v((x))
NEA_DLL extern tag_typedef_t neatag_eventlist;
#define NEATAG_EVENTLIST_REF(x) neatag_eventlist_ref, tag_bool_vr((&x))
NEA_DLL extern tag_typedef_t neatag_eventlist_ref;
/** Specify the default throttle value for subscription. */
#define NEATAG_THROTTLE(x) neatag_throttle, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_throttle;
#define NEATAG_THROTTLE_REF(x) neatag_throttle_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_throttle_ref;
/** Specify the minimum throttle value for subscription. */
#define NEATAG_MINTHROTTLE(x) neatag_minthrottle, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_minthrottle;
#define NEATAG_MINTHROTTLE_REF(x) neatag_minthrottle_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_minthrottle_ref;
/** Specify dialog handle */
#define NEATAG_DIALOG(x) neatag_dialog, tag_ptr_v((x))
NEA_DLL extern tag_typedef_t neatag_dialog;
#define NEATAG_DIALOG_REF(x) neatag_dialog_ref, tag_ptr_vr((&x), (x))
NEA_DLL extern tag_typedef_t neatag_dialog_ref;
/* Server-specific tags */
/** Pass pointer to subscription */
#define NEATAG_SUB(x) neatag_sub, tag_ptr_v((x))
NEA_DLL extern tag_typedef_t neatag_sub;
#define NEATAG_SUB_REF(x) neatag_sub_ref, tag_ptr_vr((&x), (x))
NEA_DLL extern tag_typedef_t neatag_sub_ref;
/** Use fake content. @sa nea_sub_auth() and nea_server_update(). */
#define NEATAG_FAKE(x) neatag_fake, tag_bool_v((x))
NEA_DLL extern tag_typedef_t neatag_fake;
#define NEATAG_FAKE_REF(x) neatag_fake_ref, tag_bool_vr((&x))
NEA_DLL extern tag_typedef_t neatag_fake_ref;
/** Specify reason for termination */
#define NEATAG_REASON(x) neatag_reason, tag_str_v((x))
NEA_DLL extern tag_typedef_t neatag_reason;
#define NEATAG_REASON_REF(x) neatag_reason_ref, tag_str_vr((&x))
NEA_DLL extern tag_typedef_t neatag_reason_ref;
/** Specify retry-after for termination */
#define NEATAG_RETRY_AFTER(x) neatag_retry_after, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_retry_after;
#define NEATAG_RETRY_AFTER_REF(x) neatag_retry_after_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_retry_after_ref;
/** Specify extended state for subscription-state */
#define NEATAG_EXSTATE(x) neatag_exstate, tag_str_v((x))
NEA_DLL extern tag_typedef_t neatag_exstate;
#define NEATAG_EXSTATE_REF(x) neatag_exstate_ref, tag_str_vr((&x))
NEA_DLL extern tag_typedef_t neatag_exstate_ref;
/** Do not try to conform pre-3265 notifiers/watchers */
#define NEATAG_STRICT_3265(x) neatag_strict_3265, tag_bool_v((x))
NEA_DLL extern tag_typedef_t neatag_strict_3265;
#define NEATAG_STRICT_3265_REF(x) neatag_strict_3265_ref, tag_bool_vr((&x))
NEA_DLL extern tag_typedef_t neatag_strict_3265_ref;
/** Version number of content */
#define NEATAG_VERSION(x) neatag_version, tag_uint_v((x))
NEA_DLL extern tag_typedef_t neatag_version;
#define NEATAG_VERSION_REF(x) neatag_version_ref, tag_uint_vr((&x))
NEA_DLL extern tag_typedef_t neatag_version_ref;
/** List of all NEA tags. */
/* extern tag_type_t nea_tag_list[]; */
#endif
......@@ -16,6 +16,6 @@ TAGFILES += ../docs/doxytags_tport=../tport
GENERATE_TAGFILE = ../docs/doxytags_nta
EXCLUDE_PATTERNS += sl_*.h sl_*.c
EXCLUDE_PATTERNS += sl_*.h sl_*.c nta_compat.*
ALIASES +=
......@@ -91,7 +91,7 @@ static char const __func__[] = "nta";
/* Internal tags */
/** Delay sending of request */
/* Delay sending of request */
#define NTATAG_DELAY_SENDING(x) ntatag_delay_sending, tag_bool_v((x))
#define NTATAG_DELAY_SENDING_REF(x) \
ntatag_delay_sending_ref, tag_bool_vr(&(x))
......@@ -99,7 +99,7 @@ ntatag_delay_sending_ref, tag_bool_vr(&(x))
extern tag_typedef_t ntatag_delay_sending;
extern tag_typedef_t ntatag_delay_sending_ref;
/** Allow sending incomplete responses */
/* Allow sending incomplete responses */
#define NTATAG_INCOMPLETE(x) ntatag_incomplete, tag_bool_v((x))
#define NTATAG_INCOMPLETE_REF(x) \
ntatag_incomplete_ref, tag_bool_vr(&(x))
......@@ -698,6 +698,7 @@ su_duration_t set_timeout(nta_agent_t const *agent, su_duration_t offset)
/** Return current timeval. */
static
su_time_t agent_now(nta_agent_t const *agent)
{
return agent->sa_millisec ? agent->sa_now : su_now();
......@@ -1314,13 +1315,13 @@ static tport_stack_class_t nta_agent_class[1] =
* scheme or be a wildcard uri ("*"). The @a uri syntax allowed is as
* follows:
*
* <code> url <scheme>:<host>[:<port>]<url-params> </endcode>
* @code url <scheme>:<host>[:<port>]<url-params> @endcode
* where <url-params> may be
* <code>
* @code
* ;transport=<xxx>
* ;maddr=<actual addr>
* ;comp=sigcomp
* </endcode>
* @endcode
*
* The scheme part determines which transports are used. "sip" implies UDP
* and TCP, "sips" TLS over TCP. In the future, more transports can be
......@@ -1341,22 +1342,25 @@ static tport_stack_class_t nta_agent_class[1] =
* sips). An "*" in "port" part means any port, i.e., the stack binds to an
* ephemeral port.
*
* The "transport" parameter determines the transport protocol that is used.
* If no protocol is specified, both UDP and TCP are used for SIP URL and TLS
* for SIPS URL.
* The "transport" parameter determines the transport protocol that is used
* and how they are preferred. If no protocol is specified, both UDP and TCP
* are used for SIP URL and TLS for SIPS URL. The preference can be
* indicated with a comma-separated list of transports, for instance,
* parameter @code transport=tcp,udp @endocde indicates that TCP is
* preferred to UDP.
*
* The "maddr" parameter determines to which address the stack binds in
* order to listen for incoming requests. An "*" in "maddr" parameter is
* shorthand for any local IP address. 0.0.0.0 means that only IPv4
* sockets are created. [::] means that only IPv6 sockets are created.
* shorthand for any local IP address. 0.0.0.0 means that only IPv4 sockets
* are created. [::] means that only IPv6 sockets are created.
*
* The "comp" parameter determines the supported compression protocol.
* Currently only sigcomp is supported (with suitable library.
*
* @par Examples:
* <code>sip:172.21.40.24;maddr=*</endcode> \n
* <code>sip:172.21.40.24:50600;transport=UDP;comp=sigcomp</endcode> \n
* <code>sips:172.21.40.24</endcode>
* @code sip:172.21.40.24;maddr=* @endcode \n
* @code sip:172.21.40.24:50600;transport=TCP,UDP;comp=sigcomp @endcode \n
* @code sips:* @endcode
*
* @return
* On success, zero is returned. On error, -1 is returned, and @a errno is
......@@ -2954,7 +2958,7 @@ int nta_msg_request_complete(msg_t *msg,
* @param status status code (in range 100 - 699)
* @param phrase status phrase (may be NULL)
*
* Generate status structure based on @a status and @phrase.
* Generate status structure based on @a status and @a phrase.
* Add essential headers to the response message:
* @b From, @b To, @b Call-ID, @b CSeq, @b Via, and optionally
* @b Record-Route.
......@@ -3622,7 +3626,7 @@ int addr_cmp(url_t const *a, url_t const *b)
* The function nta_leg_by_dialog() searches for a dialog leg from agent's
* hash table. The matching rules based on parameters are as follows:
*
* @param agennt pointer to agent object
* @param agent pointer to agent object
* @param request_uri if non-NULL, and there is destination URI
* associated with the dialog, these URIs must match
* @param call_id if non-NULL, must match with Call-ID header contents
......@@ -5723,6 +5727,7 @@ nta_outgoing_t *nta_outgoing_tcreate(nta_leg_t *leg,
* @param magic application context pointer
* @param route_url optional URL used to route transaction requests
* @param msg request message
* @param tag, value, ... tagged parameter list
*
* @return
* The function nta_outgoing_mcreate() returns a pointer to newly created
......@@ -8667,9 +8672,9 @@ int reliable_check(nta_incoming_t *irq)
* @param irq
* @param callback
* @param rmagic
* @param status
* @param phrase
* @param tag
* @param value
* @param tag, value, ..
*/
nta_reliable_t *nta_reliable_treply(nta_incoming_t *irq,
nta_prack_f *callback,
......
......@@ -387,7 +387,8 @@ void nua_handle_bind(nua_handle_t *nh, nua_hmagic_t *hmagic)
/** Check if operation handle is used for INVITE
*
* Check if operation handle has been used with either outgoing or incoming INVITE request.
* Check if operation handle has been used with either outgoing or incoming
* INVITE request.
*
* @param nh Pointer to operation handle
*
......@@ -602,8 +603,7 @@ sip_to_t const *nua_handle_local(nua_handle_t const *nh)
* #NUTAG_URL \n
* #NUTAG_USER_AGENT \n
* #NUTAG_UPDATE_REFRESH \n
* #NUTAG_SIP_PARSER \n
* #NUTAG_CERTIFICATE_DIR \n
* #NUTAG_SUBSTATE \n
* #NUTAG_SMIME_ENABLE \n
* #NUTAG_SMIME_OPT \n
* #NUTAG_SMIME_PROTECTION_MODE \n
......@@ -624,8 +624,7 @@ sip_to_t const *nua_handle_local(nua_handle_t const *nh)
* #NTATAG_DEBUG_DROP_PROB \n
* #NTATAG_SIPFLAGS
*
* nua_set_params() also accepts any soa tags from <soa_tag.h> (or
* <mss_soa.h>).
* nua_set_params() also accepts any soa tags, defined in <soa_tag.h>.
*
* @par Events:
* none
......@@ -708,8 +707,6 @@ void nua_get_params(nua_t *nua, tag_type_t tag, tag_value_t value, ...)
* #NUTAG_SESSION_TIMER \n
* #NUTAG_USER_AGENT \n
* #NUTAG_UPDATE_REFRESH \n
* #NUTAG_SIP_PARSER (XXX) \n
* #NUTAG_CERTIFICATE_DIR (XXX) \n
* #NUTAG_SMIME_ENABLE \n
* #NUTAG_SMIME_OPT \n
* #NUTAG_SMIME_PROTECTION_MODE \n
......@@ -826,10 +823,11 @@ void nua_unregister(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
*
* By default creates a media session, includes its description as
* SDP and send the request to the recipient. Upon receiving the
* response it will active the media session and establish the call. \n
* \n
* Incomple call can be hung-up with nua_cancel() \n
* \n
* response it will active the media session and establish the call.
*
* Incomplete call can be hung-up with nua_cancel(). Completed call can be
* hung-up with nua_bye().
*
* Optionally
* - uses early media if #NUTAG_EARLY_MEDIA tag is used with non zero value
* - media parameters can be set by NUTAG_MEDIA_* tags
......@@ -848,22 +846,25 @@ void nua_unregister(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
* nothing
*
* @par Related Tags:
* #NUTAG_AF \n
* #NUTAG_HOLD \n
* #NUTAG_INVITE_TIMER \n
* #NUTAG_MEDIA_ADDRESS \n
* #NUTAG_MEDIA_ENABLE \n
* #NUTAG_MEDIA_FEATURES \n
* #NUTAG_REFER_PAUSE \n
* #NUTAG_URL \n
* NUTAG_URL() \n
* NUTAG_HOLD() \n
* NUTAG_NOTIFY_REFER() \n
* NUTAG_REFER_PAUSE() \n
* NUTAG_INVITE_TIMER() \n
* NUTAG_MEDIA_FEATURES() \n
* NUTAG_MEDIA_ENABLE() \n
* SOATAG_HOLD() \n
* SOATAG_AF() \n
* SOATAG_ADDRESS() \n
* SOATAG_USER_SDP() or SOATAG_USER_SDP_STR() \n
* tags in <sip_tag.h>
*
* @par Events:
* #nua_r_invite \n
* #nua_i_state \n
* #nua_i_active \n
* #nua_i_media_error \n
* #nua_i_fork \n
* #nua_i_active \n
* #nua_i_media_update
*
* \sa nua_handle_has_active_call() \n
* nua_handle_has_call_on_hold()\n
......@@ -1104,10 +1105,10 @@ void nua_notify(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
*
* @par Related Tags:
* #NUTAG_URL \n
* #SIPTAG_EVENT \n
* #SIPTAG_CONTENT_TYPE \n
* #SIPTAG_PAYLOAD \n
* #SIPTAG_ACCEPT
* #SIPTAG_EVENT or #SIPTAG_EVENT_STR \n
* #SIPTAG_CONTENT_TYPE or SIPTAG_CONTENT_TYPE_STR \n
* #SIPTAG_PAYLOAD or #SIPTAG_PAYLOAD_STR \n
* #SIPTAG_ACCEPT or #SIPTAG_ACCEPT_STR \n
*
* @par Events:
* #nua_r_notify
......@@ -1119,9 +1120,8 @@ void nua_notifier(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
/** Terminate an event server.
*
* Terminate an event server with matching event and content type.
* The event server was created earlier with nua_notifier()
* function containing the same content and event type tags.
* Terminate an event server with matching event and content type. The event
* server was created earlier with nua_notifier() function.
*
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
......@@ -1132,6 +1132,7 @@ void nua_notifier(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
* @par Related Tags:
* #SIPTAG_EVENT \n
* #SIPTAG_CONTENT_TYPE \n
* #SIPTAG_PAYLOAD \n
* #NEATAG_REASON
*
* @par Events:
......@@ -1346,11 +1347,9 @@ void nua_redirect(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
* nothing
*
* @par Related Tags:
* #NUTAG_MEDIA_ADDRESS \n
* #NUTAG_AF \n
* #NUTAG_HOLD \n
* #NUTAG_VIDEO_LOCAL \n
* #NUTAG_VIDEO_REMOTE \n
* #SOATAG_ADDRESS \n
* #SOATAG_AF \n
* #SOATAG_HOLD \n
* Tags in <sip_tag.h>.
*
* @par Events:
......
This diff is collapsed.
......@@ -111,10 +111,11 @@ typedef unsigned longlong ull;
#define SET_STATUS(_status, _phrase) status = _status, phrase = _phrase
/* This is interesting macro:
* x expands to "num, str", num is assigned to status, str to phrase.
* Macro expands to two comma-separated expressions
* usable as function arguments
/* This is an "interesting" macro:
* x is a define expanding to <i>num, str</i>.
* @a num is assigned to variable status, @a str to variable phrase.
* Macro SET_STATUS1 expands to two comma-separated expressions that are
* also usable as function arguments.
*/
#define SET_STATUS1(x) ((status = x), status), (phrase = ((void)x))
......
......@@ -575,6 +575,4 @@ int sip_X_e(char buf[], int bsiz, sip_header_t const *h, int flags);
* and @b User-Agent headers along with message payload to the SIP message.
* The @b Content-Type header is made with value "text/plain".
*
* @}
*/
......@@ -710,7 +710,7 @@ int sip_mime_version_e(char b[], int bsiz, sip_header_t const *h, int f)
/**@SIP_HEADER sip_warning Warning Header
*
* The Warning response-header field is used to carry additional information
* about the status of a response. Its syntax is defined in [S10.47] as
* about the status of a response. Its syntax is defined in [S20.43] as
* follows:
*
* @code
......
......@@ -42,12 +42,13 @@
* Media states
*/
enum {
SOA_ACTIVE_DISABLED = -4, /**< Media not negotiated */
SOA_ACTIVE_REJECTED = -8, /**< Media rejected in negotiation */
SOA_ACTIVE_INACTIVE = 0, /**< SDP O-A state for media */
SOA_ACTIVE_SENDONLY = 1, /**< SDP O-A state for media */
SOA_ACTIVE_RECVONLY = 2, /**< SDP O-A state for media */
SOA_ACTIVE_DISABLED = -4, /**< Media not negotiated */
SOA_ACTIVE_INACTIVE = 0, /**< Media is inactive: no RTP */
SOA_ACTIVE_SENDONLY = 1, /**< Media is sent only */
SOA_ACTIVE_RECVONLY = 2, /**< Media is received only */
SOA_ACTIVE_SENDRECV = SOA_ACTIVE_SENDONLY | SOA_ACTIVE_RECVONLY
/**< Media is bidirectional */
};
#define SOA_ACTIVE_DISABLED SOA_ACTIVE_DISABLED
......
......@@ -326,8 +326,7 @@ struct tport_master {
tp_stack_t *mr_stack; /**< Transport consumer */
tp_stack_class_t
const *mr_tpac; /**< Methods provided by stack */
int mr_log; /**< Log message contents? */
#define mr_msg_flags mr_log /**< Flags used by msg_t creation */
int mr_log; /**< Do logging of parsed messages */
su_root_t *mr_root; /**< SU root pointer */
/**< Timer reclaiming unused connections and compartment */
......@@ -2751,8 +2750,8 @@ msg_t *tport_msg_alloc(tport_t const *self, unsigned size)
{
if (self) {
tport_master_t *mr = self->tp_master;
msg_t *msg = mr->mr_tpac->tpac_alloc(mr->mr_stack, mr->mr_msg_flags,
NULL, size, self, NULL);
msg_t *msg = mr->mr_tpac->tpac_alloc(mr->mr_stack, mr->mr_log,
NULL, size, self, NULL);
if (msg) {
msg_addrinfo(msg)->ai_family = self->tp_pri->pri_family;
msg_addrinfo(msg)->ai_protocol = self->tp_pri->pri_protocol;
......
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