722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainen/* Initialize quoted-printable decoder. Write all the decoded output to dest. */
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainenstruct qp_decoder *qp_decoder_init(buffer_t *dest);
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainenvoid qp_decoder_deinit(struct qp_decoder **qp);
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainen/* Translate more quoted printable data into binary. Returns 0 if input was
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainen valid, -1 if there were some decoding errors (which were skipped over).
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainen LFs without preceding CR are returned as CRLF (but =0A isn't). */
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainenint qp_decoder_more(struct qp_decoder *qp, const unsigned char *src,
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainen const char **error_r);
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainen/* Finish decoding any pending input. Returns the same as qp_decoder_more().
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainen This function also resets the entire decoder state, so the same decoder can
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainen be used to decode more data if wanted. */
722702762c77bf1c02f25f8b870dda988f15d539Timo Sirainenint qp_decoder_finish(struct qp_decoder *qp, const char **error_r);