msg
1.12.11
|
00001 /* 00002 * This file is part of the Sofia-SIP package 00003 * 00004 * Copyright (C) 2005 Nokia Corporation. 00005 * 00006 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 * 00023 */ 00024 00025 #ifndef MSG_MIME_PROTOS_H 00026 00027 #define MSG_MIME_PROTOS_H 00028 00039 #ifndef MSG_PARSER_H 00040 #include <sofia-sip/msg_parser.h> 00041 #endif 00042 #ifndef MSG_MIME_H 00043 #include <sofia-sip/msg_mime.h> 00044 #endif 00045 #ifndef MSG_MCLASS_H 00046 #include <sofia-sip/msg_mclass.h> 00047 #endif 00048 #ifndef MSG_MCLASS_H 00049 #include <sofia-sip/msg_mclass.h> 00050 #endif 00051 00052 SOFIA_BEGIN_DECLS 00053 00054 MSG_DLL extern msg_mclass_t const msg_multipart_mclass[1]; 00055 00056 #define msg_multipart_class ((msg_hclass_t *)msg_multipart_mclass) 00057 00058 00059 /* Declare internal prototypes for Content-Type header */ 00060 00065 enum { 00067 msg_content_type_hash = 51226 00068 }; 00069 00071 MSG_DLL msg_parse_f msg_content_type_d; 00072 00074 MSG_DLL msg_print_f msg_content_type_e; 00075 00076 MSG_DLL msg_xtra_f msg_content_type_dup_xtra; 00077 MSG_DLL msg_dup_f msg_content_type_dup_one; 00078 00087 #ifndef msg_content_type_class 00088 MSG_DLL extern msg_hclass_t msg_content_type_class[]; 00089 #endif 00090 00102 #define MSG_CONTENT_TYPE_INIT() MSG_HDR_INIT(content_type) 00103 00118 #if SU_HAVE_INLINE 00119 su_inline msg_content_type_t *msg_content_type_init(msg_content_type_t x[1]) 00120 { 00121 return MSG_HEADER_INIT(x, msg_content_type_class, sizeof(msg_content_type_t)); 00122 } 00123 #else 00124 #define msg_content_type_init(x) \ 00125 MSG_HEADER_INIT(x, msg_content_type_class, sizeof(msg_content_type_t)) 00126 #endif 00127 00140 #if SU_HAVE_INLINE 00141 su_inline int msg_is_content_type(msg_header_t const *header) 00142 { 00143 return header && header->sh_class->hc_hash == msg_content_type_hash; 00144 } 00145 #else 00146 int msg_is_content_type(msg_header_t const *header); 00147 #endif 00148 00149 #define msg_content_type_p(h) msg_is_content_type((h)) 00150 00178 #if SU_HAVE_INLINE 00179 su_inline 00180 #endif 00181 msg_content_type_t *msg_content_type_dup(su_home_t *home, 00182 msg_content_type_t const *header); 00183 00184 #if SU_HAVE_INLINE 00185 su_inline 00186 msg_content_type_t *msg_content_type_dup(su_home_t *home, 00187 msg_content_type_t const *header) 00188 { 00189 return (msg_content_type_t *) 00190 msg_header_dup_as(home, msg_content_type_class, (msg_header_t const *)header); 00191 } 00192 #endif 00193 00194 00223 #if SU_HAVE_INLINE 00224 su_inline 00225 #endif 00226 msg_content_type_t *msg_content_type_copy(su_home_t *home, 00227 msg_content_type_t const *header); 00228 00229 #if SU_HAVE_INLINE 00230 su_inline 00231 msg_content_type_t *msg_content_type_copy(su_home_t *home, 00232 msg_content_type_t const *header) 00233 { 00234 return (msg_content_type_t *) 00235 msg_header_copy_as(home, msg_content_type_class, (msg_header_t const *)header); 00236 } 00237 #endif 00238 00239 00256 #if SU_HAVE_INLINE 00257 su_inline msg_content_type_t *msg_content_type_make(su_home_t *home, char const *s) 00258 { 00259 return (msg_content_type_t*)msg_header_make(home, msg_content_type_class, s); 00260 } 00261 #else 00262 msg_content_type_t *msg_content_type_make(su_home_t *home, char const *s); 00263 #endif 00264 00265 00287 #if SU_HAVE_INLINE 00288 su_inline 00289 #endif 00290 msg_content_type_t *msg_content_type_format(su_home_t *home, char const *fmt, ...) 00291 __attribute__((__format__ (printf, 2, 3))); 00292 00293 #if SU_HAVE_INLINE 00294 su_inline msg_content_type_t *msg_content_type_format(su_home_t *home, char const *fmt, ...) 00295 { 00296 msg_header_t *h; 00297 va_list ap; 00298 00299 va_start(ap, fmt); 00300 h = msg_header_vformat(home, msg_content_type_class, fmt, ap); 00301 va_end(ap); 00302 00303 return (msg_content_type_t*)h; 00304 } 00305 #endif 00306 00309 /* Declare internal prototypes for Content-Disposition header */ 00310 00315 enum { 00317 msg_content_disposition_hash = 16333 00318 }; 00319 00321 MSG_DLL msg_parse_f msg_content_disposition_d; 00322 00324 MSG_DLL msg_print_f msg_content_disposition_e; 00325 00326 MSG_DLL msg_xtra_f msg_content_disposition_dup_xtra; 00327 MSG_DLL msg_dup_f msg_content_disposition_dup_one; 00328 00337 #ifndef msg_content_disposition_class 00338 MSG_DLL extern msg_hclass_t msg_content_disposition_class[]; 00339 #endif 00340 00352 #define MSG_CONTENT_DISPOSITION_INIT() MSG_HDR_INIT(content_disposition) 00353 00368 #if SU_HAVE_INLINE 00369 su_inline msg_content_disposition_t *msg_content_disposition_init(msg_content_disposition_t x[1]) 00370 { 00371 return MSG_HEADER_INIT(x, msg_content_disposition_class, sizeof(msg_content_disposition_t)); 00372 } 00373 #else 00374 #define msg_content_disposition_init(x) \ 00375 MSG_HEADER_INIT(x, msg_content_disposition_class, sizeof(msg_content_disposition_t)) 00376 #endif 00377 00390 #if SU_HAVE_INLINE 00391 su_inline int msg_is_content_disposition(msg_header_t const *header) 00392 { 00393 return header && header->sh_class->hc_hash == msg_content_disposition_hash; 00394 } 00395 #else 00396 int msg_is_content_disposition(msg_header_t const *header); 00397 #endif 00398 00399 #define msg_content_disposition_p(h) msg_is_content_disposition((h)) 00400 00428 #if SU_HAVE_INLINE 00429 su_inline 00430 #endif 00431 msg_content_disposition_t *msg_content_disposition_dup(su_home_t *home, 00432 msg_content_disposition_t const *header); 00433 00434 #if SU_HAVE_INLINE 00435 su_inline 00436 msg_content_disposition_t *msg_content_disposition_dup(su_home_t *home, 00437 msg_content_disposition_t const *header) 00438 { 00439 return (msg_content_disposition_t *) 00440 msg_header_dup_as(home, msg_content_disposition_class, (msg_header_t const *)header); 00441 } 00442 #endif 00443 00444 00473 #if SU_HAVE_INLINE 00474 su_inline 00475 #endif 00476 msg_content_disposition_t *msg_content_disposition_copy(su_home_t *home, 00477 msg_content_disposition_t const *header); 00478 00479 #if SU_HAVE_INLINE 00480 su_inline 00481 msg_content_disposition_t *msg_content_disposition_copy(su_home_t *home, 00482 msg_content_disposition_t const *header) 00483 { 00484 return (msg_content_disposition_t *) 00485 msg_header_copy_as(home, msg_content_disposition_class, (msg_header_t const *)header); 00486 } 00487 #endif 00488 00489 00506 #if SU_HAVE_INLINE 00507 su_inline msg_content_disposition_t *msg_content_disposition_make(su_home_t *home, char const *s) 00508 { 00509 return (msg_content_disposition_t*)msg_header_make(home, msg_content_disposition_class, s); 00510 } 00511 #else 00512 msg_content_disposition_t *msg_content_disposition_make(su_home_t *home, char const *s); 00513 #endif 00514 00515 00537 #if SU_HAVE_INLINE 00538 su_inline 00539 #endif 00540 msg_content_disposition_t *msg_content_disposition_format(su_home_t *home, char const *fmt, ...) 00541 __attribute__((__format__ (printf, 2, 3))); 00542 00543 #if SU_HAVE_INLINE 00544 su_inline msg_content_disposition_t *msg_content_disposition_format(su_home_t *home, char const *fmt, ...) 00545 { 00546 msg_header_t *h; 00547 va_list ap; 00548 00549 va_start(ap, fmt); 00550 h = msg_header_vformat(home, msg_content_disposition_class, fmt, ap); 00551 va_end(ap); 00552 00553 return (msg_content_disposition_t*)h; 00554 } 00555 #endif 00556 00559 /* Declare internal prototypes for Content-Location header */ 00560 00565 enum { 00567 msg_content_location_hash = 3453 00568 }; 00569 00571 MSG_DLL msg_parse_f msg_content_location_d; 00572 00574 MSG_DLL msg_print_f msg_content_location_e; 00575 00576 MSG_DLL msg_xtra_f msg_content_location_dup_xtra; 00577 MSG_DLL msg_dup_f msg_content_location_dup_one; 00578 00587 #ifndef msg_content_location_class 00588 MSG_DLL extern msg_hclass_t msg_content_location_class[]; 00589 #endif 00590 00602 #define MSG_CONTENT_LOCATION_INIT() MSG_HDR_INIT(content_location) 00603 00618 #if SU_HAVE_INLINE 00619 su_inline msg_content_location_t *msg_content_location_init(msg_content_location_t x[1]) 00620 { 00621 return MSG_HEADER_INIT(x, msg_content_location_class, sizeof(msg_content_location_t)); 00622 } 00623 #else 00624 #define msg_content_location_init(x) \ 00625 MSG_HEADER_INIT(x, msg_content_location_class, sizeof(msg_content_location_t)) 00626 #endif 00627 00640 #if SU_HAVE_INLINE 00641 su_inline int msg_is_content_location(msg_header_t const *header) 00642 { 00643 return header && header->sh_class->hc_hash == msg_content_location_hash; 00644 } 00645 #else 00646 int msg_is_content_location(msg_header_t const *header); 00647 #endif 00648 00649 #define msg_content_location_p(h) msg_is_content_location((h)) 00650 00678 #if SU_HAVE_INLINE 00679 su_inline 00680 #endif 00681 msg_content_location_t *msg_content_location_dup(su_home_t *home, 00682 msg_content_location_t const *header); 00683 00684 #if SU_HAVE_INLINE 00685 su_inline 00686 msg_content_location_t *msg_content_location_dup(su_home_t *home, 00687 msg_content_location_t const *header) 00688 { 00689 return (msg_content_location_t *) 00690 msg_header_dup_as(home, msg_content_location_class, (msg_header_t const *)header); 00691 } 00692 #endif 00693 00694 00723 #if SU_HAVE_INLINE 00724 su_inline 00725 #endif 00726 msg_content_location_t *msg_content_location_copy(su_home_t *home, 00727 msg_content_location_t const *header); 00728 00729 #if SU_HAVE_INLINE 00730 su_inline 00731 msg_content_location_t *msg_content_location_copy(su_home_t *home, 00732 msg_content_location_t const *header) 00733 { 00734 return (msg_content_location_t *) 00735 msg_header_copy_as(home, msg_content_location_class, (msg_header_t const *)header); 00736 } 00737 #endif 00738 00739 00756 #if SU_HAVE_INLINE 00757 su_inline msg_content_location_t *msg_content_location_make(su_home_t *home, char const *s) 00758 { 00759 return (msg_content_location_t*)msg_header_make(home, msg_content_location_class, s); 00760 } 00761 #else 00762 msg_content_location_t *msg_content_location_make(su_home_t *home, char const *s); 00763 #endif 00764 00765 00787 #if SU_HAVE_INLINE 00788 su_inline 00789 #endif 00790 msg_content_location_t *msg_content_location_format(su_home_t *home, char const *fmt, ...) 00791 __attribute__((__format__ (printf, 2, 3))); 00792 00793 #if SU_HAVE_INLINE 00794 su_inline msg_content_location_t *msg_content_location_format(su_home_t *home, char const *fmt, ...) 00795 { 00796 msg_header_t *h; 00797 va_list ap; 00798 00799 va_start(ap, fmt); 00800 h = msg_header_vformat(home, msg_content_location_class, fmt, ap); 00801 va_end(ap); 00802 00803 return (msg_content_location_t*)h; 00804 } 00805 #endif 00806 00809 /* Declare internal prototypes for Content-ID header */ 00810 00815 enum { 00817 msg_content_id_hash = 42909 00818 }; 00819 00821 MSG_DLL msg_parse_f msg_content_id_d; 00822 00824 MSG_DLL msg_print_f msg_content_id_e; 00825 00826 MSG_DLL msg_xtra_f msg_content_id_dup_xtra; 00827 MSG_DLL msg_dup_f msg_content_id_dup_one; 00828 00837 #ifndef msg_content_id_class 00838 MSG_DLL extern msg_hclass_t msg_content_id_class[]; 00839 #endif 00840 00852 #define MSG_CONTENT_ID_INIT() MSG_HDR_INIT(content_id) 00853 00868 #if SU_HAVE_INLINE 00869 su_inline msg_content_id_t *msg_content_id_init(msg_content_id_t x[1]) 00870 { 00871 return MSG_HEADER_INIT(x, msg_content_id_class, sizeof(msg_content_id_t)); 00872 } 00873 #else 00874 #define msg_content_id_init(x) \ 00875 MSG_HEADER_INIT(x, msg_content_id_class, sizeof(msg_content_id_t)) 00876 #endif 00877 00890 #if SU_HAVE_INLINE 00891 su_inline int msg_is_content_id(msg_header_t const *header) 00892 { 00893 return header && header->sh_class->hc_hash == msg_content_id_hash; 00894 } 00895 #else 00896 int msg_is_content_id(msg_header_t const *header); 00897 #endif 00898 00899 #define msg_content_id_p(h) msg_is_content_id((h)) 00900 00928 #if SU_HAVE_INLINE 00929 su_inline 00930 #endif 00931 msg_content_id_t *msg_content_id_dup(su_home_t *home, 00932 msg_content_id_t const *header); 00933 00934 #if SU_HAVE_INLINE 00935 su_inline 00936 msg_content_id_t *msg_content_id_dup(su_home_t *home, 00937 msg_content_id_t const *header) 00938 { 00939 return (msg_content_id_t *) 00940 msg_header_dup_as(home, msg_content_id_class, (msg_header_t const *)header); 00941 } 00942 #endif 00943 00944 00973 #if SU_HAVE_INLINE 00974 su_inline 00975 #endif 00976 msg_content_id_t *msg_content_id_copy(su_home_t *home, 00977 msg_content_id_t const *header); 00978 00979 #if SU_HAVE_INLINE 00980 su_inline 00981 msg_content_id_t *msg_content_id_copy(su_home_t *home, 00982 msg_content_id_t const *header) 00983 { 00984 return (msg_content_id_t *) 00985 msg_header_copy_as(home, msg_content_id_class, (msg_header_t const *)header); 00986 } 00987 #endif 00988 00989 01006 #if SU_HAVE_INLINE 01007 su_inline msg_content_id_t *msg_content_id_make(su_home_t *home, char const *s) 01008 { 01009 return (msg_content_id_t*)msg_header_make(home, msg_content_id_class, s); 01010 } 01011 #else 01012 msg_content_id_t *msg_content_id_make(su_home_t *home, char const *s); 01013 #endif 01014 01015 01037 #if SU_HAVE_INLINE 01038 su_inline 01039 #endif 01040 msg_content_id_t *msg_content_id_format(su_home_t *home, char const *fmt, ...) 01041 __attribute__((__format__ (printf, 2, 3))); 01042 01043 #if SU_HAVE_INLINE 01044 su_inline msg_content_id_t *msg_content_id_format(su_home_t *home, char const *fmt, ...) 01045 { 01046 msg_header_t *h; 01047 va_list ap; 01048 01049 va_start(ap, fmt); 01050 h = msg_header_vformat(home, msg_content_id_class, fmt, ap); 01051 va_end(ap); 01052 01053 return (msg_content_id_t*)h; 01054 } 01055 #endif 01056 01059 /* Declare internal prototypes for Content-Language header */ 01060 01065 enum { 01067 msg_content_language_hash = 62108 01068 }; 01069 01071 MSG_DLL msg_parse_f msg_content_language_d; 01072 01074 MSG_DLL msg_print_f msg_content_language_e; 01075 01076 MSG_DLL msg_xtra_f msg_content_language_dup_xtra; 01077 MSG_DLL msg_dup_f msg_content_language_dup_one; 01078 01087 #ifndef msg_content_language_class 01088 MSG_DLL extern msg_hclass_t msg_content_language_class[]; 01089 #endif 01090 01102 #define MSG_CONTENT_LANGUAGE_INIT() MSG_HDR_INIT(content_language) 01103 01118 #if SU_HAVE_INLINE 01119 su_inline msg_content_language_t *msg_content_language_init(msg_content_language_t x[1]) 01120 { 01121 return MSG_HEADER_INIT(x, msg_content_language_class, sizeof(msg_content_language_t)); 01122 } 01123 #else 01124 #define msg_content_language_init(x) \ 01125 MSG_HEADER_INIT(x, msg_content_language_class, sizeof(msg_content_language_t)) 01126 #endif 01127 01140 #if SU_HAVE_INLINE 01141 su_inline int msg_is_content_language(msg_header_t const *header) 01142 { 01143 return header && header->sh_class->hc_hash == msg_content_language_hash; 01144 } 01145 #else 01146 int msg_is_content_language(msg_header_t const *header); 01147 #endif 01148 01149 #define msg_content_language_p(h) msg_is_content_language((h)) 01150 01178 #if SU_HAVE_INLINE 01179 su_inline 01180 #endif 01181 msg_content_language_t *msg_content_language_dup(su_home_t *home, 01182 msg_content_language_t const *header); 01183 01184 #if SU_HAVE_INLINE 01185 su_inline 01186 msg_content_language_t *msg_content_language_dup(su_home_t *home, 01187 msg_content_language_t const *header) 01188 { 01189 return (msg_content_language_t *) 01190 msg_header_dup_as(home, msg_content_language_class, (msg_header_t const *)header); 01191 } 01192 #endif 01193 01194 01223 #if SU_HAVE_INLINE 01224 su_inline 01225 #endif 01226 msg_content_language_t *msg_content_language_copy(su_home_t *home, 01227 msg_content_language_t const *header); 01228 01229 #if SU_HAVE_INLINE 01230 su_inline 01231 msg_content_language_t *msg_content_language_copy(su_home_t *home, 01232 msg_content_language_t const *header) 01233 { 01234 return (msg_content_language_t *) 01235 msg_header_copy_as(home, msg_content_language_class, (msg_header_t const *)header); 01236 } 01237 #endif 01238 01239 01256 #if SU_HAVE_INLINE 01257 su_inline msg_content_language_t *msg_content_language_make(su_home_t *home, char const *s) 01258 { 01259 return (msg_content_language_t*)msg_header_make(home, msg_content_language_class, s); 01260 } 01261 #else 01262 msg_content_language_t *msg_content_language_make(su_home_t *home, char const *s); 01263 #endif 01264 01265 01287 #if SU_HAVE_INLINE 01288 su_inline 01289 #endif 01290 msg_content_language_t *msg_content_language_format(su_home_t *home, char const *fmt, ...) 01291 __attribute__((__format__ (printf, 2, 3))); 01292 01293 #if SU_HAVE_INLINE 01294 su_inline msg_content_language_t *msg_content_language_format(su_home_t *home, char const *fmt, ...) 01295 { 01296 msg_header_t *h; 01297 va_list ap; 01298 01299 va_start(ap, fmt); 01300 h = msg_header_vformat(home, msg_content_language_class, fmt, ap); 01301 va_end(ap); 01302 01303 return (msg_content_language_t*)h; 01304 } 01305 #endif 01306 01309 /* Declare internal prototypes for Content-Encoding header */ 01310 01315 enum { 01317 msg_content_encoding_hash = 8707 01318 }; 01319 01321 MSG_DLL msg_parse_f msg_content_encoding_d; 01322 01324 MSG_DLL msg_print_f msg_content_encoding_e; 01325 01326 MSG_DLL msg_xtra_f msg_content_encoding_dup_xtra; 01327 MSG_DLL msg_dup_f msg_content_encoding_dup_one; 01328 01337 #ifndef msg_content_encoding_class 01338 MSG_DLL extern msg_hclass_t msg_content_encoding_class[]; 01339 #endif 01340 01352 #define MSG_CONTENT_ENCODING_INIT() MSG_HDR_INIT(content_encoding) 01353 01368 #if SU_HAVE_INLINE 01369 su_inline msg_content_encoding_t *msg_content_encoding_init(msg_content_encoding_t x[1]) 01370 { 01371 return MSG_HEADER_INIT(x, msg_content_encoding_class, sizeof(msg_content_encoding_t)); 01372 } 01373 #else 01374 #define msg_content_encoding_init(x) \ 01375 MSG_HEADER_INIT(x, msg_content_encoding_class, sizeof(msg_content_encoding_t)) 01376 #endif 01377 01390 #if SU_HAVE_INLINE 01391 su_inline int msg_is_content_encoding(msg_header_t const *header) 01392 { 01393 return header && header->sh_class->hc_hash == msg_content_encoding_hash; 01394 } 01395 #else 01396 int msg_is_content_encoding(msg_header_t const *header); 01397 #endif 01398 01399 #define msg_content_encoding_p(h) msg_is_content_encoding((h)) 01400 01428 #if SU_HAVE_INLINE 01429 su_inline 01430 #endif 01431 msg_content_encoding_t *msg_content_encoding_dup(su_home_t *home, 01432 msg_content_encoding_t const *header); 01433 01434 #if SU_HAVE_INLINE 01435 su_inline 01436 msg_content_encoding_t *msg_content_encoding_dup(su_home_t *home, 01437 msg_content_encoding_t const *header) 01438 { 01439 return (msg_content_encoding_t *) 01440 msg_header_dup_as(home, msg_content_encoding_class, (msg_header_t const *)header); 01441 } 01442 #endif 01443 01444 01473 #if SU_HAVE_INLINE 01474 su_inline 01475 #endif 01476 msg_content_encoding_t *msg_content_encoding_copy(su_home_t *home, 01477 msg_content_encoding_t const *header); 01478 01479 #if SU_HAVE_INLINE 01480 su_inline 01481 msg_content_encoding_t *msg_content_encoding_copy(su_home_t *home, 01482 msg_content_encoding_t const *header) 01483 { 01484 return (msg_content_encoding_t *) 01485 msg_header_copy_as(home, msg_content_encoding_class, (msg_header_t const *)header); 01486 } 01487 #endif 01488 01489 01506 #if SU_HAVE_INLINE 01507 su_inline msg_content_encoding_t *msg_content_encoding_make(su_home_t *home, char const *s) 01508 { 01509 return (msg_content_encoding_t*)msg_header_make(home, msg_content_encoding_class, s); 01510 } 01511 #else 01512 msg_content_encoding_t *msg_content_encoding_make(su_home_t *home, char const *s); 01513 #endif 01514 01515 01537 #if SU_HAVE_INLINE 01538 su_inline 01539 #endif 01540 msg_content_encoding_t *msg_content_encoding_format(su_home_t *home, char const *fmt, ...) 01541 __attribute__((__format__ (printf, 2, 3))); 01542 01543 #if SU_HAVE_INLINE 01544 su_inline msg_content_encoding_t *msg_content_encoding_format(su_home_t *home, char const *fmt, ...) 01545 { 01546 msg_header_t *h; 01547 va_list ap; 01548 01549 va_start(ap, fmt); 01550 h = msg_header_vformat(home, msg_content_encoding_class, fmt, ap); 01551 va_end(ap); 01552 01553 return (msg_content_encoding_t*)h; 01554 } 01555 #endif 01556 01559 /* Declare internal prototypes for Content-Transfer-Encoding header */ 01560 01565 enum { 01567 msg_content_transfer_encoding_hash = 7853 01568 }; 01569 01571 MSG_DLL msg_parse_f msg_content_transfer_encoding_d; 01572 01574 MSG_DLL msg_print_f msg_content_transfer_encoding_e; 01575 01576 MSG_DLL msg_xtra_f msg_content_transfer_encoding_dup_xtra; 01577 MSG_DLL msg_dup_f msg_content_transfer_encoding_dup_one; 01578 01587 #ifndef msg_content_transfer_encoding_class 01588 MSG_DLL extern msg_hclass_t msg_content_transfer_encoding_class[]; 01589 #endif 01590 01602 #define MSG_CONTENT_TRANSFER_ENCODING_INIT() MSG_HDR_INIT(content_transfer_encoding) 01603 01618 #if SU_HAVE_INLINE 01619 su_inline msg_content_transfer_encoding_t *msg_content_transfer_encoding_init(msg_content_transfer_encoding_t x[1]) 01620 { 01621 return MSG_HEADER_INIT(x, msg_content_transfer_encoding_class, sizeof(msg_content_transfer_encoding_t)); 01622 } 01623 #else 01624 #define msg_content_transfer_encoding_init(x) \ 01625 MSG_HEADER_INIT(x, msg_content_transfer_encoding_class, sizeof(msg_content_transfer_encoding_t)) 01626 #endif 01627 01640 #if SU_HAVE_INLINE 01641 su_inline int msg_is_content_transfer_encoding(msg_header_t const *header) 01642 { 01643 return header && header->sh_class->hc_hash == msg_content_transfer_encoding_hash; 01644 } 01645 #else 01646 int msg_is_content_transfer_encoding(msg_header_t const *header); 01647 #endif 01648 01649 #define msg_content_transfer_encoding_p(h) msg_is_content_transfer_encoding((h)) 01650 01678 #if SU_HAVE_INLINE 01679 su_inline 01680 #endif 01681 msg_content_transfer_encoding_t *msg_content_transfer_encoding_dup(su_home_t *home, 01682 msg_content_transfer_encoding_t const *header); 01683 01684 #if SU_HAVE_INLINE 01685 su_inline 01686 msg_content_transfer_encoding_t *msg_content_transfer_encoding_dup(su_home_t *home, 01687 msg_content_transfer_encoding_t const *header) 01688 { 01689 return (msg_content_transfer_encoding_t *) 01690 msg_header_dup_as(home, msg_content_transfer_encoding_class, (msg_header_t const *)header); 01691 } 01692 #endif 01693 01694 01723 #if SU_HAVE_INLINE 01724 su_inline 01725 #endif 01726 msg_content_transfer_encoding_t *msg_content_transfer_encoding_copy(su_home_t *home, 01727 msg_content_transfer_encoding_t const *header); 01728 01729 #if SU_HAVE_INLINE 01730 su_inline 01731 msg_content_transfer_encoding_t *msg_content_transfer_encoding_copy(su_home_t *home, 01732 msg_content_transfer_encoding_t const *header) 01733 { 01734 return (msg_content_transfer_encoding_t *) 01735 msg_header_copy_as(home, msg_content_transfer_encoding_class, (msg_header_t const *)header); 01736 } 01737 #endif 01738 01739 01756 #if SU_HAVE_INLINE 01757 su_inline msg_content_transfer_encoding_t *msg_content_transfer_encoding_make(su_home_t *home, char const *s) 01758 { 01759 return (msg_content_transfer_encoding_t*)msg_header_make(home, msg_content_transfer_encoding_class, s); 01760 } 01761 #else 01762 msg_content_transfer_encoding_t *msg_content_transfer_encoding_make(su_home_t *home, char const *s); 01763 #endif 01764 01765 01787 #if SU_HAVE_INLINE 01788 su_inline 01789 #endif 01790 msg_content_transfer_encoding_t *msg_content_transfer_encoding_format(su_home_t *home, char const *fmt, ...) 01791 __attribute__((__format__ (printf, 2, 3))); 01792 01793 #if SU_HAVE_INLINE 01794 su_inline msg_content_transfer_encoding_t *msg_content_transfer_encoding_format(su_home_t *home, char const *fmt, ...) 01795 { 01796 msg_header_t *h; 01797 va_list ap; 01798 01799 va_start(ap, fmt); 01800 h = msg_header_vformat(home, msg_content_transfer_encoding_class, fmt, ap); 01801 va_end(ap); 01802 01803 return (msg_content_transfer_encoding_t*)h; 01804 } 01805 #endif 01806 01809 /* Declare internal prototypes for Accept header */ 01810 01815 enum { 01817 msg_accept_hash = 29344 01818 }; 01819 01821 MSG_DLL msg_parse_f msg_accept_d; 01822 01824 MSG_DLL msg_print_f msg_accept_e; 01825 01826 MSG_DLL msg_xtra_f msg_accept_dup_xtra; 01827 MSG_DLL msg_dup_f msg_accept_dup_one; 01828 01837 #ifndef msg_accept_class 01838 MSG_DLL extern msg_hclass_t msg_accept_class[]; 01839 #endif 01840 01852 #define MSG_ACCEPT_INIT() MSG_HDR_INIT(accept) 01853 01868 #if SU_HAVE_INLINE 01869 su_inline msg_accept_t *msg_accept_init(msg_accept_t x[1]) 01870 { 01871 return MSG_HEADER_INIT(x, msg_accept_class, sizeof(msg_accept_t)); 01872 } 01873 #else 01874 #define msg_accept_init(x) \ 01875 MSG_HEADER_INIT(x, msg_accept_class, sizeof(msg_accept_t)) 01876 #endif 01877 01890 #if SU_HAVE_INLINE 01891 su_inline int msg_is_accept(msg_header_t const *header) 01892 { 01893 return header && header->sh_class->hc_hash == msg_accept_hash; 01894 } 01895 #else 01896 int msg_is_accept(msg_header_t const *header); 01897 #endif 01898 01899 #define msg_accept_p(h) msg_is_accept((h)) 01900 01928 #if SU_HAVE_INLINE 01929 su_inline 01930 #endif 01931 msg_accept_t *msg_accept_dup(su_home_t *home, 01932 msg_accept_t const *header); 01933 01934 #if SU_HAVE_INLINE 01935 su_inline 01936 msg_accept_t *msg_accept_dup(su_home_t *home, 01937 msg_accept_t const *header) 01938 { 01939 return (msg_accept_t *) 01940 msg_header_dup_as(home, msg_accept_class, (msg_header_t const *)header); 01941 } 01942 #endif 01943 01944 01973 #if SU_HAVE_INLINE 01974 su_inline 01975 #endif 01976 msg_accept_t *msg_accept_copy(su_home_t *home, 01977 msg_accept_t const *header); 01978 01979 #if SU_HAVE_INLINE 01980 su_inline 01981 msg_accept_t *msg_accept_copy(su_home_t *home, 01982 msg_accept_t const *header) 01983 { 01984 return (msg_accept_t *) 01985 msg_header_copy_as(home, msg_accept_class, (msg_header_t const *)header); 01986 } 01987 #endif 01988 01989 02006 #if SU_HAVE_INLINE 02007 su_inline msg_accept_t *msg_accept_make(su_home_t *home, char const *s) 02008 { 02009 return (msg_accept_t*)msg_header_make(home, msg_accept_class, s); 02010 } 02011 #else 02012 msg_accept_t *msg_accept_make(su_home_t *home, char const *s); 02013 #endif 02014 02015 02037 #if SU_HAVE_INLINE 02038 su_inline 02039 #endif 02040 msg_accept_t *msg_accept_format(su_home_t *home, char const *fmt, ...) 02041 __attribute__((__format__ (printf, 2, 3))); 02042 02043 #if SU_HAVE_INLINE 02044 su_inline msg_accept_t *msg_accept_format(su_home_t *home, char const *fmt, ...) 02045 { 02046 msg_header_t *h; 02047 va_list ap; 02048 02049 va_start(ap, fmt); 02050 h = msg_header_vformat(home, msg_accept_class, fmt, ap); 02051 va_end(ap); 02052 02053 return (msg_accept_t*)h; 02054 } 02055 #endif 02056 02059 /* Declare internal prototypes for Accept-Charset header */ 02060 02065 enum { 02067 msg_accept_charset_hash = 41803 02068 }; 02069 02071 MSG_DLL msg_parse_f msg_accept_charset_d; 02072 02074 MSG_DLL msg_print_f msg_accept_charset_e; 02075 02076 MSG_DLL msg_xtra_f msg_accept_charset_dup_xtra; 02077 MSG_DLL msg_dup_f msg_accept_charset_dup_one; 02078 02087 #ifndef msg_accept_charset_class 02088 MSG_DLL extern msg_hclass_t msg_accept_charset_class[]; 02089 #endif 02090 02102 #define MSG_ACCEPT_CHARSET_INIT() MSG_HDR_INIT(accept_charset) 02103 02118 #if SU_HAVE_INLINE 02119 su_inline msg_accept_charset_t *msg_accept_charset_init(msg_accept_charset_t x[1]) 02120 { 02121 return MSG_HEADER_INIT(x, msg_accept_charset_class, sizeof(msg_accept_charset_t)); 02122 } 02123 #else 02124 #define msg_accept_charset_init(x) \ 02125 MSG_HEADER_INIT(x, msg_accept_charset_class, sizeof(msg_accept_charset_t)) 02126 #endif 02127 02140 #if SU_HAVE_INLINE 02141 su_inline int msg_is_accept_charset(msg_header_t const *header) 02142 { 02143 return header && header->sh_class->hc_hash == msg_accept_charset_hash; 02144 } 02145 #else 02146 int msg_is_accept_charset(msg_header_t const *header); 02147 #endif 02148 02149 #define msg_accept_charset_p(h) msg_is_accept_charset((h)) 02150 02178 #if SU_HAVE_INLINE 02179 su_inline 02180 #endif 02181 msg_accept_charset_t *msg_accept_charset_dup(su_home_t *home, 02182 msg_accept_charset_t const *header); 02183 02184 #if SU_HAVE_INLINE 02185 su_inline 02186 msg_accept_charset_t *msg_accept_charset_dup(su_home_t *home, 02187 msg_accept_charset_t const *header) 02188 { 02189 return (msg_accept_charset_t *) 02190 msg_header_dup_as(home, msg_accept_charset_class, (msg_header_t const *)header); 02191 } 02192 #endif 02193 02194 02223 #if SU_HAVE_INLINE 02224 su_inline 02225 #endif 02226 msg_accept_charset_t *msg_accept_charset_copy(su_home_t *home, 02227 msg_accept_charset_t const *header); 02228 02229 #if SU_HAVE_INLINE 02230 su_inline 02231 msg_accept_charset_t *msg_accept_charset_copy(su_home_t *home, 02232 msg_accept_charset_t const *header) 02233 { 02234 return (msg_accept_charset_t *) 02235 msg_header_copy_as(home, msg_accept_charset_class, (msg_header_t const *)header); 02236 } 02237 #endif 02238 02239 02256 #if SU_HAVE_INLINE 02257 su_inline msg_accept_charset_t *msg_accept_charset_make(su_home_t *home, char const *s) 02258 { 02259 return (msg_accept_charset_t*)msg_header_make(home, msg_accept_charset_class, s); 02260 } 02261 #else 02262 msg_accept_charset_t *msg_accept_charset_make(su_home_t *home, char const *s); 02263 #endif 02264 02265 02287 #if SU_HAVE_INLINE 02288 su_inline 02289 #endif 02290 msg_accept_charset_t *msg_accept_charset_format(su_home_t *home, char const *fmt, ...) 02291 __attribute__((__format__ (printf, 2, 3))); 02292 02293 #if SU_HAVE_INLINE 02294 su_inline msg_accept_charset_t *msg_accept_charset_format(su_home_t *home, char const *fmt, ...) 02295 { 02296 msg_header_t *h; 02297 va_list ap; 02298 02299 va_start(ap, fmt); 02300 h = msg_header_vformat(home, msg_accept_charset_class, fmt, ap); 02301 va_end(ap); 02302 02303 return (msg_accept_charset_t*)h; 02304 } 02305 #endif 02306 02309 /* Declare internal prototypes for Accept-Encoding header */ 02310 02315 enum { 02317 msg_accept_encoding_hash = 35932 02318 }; 02319 02321 MSG_DLL msg_parse_f msg_accept_encoding_d; 02322 02324 MSG_DLL msg_print_f msg_accept_encoding_e; 02325 02326 MSG_DLL msg_xtra_f msg_accept_encoding_dup_xtra; 02327 MSG_DLL msg_dup_f msg_accept_encoding_dup_one; 02328 02337 #ifndef msg_accept_encoding_class 02338 MSG_DLL extern msg_hclass_t msg_accept_encoding_class[]; 02339 #endif 02340 02352 #define MSG_ACCEPT_ENCODING_INIT() MSG_HDR_INIT(accept_encoding) 02353 02368 #if SU_HAVE_INLINE 02369 su_inline msg_accept_encoding_t *msg_accept_encoding_init(msg_accept_encoding_t x[1]) 02370 { 02371 return MSG_HEADER_INIT(x, msg_accept_encoding_class, sizeof(msg_accept_encoding_t)); 02372 } 02373 #else 02374 #define msg_accept_encoding_init(x) \ 02375 MSG_HEADER_INIT(x, msg_accept_encoding_class, sizeof(msg_accept_encoding_t)) 02376 #endif 02377 02390 #if SU_HAVE_INLINE 02391 su_inline int msg_is_accept_encoding(msg_header_t const *header) 02392 { 02393 return header && header->sh_class->hc_hash == msg_accept_encoding_hash; 02394 } 02395 #else 02396 int msg_is_accept_encoding(msg_header_t const *header); 02397 #endif 02398 02399 #define msg_accept_encoding_p(h) msg_is_accept_encoding((h)) 02400 02428 #if SU_HAVE_INLINE 02429 su_inline 02430 #endif 02431 msg_accept_encoding_t *msg_accept_encoding_dup(su_home_t *home, 02432 msg_accept_encoding_t const *header); 02433 02434 #if SU_HAVE_INLINE 02435 su_inline 02436 msg_accept_encoding_t *msg_accept_encoding_dup(su_home_t *home, 02437 msg_accept_encoding_t const *header) 02438 { 02439 return (msg_accept_encoding_t *) 02440 msg_header_dup_as(home, msg_accept_encoding_class, (msg_header_t const *)header); 02441 } 02442 #endif 02443 02444 02473 #if SU_HAVE_INLINE 02474 su_inline 02475 #endif 02476 msg_accept_encoding_t *msg_accept_encoding_copy(su_home_t *home, 02477 msg_accept_encoding_t const *header); 02478 02479 #if SU_HAVE_INLINE 02480 su_inline 02481 msg_accept_encoding_t *msg_accept_encoding_copy(su_home_t *home, 02482 msg_accept_encoding_t const *header) 02483 { 02484 return (msg_accept_encoding_t *) 02485 msg_header_copy_as(home, msg_accept_encoding_class, (msg_header_t const *)header); 02486 } 02487 #endif 02488 02489 02506 #if SU_HAVE_INLINE 02507 su_inline msg_accept_encoding_t *msg_accept_encoding_make(su_home_t *home, char const *s) 02508 { 02509 return (msg_accept_encoding_t*)msg_header_make(home, msg_accept_encoding_class, s); 02510 } 02511 #else 02512 msg_accept_encoding_t *msg_accept_encoding_make(su_home_t *home, char const *s); 02513 #endif 02514 02515 02537 #if SU_HAVE_INLINE 02538 su_inline 02539 #endif 02540 msg_accept_encoding_t *msg_accept_encoding_format(su_home_t *home, char const *fmt, ...) 02541 __attribute__((__format__ (printf, 2, 3))); 02542 02543 #if SU_HAVE_INLINE 02544 su_inline msg_accept_encoding_t *msg_accept_encoding_format(su_home_t *home, char const *fmt, ...) 02545 { 02546 msg_header_t *h; 02547 va_list ap; 02548 02549 va_start(ap, fmt); 02550 h = msg_header_vformat(home, msg_accept_encoding_class, fmt, ap); 02551 va_end(ap); 02552 02553 return (msg_accept_encoding_t*)h; 02554 } 02555 #endif 02556 02559 /* Declare internal prototypes for Accept-Language header */ 02560 02565 enum { 02567 msg_accept_language_hash = 23797 02568 }; 02569 02571 MSG_DLL msg_parse_f msg_accept_language_d; 02572 02574 MSG_DLL msg_print_f msg_accept_language_e; 02575 02576 MSG_DLL msg_xtra_f msg_accept_language_dup_xtra; 02577 MSG_DLL msg_dup_f msg_accept_language_dup_one; 02578 02587 #ifndef msg_accept_language_class 02588 MSG_DLL extern msg_hclass_t msg_accept_language_class[]; 02589 #endif 02590 02602 #define MSG_ACCEPT_LANGUAGE_INIT() MSG_HDR_INIT(accept_language) 02603 02618 #if SU_HAVE_INLINE 02619 su_inline msg_accept_language_t *msg_accept_language_init(msg_accept_language_t x[1]) 02620 { 02621 return MSG_HEADER_INIT(x, msg_accept_language_class, sizeof(msg_accept_language_t)); 02622 } 02623 #else 02624 #define msg_accept_language_init(x) \ 02625 MSG_HEADER_INIT(x, msg_accept_language_class, sizeof(msg_accept_language_t)) 02626 #endif 02627 02640 #if SU_HAVE_INLINE 02641 su_inline int msg_is_accept_language(msg_header_t const *header) 02642 { 02643 return header && header->sh_class->hc_hash == msg_accept_language_hash; 02644 } 02645 #else 02646 int msg_is_accept_language(msg_header_t const *header); 02647 #endif 02648 02649 #define msg_accept_language_p(h) msg_is_accept_language((h)) 02650 02678 #if SU_HAVE_INLINE 02679 su_inline 02680 #endif 02681 msg_accept_language_t *msg_accept_language_dup(su_home_t *home, 02682 msg_accept_language_t const *header); 02683 02684 #if SU_HAVE_INLINE 02685 su_inline 02686 msg_accept_language_t *msg_accept_language_dup(su_home_t *home, 02687 msg_accept_language_t const *header) 02688 { 02689 return (msg_accept_language_t *) 02690 msg_header_dup_as(home, msg_accept_language_class, (msg_header_t const *)header); 02691 } 02692 #endif 02693 02694 02723 #if SU_HAVE_INLINE 02724 su_inline 02725 #endif 02726 msg_accept_language_t *msg_accept_language_copy(su_home_t *home, 02727 msg_accept_language_t const *header); 02728 02729 #if SU_HAVE_INLINE 02730 su_inline 02731 msg_accept_language_t *msg_accept_language_copy(su_home_t *home, 02732 msg_accept_language_t const *header) 02733 { 02734 return (msg_accept_language_t *) 02735 msg_header_copy_as(home, msg_accept_language_class, (msg_header_t const *)header); 02736 } 02737 #endif 02738 02739 02756 #if SU_HAVE_INLINE 02757 su_inline msg_accept_language_t *msg_accept_language_make(su_home_t *home, char const *s) 02758 { 02759 return (msg_accept_language_t*)msg_header_make(home, msg_accept_language_class, s); 02760 } 02761 #else 02762 msg_accept_language_t *msg_accept_language_make(su_home_t *home, char const *s); 02763 #endif 02764 02765 02787 #if SU_HAVE_INLINE 02788 su_inline 02789 #endif 02790 msg_accept_language_t *msg_accept_language_format(su_home_t *home, char const *fmt, ...) 02791 __attribute__((__format__ (printf, 2, 3))); 02792 02793 #if SU_HAVE_INLINE 02794 su_inline msg_accept_language_t *msg_accept_language_format(su_home_t *home, char const *fmt, ...) 02795 { 02796 msg_header_t *h; 02797 va_list ap; 02798 02799 va_start(ap, fmt); 02800 h = msg_header_vformat(home, msg_accept_language_class, fmt, ap); 02801 va_end(ap); 02802 02803 return (msg_accept_language_t*)h; 02804 } 02805 #endif 02806 02809 /* Declare internal prototypes for MIME-Version header */ 02810 02815 enum { 02817 msg_mime_version_hash = 49047 02818 }; 02819 02821 MSG_DLL msg_parse_f msg_mime_version_d; 02822 02824 MSG_DLL msg_print_f msg_mime_version_e; 02825 02826 MSG_DLL msg_xtra_f msg_mime_version_dup_xtra; 02827 MSG_DLL msg_dup_f msg_mime_version_dup_one; 02828 02837 #ifndef msg_mime_version_class 02838 MSG_DLL extern msg_hclass_t msg_mime_version_class[]; 02839 #endif 02840 02852 #define MSG_MIME_VERSION_INIT() MSG_HDR_INIT(mime_version) 02853 02868 #if SU_HAVE_INLINE 02869 su_inline msg_mime_version_t *msg_mime_version_init(msg_mime_version_t x[1]) 02870 { 02871 return MSG_HEADER_INIT(x, msg_mime_version_class, sizeof(msg_mime_version_t)); 02872 } 02873 #else 02874 #define msg_mime_version_init(x) \ 02875 MSG_HEADER_INIT(x, msg_mime_version_class, sizeof(msg_mime_version_t)) 02876 #endif 02877 02890 #if SU_HAVE_INLINE 02891 su_inline int msg_is_mime_version(msg_header_t const *header) 02892 { 02893 return header && header->sh_class->hc_hash == msg_mime_version_hash; 02894 } 02895 #else 02896 int msg_is_mime_version(msg_header_t const *header); 02897 #endif 02898 02899 #define msg_mime_version_p(h) msg_is_mime_version((h)) 02900 02928 #if SU_HAVE_INLINE 02929 su_inline 02930 #endif 02931 msg_mime_version_t *msg_mime_version_dup(su_home_t *home, 02932 msg_mime_version_t const *header); 02933 02934 #if SU_HAVE_INLINE 02935 su_inline 02936 msg_mime_version_t *msg_mime_version_dup(su_home_t *home, 02937 msg_mime_version_t const *header) 02938 { 02939 return (msg_mime_version_t *) 02940 msg_header_dup_as(home, msg_mime_version_class, (msg_header_t const *)header); 02941 } 02942 #endif 02943 02944 02973 #if SU_HAVE_INLINE 02974 su_inline 02975 #endif 02976 msg_mime_version_t *msg_mime_version_copy(su_home_t *home, 02977 msg_mime_version_t const *header); 02978 02979 #if SU_HAVE_INLINE 02980 su_inline 02981 msg_mime_version_t *msg_mime_version_copy(su_home_t *home, 02982 msg_mime_version_t const *header) 02983 { 02984 return (msg_mime_version_t *) 02985 msg_header_copy_as(home, msg_mime_version_class, (msg_header_t const *)header); 02986 } 02987 #endif 02988 02989 03006 #if SU_HAVE_INLINE 03007 su_inline msg_mime_version_t *msg_mime_version_make(su_home_t *home, char const *s) 03008 { 03009 return (msg_mime_version_t*)msg_header_make(home, msg_mime_version_class, s); 03010 } 03011 #else 03012 msg_mime_version_t *msg_mime_version_make(su_home_t *home, char const *s); 03013 #endif 03014 03015 03037 #if SU_HAVE_INLINE 03038 su_inline 03039 #endif 03040 msg_mime_version_t *msg_mime_version_format(su_home_t *home, char const *fmt, ...) 03041 __attribute__((__format__ (printf, 2, 3))); 03042 03043 #if SU_HAVE_INLINE 03044 su_inline msg_mime_version_t *msg_mime_version_format(su_home_t *home, char const *fmt, ...) 03045 { 03046 msg_header_t *h; 03047 va_list ap; 03048 03049 va_start(ap, fmt); 03050 h = msg_header_vformat(home, msg_mime_version_class, fmt, ap); 03051 va_end(ap); 03052 03053 return (msg_mime_version_t*)h; 03054 } 03055 #endif 03056 03059 /* Declare internal prototypes for Content-MD5 header */ 03060 03065 enum { 03067 msg_content_md5_hash = 60494 03068 }; 03069 03071 MSG_DLL msg_parse_f msg_content_md5_d; 03072 03074 MSG_DLL msg_print_f msg_content_md5_e; 03075 03076 MSG_DLL msg_xtra_f msg_content_md5_dup_xtra; 03077 MSG_DLL msg_dup_f msg_content_md5_dup_one; 03078 03087 #ifndef msg_content_md5_class 03088 MSG_DLL extern msg_hclass_t msg_content_md5_class[]; 03089 #endif 03090 03102 #define MSG_CONTENT_MD5_INIT() MSG_HDR_INIT(content_md5) 03103 03118 #if SU_HAVE_INLINE 03119 su_inline msg_content_md5_t *msg_content_md5_init(msg_content_md5_t x[1]) 03120 { 03121 return MSG_HEADER_INIT(x, msg_content_md5_class, sizeof(msg_content_md5_t)); 03122 } 03123 #else 03124 #define msg_content_md5_init(x) \ 03125 MSG_HEADER_INIT(x, msg_content_md5_class, sizeof(msg_content_md5_t)) 03126 #endif 03127 03140 #if SU_HAVE_INLINE 03141 su_inline int msg_is_content_md5(msg_header_t const *header) 03142 { 03143 return header && header->sh_class->hc_hash == msg_content_md5_hash; 03144 } 03145 #else 03146 int msg_is_content_md5(msg_header_t const *header); 03147 #endif 03148 03149 #define msg_content_md5_p(h) msg_is_content_md5((h)) 03150 03178 #if SU_HAVE_INLINE 03179 su_inline 03180 #endif 03181 msg_content_md5_t *msg_content_md5_dup(su_home_t *home, 03182 msg_content_md5_t const *header); 03183 03184 #if SU_HAVE_INLINE 03185 su_inline 03186 msg_content_md5_t *msg_content_md5_dup(su_home_t *home, 03187 msg_content_md5_t const *header) 03188 { 03189 return (msg_content_md5_t *) 03190 msg_header_dup_as(home, msg_content_md5_class, (msg_header_t const *)header); 03191 } 03192 #endif 03193 03194 03223 #if SU_HAVE_INLINE 03224 su_inline 03225 #endif 03226 msg_content_md5_t *msg_content_md5_copy(su_home_t *home, 03227 msg_content_md5_t const *header); 03228 03229 #if SU_HAVE_INLINE 03230 su_inline 03231 msg_content_md5_t *msg_content_md5_copy(su_home_t *home, 03232 msg_content_md5_t const *header) 03233 { 03234 return (msg_content_md5_t *) 03235 msg_header_copy_as(home, msg_content_md5_class, (msg_header_t const *)header); 03236 } 03237 #endif 03238 03239 03256 #if SU_HAVE_INLINE 03257 su_inline msg_content_md5_t *msg_content_md5_make(su_home_t *home, char const *s) 03258 { 03259 return (msg_content_md5_t*)msg_header_make(home, msg_content_md5_class, s); 03260 } 03261 #else 03262 msg_content_md5_t *msg_content_md5_make(su_home_t *home, char const *s); 03263 #endif 03264 03265 03287 #if SU_HAVE_INLINE 03288 su_inline 03289 #endif 03290 msg_content_md5_t *msg_content_md5_format(su_home_t *home, char const *fmt, ...) 03291 __attribute__((__format__ (printf, 2, 3))); 03292 03293 #if SU_HAVE_INLINE 03294 su_inline msg_content_md5_t *msg_content_md5_format(su_home_t *home, char const *fmt, ...) 03295 { 03296 msg_header_t *h; 03297 va_list ap; 03298 03299 va_start(ap, fmt); 03300 h = msg_header_vformat(home, msg_content_md5_class, fmt, ap); 03301 va_end(ap); 03302 03303 return (msg_content_md5_t*)h; 03304 } 03305 #endif 03306 03309 /* Declare internal prototypes for Content-Length header */ 03310 03315 enum { 03317 msg_content_length_hash = 8402 03318 }; 03319 03321 MSG_DLL msg_parse_f msg_content_length_d; 03322 03324 MSG_DLL msg_print_f msg_content_length_e; 03325 03326 MSG_DLL msg_xtra_f msg_content_length_dup_xtra; 03327 MSG_DLL msg_dup_f msg_content_length_dup_one; 03328 03337 #ifndef msg_content_length_class 03338 MSG_DLL extern msg_hclass_t msg_content_length_class[]; 03339 #endif 03340 03352 #define MSG_CONTENT_LENGTH_INIT() MSG_HDR_INIT(content_length) 03353 03368 #if SU_HAVE_INLINE 03369 su_inline msg_content_length_t *msg_content_length_init(msg_content_length_t x[1]) 03370 { 03371 return MSG_HEADER_INIT(x, msg_content_length_class, sizeof(msg_content_length_t)); 03372 } 03373 #else 03374 #define msg_content_length_init(x) \ 03375 MSG_HEADER_INIT(x, msg_content_length_class, sizeof(msg_content_length_t)) 03376 #endif 03377 03390 #if SU_HAVE_INLINE 03391 su_inline int msg_is_content_length(msg_header_t const *header) 03392 { 03393 return header && header->sh_class->hc_hash == msg_content_length_hash; 03394 } 03395 #else 03396 int msg_is_content_length(msg_header_t const *header); 03397 #endif 03398 03399 #define msg_content_length_p(h) msg_is_content_length((h)) 03400 03428 #if SU_HAVE_INLINE 03429 su_inline 03430 #endif 03431 msg_content_length_t *msg_content_length_dup(su_home_t *home, 03432 msg_content_length_t const *header); 03433 03434 #if SU_HAVE_INLINE 03435 su_inline 03436 msg_content_length_t *msg_content_length_dup(su_home_t *home, 03437 msg_content_length_t const *header) 03438 { 03439 return (msg_content_length_t *) 03440 msg_header_dup_as(home, msg_content_length_class, (msg_header_t const *)header); 03441 } 03442 #endif 03443 03444 03473 #if SU_HAVE_INLINE 03474 su_inline 03475 #endif 03476 msg_content_length_t *msg_content_length_copy(su_home_t *home, 03477 msg_content_length_t const *header); 03478 03479 #if SU_HAVE_INLINE 03480 su_inline 03481 msg_content_length_t *msg_content_length_copy(su_home_t *home, 03482 msg_content_length_t const *header) 03483 { 03484 return (msg_content_length_t *) 03485 msg_header_copy_as(home, msg_content_length_class, (msg_header_t const *)header); 03486 } 03487 #endif 03488 03489 03506 #if SU_HAVE_INLINE 03507 su_inline msg_content_length_t *msg_content_length_make(su_home_t *home, char const *s) 03508 { 03509 return (msg_content_length_t*)msg_header_make(home, msg_content_length_class, s); 03510 } 03511 #else 03512 msg_content_length_t *msg_content_length_make(su_home_t *home, char const *s); 03513 #endif 03514 03515 03537 #if SU_HAVE_INLINE 03538 su_inline 03539 #endif 03540 msg_content_length_t *msg_content_length_format(su_home_t *home, char const *fmt, ...) 03541 __attribute__((__format__ (printf, 2, 3))); 03542 03543 #if SU_HAVE_INLINE 03544 su_inline msg_content_length_t *msg_content_length_format(su_home_t *home, char const *fmt, ...) 03545 { 03546 msg_header_t *h; 03547 va_list ap; 03548 03549 va_start(ap, fmt); 03550 h = msg_header_vformat(home, msg_content_length_class, fmt, ap); 03551 va_end(ap); 03552 03553 return (msg_content_length_t*)h; 03554 } 03555 #endif 03556 03559 /* Declare internal prototypes for Recursive multipart header */ 03560 03565 enum { 03567 msg_multipart_hash = 58884 03568 }; 03569 03571 MSG_DLL msg_parse_f msg_multipart_d; 03572 03574 MSG_DLL msg_print_f msg_multipart_e; 03575 03576 MSG_DLL msg_xtra_f msg_multipart_dup_xtra; 03577 MSG_DLL msg_dup_f msg_multipart_dup_one; 03578 03587 #ifndef msg_multipart_class 03588 MSG_DLL extern msg_hclass_t msg_multipart_class[]; 03589 #endif 03590 03602 #define MSG_MULTIPART_INIT() MSG_HDR_INIT(multipart) 03603 03618 #if SU_HAVE_INLINE 03619 su_inline msg_multipart_t *msg_multipart_init(msg_multipart_t x[1]) 03620 { 03621 return MSG_HEADER_INIT(x, msg_multipart_class, sizeof(msg_multipart_t)); 03622 } 03623 #else 03624 #define msg_multipart_init(x) \ 03625 MSG_HEADER_INIT(x, msg_multipart_class, sizeof(msg_multipart_t)) 03626 #endif 03627 03640 #if SU_HAVE_INLINE 03641 su_inline int msg_is_multipart(msg_header_t const *header) 03642 { 03643 return header && header->sh_class->hc_hash == msg_multipart_hash; 03644 } 03645 #else 03646 int msg_is_multipart(msg_header_t const *header); 03647 #endif 03648 03649 #define msg_multipart_p(h) msg_is_multipart((h)) 03650 03678 #if SU_HAVE_INLINE 03679 su_inline 03680 #endif 03681 msg_multipart_t *msg_multipart_dup(su_home_t *home, 03682 msg_multipart_t const *header); 03683 03684 #if SU_HAVE_INLINE 03685 su_inline 03686 msg_multipart_t *msg_multipart_dup(su_home_t *home, 03687 msg_multipart_t const *header) 03688 { 03689 return (msg_multipart_t *) 03690 msg_header_dup_as(home, msg_multipart_class, (msg_header_t const *)header); 03691 } 03692 #endif 03693 03694 03723 #if SU_HAVE_INLINE 03724 su_inline 03725 #endif 03726 msg_multipart_t *msg_multipart_copy(su_home_t *home, 03727 msg_multipart_t const *header); 03728 03729 #if SU_HAVE_INLINE 03730 su_inline 03731 msg_multipart_t *msg_multipart_copy(su_home_t *home, 03732 msg_multipart_t const *header) 03733 { 03734 return (msg_multipart_t *) 03735 msg_header_copy_as(home, msg_multipart_class, (msg_header_t const *)header); 03736 } 03737 #endif 03738 03739 03756 #if SU_HAVE_INLINE 03757 su_inline msg_multipart_t *msg_multipart_make(su_home_t *home, char const *s) 03758 { 03759 return (msg_multipart_t*)msg_header_make(home, msg_multipart_class, s); 03760 } 03761 #else 03762 msg_multipart_t *msg_multipart_make(su_home_t *home, char const *s); 03763 #endif 03764 03765 03787 #if SU_HAVE_INLINE 03788 su_inline 03789 #endif 03790 msg_multipart_t *msg_multipart_format(su_home_t *home, char const *fmt, ...) 03791 __attribute__((__format__ (printf, 2, 3))); 03792 03793 #if SU_HAVE_INLINE 03794 su_inline msg_multipart_t *msg_multipart_format(su_home_t *home, char const *fmt, ...) 03795 { 03796 msg_header_t *h; 03797 va_list ap; 03798 03799 va_start(ap, fmt); 03800 h = msg_header_vformat(home, msg_multipart_class, fmt, ap); 03801 va_end(ap); 03802 03803 return (msg_multipart_t*)h; 03804 } 03805 #endif 03806 03809 /* Declare internal prototypes for Warning header */ 03810 03815 enum { 03817 msg_warning_hash = 4130 03818 }; 03819 03821 MSG_DLL msg_parse_f msg_warning_d; 03822 03824 MSG_DLL msg_print_f msg_warning_e; 03825 03826 MSG_DLL msg_xtra_f msg_warning_dup_xtra; 03827 MSG_DLL msg_dup_f msg_warning_dup_one; 03828 03837 #ifndef msg_warning_class 03838 MSG_DLL extern msg_hclass_t msg_warning_class[]; 03839 #endif 03840 03852 #define MSG_WARNING_INIT() MSG_HDR_INIT(warning) 03853 03868 #if SU_HAVE_INLINE 03869 su_inline msg_warning_t *msg_warning_init(msg_warning_t x[1]) 03870 { 03871 return MSG_HEADER_INIT(x, msg_warning_class, sizeof(msg_warning_t)); 03872 } 03873 #else 03874 #define msg_warning_init(x) \ 03875 MSG_HEADER_INIT(x, msg_warning_class, sizeof(msg_warning_t)) 03876 #endif 03877 03890 #if SU_HAVE_INLINE 03891 su_inline int msg_is_warning(msg_header_t const *header) 03892 { 03893 return header && header->sh_class->hc_hash == msg_warning_hash; 03894 } 03895 #else 03896 int msg_is_warning(msg_header_t const *header); 03897 #endif 03898 03899 #define msg_warning_p(h) msg_is_warning((h)) 03900 03928 #if SU_HAVE_INLINE 03929 su_inline 03930 #endif 03931 msg_warning_t *msg_warning_dup(su_home_t *home, 03932 msg_warning_t const *header); 03933 03934 #if SU_HAVE_INLINE 03935 su_inline 03936 msg_warning_t *msg_warning_dup(su_home_t *home, 03937 msg_warning_t const *header) 03938 { 03939 return (msg_warning_t *) 03940 msg_header_dup_as(home, msg_warning_class, (msg_header_t const *)header); 03941 } 03942 #endif 03943 03944 03973 #if SU_HAVE_INLINE 03974 su_inline 03975 #endif 03976 msg_warning_t *msg_warning_copy(su_home_t *home, 03977 msg_warning_t const *header); 03978 03979 #if SU_HAVE_INLINE 03980 su_inline 03981 msg_warning_t *msg_warning_copy(su_home_t *home, 03982 msg_warning_t const *header) 03983 { 03984 return (msg_warning_t *) 03985 msg_header_copy_as(home, msg_warning_class, (msg_header_t const *)header); 03986 } 03987 #endif 03988 03989 04006 #if SU_HAVE_INLINE 04007 su_inline msg_warning_t *msg_warning_make(su_home_t *home, char const *s) 04008 { 04009 return (msg_warning_t*)msg_header_make(home, msg_warning_class, s); 04010 } 04011 #else 04012 msg_warning_t *msg_warning_make(su_home_t *home, char const *s); 04013 #endif 04014 04015 04037 #if SU_HAVE_INLINE 04038 su_inline 04039 #endif 04040 msg_warning_t *msg_warning_format(su_home_t *home, char const *fmt, ...) 04041 __attribute__((__format__ (printf, 2, 3))); 04042 04043 #if SU_HAVE_INLINE 04044 su_inline msg_warning_t *msg_warning_format(su_home_t *home, char const *fmt, ...) 04045 { 04046 msg_header_t *h; 04047 va_list ap; 04048 04049 va_start(ap, fmt); 04050 h = msg_header_vformat(home, msg_warning_class, fmt, ap); 04051 va_end(ap); 04052 04053 return (msg_warning_t*)h; 04054 } 04055 #endif 04056 04060 /* Internal prototypes */ 04061 MSG_DLL msg_update_f msg_accept_update; 04062 MSG_DLL msg_update_f msg_accept_any_update; 04063 MSG_DLL msg_update_f msg_content_disposition_update; 04064 04065 SOFIA_END_DECLS 04066 04067 #endif