1 /*
2 * This file is part of the Sofia-SIP package
3 *
4 * Copyright (C) 2006 Nokia Corporation.
5 *
6 * Contact: Pekka Pessi <pekka.pessi@nokia.com>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25 #ifndef NUA_TAG_H
26 /** Defined when <sofia-sip/nua_tag.h> has been included. */
27 #define NUA_TAG_H
28
29 /**@file sofia-sip/nua_tag.h
30 * @brief Tags for Sofia-SIP User Agent Library
31 *
32 * @author Pekka Pessi <Pekka.Pessi@nokia.com>
33 * @author Martti Mela <Martti.Mela@nokia.com>
34 *
35 * @date Created: Mon Feb 19 18:54:26 EET 2001 ppessi
36 */
37
38 #ifndef SU_TAG_H
39 #include <sofia-sip/su_tag.h>
40 #endif
41 #ifndef SDP_TAG_H
42 #include <sofia-sip/sdp_tag.h>
43 #endif
44 #ifndef URL_TAG_H
45 #include <sofia-sip/url_tag.h>
46 #endif
47 #ifndef SIP_TAG_H
48 #include <sofia-sip/sip_tag.h>
49 #endif
50 #ifndef NTA_TAG_H
51 #include <sofia-sip/nta_tag.h>
52 #endif
53 #ifndef NEA_TAG_H
54 #include <sofia-sip/nea_tag.h>
55 #endif
56 #ifndef SOA_TAG_H
57 #include <sofia-sip/soa_tag.h>
58 #endif
59
60 SOFIA_BEGIN_DECLS
61
62 /** NUA agent. */
63 typedef struct nua_s nua_t;
64
65 /** NUA transaction handle. */
66 typedef struct nua_handle_s nua_handle_t;
67
68 /** List of all NUA tags. */
69 SOFIAPUBVAR tag_type_t nua_tag_list[];
70
71 /** Filter tag matching any nua tag. */
72 #define NUTAG_ANY() nutag_any, ((tag_value_t)0)
73 SOFIAPUBVAR tag_typedef_t nutag_any;
74
75 #define NUTAG_URL(x) nutag_url, urltag_url_v(x)
76 SOFIAPUBVAR tag_typedef_t nutag_url;
77 #define NUTAG_URL_REF(x) nutag_url_ref, urltag_url_vr(&(x))
78 SOFIAPUBVAR tag_typedef_t nutag_url_ref;
79
80 #define NUTAG_ADDRESS(x) nutag_address, tag_str_v(x)
81 SOFIAPUBVAR tag_typedef_t nutag_address;
82 #define NUTAG_ADDRESS_REF(x) nutag_address_ref, tag_str_vr(&(x))
83 SOFIAPUBVAR tag_typedef_t nutag_address_ref;
84
85 #define NUTAG_WITH(x) nutag_with, tag_ptr_v(x)
86 SOFIAPUBVAR tag_typedef_t nutag_with;
87
88 #define NUTAG_WITH_THIS(nua) nutag_with, tag_ptr_v(nua_current_request((nua)))
89 #define NUTAG_WITH_CURRENT(nua) \
90 nutag_with, tag_ptr_v(nua_current_request((nua)))
91 #define NUTAG_WITH_SAVED(e) nutag_with, tag_ptr_v(nua_saved_event_request((e)))
92
93 #define NUTAG_DIALOG(b) nutag_dialog, tag_uint_v((b))
94 SOFIAPUBVAR tag_typedef_t nutag_dialog;
95
96 #define NUTAG_METHOD(x) nutag_method, tag_str_v(x)
97 SOFIAPUBVAR tag_typedef_t nutag_method;
98 #define NUTAG_METHOD_REF(x) nutag_method_ref, tag_str_vr(&(x))
99 SOFIAPUBVAR tag_typedef_t nutag_method_ref;
100
101 #define NUTAG_MAX_SUBSCRIPTIONS(x) nutag_max_subscriptions, tag_uint_v(x)
102 SOFIAPUBVAR tag_typedef_t nutag_max_subscriptions;
103 #define NUTAG_MAX_SUBSCRIPTIONS_REF(x) \
104 nutag_max_subscriptions_ref, tag_uint_vr(&(x))
105 SOFIAPUBVAR tag_typedef_t nutag_max_subscriptions_ref;
106
107 #define NUTAG_UICC(x) nutag_uicc, tag_str_v(x)
108 SOFIAPUBVAR tag_typedef_t nutag_uicc;
109 #define NUTAG_UICC_REF(x) nutag_uicc_ref, tag_str_vr(&(x))
110 SOFIAPUBVAR tag_typedef_t nutag_uicc_ref;
111
112 #define NUTAG_USE_DIALOG(x) nutag_use_dialog, tag_bool_v(x)
113 SOFIAPUBVAR tag_typedef_t nutag_use_dialog;
114 #define NUTAG_USE_DIALOG_REF(x) nutag_use_dialog_ref, tag_bool_vr(&(x))
115 SOFIAPUBVAR tag_typedef_t nutag_use_dialog_ref;
116
117
118 /* Protocol engine parameters,
119 * set by nua_set_params(), get by nua_get_params() */
120
121 #define NUTAG_RETRY_COUNT(x) nutag_retry_count, tag_uint_v(x)
122 SOFIAPUBVAR tag_typedef_t nutag_retry_count;
123 #define NUTAG_RETRY_COUNT_REF(x) nutag_retry_count_ref, tag_uint_vr(&(x))
124 SOFIAPUBVAR tag_typedef_t nutag_retry_count_ref;
125
126 #define NUTAG_CALL_TLS_ORQ_CONNECT_TIMEOUT(x) nutag_call_tls_orq_connect_timeout, tag_uint_v(x)
127 SOFIAPUBVAR tag_typedef_t nutag_call_tls_orq_connect_timeout;
128 #define NUTAG_CALL_TLS_ORQ_CONNECT_TIMEOUT_REF(x) nutag_call_tls_orq_connect_timeout_ref, tag_uint_vr(&(x))
129 SOFIAPUBVAR tag_typedef_t nutag_call_tls_orq_connect_timeout_ref;
130
131 #define NUTAG_SOA_NAME(x) nutag_soa_name, tag_str_v(x)
132 SOFIAPUBVAR tag_typedef_t nutag_soa_name;
133 #define NUTAG_SOA_NAME_REF(x) \
134 nutag_soa_name_ref, tag_str_vr(&(x))
135 SOFIAPUBVAR tag_typedef_t nutag_soa_name_ref;
136
137 #define NUTAG_EARLY_MEDIA(x) nutag_early_media, tag_bool_v(x)
138 SOFIAPUBVAR tag_typedef_t nutag_early_media;
139 #define NUTAG_EARLY_MEDIA_REF(x) nutag_early_media_ref, tag_bool_vr(&(x))
140 SOFIAPUBVAR tag_typedef_t nutag_early_media_ref;
141
142 #define NUTAG_ONLY183_100REL(x) nutag_only183_100rel, tag_bool_v(x)
143 SOFIAPUBVAR tag_typedef_t nutag_only183_100rel;
144 #define NUTAG_ONLY183_100REL_REF(x) nutag_only183_100rel_ref, tag_bool_vr(&(x))
145 SOFIAPUBVAR tag_typedef_t nutag_only183_100rel_ref;
146
147 #define NUTAG_EARLY_ANSWER(x) nutag_early_answer, tag_bool_v(x)
148 SOFIAPUBVAR tag_typedef_t nutag_early_answer;
149 #define NUTAG_EARLY_ANSWER_REF(x) nutag_early_answer_ref, tag_bool_vr(&(x))
150 SOFIAPUBVAR tag_typedef_t nutag_early_answer_ref;
151
152 #define NUTAG_INCLUDE_EXTRA_SDP(x) nutag_include_extra_sdp, tag_bool_v(x)
153 SOFIAPUBVAR tag_typedef_t nutag_include_extra_sdp;
154 #define NUTAG_INCLUDE_EXTRA_SDP_REF(x) \
155 nutag_include_extra_sdp_ref, tag_bool_vr(&(x))
156 SOFIAPUBVAR tag_typedef_t nutag_include_extra_sdp_ref;
157
158 #define NUTAG_INVITE_TIMER(x) nutag_invite_timer, tag_uint_v((x))
159 SOFIAPUBVAR tag_typedef_t nutag_invite_timer;
160 #define NUTAG_INVITE_TIMER_REF(x) nutag_invite_timer_ref, tag_uint_vr(&(x))
161 SOFIAPUBVAR tag_typedef_t nutag_invite_timer_ref;
162
163 #define NUTAG_SESSION_TIMER(x) nutag_session_timer, tag_uint_v((x))
164 SOFIAPUBVAR tag_typedef_t nutag_session_timer;
165 #define NUTAG_SESSION_TIMER_REF(x) nutag_session_timer_ref, tag_uint_vr((&(x)))
166 SOFIAPUBVAR tag_typedef_t nutag_session_timer_ref;
167
168 #define NUTAG_MIN_SE(x) nutag_min_se, tag_uint_v((x))
169 SOFIAPUBVAR tag_typedef_t nutag_min_se;
170 #define NUTAG_MIN_SE_REF(x) nutag_min_se_ref, tag_uint_vr((&(x)))
171 SOFIAPUBVAR tag_typedef_t nutag_min_se_ref;
172
173 /** Enumeration type of NUTAG_SESSION_REFRESHER(). */
174 enum nua_session_refresher {
175 nua_no_refresher, /**< Disable session timer. */
176 nua_local_refresher, /**< Session refresh by local end. */
177 nua_remote_refresher, /**< Session refresh by remote end. */
178 nua_any_refresher /**< No preference (default). */
179 };
180
181 #define NUTAG_SESSION_REFRESHER(x) nutag_session_refresher, tag_int_v((x))
182 SOFIAPUBVAR tag_typedef_t nutag_session_refresher;
183 #define NUTAG_SESSION_REFRESHER_REF(x) nutag_session_refresher_ref, tag_int_vr((&(x)))
184 SOFIAPUBVAR tag_typedef_t nutag_session_refresher_ref;
185
186 #define NUTAG_UPDATE_REFRESH(x) nutag_update_refresh, tag_bool_v((x))
187 SOFIAPUBVAR tag_typedef_t nutag_update_refresh;
188 #define NUTAG_UPDATE_REFRESH_REF(x) nutag_update_refresh_ref, tag_bool_vr((&(x)))
189 SOFIAPUBVAR tag_typedef_t nutag_update_refresh_ref;
190
191 #define NUTAG_REFRESH_WITHOUT_SDP(x) nutag_refresh_without_sdp, tag_bool_v((x))
192 SOFIAPUBVAR tag_typedef_t nutag_refresh_without_sdp;
193 #define NUTAG_REFRESH_WITHOUT_SDP_REF(x) \
194 nutag_refresh_without_sdp_ref, tag_bool_vr((&(x)))
195 SOFIAPUBVAR tag_typedef_t nutag_refresh_without_sdp_ref;
196
197 #define NUTAG_AUTOALERT(x) nutag_autoalert, tag_bool_v(x)
198 SOFIAPUBVAR tag_typedef_t nutag_autoalert;
199 #define NUTAG_AUTOALERT_REF(x) nutag_autoalert_ref, tag_bool_vr(&(x))
200 SOFIAPUBVAR tag_typedef_t nutag_autoalert_ref;
201
202 #define NUTAG_AUTOACK(x) nutag_autoack, tag_bool_v(x)
203 SOFIAPUBVAR tag_typedef_t nutag_autoack;
204 #define NUTAG_AUTOACK_REF(x) nutag_autoack_ref, tag_bool_vr(&(x))
205 SOFIAPUBVAR tag_typedef_t nutag_autoack_ref;
206
207 #define NUTAG_TIMER_AUTOREQUIRE(x) nutag_timer_autorequire, tag_bool_v(x)
208 SOFIAPUBVAR tag_typedef_t nutag_timer_autorequire;
209 #define NUTAG_TIMER_AUTOREQUIRE_REF(x) nutag_timer_autorequire_ref, tag_bool_vr(&(x))
210 SOFIAPUBVAR tag_typedef_t nutag_timer_autorequire_ref;
211
212 #define NUTAG_AUTOANSWER(x) nutag_autoanswer, tag_bool_v(x)
213 SOFIAPUBVAR tag_typedef_t nutag_autoanswer;
214 #define NUTAG_AUTOANSWER_REF(x) nutag_autoanswer_ref, tag_bool_vr(&(x))
215 SOFIAPUBVAR tag_typedef_t nutag_autoanswer_ref;
216
217 #define NUTAG_ENABLEINVITE(x) nutag_enableinvite, tag_bool_v(x)
218 SOFIAPUBVAR tag_typedef_t nutag_enableinvite;
219 #define NUTAG_ENABLEINVITE_REF(x) nutag_enableinvite_ref, tag_bool_vr(&(x))
220 SOFIAPUBVAR tag_typedef_t nutag_enableinvite_ref;
221
222 #define NUTAG_ENABLEMESSAGE(x) nutag_enablemessage, tag_bool_v(x)
223 SOFIAPUBVAR tag_typedef_t nutag_enablemessage;
224 #define NUTAG_ENABLEMESSAGE_REF(x) nutag_enablemessage_ref, tag_bool_vr(&(x))
225 SOFIAPUBVAR tag_typedef_t nutag_enablemessage_ref;
226
227 #define NUTAG_ENABLEMESSENGER(x) nutag_enablemessenger, tag_bool_v(x)
228 SOFIAPUBVAR tag_typedef_t nutag_enablemessenger;
229 #define NUTAG_ENABLEMESSENGER_REF(x) \
230 nutag_enablemessenger_ref, tag_bool_vr(&(x))
231 SOFIAPUBVAR tag_typedef_t nutag_enablemessenger_ref;
232
233 /* Start NRC Boston */
234
235 #define NUTAG_SMIME_ENABLE(x) nutag_smime_enable, tag_bool_v(x)
236 SOFIAPUBVAR tag_typedef_t nutag_smime_enable;
237 #define NUTAG_SMIME_ENABLE_REF(x) nutag_smime_enable_ref, tag_bool_vr(&(x))
238 SOFIAPUBVAR tag_typedef_t nutag_smime_enable_ref;
239
240 #define NUTAG_SMIME_OPT(x) nutag_smime_opt, tag_int_v(x)
241 SOFIAPUBVAR tag_typedef_t nutag_smime_opt;
242 #define NUTAG_SMIME_OPT_REF(x) nutag_smime_opt_ref, tag_int_vr(&(x))
243 SOFIAPUBVAR tag_typedef_t nutag_smime_opt_ref;
244
245 #define NUTAG_SMIME_PROTECTION_MODE(x) nutag_smime_protection_mode, tag_uint_v(x)
246 SOFIAPUBVAR tag_typedef_t nutag_smime_protection_mode;
247 #define NUTAG_SMIME_PROTECTION_MODE_REF(x) \
248 nutag_smime_protection_mode_ref, tag_uint_vr(&(x))
249 SOFIAPUBVAR tag_typedef_t nutag_smime_protection_mode_ref;
250
251 #define NUTAG_SMIME_MESSAGE_DIGEST(x) nutag_smime_message_digest, tag_str_v(x)
252 SOFIAPUBVAR tag_typedef_t nutag_smime_message_digest;
253 #define NUTAG_SMIME_MESSAGE_DIGEST_REF(x) \
254 nutag_smime_message_digest_ref, tag_str_vr((&x))
255 SOFIAPUBVAR tag_typedef_t nutag_smime_message_digest_ref;
256
257 #define NUTAG_SMIME_SIGNATURE(x) nutag_smime_signature, tag_str_v(x)
258 SOFIAPUBVAR tag_typedef_t nutag_smime_signature;
259 #define NUTAG_SMIME_SIGNATURE_REF(x) \
260 nutag_smime_signature_ref, tag_str_vr((&x))
261 SOFIAPUBVAR tag_typedef_t nutag_smime_signature_ref;
262
263 #define NUTAG_SMIME_KEY_ENCRYPTION(x) nutag_smime_key_encryption, tag_str_v(x)
264 SOFIAPUBVAR tag_typedef_t nutag_smime_key_encryption;
265 #define NUTAG_SMIME_KEY_ENCRYPTION_REF(x) \
266 nutag_smime_key_encryption_ref, tag_str_vr((&x))
267 SOFIAPUBVAR tag_typedef_t nutag_smime_key_encryption_ref;
268
269 #define NUTAG_SMIME_MESSAGE_ENCRYPTION(x) nutag_smime_message_encryption, tag_str_v(x)
270 SOFIAPUBVAR tag_typedef_t nutag_smime_message_encryption;
271 #define NUTAG_SMIME_MESSAGE_ENCRYPTION_REF(x) \
272 nutag_smime_message_encryption_ref, tag_str_vr((&x))
273 SOFIAPUBVAR tag_typedef_t nutag_smime_message_encryption_ref;
274
275 /* End NRC Boston */
276
277 #define NUTAG_CERTIFICATE_DIR(x) nutag_certificate_dir, tag_str_v(x)
278 SOFIAPUBVAR tag_typedef_t nutag_certificate_dir;
279 #define NUTAG_CERTIFICATE_DIR_REF(x) \
280 nutag_certificate_dir_ref, tag_str_vr((&x))
281 SOFIAPUBVAR tag_typedef_t nutag_certificate_dir_ref;
282
283 #define NUTAG_CERTIFICATE_PHRASE(x) nutag_certificate_phrase, tag_str_v(x)
284 SOFIAPUBVAR tag_typedef_t nutag_certificate_phrase;
285 #define NUTAG_CERTIFICATE_PHRASE_REF(x) \
286 nutag_certificate_phrase_ref, tag_str_vr((&x))
287 SOFIAPUBVAR tag_typedef_t nutag_certificate_phrase_ref;
288
289 #define NUTAG_SIPS_URL(x) nutag_sips_url, urltag_url_v(x)
290 SOFIAPUBVAR tag_typedef_t nutag_sips_url;
291 #define NUTAG_SIPS_URL_REF(x) nutag_sips_url_ref, urltag_url_vr(&(x))
292 SOFIAPUBVAR tag_typedef_t nutag_sips_url_ref;
293
294 #define NUTAG_WS_URL(x) nutag_ws_url, urltag_url_v(x)
295 SOFIAPUBVAR tag_typedef_t nutag_ws_url;
296 #define NUTAG_WS_URL_REF(x) nutag_ws_url_ref, urltag_url_vr(&(x))
297 SOFIAPUBVAR tag_typedef_t nutag_ws_url_ref;
298
299 #define NUTAG_WSS_URL(x) nutag_wss_url, urltag_url_v(x)
300 SOFIAPUBVAR tag_typedef_t nutag_wss_url;
301 #define NUTAG_WSS_URL_REF(x) nutag_wss_url_ref, urltag_url_vr(&(x))
302 SOFIAPUBVAR tag_typedef_t nutag_wss_url_ref;
303
304 #define NUTAG_PROXY(x) NTATAG_DEFAULT_PROXY(x)
305 #define NUTAG_PROXY_REF(x) NTATAG_DEFAULT_PROXY_REF(x)
306 #define nutag_proxy ntatag_default_proxy
307
308 #define NUTAG_INITIAL_ROUTE(x) nutag_initial_route, siptag_route_v(x)
309 SOFIAPUBVAR tag_typedef_t nutag_initial_route;
310 #define NUTAG_INITIAL_ROUTE_REF(x) nutag_initial_route_ref, siptag_route_vr(&(x))
311 SOFIAPUBVAR tag_typedef_t nutag_initial_route_ref;
312
313 #define NUTAG_INITIAL_ROUTE_STR(x) nutag_initial_route_str, tag_str_v(x)
314 SOFIAPUBVAR tag_typedef_t nutag_initial_route_str;
315 #define NUTAG_INITIAL_ROUTE_STR_REF(x) nutag_initial_route_str_ref, tag_str_vr(&(x))
316 SOFIAPUBVAR tag_typedef_t nutag_initial_route_str_ref;
317
318 #define NUTAG_REGISTRAR(x) nutag_registrar, urltag_url_v(x)
319 SOFIAPUBVAR tag_typedef_t nutag_registrar;
320 #define NUTAG_REGISTRAR_REF(x) nutag_registrar_ref, urltag_url_vr(&(x))
321 SOFIAPUBVAR tag_typedef_t nutag_registrar_ref;
322
323 #define NUTAG_OUTBOUND(x) nutag_outbound, tag_str_v(x)
324 SOFIAPUBVAR tag_typedef_t nutag_outbound;
325 #define NUTAG_OUTBOUND_REF(x) nutag_outbound_ref, tag_str_vr(&(x))
326 SOFIAPUBVAR tag_typedef_t nutag_outbound_ref;
327
328 #if notyet
329
330 #define NUTAG_OUTBOUND_SET1(x) nutag_outbound_set1, tag_str_v(x)
331 SOFIAPUBVAR tag_typedef_t nutag_outbound_set1;
332 #define NUTAG_OUTBOUND_SET1_REF(x) nutag_outbound_set1_ref, tag_str_vr(&(x))
333 SOFIAPUBVAR tag_typedef_t nutag_outbound_set1_ref;
334
335 #define NUTAG_OUTBOUND_SET2(x) nutag_outbound_set2, tag_str_v(x)
336 SOFIAPUBVAR tag_typedef_t nutag_outbound_set2;
337 #define NUTAG_OUTBOUND_SET2_REF(x) nutag_outbound_set2_ref, tag_str_vr(&(x))
338 SOFIAPUBVAR tag_typedef_t nutag_outbound_set2_ref;
339
340 #define NUTAG_OUTBOUND_SET3(x) nutag_outbound_set3, tag_str_v(x)
341 SOFIAPUBVAR tag_typedef_t nutag_outbound_set3;
342 #define NUTAG_OUTBOUND_SET3_REF(x) nutag_outbound_set3_ref, tag_str_vr(&(x))
343 SOFIAPUBVAR tag_typedef_t nutag_outbound_set3_ref;
344
345 #define NUTAG_OUTBOUND_SET4(x) nutag_outbound_set4, tag_str_v(x)
346 SOFIAPUBVAR tag_typedef_t nutag_outbound_set4;
347 #define NUTAG_OUTBOUND_SET4_REF(x) nutag_outbound_set4_ref, tag_str_vr(&(x))
348 SOFIAPUBVAR tag_typedef_t nutag_outbound_set4_ref;
349
350 #endif /* ...notyet */
351
352 #define NUTAG_SIP_PARSER(x) NTATAG_MCLASS(x)
353 #define NUTAG_SIP_PARSER_REF(x) NTATAG_MCLASS_REF(x)
354
355 #define NUTAG_AUTH(x) nutag_auth, tag_str_v(x)
356 SOFIAPUBVAR tag_typedef_t nutag_auth;
357 #define NUTAG_AUTH_REF(x) nutag_auth_ref, tag_str_vr(&(x))
358 SOFIAPUBVAR tag_typedef_t nutag_auth_ref;
359
360 #define NUTAG_AUTH_CACHE(x) nutag_auth_cache, tag_int_v(x)
361 SOFIAPUBVAR tag_typedef_t nutag_auth_cache;
362 #define NUTAG_AUTH_CACHE_REF(x) nutag_auth_cache_ref, tag_int_vr(&(x))
363 SOFIAPUBVAR tag_typedef_t nutag_auth_cache_ref;
364
365 /** Authentication caching policy. @NEW_1_12_6. */
366 enum nua_auth_cache {
367 /** Include credentials within dialog (default) */
368 nua_auth_cache_dialog = 0,
369 /** Include credentials only when challenged */
370 nua_auth_cache_challenged = 1,
371 _nua_auth_cache_invalid
372 };
373
374 #define NUTAG_KEEPALIVE(x) nutag_keepalive, tag_uint_v(x)
375 SOFIAPUBVAR tag_typedef_t nutag_keepalive;
376 #define NUTAG_KEEPALIVE_REF(x) nutag_keepalive_ref, tag_uint_vr(&(x))
377 SOFIAPUBVAR tag_typedef_t nutag_keepalive_ref;
378
379 #define NUTAG_KEEPALIVE_STREAM(x) nutag_keepalive_stream, tag_uint_v(x)
380 SOFIAPUBVAR tag_typedef_t nutag_keepalive_stream;
381 #define NUTAG_KEEPALIVE_STREAM_REF(x) \
382 nutag_keepalive_stream_ref, tag_uint_vr(&(x))
383 SOFIAPUBVAR tag_typedef_t nutag_keepalive_stream_ref;
384
385 #define NUTAG_AUTHTIME(x) nutag_authtime, tag_uint_v(x)
386 SOFIAPUBVAR tag_typedef_t nutag_authtime;
387 #define NUTAG_AUTHTIME_REF(x) nutag_authtime_ref, tag_uint_vr(&(x))
388 SOFIAPUBVAR tag_typedef_t nutag_authtime_ref;
389
390 #define NUTAG_M_DISPLAY(x) nutag_m_display, tag_str_v(x)
391 SOFIAPUBVAR tag_typedef_t nutag_m_display;
392 #define NUTAG_M_DISPLAY_REF(x) nutag_m_display_ref, tag_str_vr(&(x))
393 SOFIAPUBVAR tag_typedef_t nutag_m_display_ref;
394
395 #define NUTAG_M_USERNAME(x) nutag_m_username, tag_str_v(x)
396 SOFIAPUBVAR tag_typedef_t nutag_m_username;
397 #define NUTAG_M_USERNAME_REF(x) nutag_m_username_ref, tag_str_vr(&(x))
398 SOFIAPUBVAR tag_typedef_t nutag_m_username_ref;
399
400 #define NUTAG_M_PARAMS(x) nutag_m_params, tag_str_v(x)
401 SOFIAPUBVAR tag_typedef_t nutag_m_params;
402 #define NUTAG_M_PARAMS_REF(x) nutag_m_params_ref, tag_str_vr(&(x))
403 SOFIAPUBVAR tag_typedef_t nutag_m_params_ref;
404
405 #define NUTAG_M_FEATURES(x) nutag_m_features, tag_str_v(x)
406 SOFIAPUBVAR tag_typedef_t nutag_m_features;
407 #define NUTAG_M_FEATURES_REF(x) nutag_m_features_ref, tag_str_vr(&(x))
408 SOFIAPUBVAR tag_typedef_t nutag_m_features_ref;
409
410 #define NUTAG_EVENT(x) nutag_event, tag_int_v(x)
411 SOFIAPUBVAR tag_typedef_t nutag_event;
412 #define NUTAG_EVENT_REF(x) nutag_event_ref, tag_int_vr(&(x))
413 SOFIAPUBVAR tag_typedef_t nutag_event_ref;
414
415 #define NUTAG_STATUS(x) nutag_status, tag_uint_v(x)
416 SOFIAPUBVAR tag_typedef_t nutag_status;
417 #define NUTAG_STATUS_REF(x) nutag_status_ref, tag_uint_vr(&(x))
418 SOFIAPUBVAR tag_typedef_t nutag_status_ref;
419
420 #define NUTAG_PHRASE(x) nutag_phrase, tag_str_v(x)
421 SOFIAPUBVAR tag_typedef_t nutag_phrase;
422 #define NUTAG_PHRASE_REF(x) nutag_phrase_ref, tag_str_vr(&(x))
423 SOFIAPUBVAR tag_typedef_t nutag_phrase_ref;
424
425 #define NUTAG_HANDLE(x) nutag_handle, nutag_handle_v(x)
426 SOFIAPUBVAR tag_typedef_t nutag_handle;
427 #define NUTAG_HANDLE_REF(x) nutag_handle_ref, nutag_handle_vr(&(x))
428 SOFIAPUBVAR tag_typedef_t nutag_handle_ref;
429
430 #define NUTAG_IDENTITY(x) nutag_identity, nutag_handle_v(x)
431 SOFIAPUBVAR tag_typedef_t nutag_identity;
432 #define NUTAG_IDENTITY_REF(x) nutag_identity_ref, nutag_handle_vr(&(x))
433 SOFIAPUBVAR tag_typedef_t nutag_identity_ref;
434
435 #define NUTAG_INSTANCE(x) nutag_instance, tag_str_v(x)
436 SOFIAPUBVAR tag_typedef_t nutag_instance;
437 #define NUTAG_INSTANCE_REF(x) nutag_instance_ref, tag_str_vr(&(x))
438 SOFIAPUBVAR tag_typedef_t nutag_instance_ref;
439
440 #define NUTAG_NOTIFY_REFER(x) nutag_notify_refer, nutag_handle_v(x)
441 SOFIAPUBVAR tag_typedef_t nutag_notify_refer;
442 #define NUTAG_NOTIFY_REFER_REF(x) nutag_notify_refer_ref, nutag_handle_vr(&(x))
443 SOFIAPUBVAR tag_typedef_t nutag_notify_refer_ref;
444
445 #define NUTAG_REFER_EVENT(x) nutag_refer_event, siptag_event_v(x)
446 SOFIAPUBVAR tag_typedef_t nutag_refer_event;
447 #define NUTAG_REFER_EVENT_REF(x) nutag_refer_event_ref, siptag_event_vr(&(x))
448 SOFIAPUBVAR tag_typedef_t nutag_refer_event_ref;
449
450 #define NUTAG_REFER_PAUSE(x) nutag_refer_pause, tag_bool_v(x)
451 SOFIAPUBVAR tag_typedef_t nutag_refer_pause;
452 #define NUTAG_REFER_PAUSE_REF(x) nutag_refer_pause_ref, tag_bool_vr(&(x))
453 SOFIAPUBVAR tag_typedef_t nutag_refer_pause_ref;
454
455 #define NUTAG_USER_AGENT(x) nutag_user_agent, tag_str_v(x)
456 SOFIAPUBVAR tag_typedef_t nutag_user_agent;
457 #define NUTAG_USER_AGENT_REF(x) nutag_user_agent_ref, tag_str_vr(&(x))
458 SOFIAPUBVAR tag_typedef_t nutag_user_agent_ref;
459
460 #define NUTAG_VIA(x) nutag_via, tag_str_v(x)
461 SOFIAPUBVAR tag_typedef_t nutag_via;
462 #define NUTAG_VIA_REF(x) nutag_via_ref, tag_str_vr(&(x))
463 SOFIAPUBVAR tag_typedef_t nutag_via_ref;
464
465 #define NUTAG_ALLOW(x) nutag_allow, tag_str_v(x)
466 SOFIAPUBVAR tag_typedef_t nutag_allow;
467 #define NUTAG_ALLOW_REF(x) nutag_allow_ref, tag_str_vr(&(x))
468 SOFIAPUBVAR tag_typedef_t nutag_allow_ref;
469
470
471 #define NUTAG_APPL_METHOD(x) nutag_appl_method, tag_str_v(x)
472 SOFIAPUBVAR tag_typedef_t nutag_appl_method;
473 #define NUTAG_APPL_METHOD_REF(x) nutag_appl_method_ref, tag_str_vr(&(x))
474 SOFIAPUBVAR tag_typedef_t nutag_appl_method_ref;
475
476
477 #define NUTAG_SUPPORTED(x) nutag_supported, tag_str_v(x)
478 SOFIAPUBVAR tag_typedef_t nutag_supported;
479 #define NUTAG_SUPPORTED_REF(x) nutag_supported_ref, tag_str_vr(&(x))
480 SOFIAPUBVAR tag_typedef_t nutag_supported_ref;
481
482 #define NUTAG_ALLOW_EVENTS(x) nutag_allow_events, tag_str_v(x)
483 SOFIAPUBVAR tag_typedef_t nutag_allow_events;
484 #define NUTAG_ALLOW_EVENTS_REF(x) nutag_allow_events_ref, tag_str_vr(&(x))
485 SOFIAPUBVAR tag_typedef_t nutag_allow_events_ref;
486
487 #define NUTAG_CALLSTATE(x) nutag_callstate, tag_int_v(x)
488 SOFIAPUBVAR tag_typedef_t nutag_callstate;
489 #define NUTAG_CALLSTATE_REF(x) nutag_callstate_ref, tag_int_vr(&(x))
490 SOFIAPUBVAR tag_typedef_t nutag_callstate_ref;
491
492 enum nua_callstate {
493 nua_callstate_init, /**< Initial state */
494 nua_callstate_authenticating, /**< 401/407 received */
495 nua_callstate_calling, /**< INVITE sent */
496 nua_callstate_proceeding, /**< 18X received */
497 nua_callstate_completing, /**< 2XX received */
498 nua_callstate_received, /**< INVITE received */
499 nua_callstate_early, /**< 18X sent (w/SDP) */
500 nua_callstate_completed, /**< 2XX sent */
501 nua_callstate_ready, /**< 2XX received, ACK sent, or vice versa */
502 nua_callstate_terminating, /**< BYE sent */
503 nua_callstate_terminated /**< BYE complete */
504 };
505
506 /** Get name for NUA call state */
507 SOFIAPUBFUN char const *nua_callstate_name(enum nua_callstate state);
508
509 #define NUTAG_SUBSTATE(x) nutag_substate, tag_int_v(x)
510 SOFIAPUBVAR tag_typedef_t nutag_substate;
511 #define NUTAG_SUBSTATE_REF(x) nutag_substate_ref, tag_int_vr(&(x))
512 SOFIAPUBVAR tag_typedef_t nutag_substate_ref;
513
514 /** Parameter type of NUTAG_SUBSTATE() */
515 enum nua_substate {
516 /** Extended state, considered as active. */
517 nua_substate_extended = nea_extended,
518 /** Embryonic subscription: SUBSCRIBE sent */
519 nua_substate_embryonic = nea_embryonic,
520 nua_substate_pending = nea_pending, /**< Pending subscription */
521 nua_substate_active = nea_active, /**< Active subscription */
522 nua_substate_terminated = nea_terminated /**< Terminated subscription */
523 };
524
525 /** Return name of subscription state. @NEW_1_12_5. */
526 SOFIAPUBFUN char const *nua_substate_name(enum nua_substate substate);
527
528 /** Convert string to enum nua_substate. @NEW_1_12_5. */
529 SOFIAPUBFUN enum nua_substate nua_substate_make(char const *sip_substate);
530
531 #define NUTAG_SUB_EXPIRES(x) nutag_sub_expires, tag_uint_v(x)
532 SOFIAPUBVAR tag_typedef_t nutag_sub_expires;
533 #define NUTAG_SUB_EXPIRES_REF(x) nutag_sub_expires_ref, tag_uint_vr(&(x))
534 SOFIAPUBVAR tag_typedef_t nutag_sub_expires_ref;
535
536 #define NUTAG_NEWSUB(x) nutag_newsub, tag_bool_v(x)
537 SOFIAPUBVAR tag_typedef_t nutag_newsub;
538 #define NUTAG_NEWSUB_REF(x) nutag_newsub_ref, tag_bool_vr(&(x))
539 SOFIAPUBVAR tag_typedef_t nutag_newsub_ref;
540
541 #define NUTAG_REFER_EXPIRES(x) nutag_refer_expires, tag_uint_v((x))
542 SOFIAPUBVAR tag_typedef_t nutag_refer_expires;
543 #define NUTAG_REFER_EXPIRES_REF(x) nutag_refer_expires_ref, tag_uint_vr((&(x)))
544 SOFIAPUBVAR tag_typedef_t nutag_refer_expires_ref;
545
546 #define NUTAG_REFER_WITH_ID(x) nutag_refer_with_id, tag_bool_v(x)
547 SOFIAPUBVAR tag_typedef_t nutag_refer_with_id;
548 #define NUTAG_REFER_WITH_ID_REF(x) nutag_refer_with_id_ref, tag_bool_vr(&(x))
549 SOFIAPUBVAR tag_typedef_t nutag_refer_with_id_ref;
550
551 #define NUTAG_MEDIA_FEATURES(x) nutag_media_features, tag_bool_v(x)
552 SOFIAPUBVAR tag_typedef_t nutag_media_features;
553 #define NUTAG_MEDIA_FEATURES_REF(x) \
554 nutag_media_features_ref, tag_bool_vr(&(x))
555 SOFIAPUBVAR tag_typedef_t nutag_media_features_ref;
556
557 #define NUTAG_CALLEE_CAPS(x) nutag_callee_caps, tag_bool_v(x)
558 SOFIAPUBVAR tag_typedef_t nutag_callee_caps;
559 #define NUTAG_CALLEE_CAPS_REF(x) \
560 nutag_callee_caps_ref, tag_bool_vr(&(x))
561 SOFIAPUBVAR tag_typedef_t nutag_callee_caps_ref;
562
563 #define NUTAG_PATH_ENABLE(x) nutag_path_enable, tag_bool_v(x)
564 SOFIAPUBVAR tag_typedef_t nutag_path_enable;
565 #define NUTAG_PATH_ENABLE_REF(x) nutag_path_enable_ref, tag_bool_vr(&(x))
566 SOFIAPUBVAR tag_typedef_t nutag_path_enable_ref;
567
568 #define NUTAG_RETRY_AFTER_ENABLE(x) nutag_retry_after_enable, tag_bool_v(x)
569 SOFIAPUBVAR tag_typedef_t nutag_retry_after_enable;
570 #define NUTAG_RETRY_AFTER_ENABLE_REF(x) nutag_retry_after_enable_ref, tag_bool_vr(&(x))
571 SOFIAPUBVAR tag_typedef_t nutag_retry_after_enable_ref;
572
573 #define NUTAG_SERVICE_ROUTE_ENABLE(x) nutag_service_route_enable, tag_bool_v(x)
574 SOFIAPUBVAR tag_typedef_t nutag_service_route_enable;
575 #define NUTAG_SERVICE_ROUTE_ENABLE_REF(x) \
576 nutag_service_route_enable_ref, tag_bool_vr(&(x))
577 SOFIAPUBVAR tag_typedef_t nutag_service_route_enable_ref;
578
579 #define NUTAG_MEDIA_ENABLE(x) nutag_media_enable, tag_bool_v(x)
580 SOFIAPUBVAR tag_typedef_t nutag_media_enable;
581 #define NUTAG_MEDIA_ENABLE_REF(x) \
582 nutag_media_enable_ref, tag_bool_vr(&(x))
583 SOFIAPUBVAR tag_typedef_t nutag_media_enable_ref;
584
585 #define NUTAG_OFFER_RECV(x) nutag_offer_recv, tag_bool_v(x)
586 SOFIAPUBVAR tag_typedef_t nutag_offer_recv;
587 #define NUTAG_OFFER_RECV_REF(x) nutag_offer_recv_ref, tag_bool_vr(&(x))
588 SOFIAPUBVAR tag_typedef_t nutag_offer_recv_ref;
589
590 #define NUTAG_ANSWER_RECV(x) nutag_answer_recv, tag_bool_v(x)
591 SOFIAPUBVAR tag_typedef_t nutag_answer_recv;
592 #define NUTAG_ANSWER_RECV_REF(x) nutag_answer_recv_ref, tag_bool_vr(&(x))
593 SOFIAPUBVAR tag_typedef_t nutag_answer_recv_ref;
594
595 #define NUTAG_OFFER_SENT(x) nutag_offer_sent, tag_bool_v(x)
596 SOFIAPUBVAR tag_typedef_t nutag_offer_sent;
597 #define NUTAG_OFFER_SENT_REF(x) nutag_offer_sent_ref, tag_bool_vr(&(x))
598 SOFIAPUBVAR tag_typedef_t nutag_offer_sent_ref;
599
600 #define NUTAG_ANSWER_SENT(x) nutag_answer_sent, tag_bool_v(x)
601 SOFIAPUBVAR tag_typedef_t nutag_answer_sent;
602 #define NUTAG_ANSWER_SENT_REF(x) nutag_answer_sent_ref, tag_bool_vr(&(x))
603 SOFIAPUBVAR tag_typedef_t nutag_answer_sent_ref;
604
605 #define NUTAG_DETECT_NETWORK_UPDATES(x) \
606 nutag_detect_network_updates, tag_int_v(x)
607 SOFIAPUBVAR tag_typedef_t nutag_detect_network_updates;
608 #define NUTAG_DETECT_NETWORK_UPDATES_REF(x) \
609 nutag_detect_network_updates_ref, tag_int_vr(&(x))
610 SOFIAPUBVAR tag_typedef_t nutag_detect_network_updates_ref;
611
612 #define NUTAG_SHUTDOWN_EVENTS(x) \
613 nutag_shutdown_events, tag_bool_v(x)
614 SOFIAPUBVAR tag_typedef_t nutag_shutdown_events;
615 #define NUTAG_SHUTDOWN_EVENTS_REF(x) \
616 nutag_shutdown_events_ref, tag_bool_vr(&(x))
617 SOFIAPUBVAR tag_typedef_t nutag_shutdown_events_ref;
618
619 #define NUTAG_AUTO_INVITE_100(x) \
620 nutag_auto_invite_100, tag_bool_v(x)
621 SOFIAPUBVAR tag_typedef_t nutag_auto_invite_100;
622 #define NUTAG_AUTO_INVITE_100_REF(x) \
623 nutag_auto_invite_100_ref, tag_bool_vr(&(x))
624 SOFIAPUBVAR tag_typedef_t nutag_auto_invite_100_ref;
625
626 /* Pass nua handle as tagged argument */
627 #if SU_INLINE_TAG_CAST
nutag_handle_v(nua_handle_t * v)628 su_inline tag_value_t nutag_handle_v(nua_handle_t *v) { return (tag_value_t)v; }
nutag_handle_vr(nua_handle_t ** vp)629 su_inline tag_value_t nutag_handle_vr(nua_handle_t **vp) {return(tag_value_t)vp;}
630 #else
631 #define nutag_handle_v(v) (tag_value_t)(v)
632 #define nutag_handle_vr(v) (tag_value_t)(v)
633 #endif
634
635 /* Tags for compatibility */
636
637 #define NUTAG_USE_LEG(x) NUTAG_USE_DIALOG(x)
638 #define NUTAG_USE_LEG_REF(x) NUTAG_USE_DIALOG_REF(x)
639
640 #define NUTAG_AF(x) SOATAG_AF((x))
641 #define NUTAG_AF_REF(x) SOATAG_AF_REF((x))
642
643 enum nua_af {
644 nutag_af_any = SOA_AF_ANY,
645 nutag_af_ip4_only = SOA_AF_IP4_ONLY,
646 nutag_af_ip6_only = SOA_AF_IP6_ONLY,
647 nutag_af_ip4_ip6 = SOA_AF_IP4_IP6,
648 nutag_af_ip6_ip4 = SOA_AF_IP6_IP4
649 };
650
651 #define NUTAG_AF_ANY nutag_af_any
652 #define NUTAG_AF_IP4_ONLY nutag_af_ip4_only
653 #define NUTAG_AF_IP6_ONLY nutag_af_ip6_only
654 #define NUTAG_AF_IP4_IP6 nutag_af_ip4_ip6
655 #define NUTAG_AF_IP6_IP4 nutag_af_ip6_ip4
656
657 #define NUTAG_MEDIA_ADDRESS(x) SOATAG_ADDRESS((x))
658 #define NUTAG_MEDIA_ADDRESS_REF(x) SOATAG_ADDRESS_REF((x))
659
660 #define NUTAG_HOLD(x) SOATAG_HOLD((x) ? "*" : NULL)
661
662 #define NUTAG_ACTIVE_AUDIO(x) SOATAG_ACTIVE_AUDIO((x))
663 #define NUTAG_ACTIVE_AUDIO_REF(x) SOATAG_ACTIVE_AUDIO_REF((x))
664 #define NUTAG_ACTIVE_VIDEO(x) SOATAG_ACTIVE_VIDEO((x))
665 #define NUTAG_ACTIVE_VIDEO_REF(x) SOATAG_ACTIVE_VIDEO_REF((x))
666 #define NUTAG_ACTIVE_IMAGE(x) SOATAG_ACTIVE_IMAGE((x))
667 #define NUTAG_ACTIVE_IMAGE_REF(x) SOATAG_ACTIVE_IMAGE_REF((x))
668 #define NUTAG_ACTIVE_CHAT(x) SOATAG_ACTIVE_CHAT((x))
669 #define NUTAG_ACTIVE_CHAT_REF(x) SOATAG_ACTIVE_CHAT_REF((x))
670
671 enum {
672 nua_active_rejected = SOA_ACTIVE_REJECTED,
673 nua_active_disabled = SOA_ACTIVE_DISABLED,
674 nua_active_inactive = SOA_ACTIVE_INACTIVE,
675 nua_active_sendonly = SOA_ACTIVE_SENDONLY,
676 nua_active_recvonly = SOA_ACTIVE_RECVONLY,
677 nua_active_sendrecv = SOA_ACTIVE_SENDRECV
678 };
679
680 #define NUTAG_SRTP_ENABLE(x) SOATAG_SRTP_ENABLE((x))
681 #define NUTAG_SRTP_ENABLE_REF(x) SOATAG_SRTP_ENABLE_REF((x))
682 #define NUTAG_SRTP_CONFIDENTIALITY(x) SOATAG_SRTP_CONFIDENTIALITY((x))
683 #define NUTAG_SRTP_CONFIDENTIALITY_REF(x) SOATAG_SRTP_CONFIDENTIALITY_REF((x))
684 #define NUTAG_SRTP_INTEGRITY_PROTECTION(x) SOATAG_SRTP_INTEGRITY((x))
685 #define NUTAG_SRTP_INTEGRITY_PROTECTION_REF(x) SOATAG_SRTP_INTEGRITY_REF((x))
686
687 SOFIA_END_DECLS
688
689 #endif
690