view src/lib-mail/message-part-serialize.h @ 14682:d0d7b810646b

Make sure we check all the functions' return values. Minor API changes to simplify this. Checked using a patched clang that adds attribute(warn_unused_result) to all functions. This commit fixes several error handling mistakes.
author Timo Sirainen <tss@iki.fi>
date Mon, 25 Jun 2012 01:14:03 +0300
parents e4eb71ae8e96
children
line wrap: on
line source

#ifndef MESSAGE_PART_SERIALIZE_H
#define MESSAGE_PART_SERIALIZE_H

struct message_part;
struct message_size;

/* Serialize message part. */
void message_part_serialize(struct message_part *part, buffer_t *dest);

/* Generate struct message_part from serialized data. Returns NULL and sets
   error if any problems are detected. */
struct message_part *
message_part_deserialize(pool_t pool, const void *data, size_t size,
			 const char **error_r);

#endif