📄 nua_tag.h
字号:
/* * This file is part of the Sofia-SIP package * * Copyright (C) 2006 Nokia Corporation. * * Contact: Pekka Pessi <pekka.pessi@nokia.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA * */#ifndef NUA_TAG_H/** Defined when <sofia-sip/nua_tag.h> has been included. */#define NUA_TAG_H/**@file sofia-sip/nua_tag.h * @brief Tags for Sofia-SIP User Agent Library * * @author Pekka Pessi <Pekka.Pessi@nokia.com> * @author Martti Mela <Martti.Mela@nokia.com> * * @date Created: Mon Feb 19 18:54:26 EET 2001 ppessi */#ifndef SU_TAG_H#include <sofia-sip/su_tag.h>#endif#ifndef SDP_TAG_H#include <sofia-sip/sdp_tag.h>#endif#ifndef URL_TAG_H#include <sofia-sip/url_tag.h>#endif#ifndef SIP_TAG_H#include <sofia-sip/sip_tag.h>#endif#ifndef NTA_TAG_H#include <sofia-sip/nta_tag.h>#endif#ifndef NEA_TAG_H#include <sofia-sip/nea_tag.h>#endif#ifndef SOA_TAG_H#include <sofia-sip/soa_tag.h>#endifSOFIA_BEGIN_DECLS/** NUA agent. */typedef struct nua_s nua_t;/** NUA transaction handle. */typedef struct nua_handle_s nua_handle_t;/** List of all NUA tags. */SOFIAPUBVAR tag_type_t nua_tag_list[];/** Filter tag matching any nua tag. */#define NUTAG_ANY() nutag_any, ((tag_value_t)0)SOFIAPUBVAR tag_typedef_t nutag_any;/** URL address from application to NUA * * @par Used with * any function that create SIP request or nua_handle() \n * nua_create() \n * nua_set_params() \n * nua_get_params() \n * * @par Parameter type * char const * * * @par Values * #url_string_t, which is either a pointer to #url_t or NULL terminated * character string representing URL \n * * For normal nua calls, this tag is used as request target, which is usually * stored as request-URI. * * It is used to set stack's own address with nua_create(), nua_set_params() * and nua_get_params(). * * @sa SIPTAG_TO() * * Corresponding tag taking reference parameter is NUTAG_URL_REF() */#define NUTAG_URL(x) nutag_url, urltag_url_v(x)SOFIAPUBVAR tag_typedef_t nutag_url;#define NUTAG_URL_REF(x) nutag_url_ref, urltag_url_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_url_ref;/** Address as a string * * @deprecated Not used. * * @par Parameter type * char const * * * @par Values * String in form "name <url>" * * Corresponding tag taking reference parameter is * NUTAG_ADDRESS_REF() */#define NUTAG_ADDRESS(x) nutag_address, tag_str_v(x)SOFIAPUBVAR tag_typedef_t nutag_address;#define NUTAG_ADDRESS_REF(x) nutag_address_ref, tag_str_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_address_ref;/**Specify request to respond to. * * @par Used with * nua_respond() * * @par Parameter type * msg_t * * * @par Values * Pointer to a request message. * * @NEW_1_12_4. * * @sa NUTAG_WITH_THIS(), NUTAG_WITH_SAVED() */#define NUTAG_WITH(x) nutag_with, tag_ptr_v(x)SOFIAPUBVAR tag_typedef_t nutag_with;/**Specify request to respond to. * * @par Used with * nua_respond() * * @par Parameter type * nua_t * * * @par Values * Pointer to the nua agent instance object. * * @NEW_1_12_4. * * @sa nua_save_event(), NUTAG_WITH(), NUTAG_WITH_SAVED() */#define NUTAG_WITH_THIS(nua) nutag_with, tag_ptr_v(nua_current_request((nua)))/**Specify request to respond to. * * @par Used with * nua_respond() * * @par Parameter type * msg_t * * * @par Values * Pointer to a saved event. * * @NEW_1_12_4. * * @sa nua_save_event(), NUTAG_WITH(), NUTAG_WITH_THIS() */#define NUTAG_WITH_SAVED(e) nutag_with, tag_ptr_v(nua_saved_event_request((e)))/**Set request retry count. * * Retry count determines how many times stack will automatically retry * after an recoverable error response, like 302, 401 or 407. * * @par Used with * nua_set_params(), nua_set_hparams() \n * nua_get_params(), nua_get_hparams() \n * nua_invite(), nua_ack() * * @par Parameter type * unsigned * * @par Values * @c 0 Never retry automatically \n * * @NEW_1_12_4. * * Corresponding tag taking reference parameter is NUTAG_RETRY_COUNT_REF() */#define NUTAG_RETRY_COUNT(x) nutag_retry_count, tag_uint_v(x)SOFIAPUBVAR tag_typedef_t nutag_retry_count;#define NUTAG_RETRY_COUNT_REF(x) nutag_retry_count_ref, tag_uint_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_retry_count_ref;/** Extension method name. * * Specify extension method name with nua_method() function. * * @par Used with * nua_method() \n * * @par Parameter type * char const * * * @par Values * Extension method name (e.g., "SERVICE") * * Corresponding tag taking reference parameter is NUTAG_METHOD_REF() * * @sa nua_method(), SIP_METHOD_UNKNOWN() * * @since New in @VERSION_1_12_4. */#define NUTAG_METHOD(x) nutag_method, tag_str_v(x)SOFIAPUBVAR tag_typedef_t nutag_method;#define NUTAG_METHOD_REF(x) nutag_method_ref, tag_str_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_method_ref;/**Set maximum number of simultaneous subscribers per single event server. * * Determines how many subscribers can simultaneously subscribe to a single * event. * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * unsigned * * @par Values * @c 0 Do not allow any subscriptions \n * * @sa nua_notifier(), nua_authorize() * * Corresponding tag taking reference parameter is * NUTAG_MAX_SUBSCRIPTIONS_REF() */#define NUTAG_MAX_SUBSCRIPTIONS(x) nutag_max_subscriptions, tag_uint_v(x)SOFIAPUBVAR tag_typedef_t nutag_max_subscriptions;#define NUTAG_MAX_SUBSCRIPTIONS_REF(x) \nutag_max_subscriptions_ref, tag_uint_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_max_subscriptions_ref;/** Intentionally undocumented. */#define NUTAG_UICC(x) nutag_uicc, tag_str_v(x)SOFIAPUBVAR tag_typedef_t nutag_uicc;#define NUTAG_UICC_REF(x) nutag_uicc_ref, tag_str_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_uicc_ref;/** Ask NUA to create dialog for this handle * * @par Used with nua calls that send a SIP request * * @par Parameter type * int * * @par Values * @c False (zero) \n * @c True (nonzero) * * Corresponding tag taking reference parameter is NUTAG_USE_DIALOG_REF() */#define NUTAG_USE_DIALOG(x) nutag_use_dialog, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_use_dialog;#define NUTAG_USE_DIALOG_REF(x) nutag_use_dialog_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_use_dialog_ref;/* Protocol engine parameters, * set by nua_set_params(), get by nua_get_params() */#if 0/**Pointer to a SDP Offer-Answer session object. * * Pointer to the media session object. * * @par Used with nua_create(), nua_handle(). * * @par Parameter type * void * (actually soa_session_t *) * * @par Values * Pointer to MSS media session. * * Corresponding tag taking reference parameter is NUTAG_SOA_SESSION_REF. */#define NUTAG_SOA_SESSION(x) nutag_soa_session, tag_ptr_v(x)SOFIAPUBVAR tag_typedef_t nutag_soa_session;#define NUTAG_SOA_SESSION_REF(x) \ nutag_soa_session_ref, tag_ptr_vr(&(x),(x))SOFIAPUBVAR tag_typedef_t nutag_soa_session_ref;#endif/**Name for SDP Offer-Answer session object. * * SDP Offer-Answer session object name. * * @par Used with nua_create(), nua_handle(). * * @par Parameter type * void * (actually soa_session_t *) * * @par Values * Pointer to MSS media session. * * Corresponding tag taking reference parameter is NUTAG_SOA_SESSION_REF. */#define NUTAG_SOA_NAME(x) nutag_soa_name, tag_str_v(x)SOFIAPUBVAR tag_typedef_t nutag_soa_name;#define NUTAG_SOA_NAME_REF(x) \ nutag_soa_name_ref, tag_str_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_soa_name_ref;/**Establish early media session using 100rel, 183 responses and PRACK. * * @par Used with * nua_set_params() \n * nua_get_params() \n * nua_set_hparams() \n * nua_get_hparams() \n * nua_invite() \n * nua_respond() \n * * @par Parameter type * int (boolean) * * @par Values * @c 0 False \n * @c !=0 True * * @sa NUTAG_EARLY_ANWER() * * Corresponding tag taking reference parameter is NUTAG_EARLY_MEDIA_REF() */#define NUTAG_EARLY_MEDIA(x) nutag_early_media, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_early_media;#define NUTAG_EARLY_MEDIA_REF(x) nutag_early_media_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_early_media_ref;/**Respond only 183 with 100rel. * * If this parameter is set, stack uses 100rel only with 183: otherwise, all * 1XX responses (except <i>100 Trying</i>) uses 100rel. * * @par Used with * nua_set_params() \n * nua_get_params() \n * nua_set_hparams() \n * nua_get_hparams() \n * nua_invite() \n * nua_respond() * * @par Parameter type * int (boolean) * * @par Values * @c 0 False \n * @c !=0 True * * Corresponding tag taking reference parameter is NUTAG_ONLY183_100REL_REF()*/#define NUTAG_ONLY183_100REL(x) nutag_only183_100rel, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_only183_100rel;#define NUTAG_ONLY183_100REL_REF(x) nutag_only183_100rel_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_only183_100rel_ref;/**Establish early media session by including SDP answer in 1XX response. * * @par Used with * nua_respond(), nua_set_params(), nua_set_hparams() * * @par Parameter type * int (boolean) * * @par Values * @c 0 False \n * @c !=0 True * * Corresponding tag taking reference parameter is NUTAG_EARLY_ANSWER_REF(). * * @note Requires that @soa is enabled with NUTAG_MEDIA_ENABLE(1). * * @sa NUTAG_EARLY_MEDIA(), NUTAG_AUTOALERT(), NUTAG_MEDIA_ENABLE() * * @since New in @VERSION_1_12_2. */#define NUTAG_EARLY_ANSWER(x) nutag_early_answer, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_early_answer;#define NUTAG_EARLY_ANSWER_REF(x) nutag_early_answer_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_early_answer_ref;/**Include an extra copy of SDP answer in the response. * * When NUTAG_INCLUDE_EXTRA_SDP(1) is included in nua_respond() tags, stack * will include in the response a copy of the SDP offer/answer that was last * sent to the client. This tag should be used only when you know that the * remote end requires the extra SDP, for example, some versions of Cisco * SIPGateway need a copy of answer in 200 OK even when they indicate * support for 100rel. * * @par Used with * nua_respond() * * @par Parameter type * int (boolean) * * @par Values * @c 0 False \n * @c !=0 True
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -