📄 nua_tag.h
字号:
/* * This file is part of the Sofia-SIP package * * Copyright (C) 2005 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 <nua_tag.h> has been included. */#define NUA_TAG_H/**@file nua_tag.h * @brief Tags for Nokia User Agent Library * * @author Pekka Pessi <Pekka.Pessi@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. */extern tag_type_t nua_tag_list[];/** Filter tag matching any nua tag. */#define NUTAG_ANY() nutag_any, ((tag_value_t)0)extern tag_typedef_t nutag_any;/** URL address from application to NUA * * @par Used with * nua_create() \n * nua_set_params() \n * nua_get_params() \n * other calls that create SIP request * * @par Parameter type * char const * * * @par Values * NULL terminated character string \n * Own address for nua_create(), nua_set_params() and nua_get_params(). \n * Target address for other calls. * * Corresponding tag taking reference parameter is NUTAG_URL_REF */#define NUTAG_URL(x) nutag_url, urltag_url_v(x)extern tag_typedef_t nutag_url;#define NUTAG_URL_REF(x) nutag_url_ref, urltag_url_vr(&(x))extern tag_typedef_t nutag_url_ref;/** Address as a string * * @par Used with * * @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)extern tag_typedef_t nutag_address;#define NUTAG_ADDRESS_REF(x) nutag_address_ref, tag_str_vr(&(x))extern tag_typedef_t nutag_address_ref;/**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() \n * nua_get_params() * * @par Parameter type * unsigned * * @par Values * @c 0 Never retry automatically \n * * Corresponding tag taking reference parameter is NUTAG_RETRY_COUNT_REF() */#define NUTAG_RETRY_COUNT(x) nutag_retry_count, tag_uint_v(x)extern tag_typedef_t nutag_retry_count;#define NUTAG_RETRY_COUNT_REF(x) nutag_retry_count_ref, tag_uint_vr(&(x))extern tag_typedef_t nutag_retry_count_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 * * Corresponding tag taking reference parameter is NUTAG_MAX_SUBSCRIPTIONS_REF() */#define NUTAG_MAX_SUBSCRIPTIONS(x) nutag_max_subscriptions, tag_uint_v(x)extern tag_typedef_t nutag_max_subscriptions;#define NUTAG_MAX_SUBSCRIPTIONS_REF(x) \nutag_max_subscriptions_ref, tag_uint_vr(&(x))extern tag_typedef_t nutag_max_subscriptions_ref;/** Intentionally undocumented. */#define NUTAG_UICC(x) nutag_uicc, tag_str_v(x)extern tag_typedef_t nutag_uicc;#define NUTAG_UICC_REF(x) nutag_uicc_ref, tag_str_vr(&(x))extern 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)extern tag_typedef_t nutag_use_dialog;#define NUTAG_USE_DIALOG_REF(x) nutag_use_dialog_ref, tag_bool_vr(&(x))extern 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)extern tag_typedef_t nutag_soa_session;#define NUTAG_SOA_SESSION_REF(x) \ nutag_soa_session_ref, tag_ptr_vr(&(x),(x))extern 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)extern tag_typedef_t nutag_soa_name;#define NUTAG_SOA_NAME_REF(x) \ nutag_soa_name_ref, tag_str_vr(&(x))extern tag_typedef_t nutag_soa_name_ref;/** Establish early media session using 183 responses and PRACK requests. * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * int * * @par Values * @c 0 False \n * @c !=0 True * * Corresponding tag taking reference parameter is NUTAG_EARLY_MEDIA_REF()*/#define NUTAG_EARLY_MEDIA(x) nutag_early_media, tag_bool_v(x)extern tag_typedef_t nutag_early_media;#define NUTAG_EARLY_MEDIA_REF(x) nutag_early_media_ref, tag_bool_vr(&(x))extern tag_typedef_t nutag_early_media_ref;/** Timer for outstanding INVITE in seconds. * * INVITE will be canceled if no answer is received before timer expires. * * @par Used with * nua_invite() \n * nua_set_params() \n * nua_get_params() * * @par Parameter type * int (enum nua_af) * * @par Values * @c 0 no timer \n * @c >0 timer in seconds * * Corresponding tag taking reference parameter is NUTAG_INVITE_TIMER_REF() */#define NUTAG_INVITE_TIMER(x) nutag_invite_timer, tag_uint_v((x))extern tag_typedef_t nutag_invite_timer;#define NUTAG_INVITE_TIMER_REF(x) nutag_invite_timer_ref, tag_uint_vr(&(x))extern tag_typedef_t nutag_invite_timer_ref;/**Default session timer in seconds. * * Set default session timer in seconds when using session timer extension. * Re-INVITE will be sent in given intervals. * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * unsigned int * * @par Values * @c 0 disable \n * @c >0 interval in seconds * * Corresponding tag taking reference parameter is NUTAG_SESSION_TIMER_REF() */#define NUTAG_SESSION_TIMER(x) nutag_session_timer, tag_uint_v((x))extern tag_typedef_t nutag_session_timer;#define NUTAG_SESSION_TIMER_REF(x) nutag_session_timer_ref, tag_uint_vr((&(x)))extern tag_typedef_t nutag_session_timer_ref;/** Minimum acceptable refresh interval for session. * * Specifies the value of Min-SE header in seconds. * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * unsigned int * * @par Values * interval in seconds. * * Corresponding tag taking reference parameter is NUTAG_MIN_SE_REF()*/#define NUTAG_MIN_SE(x) nutag_min_se, tag_uint_v((x))extern tag_typedef_t nutag_min_se;#define NUTAG_MIN_SE_REF(x) nutag_min_se_ref, tag_uint_vr((&(x)))extern tag_typedef_t nutag_min_se_ref;enum nua_session_refresher { nua_no_refresher, nua_local_refresher, nua_remote_refresher, nua_any_refresher};/** Specify preferred refresher. * * Specify for session timer extension which party is the preferred refresher. * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * enum { #nua_no_refresher, #nua_local_refresher, #nua_remote_refresher, * #nua_any_refresher } * * @par Values * @c nua_no_refresher (session timers are disabled) \n * @c nua_local_refresher \n * @c nua_remote_refresher \n * @c nua_any_refresher (default) \n * * Corresponding tag taking reference parameter is NUTAG_SESSION_REFRESHER_REF() */#define NUTAG_SESSION_REFRESHER(x) nutag_session_refresher, tag_int_v((x))extern tag_typedef_t nutag_session_refresher;#define NUTAG_SESSION_REFRESHER_REF(x) nutag_session_refresher_ref, tag_int_vr((&(x)))extern tag_typedef_t nutag_session_refresher_ref;/** Use UPDATE as refresh method. * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * boolean * * @par Values * @c 1 Use UPDATE \n * @c 0 Use INVITE * * Corresponding tag taking reference parameter is NUTAG_UPDATE_REFRESH_REF() */#define NUTAG_UPDATE_REFRESH(x) nutag_update_refresh, tag_bool_v((x))extern tag_typedef_t nutag_update_refresh;#define NUTAG_UPDATE_REFRESH_REF(x) nutag_update_refresh_ref, tag_bool_vr((&(x)))extern tag_typedef_t nutag_update_refresh_ref;/** Send alerting (180 Ringing) automatically * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * int * * @par Values * @c 0 No automatic sending of "180 Ringing" \n * @c !=0 "180 Ringing" sent automatically * * Corresponding tag taking reference parameter is NUTAG_AUTOALERT_REF() */#define NUTAG_AUTOALERT(x) nutag_autoAlert, tag_bool_v(x)extern tag_typedef_t nutag_autoAlert;#define NUTAG_AUTOALERT_REF(x) nutag_autoAlert_ref, tag_bool_vr(&(x))extern tag_typedef_t nutag_autoAlert_ref;/** ACK automatically * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * int * * @par Values * @c 0 No automatic sending of ACK \n * @c !=0 ACK sent automatically * * Corresponding tag taking reference parameter is NUTAG_AUTOACK_REF() */#define NUTAG_AUTOACK(x) nutag_autoACK, tag_bool_v(x)extern tag_typedef_t nutag_autoACK;#define NUTAG_AUTOACK_REF(x) nutag_autoACK_ref, tag_bool_vr(&(x))extern tag_typedef_t nutag_autoACK_ref;/** Answer (200 Ok) automatically to incoming call * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * int * * @par Values * @c 0 No automatic sending of "200 Ok" \n * @c !=0 "200 Ok" sent automatically * * Corresponding tag taking reference parameter is NUTAG_AUTOANSWER_REF() */#define NUTAG_AUTOANSWER(x) nutag_autoAnswer, tag_bool_v(x)extern tag_typedef_t nutag_autoAnswer;#define NUTAG_AUTOANSWER_REF(x) nutag_autoAnswer_ref, tag_bool_vr(&(x))extern tag_typedef_t nutag_autoAnswer_ref;/** Enable incoming INVITE * * @par Used with * nua_set_params() \n * nua_get_params() * * @par Parameter type * int * * @par Values * @c 0 Incoming INVITE not enabled. NUA answers 403 Forbidden \n * @c !=0 Incoming INVITE enabled * * Corresponding tag taking reference parameter is NUTAG_ENABLEINVITE_REF() */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -