GCC Code Coverage Report


Directory: src/
File: mail/msg-mail-message.h
Date: 2026-03-14 01:53:36
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 4 5 80.0%
Branches: 2 2 100.0%

Line Branch Exec Source
1 /* Copyright 2022-2024 Jan-Michael Brummer <jan-michael.brummer1@volkswagen.de>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU Lesser General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 #pragma once
18
19 #if !defined(_MSG_INSIDE) && !defined(MSG_COMPILATION)
20 #error "Only <msg.h> can be included directly."
21 #endif
22
23 #include <glib-object.h>
24 #include <gio/gio.h>
25 #include <json-glib/json-glib.h>
26
27 G_BEGIN_DECLS
28
29 #define MSG_TYPE_MAIL_MESSAGE (msg_mail_message_get_type ())
30
31
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 3 times.
24 G_DECLARE_FINAL_TYPE (MsgMailMessage, msg_mail_message, MSG, MAIL_MESSAGE, GObject);
32
33 MsgMailMessage *
34 msg_mail_message_new (void);
35
36 MsgMailMessage *
37 msg_mail_message_new_from_json (JsonObject *json_object,
38 GError **error);
39
40 const char *
41 msg_mail_message_get_subject (MsgMailMessage *self);
42
43 void
44 msg_mail_message_set_subject (MsgMailMessage *self,
45 const char *subject);
46
47 const char *
48 msg_mail_message_get_body_preview (MsgMailMessage *self);
49
50 void
51 msg_mail_message_set_body_preview (MsgMailMessage *self,
52 const char *preview);
53
54 void
55 msg_mail_message_set_body (MsgMailMessage *self,
56 const char *body);
57
58 const char *
59 msg_mail_message_get_id (MsgMailMessage *self);
60
61 void
62 msg_mail_message_set_id (MsgMailMessage *self,
63 const char *id);
64
65 int
66 msg_mail_message_get_unread (MsgMailMessage *self);
67
68 void
69 msg_mail_message_set_unread (MsgMailMessage *self,
70 int unread);
71
72 const char *
73 msg_mail_message_get_sender (MsgMailMessage *self);
74
75 void
76 msg_mail_message_set_sender (MsgMailMessage *self,
77 const char *sender);
78
79 GDateTime *
80 msg_mail_message_get_received_date (MsgMailMessage *self);
81
82 void
83 msg_mail_message_set_received_date (MsgMailMessage *self,
84 gint64 timestamp);
85
86 const char *
87 msg_mail_message_get_body (MsgMailMessage *self, gboolean *is_html);
88
89 const char *
90 msg_mail_message_get_receiver (MsgMailMessage *self);
91
92 void
93 msg_mail_message_set_receiver (MsgMailMessage *self,
94 const char *receiver);
95
96 const char *
97 msg_mail_message_get_cc (MsgMailMessage *self);
98
99 void
100 msg_mail_message_set_cc (MsgMailMessage *self,
101 const char *cc);
102
103 gboolean
104 msg_mail_message_get_has_attachment (MsgMailMessage *self);
105
106 void
107 msg_mail_message_set_has_attachment (MsgMailMessage *self,
108 gboolean has_attachment);
109
110 G_END_DECLS
111