view src/lib-mail/message-address.h @ 988:8028c4dcf38f HEAD

mail-storage.h interface changes, affects pretty much everything. FETCH, SEARCH, SORT and THREAD handling were pretty much moved from lib-storage/ to imap/ so adding non-index storages would be much easier now. Also POP3 server can now be easily implemented with lib-storage. Not too well tested, and at least one major problem: partial fetching is _slow_.
author Timo Sirainen <tss@iki.fi>
date Mon, 20 Jan 2003 16:52:51 +0200
parents fd8888f6f037
children d6910d273852
line wrap: on
line source

#ifndef __MESSAGE_ADDRESS_H
#define __MESSAGE_ADDRESS_H

/* group: ... ; will be stored like:
   {name = "group", NULL, NULL, NULL}, ..., {NULL, NULL, NULL, NULL}
*/
struct message_address {
	struct message_address *next;

	const char *name, *route, *mailbox, *domain;
};

/* data and size are passed directly to message_tokenize_init(), so (size_t)-1
   can be given if data is \0 terminated. If there's more than max_addresses,
   the rest are skipped. Setting max_addresses to 0 disables this. */
struct message_address *
message_address_parse(pool_t pool, const unsigned char *data, size_t size,
		      unsigned int max_addresses);

void message_address_write(string_t *str, const struct message_address *addr);

#endif