summaryrefslogtreecommitdiffabout
path: root/kmicromail/libetpan/tests/readmsg-common.h
blob: 70265f28f872f1063966a7df72c0fc9c62b31bea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef READMSG_COMMON_H

#define READMSG_COMMON_H

#include <libetpan/libetpan.h>

#define DEST_CHARSET "iso-8859-1"

enum {
  NO_ERROR,
  ERROR_FILE,
  ERROR_MEMORY,
  ERROR_INVAL,
  ERROR_FETCH,
};

int etpan_mime_is_text(struct mailmime * build_info);

int show_part_info(FILE * f,
    struct mailmime_single_fields * mime_fields,
    struct mailmime_content * content);

int etpan_fetch_message(mailmessage * msg_info,
    struct mailmime * mime_part,
    struct mailmime_single_fields * fields,
    char ** result, size_t * result_len);

struct mailimf_fields * fetch_fields(mailmessage * msg_info,
    struct mailmime * mime);

int fields_write(FILE * f, int * col,
    struct mailimf_fields * fields);

#endif