1 // This file is under GNU General Public License 3.0
7 #define _EXPORT_PEP_ENGINE_DLL
9 #include <libetpan/libetpan.h>
10 #include <libetpan/mailmime.h>
11 #include <libetpan/mailmime_encode.h>
13 #include "resource_id.h"
14 #include "stringpair.h"
15 #include "timestamp.h"
17 struct mailmime * part_new_empty(
18 struct mailmime_content * content,
19 struct mailmime_fields * mime_fields,
20 stringpair_list_t* param_keyvals,
24 struct mailmime * get_pgp_encrypted_part(void);
26 struct mailmime * get_text_part(
27 pEp_rid_list_t* resource,
28 const char * mime_type,
34 struct mailmime * get_file_part(
35 pEp_rid_list_t* resource,
36 const char * mime_type,
39 bool set_attachment_forward_comment
42 struct mailmime * part_multiple_new(const char *type);
44 typedef void *(*_new_func_t)(void *);
46 struct mailimf_field * _new_field(
52 void _free_field(struct mailimf_field *field);
61 struct mailimf_date_time * timestamp_to_etpantime(const timestamp *ts);
62 timestamp * etpantime_to_timestamp(const struct mailimf_date_time *et);
64 struct mailimf_mailbox * mailbox_from_string(
69 struct mailimf_field * create_optional_field(
74 int _append_optional_field(
80 clist * _get_fields(struct mailmime * mime);
81 struct mailmime_content * _get_content(struct mailmime * mime);
82 char * _get_filename_or_cid(struct mailmime *mime);
83 pEp_rid_list_t* _get_resource_id_list(struct mailmime *mime);
84 char* _build_uri(char* uri_prefix, char* resource);
85 bool _is_multipart(struct mailmime_content *content, const char *subtype);
86 bool _is_PGP_MIME(struct mailmime_content *content);
87 bool _is_text_part(struct mailmime_content *content, const char *subtype);
88 bool must_field_value_be_encoded(const char* field_value);
89 bool must_chunk_be_encoded(const void* value, size_t size, bool ignore_fws);
92 int _get_content_type(
93 const struct mailmime_content *content,