src/etpan_mime.h
author vb
Sat, 07 Mar 2015 20:29:13 +0100
changeset 89 aef5a4bc78f3
parent 59 88429085f8da
child 90 42b5eb9d5af2
permissions -rw-r--r--
...
vb@48
     1
#pragma once
vb@48
     2
vb@48
     3
#include <libetpan/libetpan.h>
vb@48
     4
vb@48
     5
struct mailmime * part_new_empty(
vb@48
     6
        struct mailmime_content * content,
vb@48
     7
        struct mailmime_fields * mime_fields,
vb@48
     8
        const char * boundary_prefix,
vb@48
     9
        int force_single
vb@48
    10
    );
vb@48
    11
vb@48
    12
struct mailmime * get_text_part(
vb@48
    13
        const char * mime_type,
vb@48
    14
        const char * text,
vb@48
    15
        size_t length,
vb@48
    16
        int encoding_type
vb@48
    17
    );
vb@48
    18
vb@59
    19
struct mailmime * get_file_part(
vb@59
    20
        const char * filename,
vb@59
    21
        const char * mime_type,
vb@59
    22
        char * data,
vb@59
    23
        size_t length
vb@59
    24
    );
vb@59
    25
vb@48
    26
struct mailmime * part_multiple_new(
vb@48
    27
        const char * type,
vb@48
    28
        const char * boundary_prefix
vb@48
    29
    );
vb@48
    30
vb@89
    31
typedef void *(*_new_func_t)(void *);
vb@89
    32
vb@89
    33
struct mailimf_field * _new_field(
vb@89
    34
        int type,
vb@89
    35
        _new_func_t new_func,
vb@89
    36
        void *value
vb@89
    37
    );
vb@89
    38
vb@89
    39
void _free_field(struct mailimf_field *field);
vb@89
    40
vb@89
    41
int _append_field(
vb@89
    42
        clist *list,
vb@89
    43
        int type,
vb@89
    44
        _new_func_t new_func,
vb@89
    45
        void *value
vb@89
    46
    );
vb@89
    47
vb@89
    48
struct mailimf_date_time * timestamp_to_etpantime(const struct tm *ts);
vb@89
    49
struct tm * etpantime_to_timestamp(const struct mailimf_date_time *et);
vb@89
    50