Go to the documentation of this file.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 #ifndef MSG_MCLASS_H
00026
00027 #define MSG_MCLASS_H
00028
00038 #ifndef MSG_HEADER_H
00039 #include <sofia-sip/msg_header.h>
00040 #endif
00041
00042 SOFIA_BEGIN_DECLS
00043
00044 enum {
00046 MC_HASH_SIZE = 127,
00048 MC_SHORT_SIZE = 'Z' - 'A' + 1
00049 };
00050
00062 struct msg_href_s
00063 {
00064 msg_hclass_t *hr_class;
00065 unsigned short hr_offset;
00066 unsigned short hr_flags;
00067 };
00068
00096 struct msg_mclass_s
00097 {
00098 struct msg_hclass_s
00099 mc_hclass[1];
00100 char const *mc_name;
00101 void *mc_tag;
00102 unsigned mc_flags;
00103 unsigned mc_msize;
00105 issize_t (*mc_extract_body)(msg_t *msg, msg_pub_t *pub,
00106 char b[], isize_t bsiz, int eos);
00107
00108 msg_href_t mc_request[1];
00109 msg_href_t mc_status[1];
00110 msg_href_t mc_separator[1];
00111 msg_href_t mc_payload[1];
00112 msg_href_t mc_unknown[1];
00113 msg_href_t mc_error[1];
00114 msg_href_t mc_multipart[1];
00115 msg_href_t const *
00116 mc_short;
00117 short mc_hash_size;
00118 short mc_hash_used;
00120 msg_href_t mc_hash[MC_HASH_SIZE];
00121 };
00122
00123 enum { msg_mclass_copy = 0, msg_mclass_empty = 1 };
00124
00125 SOFIAPUBFUN msg_mclass_t *msg_mclass_clone(msg_mclass_t const *old,
00126 int newsize, int empty);
00127
00128 SOFIAPUBFUN int msg_mclass_insert(msg_mclass_t *mc, msg_href_t const *hr);
00129
00130 SOFIAPUBFUN
00131 int msg_mclass_insert_header(msg_mclass_t *mc,
00132 msg_hclass_t *hc,
00133 unsigned short offset);
00134
00135 SOFIAPUBFUN
00136 int msg_mclass_insert_with_mask(msg_mclass_t *mc,
00137 msg_hclass_t *hc,
00138 unsigned short offset,
00139 unsigned short mask);
00140
00141 SOFIAPUBFUN
00142 msg_href_t const *msg_find_hclass(msg_mclass_t const *, char const *, isize_t *);
00143
00144 SOFIAPUBFUN msg_mclass_t const *msg_mclass(msg_t const *);
00145
00146 SOFIA_END_DECLS
00147
00148 #endif