Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/lib-mail/message-part-serialize.h @ 956:26cafa3dc09c HEAD
minor optimization
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 12 Jan 2003 01:49:45 +0200 |
parents | f7d0209bb7a6 |
children | 7e3ce7515477 |
rev | line source |
---|---|
113 | 1 #ifndef __MESSAGE_PART_SERIALIZE_H |
2 #define __MESSAGE_PART_SERIALIZE_H | |
3 | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
4 struct message_part; |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
5 struct message_size; |
113 | 6 |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
7 /* Serialize message part. */ |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
8 void message_part_serialize(struct message_part *part, buffer_t *dest); |
113 | 9 |
914
fe0ba77d5506
message_part_deserialize() now verifies that the data is valid so we don't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
10 /* Generate struct message_part from serialized data. Returns NULL and sets |
fe0ba77d5506
message_part_deserialize() now verifies that the data is valid so we don't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
11 error if any problems are detected. */ |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
12 struct message_part *message_part_deserialize(pool_t pool, const void *data, |
914
fe0ba77d5506
message_part_deserialize() now verifies that the data is valid so we don't
Timo Sirainen <tss@iki.fi>
parents:
903
diff
changeset
|
13 size_t size, const char **error); |
162 | 14 |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
15 /* Update header size in serialized struct message_part. */ |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
16 int message_part_serialize_update_header(void *data, size_t size, |
954
f7d0209bb7a6
Do some more sanity checking when updating cached message_part. If anything
Timo Sirainen <tss@iki.fi>
parents:
914
diff
changeset
|
17 struct message_size *hdr_size, |
f7d0209bb7a6
Do some more sanity checking when updating cached message_part. If anything
Timo Sirainen <tss@iki.fi>
parents:
914
diff
changeset
|
18 const char **error); |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
19 |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
20 /* Get message size from serialized struct message_part data. */ |
184 | 21 int message_part_deserialize_size(const void *data, size_t size, |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
22 struct message_size *hdr_size, |
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
765
diff
changeset
|
23 struct message_size *body_size); |
162 | 24 |
113 | 25 #endif |