msg
1.12.11devel
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libsofia-sip-ua
msg
sofia-sip
msg_mclass.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Sofia-SIP package
3
*
4
* Copyright (C) 2005 Nokia Corporation.
5
*
6
* Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
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 MSG_MCLASS_H
26
27
#define MSG_MCLASS_H
28
38
#ifndef MSG_HEADER_H
39
#include <
sofia-sip/msg_header.h
>
40
#endif
41
42
SOFIA_BEGIN_DECLS
43
44
enum
{
46
MC_HASH_SIZE
= 127,
48
MC_SHORT_SIZE
=
'Z'
-
'A'
+ 1
49
};
50
62
struct
msg_href_s
63
{
64
msg_hclass_t
*
hr_class
;
65
unsigned
short
hr_offset
;
66
unsigned
short
hr_flags
;
67
};
68
96
struct
msg_mclass_s
97
{
98
struct
msg_hclass_s
99
mc_hclass
[1];
100
char
const
*
mc_name
;
101
void
*
mc_tag
;
102
unsigned
mc_flags
;
103
unsigned
mc_msize
;
105
issize_t (*
mc_extract_body
)(
msg_t
*msg,
msg_pub_t
*pub,
106
char
b[], isize_t bsiz,
int
eos);
107
108
msg_href_t
mc_request
[1];
109
msg_href_t
mc_status
[1];
110
msg_href_t
mc_separator
[1];
111
msg_href_t
mc_payload
[1];
112
msg_href_t
mc_unknown
[1];
113
msg_href_t
mc_error
[1];
114
msg_href_t
mc_multipart
[1];
115
msg_href_t
const
*
116
mc_short
;
117
short
mc_hash_size
;
118
short
mc_hash_used
;
120
msg_href_t
mc_hash
[
MC_HASH_SIZE
];
121
};
122
123
enum
{ msg_mclass_copy = 0, msg_mclass_empty = 1 };
124
125
SOFIAPUBFUN
msg_mclass_t
*
msg_mclass_clone
(
msg_mclass_t
const
*old,
126
int
newsize,
int
empty);
127
128
SOFIAPUBFUN
int
msg_mclass_insert
(
msg_mclass_t
*mc,
msg_href_t
const
*hr);
129
130
SOFIAPUBFUN
131
int
msg_mclass_insert_header
(
msg_mclass_t
*mc,
132
msg_hclass_t
*hc,
133
unsigned
short
offset);
134
135
SOFIAPUBFUN
136
int
msg_mclass_insert_with_mask
(
msg_mclass_t
*mc,
137
msg_hclass_t
*hc,
138
unsigned
short
offset,
139
unsigned
short
mask);
140
141
SOFIAPUBFUN
142
msg_href_t
const
*
msg_find_hclass
(
msg_mclass_t
const
*,
char
const
*, isize_t *);
143
144
SOFIAPUBFUN
msg_mclass_t
const
*
msg_mclass
(
msg_t
const
*);
145
146
SOFIA_END_DECLS
147
148
#endif
/* !defined(MSG_MCLASS_H) */
Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.