c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen#ifndef IMAP_QUOTE_H
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen#define IMAP_QUOTE_H
f8b23df4e11e19ebe8a159c5e205c48e425200a5Timo Sirainen
169d60e9729b7a047ed17e82607101e20c69dcb1Timo Sirainen/* Append "quoted" or literal. */
169d60e9729b7a047ed17e82607101e20c69dcb1Timo Sirainenvoid imap_append_string(string_t *dest, const char *src);
0b1929455dec03c97d35e5286a17a8c7bd1a633bTimo Sirainen/* Append atom, "quoted" or literal. */
0b1929455dec03c97d35e5286a17a8c7bd1a633bTimo Sirainenvoid imap_append_astring(string_t *dest, const char *src);
169d60e9729b7a047ed17e82607101e20c69dcb1Timo Sirainen/* Append NIL, "quoted" or literal. */
169d60e9729b7a047ed17e82607101e20c69dcb1Timo Sirainenvoid imap_append_nstring(string_t *dest, const char *src);
be0c9927cd9856b1a37c9c8c6b73bd7e5a75737cSergey Kitov/* Append NIL, "quoted" or literal, CRs and LFs skipped. */
be0c9927cd9856b1a37c9c8c6b73bd7e5a75737cSergey Kitovvoid imap_append_nstring_nolf(string_t *dest, const char *src);
169d60e9729b7a047ed17e82607101e20c69dcb1Timo Sirainen/* Append "quoted". If src has 8bit chars, skip over them. */
2ca9d7b51853007c0edd3bd373375792f2c8272fTimo Sirainenvoid imap_append_quoted(string_t *dest, const char *src);
6764705326c7187d703b784b8e86083c08363549Timo Sirainen
eea128bec7b5af0ece444e0c3b35297cd1e2b31cTimo Sirainen/* Otherwise the same as imap_append_string(), but cleanup the input data
eea128bec7b5af0ece444e0c3b35297cd1e2b31cTimo Sirainen so that it's more readable by humans. This includes converting TABs to
eea128bec7b5af0ece444e0c3b35297cd1e2b31cTimo Sirainen spaces, multiple spaces into a single space and NULs to #0x80. */
eea128bec7b5af0ece444e0c3b35297cd1e2b31cTimo Sirainenvoid imap_append_string_for_humans(string_t *dest,
eea128bec7b5af0ece444e0c3b35297cd1e2b31cTimo Sirainen const unsigned char *src, size_t size);
eea128bec7b5af0ece444e0c3b35297cd1e2b31cTimo Sirainen
f8b23df4e11e19ebe8a159c5e205c48e425200a5Timo Sirainen#endif