GCC Code Coverage Report


Directory: src/
File: mail/msg-mail-folder.h
Date: 2026-04-11 00:53:51
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 5 5 100.0%
Branches: 2 2 100.0%

Line Branch Exec Source
1 /* Copyright 2022-2023 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_FOLDER (msg_mail_folder_get_type ())
30
31
2/2
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
33 G_DECLARE_FINAL_TYPE (MsgMailFolder, msg_mail_folder, MSG, MAIL_FOLDER, GObject);
32
33 typedef enum {
34 MSG_MAIL_FOLDER_TYPE_0,
35 MSG_MAIL_FOLDER_TYPE_INBOX,
36 MSG_MAIL_FOLDER_TYPE_DRAFTS,
37 MSG_MAIL_FOLDER_TYPE_SENT_ITEMS,
38 MSG_MAIL_FOLDER_TYPE_JUNK_EMAIL,
39 MSG_MAIL_FOLDER_TYPE_DELETED_ITEMS,
40 MSG_MAIL_FOLDER_TYPE_OUTBOX,
41 MSG_MAIL_FOLDER_TYPE_ARCHIVE,
42 MSG_MAIL_FOLDER_TYPE_OTHER,
43 MSG_MAIL_FOLDER_TYPE_MAX
44 } MsgMailFolderType;
45
46 MsgMailFolder *
47 msg_mail_folder_new (void);
48
49 MsgMailFolder *
50 msg_mail_folder_new_from_json (JsonObject *json_object,
51 GError **error);
52
53 const char *
54 msg_mail_folder_get_display_name (MsgMailFolder *self);
55
56 int
57 msg_mail_folder_get_unread_item_count (MsgMailFolder *self);
58
59 void
60 msg_mail_folder_set_unread_item_count (MsgMailFolder *self,
61 guint count);
62
63 int
64 msg_mail_folder_get_total_item_count (MsgMailFolder *self);
65
66 void
67 msg_mail_folder_set_total_item_count (MsgMailFolder *self,
68 guint count);
69
70 const char *
71 msg_mail_folder_get_id (MsgMailFolder *self);
72
73 void
74 msg_mail_folder_set_id (MsgMailFolder *self,
75 const char *id);
76
77 MsgMailFolderType
78 msg_mail_folder_get_folder_type (MsgMailFolder *self);
79
80 void
81 msg_mail_folder_set_folder_type (MsgMailFolder *self,
82 MsgMailFolderType type);
83
84 void
85 msg_mail_folder_set_display_name (MsgMailFolder *self,
86 const char *display_name);
87
88 void
89 msg_mail_folder_set_delta_link (MsgMailFolder *self,
90 const char *delta_link);
91
92 const char *
93 msg_mail_folder_get_delta_link (MsgMailFolder *self);
94
95 const char *
96 msg_mail_folder_get_parent_id (MsgMailFolder *self);
97
98 void
99 msg_mail_folder_set_parent_id (MsgMailFolder *self,
100 const char *id);
101
102 int
103 msg_mail_folder_get_child_folder_count (MsgMailFolder *self);
104
105 void
106 msg_mail_folder_set_child_folder_count (MsgMailFolder *self,
107 guint count);
108
109 G_END_DECLS
110