view src/lib-imap/imap-quote.h @ 7182:efc78f6db374 HEAD

Added tag 1.1.beta14 for changeset 88de748a2f17
author Timo Sirainen <tss@iki.fi>
date Sun, 20 Jan 2008 14:55:38 +0200
parents e4eb71ae8e96
children 8f3115354d14
line wrap: on
line source

#ifndef IMAP_QUOTE_H
#define IMAP_QUOTE_H

/* Return value suitable for sending to client, either as quoted-string or
   literal. Note that this also converts TABs into spaces, multiple spaces
   into single space and NULs to #128. */
const char *imap_quote(pool_t pool, const unsigned char *value,
		       size_t value_len);

/* Append to existing string. */
void imap_quote_append(string_t *str, const unsigned char *value,
		       size_t value_len, bool compress_lwsp);

#define imap_quote_append_string(str, value, compress_lwsp) \
	imap_quote_append(str, (const unsigned char *)(value), \
			  (size_t)-1, compress_lwsp)

#endif