📄 nua_tag.h
字号:
*/#define NUTAG_SUPPORTED(x) nutag_supported, tag_str_v(x)SOFIAPUBVAR tag_typedef_t nutag_supported;#define NUTAG_SUPPORTED_REF(x) nutag_supported_ref, tag_str_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_supported_ref;/** Allow an event or events. * * This tag is used to add a new event to the already existing set of * allowed events. If you want to ignore the existing set of allowed events, * set the allowed event set with SIPTAG_ALLOW_EVENTS_STR() or * SIPTAG_ALLOW_EVENTS(). * * The set of allowed methods is added to the @AllowEvents header in the * response to the SUBSCRIBE or PUBLISH requests. For incoming SUBSCRIBE or * PUBLISH request, an error response <i>489 Bad Event</i> is automatically * returned if the incoming method is not included in the set. * * @par Used with * nua_set_params() \n * nua_set_hparams() \n * any handle-specific nua call * * @par Parameter type * char const * * * @par Values * Valid event name, or comma-separated list of them. * * @sa @AllowEvents, @RFC3265, @RFC3903, #nua_i_subscribe, #nua_i_publish, * nua_subscribe(), nua_publish(), SIPTAG_ALLOW_EVENTS(), * SIPTAG_ALLOW_EVENTS_STR() * * @NEW_1_12_4. * * Corresponding tag taking reference parameter is NUTAG_ALLOW_EVENTS_REF() */#define NUTAG_ALLOW_EVENTS(x) nutag_allow_events, tag_str_v(x)SOFIAPUBVAR tag_typedef_t nutag_allow_events;#define NUTAG_ALLOW_EVENTS_REF(x) nutag_allow_events_ref, tag_str_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_allow_events_ref;/** Call state * * @par Used with * #nua_i_state * * @par Parameter type * int * * @par Values * - #nua_callstate_init - Initial state * - #nua_callstate_authenticating - 401/407 received * - #nua_callstate_calling - INVITE sent * - #nua_callstate_proceeding - 18X received * - #nua_callstate_completing - 2XX received * - #nua_callstate_received - INVITE received (and 100 Trying sent) * - #nua_callstate_early - 18X sent * - #nua_callstate_completed - 2XX sent * - #nua_callstate_ready - 2XX and ACK received/sent * - #nua_callstate_terminating - BYE sent * - #nua_callstate_terminated - BYE complete * * Corresponding tag taking reference parameter is NUTAG_CALLSTATE_REF() */#define NUTAG_CALLSTATE(x) nutag_callstate, tag_int_v(x)SOFIAPUBVAR tag_typedef_t nutag_callstate;#define NUTAG_CALLSTATE_REF(x) nutag_callstate_ref, tag_int_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_callstate_ref;enum nua_callstate { nua_callstate_init, /**< Initial state */ nua_callstate_authenticating, /**< 401/407 received */ nua_callstate_calling, /**< INVITE sent */ nua_callstate_proceeding, /**< 18X received */ nua_callstate_completing, /**< 2XX received */ nua_callstate_received, /**< INVITE received */ nua_callstate_early, /**< 18X sent (w/SDP) */ nua_callstate_completed, /**< 2XX sent */ nua_callstate_ready, /**< 2XX received, ACK sent, or vice versa */ nua_callstate_terminating, /**< BYE sent */ nua_callstate_terminated /**< BYE complete */};/** Get name for NUA call state */SOFIAPUBFUN char const *nua_callstate_name(enum nua_callstate state);/** Subscription state * * @par Used with * #nua_r_subscribe \n * #nua_i_notify * * @par Parameter type * int * * @par Values * @c nua_substate_embryonic (0) \n * @c nua_substate_pending (1) \n * @c nua_substate_active (2) \n * @c nua_substate_terminated (3) \n * * see * <a href="http://www.ietf.org/rfc/rfc3265.txt">RFC 3265</a> * * Corresponding tag taking reference parameter is NUTAG_SUBSTATE_REF()*/#define NUTAG_SUBSTATE(x) nutag_substate, tag_int_v(x)SOFIAPUBVAR tag_typedef_t nutag_substate;#define NUTAG_SUBSTATE_REF(x) nutag_substate_ref, tag_int_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_substate_ref;/** Parameter type of NUTAG_SUBSTATE() */enum nua_substate { /** Extended state, considered as active. */ nua_substate_extended = nea_extended, /** Embryonic subscription: SUBSCRIBE sent */ nua_substate_embryonic = nea_embryonic, nua_substate_pending = nea_pending, /**< Pending subscription */ nua_substate_active = nea_active, /**< Active subscription */ nua_substate_terminated = nea_terminated /**< Terminated subscription */};/**Default lifetime for implicit subscriptions created by REFER. * * Default expiration time in seconds for implicit subscriptions created by * REFER. * * @par Used with * nua_set_params() \n * nua_get_params() \n * nua_set_hparams() \n * nua_get_hparams() \n * * @par Parameter type * unsigned int * * @par Values * @c 0 disable \n * @c >0 interval in seconds * * Corresponding tag taking reference parameter is NUTAG_REFER_EXPIRES() */#define NUTAG_REFER_EXPIRES(x) nutag_refer_expires, tag_uint_v((x))SOFIAPUBVAR tag_typedef_t nutag_refer_expires;#define NUTAG_REFER_EXPIRES_REF(x) nutag_refer_expires_ref, tag_uint_vr((&(x)))SOFIAPUBVAR tag_typedef_t nutag_refer_expires_ref;/**Always use id parameter with refer event. * * When an incoming REFER creates an implicit subscription, the event header * in the NOTIFY request may have an id parameter. The id parameter can be * either always included (default behavior), or the parameter can be used * only for the second and subsequent REFER requests received in a given * dialog. * * Note that once the subscription is created, the event header should not * be modified. Therefore this tag has no effect on already established * subscriptions, and its use makes sense largely on nua_set_params() only. * * @par Used with * nua_set_params() (nua_set_hparams(), nua_invite(), nua_respond(), * nua_update()). * * @par Parameter type * int (boolean) * * @par Values * 0 (false, do not use id with subscription created with first REFER request) \n * 1 (true, use id with all subscriptions created with REFER request) \n * * Corresponding tag taking reference parameter is NUTAG_REFER_WITH_ID_REF(). * * @since New in @VERSION_1_12_2. */#define NUTAG_REFER_WITH_ID(x) nutag_refer_with_id, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_refer_with_id;#define NUTAG_REFER_WITH_ID_REF(x) nutag_refer_with_id_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_refer_with_id_ref;/**Add media tags from our offer to Accept-Contact headers. * * Automatically generate @AcceptContact headers for caller * preference processing according to our the media capabilities in @a soa. * * @par Used with * nua_invite() \n * nua_update() \n * nua_set_params() \n * nua_get_params() * * @par Parameter type * int * * @par Values * @c 0 Do not add media tags \n * @c !=0 Add media tags * * Corresponding tag taking reference parameter is NUTAG_MEDIA_FEATURES_REF() * * @sa nua_invite(), SOATAG_USER_SDP(), SIPTAG_ACCEPT_CONTACT(), * NUTAG_CALLEE_CAPS() */#define NUTAG_MEDIA_FEATURES(x) nutag_media_features, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_media_features;#define NUTAG_MEDIA_FEATURES_REF(x) \ nutag_media_features_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_media_features_ref;/** Add methods and media tags to Contact headers. */#define NUTAG_CALLEE_CAPS(x) nutag_callee_caps, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_callee_caps;#define NUTAG_CALLEE_CAPS_REF(x) \ nutag_callee_caps_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_callee_caps_ref;/** If true, add "path" to Supported in REGISTER. * * @sa <a href="http://www.ietf.org/rfc/rfc3327.txt">RFC 3327</a>, * <i>"SIP Extension Header Field for Registering Non-Adjacent Contacts"</i>, * D. Willis, B. Hoeneisen, * December 2002. */#define NUTAG_PATH_ENABLE(x) nutag_path_enable, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_path_enable;#define NUTAG_PATH_ENABLE_REF(x) nutag_path_enable_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_path_enable_ref;/** Use route from Service-Route header in response to REGISTER. * * @sa <a href="http://www.ietf.org/rfc/rfc3327.txt">RFC 3327</a>, * <i>"SIP Extension Header Field for Registering Non-Adjacent Contacts"</i>, * D. Willis, B. Hoeneisen, * December 2002. */#define NUTAG_SERVICE_ROUTE_ENABLE(x) nutag_service_route_enable, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_service_route_enable;#define NUTAG_SERVICE_ROUTE_ENABLE_REF(x) \ nutag_service_route_enable_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_service_route_enable_ref;/** Enable built-in media session handling * * The built-in media session object @soa takes care of most details * of offer-answer negotiation. * * @par Used with * nua_create() * * @par Parameter type * int * * @par Values * @c 0 False \n * @c !=0 True * * Corresponding tag taking reference parameter is NUTAG_MEDIA_ENABLE_REF()*/#define NUTAG_MEDIA_ENABLE(x) nutag_media_enable, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_media_enable;#define NUTAG_MEDIA_ENABLE_REF(x) \ nutag_media_enable_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_media_enable_ref;/** Indicate that SDP offer has been received. * * @par Used with * #nua_i_state * * @par Parameter type * boolean * * Corresponding tag taking reference parameter is NUTAG_OFFER_RECV_REF() */#define NUTAG_OFFER_RECV(x) nutag_offer_recv, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_offer_recv;#define NUTAG_OFFER_RECV_REF(x) nutag_offer_recv_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_offer_recv_ref;/** Indicate that SDP answer has been received. * * @par Used with * #nua_i_state * * @par Parameter type * boolean * * Corresponding tag taking reference parameter is NUTAG_ANSWER_RECV_REF() */#define NUTAG_ANSWER_RECV(x) nutag_answer_recv, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_answer_recv;#define NUTAG_ANSWER_RECV_REF(x) nutag_answer_recv_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_answer_recv_ref;/** Indicate that SDP offer has been sent. * * @par Used with * #nua_i_state * * @par Parameter type * boolean * * Corresponding tag taking reference parameter is NUTAG_OFFER_SENT_REF() */#define NUTAG_OFFER_SENT(x) nutag_offer_sent, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_offer_sent;#define NUTAG_OFFER_SENT_REF(x) nutag_offer_sent_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_offer_sent_ref;/** Indicate that SDP answer has been sent. * * @par Used with * #nua_i_state * * @par Parameter type * int (boolean: nonzero is true, zero is false) * * Corresponding tag taking reference parameter is NUTAG_ANSWER_SENT_REF() */#define NUTAG_ANSWER_SENT(x) nutag_answer_sent, tag_bool_v(x)SOFIAPUBVAR tag_typedef_t nutag_answer_sent;#define NUTAG_ANSWER_SENT_REF(x) nutag_answer_sent_ref, tag_bool_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_answer_sent_ref;/**Enable detection of local IP address updates. * * @par Used with * nua_create() \n * nua_set_params() \n * nua_get_params() * * @par Parameter type * int (enum nua_nw_detector_e aka #nua_nw_detector_t) * * @sa #nua_i_network_changed, #nua_nw_detector_t * * Corresponding tag taking reference parameter is * NUTAG_DETECT_NETWORK_UPDATES_REF(). * * @since New in @VERSION_1_12_2. */#define NUTAG_DETECT_NETWORK_UPDATES(x) \ nutag_detect_network_updates, tag_int_v(x)SOFIAPUBVAR tag_typedef_t nutag_detect_network_updates;#define NUTAG_DETECT_NETWORK_UPDATES_REF(x) \ nutag_detect_network_updates_ref, tag_int_vr(&(x))SOFIAPUBVAR tag_typedef_t nutag_detect_network_updates_ref;/* Pass nua handle as tagged argument */#if SU_HAVE_INLINEsu_inline tag_value_t nutag_handle_v(nua_handle_t *v) { return (tag_value_t)v; }su_inline tag_value_t nutag_handle_vr(nua_handle_t **vp) {return(tag_value_t)vp;}#else#define nutag_handle_v(v) (tag_value_t)(v)#define nutag_handle_vr(v) (tag_value_t)(v)#endif/* Tags for compatibility */#define NUTAG_USE_LEG(x) NUTAG_USE_DIALOG(x)#define NUTAG_USE_LEG_REF(x) NUTAG_USE_DIALOG_REF(x)#define NUTAG_AF(x) SOATAG_AF((x))#define NUTAG_AF_REF(x) SOATAG_AF_REF((x))enum nua_af { nutag_af_any = SOA_AF_ANY, nutag_af_ip4_only = SOA_AF_IP4_ONLY, nutag_af_ip6_only = SOA_AF_IP6_ONLY, nutag_af_ip4_ip6 = SOA_AF_IP4_IP6, nutag_af_ip6_ip4 = SOA_AF_IP6_IP4};#define NUTAG_AF_ANY nutag_af_any#define NUTAG_AF_IP4_ONLY nutag_af_ip4_only#define NUTAG_AF_IP6_ONLY nutag_af_ip6_only#define NUTAG_AF_IP4_IP6 nutag_af_ip4_ip6#define NUTAG_AF_IP6_IP4 nutag_af_ip6_ip4#define NUTAG_MEDIA_ADDRESS(x) SOATAG_ADDRESS((x))#define NUTAG_MEDIA_ADDRESS_REF(x) SOATAG_ADDRESS_REF((x))#define NUTAG_HOLD(x) SOATAG_HOLD((x) ? "*" : NULL)#define NUTAG_ACTIVE_AUDIO(x) SOATAG_ACTIVE_AUDIO((x))#define NUTAG_ACTIVE_AUDIO_REF(x) SOATAG_ACTIVE_AUDIO_REF((x))#define NUTAG_ACTIVE_VIDEO(x) SOATAG_ACTIVE_VIDEO((x))#define NUTAG_ACTIVE_VIDEO_REF(x) SOATAG_ACTIVE_VIDEO_REF((x))#define NUTAG_ACTIVE_IMAGE(x) SOATAG_ACTIVE_IMAGE((x))#define NUTAG_ACTIVE_IMAGE_REF(x) SOATAG_ACTIVE_IMAGE_REF((x))#define NUTAG_ACTIVE_CHAT(x) SOATAG_ACTIVE_CHAT((x))#define NUTAG_ACTIVE_CHAT_REF(x) SOATAG_ACTIVE_CHAT_REF((x))enum { nua_active_rejected = SOA_ACTIVE_REJECTED, nua_active_disabled = SOA_ACTIVE_DISABLED, nua_active_inactive = SOA_ACTIVE_INACTIVE, nua_active_sendonly = SOA_ACTIVE_SENDONLY, nua_active_recvonly = SOA_ACTIVE_RECVONLY, nua_active_sendrecv = SOA_ACTIVE_SENDRECV};#define NUTAG_SRTP_ENABLE(x) SOATAG_SRTP_ENABLE((x))#define NUTAG_SRTP_ENABLE_REF(x) SOATAG_SRTP_ENABLE_REF((x))#define NUTAG_SRTP_CONFIDENTIALITY(x) SOATAG_SRTP_CONFIDENTIALITY((x))#define NUTAG_SRTP_CONFIDENTIALITY_REF(x) SOATAG_SRTP_CONFIDENTIALITY_REF((x))#define NUTAG_SRTP_INTEGRITY_PROTECTION(x) SOATAG_SRTP_INTEGRITY((x))#define NUTAG_SRTP_INTEGRITY_PROTECTION_REF(x) SOATAG_SRTP_INTEGRITY_REF((x))SOFIA_END_DECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -