-struct unicode_info;
-
-extern char *rfc2047_decode_unicode(const char *text,
- const struct unicode_info *mychset,
- int options);
-
-#define RFC2047_DECODE_DISCARD 1
- /* options: Discard unknown charsets from decoded string. */
-#define RFC2047_DECODE_ABORT 2
- /* options: Abort if we encounter an unknown charset, errno=EINVAL */
-#define RFC2047_DECODE_NOTAG 4
- /* options: Do not tag unknown charset strings */
-#define RFC2047_DECODE_REPLACE 8
- /* options: Replace unknown characters */
+int rfc2047_decoder(const char *text,
+ void (*callback)(const char *chset,
+ const char *lang,
+ const char *content,
+ size_t cnt,
+ void *dummy),
+ void *ptr);