00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SIP_EXTRA_H
00027
00028 #define SIP_EXTRA_H
00029
00039 #ifndef SIP_H
00040 #include <sofia-sip/sip.h>
00041 #endif
00042
00043 #ifndef SIP_HEADER_H
00044 #include <sofia-sip/sip_header.h>
00045 #endif
00046
00047 SOFIA_BEGIN_DECLS
00048
00049 typedef struct sip_refer_sub_s sip_refer_sub_t;
00050
00054 struct sip_refer_sub_s
00055 {
00056 sip_common_t rs_common[1];
00057 sip_error_t *rs_next;
00058 char const *rs_value;
00059 msg_param_t const *rs_params;
00060 };
00061
00062 typedef struct sip_suppress_body_if_match_s sip_suppress_body_if_match_t;
00063
00067 struct sip_suppress_body_if_match_s
00068 {
00069 sip_common_t sbim_common[1];
00070 sip_error_t *sbim_next;
00071 char const *sbim_tag;
00072 };
00073
00074 typedef struct sip_suppress_notify_if_match_s sip_suppress_notify_if_match_t;
00075
00079 struct sip_suppress_notify_if_match_s
00080 {
00081 sip_common_t snim_common[1];
00082 sip_error_t *snim_next;
00083 char const *snim_tag;
00084 };
00085
00086
00087
00088 enum {
00095 sip_refer_sub_hash = 14607
00096 };
00097
00109 SIP_DLL extern msg_hclass_t sip_refer_sub_class[];
00110
00111
00117 SOFIAPUBFUN issize_t sip_refer_sub_d(su_home_t *, msg_header_t *,
00118 char *s, isize_t slen);
00119
00121 SOFIAPUBFUN issize_t sip_refer_sub_e(char b[], isize_t bsiz,
00122 msg_header_t const *h, int flags);
00123
00129 #define sip_refer_sub(sip) \
00130 ((sip_refer_sub_t *)msg_header_access((msg_pub_t*)(sip), sip_refer_sub_class))
00131
00147 #define SIP_REFER_SUB_INIT() SIP_HDR_INIT(refer_sub)
00148
00165 #if SU_HAVE_INLINE
00166 su_inline sip_refer_sub_t *sip_refer_sub_init(sip_refer_sub_t x[1])
00167 {
00168 return SIP_HEADER_INIT(x, sip_refer_sub_class, sizeof(sip_refer_sub_t));
00169 }
00170 #else
00171 #define sip_refer_sub_init(x) \
00172 SIP_HEADER_INIT(x, sip_refer_sub_class, sizeof(sip_refer_sub_t))
00173 #endif
00174
00188 #if SU_HAVE_INLINE
00189 su_inline int sip_is_refer_sub(sip_header_t const *header)
00190 {
00191 return header && header->sh_class->hc_hash == sip_refer_sub_hash;
00192 }
00193 #else
00194 int sip_is_refer_sub(sip_header_t const *header);
00195 #endif
00196
00197 #define sip_refer_sub_p(h) sip_is_refer_sub((h))
00198
00199
00229 #if SU_HAVE_INLINE
00230 su_inline
00231 #endif
00232 sip_refer_sub_t *sip_refer_sub_dup(su_home_t *home, sip_refer_sub_t const *hdr)
00233 __attribute__((__malloc__));
00234
00235 #if SU_HAVE_INLINE
00236 su_inline
00237 sip_refer_sub_t *sip_refer_sub_dup(su_home_t *home, sip_refer_sub_t const *hdr)
00238 {
00239 return (sip_refer_sub_t *)
00240 msg_header_dup_as(home, sip_refer_sub_class, (msg_header_t const *)hdr);
00241 }
00242 #endif
00243
00273 #if SU_HAVE_INLINE
00274 su_inline
00275 #endif
00276 sip_refer_sub_t *sip_refer_sub_copy(su_home_t *home, sip_refer_sub_t const *hdr)
00277 __attribute__((__malloc__));
00278
00279 #if SU_HAVE_INLINE
00280 su_inline
00281 sip_refer_sub_t *sip_refer_sub_copy(su_home_t *home, sip_refer_sub_t const *hdr)
00282 {
00283 return (sip_refer_sub_t *)
00284 msg_header_copy_as(home, sip_refer_sub_class, (msg_header_t const *)hdr);
00285 }
00286 #endif
00287
00304 #if SU_HAVE_INLINE
00305 su_inline
00306 #endif
00307 sip_refer_sub_t *sip_refer_sub_make(su_home_t *home, char const *s)
00308 __attribute__((__malloc__));
00309
00310 #if SU_HAVE_INLINE
00311 su_inline sip_refer_sub_t *sip_refer_sub_make(su_home_t *home, char const *s)
00312 {
00313 return (sip_refer_sub_t *)sip_header_make(home, sip_refer_sub_class, s);
00314 }
00315 #endif
00316
00336 #if SU_HAVE_INLINE
00337 su_inline
00338 #endif
00339 sip_refer_sub_t *sip_refer_sub_format(su_home_t *home, char const *fmt, ...)
00340 __attribute__((__malloc__, __format__ (printf, 2, 3)));
00341
00342 #if SU_HAVE_INLINE
00343 su_inline sip_refer_sub_t *sip_refer_sub_format(su_home_t *home, char const *fmt, ...)
00344 {
00345 sip_header_t *h;
00346 va_list ap;
00347
00348 va_start(ap, fmt);
00349 h = sip_header_vformat(home, sip_refer_sub_class, fmt, ap);
00350 va_end(ap);
00351
00352 return (sip_refer_sub_t *)h;
00353 }
00354 #endif
00355
00358 #if SU_HAVE_EXPERIMENTAL
00359
00360 enum {
00367 sip_suppress_body_if_match_hash = 49874
00368 };
00369
00381 SIP_DLL extern msg_hclass_t sip_suppress_body_if_match_class[];
00382
00383
00389 SOFIAPUBFUN issize_t sip_suppress_body_if_match_d(su_home_t *, msg_header_t *,
00390 char *s, isize_t slen);
00391
00393 SOFIAPUBFUN issize_t sip_suppress_body_if_match_e(char b[], isize_t bsiz,
00394 msg_header_t const *h, int flags);
00395
00401 #define sip_suppress_body_if_match(sip) \
00402 ((sip_suppress_body_if_match_t *)msg_header_access((msg_pub_t*)(sip), sip_suppress_body_if_match_class))
00403
00419 #define SIP_SUPPRESS_BODY_IF_MATCH_INIT() SIP_HDR_INIT(suppress_body_if_match)
00420
00437 #if SU_HAVE_INLINE
00438 su_inline sip_suppress_body_if_match_t *sip_suppress_body_if_match_init(sip_suppress_body_if_match_t x[1])
00439 {
00440 return SIP_HEADER_INIT(x, sip_suppress_body_if_match_class, sizeof(sip_suppress_body_if_match_t));
00441 }
00442 #else
00443 #define sip_suppress_body_if_match_init(x) \
00444 SIP_HEADER_INIT(x, sip_suppress_body_if_match_class, sizeof(sip_suppress_body_if_match_t))
00445 #endif
00446
00460 #if SU_HAVE_INLINE
00461 su_inline int sip_is_suppress_body_if_match(sip_header_t const *header)
00462 {
00463 return header && header->sh_class->hc_hash == sip_suppress_body_if_match_hash;
00464 }
00465 #else
00466 int sip_is_suppress_body_if_match(sip_header_t const *header);
00467 #endif
00468
00469 #define sip_suppress_body_if_match_p(h) sip_is_suppress_body_if_match((h))
00470
00471
00501 #if SU_HAVE_INLINE
00502 su_inline
00503 #endif
00504 sip_suppress_body_if_match_t *sip_suppress_body_if_match_dup(su_home_t *home, sip_suppress_body_if_match_t const *hdr)
00505 __attribute__((__malloc__));
00506
00507 #if SU_HAVE_INLINE
00508 su_inline
00509 sip_suppress_body_if_match_t *sip_suppress_body_if_match_dup(su_home_t *home, sip_suppress_body_if_match_t const *hdr)
00510 {
00511 return (sip_suppress_body_if_match_t *)
00512 msg_header_dup_as(home, sip_suppress_body_if_match_class, (msg_header_t const *)hdr);
00513 }
00514 #endif
00515
00545 #if SU_HAVE_INLINE
00546 su_inline
00547 #endif
00548 sip_suppress_body_if_match_t *sip_suppress_body_if_match_copy(su_home_t *home, sip_suppress_body_if_match_t const *hdr)
00549 __attribute__((__malloc__));
00550
00551 #if SU_HAVE_INLINE
00552 su_inline
00553 sip_suppress_body_if_match_t *sip_suppress_body_if_match_copy(su_home_t *home, sip_suppress_body_if_match_t const *hdr)
00554 {
00555 return (sip_suppress_body_if_match_t *)
00556 msg_header_copy_as(home, sip_suppress_body_if_match_class, (msg_header_t const *)hdr);
00557 }
00558 #endif
00559
00576 #if SU_HAVE_INLINE
00577 su_inline
00578 #endif
00579 sip_suppress_body_if_match_t *sip_suppress_body_if_match_make(su_home_t *home, char const *s)
00580 __attribute__((__malloc__));
00581
00582 #if SU_HAVE_INLINE
00583 su_inline sip_suppress_body_if_match_t *sip_suppress_body_if_match_make(su_home_t *home, char const *s)
00584 {
00585 return (sip_suppress_body_if_match_t *)sip_header_make(home, sip_suppress_body_if_match_class, s);
00586 }
00587 #endif
00588
00608 #if SU_HAVE_INLINE
00609 su_inline
00610 #endif
00611 sip_suppress_body_if_match_t *sip_suppress_body_if_match_format(su_home_t *home, char const *fmt, ...)
00612 __attribute__((__malloc__, __format__ (printf, 2, 3)));
00613
00614 #if SU_HAVE_INLINE
00615 su_inline sip_suppress_body_if_match_t *sip_suppress_body_if_match_format(su_home_t *home, char const *fmt, ...)
00616 {
00617 sip_header_t *h;
00618 va_list ap;
00619
00620 va_start(ap, fmt);
00621 h = sip_header_vformat(home, sip_suppress_body_if_match_class, fmt, ap);
00622 va_end(ap);
00623
00624 return (sip_suppress_body_if_match_t *)h;
00625 }
00626 #endif
00627
00630 #endif
00631 #if SU_HAVE_EXPERIMENTAL
00632
00633 enum {
00640 sip_suppress_notify_if_match_hash = 51341
00641 };
00642
00654 SIP_DLL extern msg_hclass_t sip_suppress_notify_if_match_class[];
00655
00656
00662 SOFIAPUBFUN issize_t sip_suppress_notify_if_match_d(su_home_t *, msg_header_t *,
00663 char *s, isize_t slen);
00664
00666 SOFIAPUBFUN issize_t sip_suppress_notify_if_match_e(char b[], isize_t bsiz,
00667 msg_header_t const *h, int flags);
00668
00674 #define sip_suppress_notify_if_match(sip) \
00675 ((sip_suppress_notify_if_match_t *)msg_header_access((msg_pub_t*)(sip), sip_suppress_notify_if_match_class))
00676
00692 #define SIP_SUPPRESS_NOTIFY_IF_MATCH_INIT() SIP_HDR_INIT(suppress_notify_if_match)
00693
00710 #if SU_HAVE_INLINE
00711 su_inline sip_suppress_notify_if_match_t *sip_suppress_notify_if_match_init(sip_suppress_notify_if_match_t x[1])
00712 {
00713 return SIP_HEADER_INIT(x, sip_suppress_notify_if_match_class, sizeof(sip_suppress_notify_if_match_t));
00714 }
00715 #else
00716 #define sip_suppress_notify_if_match_init(x) \
00717 SIP_HEADER_INIT(x, sip_suppress_notify_if_match_class, sizeof(sip_suppress_notify_if_match_t))
00718 #endif
00719
00733 #if SU_HAVE_INLINE
00734 su_inline int sip_is_suppress_notify_if_match(sip_header_t const *header)
00735 {
00736 return header && header->sh_class->hc_hash == sip_suppress_notify_if_match_hash;
00737 }
00738 #else
00739 int sip_is_suppress_notify_if_match(sip_header_t const *header);
00740 #endif
00741
00742 #define sip_suppress_notify_if_match_p(h) sip_is_suppress_notify_if_match((h))
00743
00744
00774 #if SU_HAVE_INLINE
00775 su_inline
00776 #endif
00777 sip_suppress_notify_if_match_t *sip_suppress_notify_if_match_dup(su_home_t *home, sip_suppress_notify_if_match_t const *hdr)
00778 __attribute__((__malloc__));
00779
00780 #if SU_HAVE_INLINE
00781 su_inline
00782 sip_suppress_notify_if_match_t *sip_suppress_notify_if_match_dup(su_home_t *home, sip_suppress_notify_if_match_t const *hdr)
00783 {
00784 return (sip_suppress_notify_if_match_t *)
00785 msg_header_dup_as(home, sip_suppress_notify_if_match_class, (msg_header_t const *)hdr);
00786 }
00787 #endif
00788
00818 #if SU_HAVE_INLINE
00819 su_inline
00820 #endif
00821 sip_suppress_notify_if_match_t *sip_suppress_notify_if_match_copy(su_home_t *home, sip_suppress_notify_if_match_t const *hdr)
00822 __attribute__((__malloc__));
00823
00824 #if SU_HAVE_INLINE
00825 su_inline
00826 sip_suppress_notify_if_match_t *sip_suppress_notify_if_match_copy(su_home_t *home, sip_suppress_notify_if_match_t const *hdr)
00827 {
00828 return (sip_suppress_notify_if_match_t *)
00829 msg_header_copy_as(home, sip_suppress_notify_if_match_class, (msg_header_t const *)hdr);
00830 }
00831 #endif
00832
00849 #if SU_HAVE_INLINE
00850 su_inline
00851 #endif
00852 sip_suppress_notify_if_match_t *sip_suppress_notify_if_match_make(su_home_t *home, char const *s)
00853 __attribute__((__malloc__));
00854
00855 #if SU_HAVE_INLINE
00856 su_inline sip_suppress_notify_if_match_t *sip_suppress_notify_if_match_make(su_home_t *home, char const *s)
00857 {
00858 return (sip_suppress_notify_if_match_t *)sip_header_make(home, sip_suppress_notify_if_match_class, s);
00859 }
00860 #endif
00861
00881 #if SU_HAVE_INLINE
00882 su_inline
00883 #endif
00884 sip_suppress_notify_if_match_t *sip_suppress_notify_if_match_format(su_home_t *home, char const *fmt, ...)
00885 __attribute__((__malloc__, __format__ (printf, 2, 3)));
00886
00887 #if SU_HAVE_INLINE
00888 su_inline sip_suppress_notify_if_match_t *sip_suppress_notify_if_match_format(su_home_t *home, char const *fmt, ...)
00889 {
00890 sip_header_t *h;
00891 va_list ap;
00892
00893 va_start(ap, fmt);
00894 h = sip_header_vformat(home, sip_suppress_notify_if_match_class, fmt, ap);
00895 va_end(ap);
00896
00897 return (sip_suppress_notify_if_match_t *)h;
00898 }
00899 #endif
00900
00903 #endif
00904
00905 SOFIA_END_DECLS
00906
00907 #endif