-
Notifications
You must be signed in to change notification settings - Fork 4
/
mimemodel.h
59 lines (40 loc) · 1.76 KB
/
mimemodel.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef MIMEMODEL_H
#define MIMEMODEL_H
/* Copyright 2013-2022 Oliver Giles
* This file is part of Wemed. Wemed is licensed under the
* GNU GPL version 3. See LICENSE or <http://www.gnu.org/licenses/>
* for more information */
#include <gmime/gmime.h>
#include <gtk/gtktreemodel.h>
struct _MimeModel;
struct _MimeModelClass;
typedef struct _MimeModel MimeModel;
typedef struct _MimeModelClass MimeModelClass;
// columns in the table representing a MIME part
enum {
MIME_MODEL_COL_OBJECT,
MIME_MODEL_COL_ICON,
MIME_MODEL_COL_NAME,
MIME_MODEL_NUM_COLS
};
MimeModel* mime_model_new(GString from_content);
void mime_model_create_blank_email(MimeModel* m);
GtkTreeModel* mime_model_get_gtk_model(MimeModel*);
void mime_model_filter_inline(MimeModel*, gboolean);
char *mime_model_content_type(GMimeObject* obj);
GMimeObject* mime_model_root(MimeModel*);
GString mime_model_part_content(GMimeObject* part);
GString mime_model_part_headers(GMimeObject* part);
GMimeObject* mime_model_update_header(MimeModel*, GMimeObject* obj, GString new_header);
GMimeObject* mime_model_find_mixed_parent(MimeModel* m, GMimeObject* part);
void mime_model_update_content(MimeModel*, GMimePart* obj, GString new_content);
GMimeObject* mime_model_new_node(MimeModel* m, GMimeObject* parent_or_sibling, const char* content_type);
// writes a part to a file, decoding base64 etc
void mime_model_write_part(GMimePart* part, FILE* fp);
void mime_model_set_part_content(GMimePart* part, FILE* fp);
void mime_model_part_remove(MimeModel* m, GMimeObject* part);
// write the whole message to a file in MIME format
gboolean mime_model_write_to_file(MimeModel* m, FILE* fp);
GByteArray* mime_model_object_from_cid(GObject* emitter, const char* cid, gpointer user_data);
void mime_model_free(MimeModel*);
#endif