Line |
Branch |
Exec |
Source |
1 |
|
|
/* Copyright 2023 Jan-Michael Brummer |
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 |
|
|
#include <glib-object.h> |
20 |
|
|
|
21 |
|
|
#include <msg-authorizer.h> |
22 |
|
|
#include <message/msg-mail-folder.h> |
23 |
|
|
#include <message/msg-message.h> |
24 |
|
|
#include <msg-service.h> |
25 |
|
|
|
26 |
|
|
#define MSG_TYPE_MESSAGE_SERVICE (msg_message_service_get_type ()) |
27 |
|
|
|
28 |
|
11 |
G_DECLARE_FINAL_TYPE (MsgMessageService, msg_message_service, MSG, MESSAGE_SERVICE, MsgService); |
29 |
|
|
|
30 |
|
|
MsgMessageService *msg_message_service_new (MsgAuthorizer *authorizer); |
31 |
|
|
|
32 |
|
|
|
33 |
|
|
typedef enum { |
34 |
|
|
MSG_MESSAGE_MAIL_FOLDER_TYPE_INBOX, |
35 |
|
|
MSG_MESSAGE_MAIL_FOLDER_TYPE_DRAFTS, |
36 |
|
|
MSG_MESSAGE_MAIL_FOLDER_TYPE_SENT_ITEMS, |
37 |
|
|
MSG_MESSAGE_MAIL_FOLDER_TYPE_JUNK_EMAIL, |
38 |
|
|
MSG_MESSAGE_MAIL_FOLDER_TYPE_DELETED_ITEMS, |
39 |
|
|
MSG_MESSAGE_MAIL_FOLDER_TYPE_OUTBOX, |
40 |
|
|
MSG_MESSAGE_MAIL_FOLDER_TYPE_ARCHIVE, |
41 |
|
|
} MsgMessageMailFolderType; |
42 |
|
|
|
43 |
|
|
GList * |
44 |
|
|
msg_message_service_get_messages (MsgMessageService *self, |
45 |
|
|
GCancellable *cancellable, |
46 |
|
|
GError **error); |
47 |
|
|
|
48 |
|
|
GList * |
49 |
|
|
msg_message_service_get_mail_folders (MsgMessageService *self, |
50 |
|
|
GCancellable *cancellable, |
51 |
|
|
GError **error); |
52 |
|
|
|
53 |
|
|
MsgMailFolder * |
54 |
|
|
msg_message_service_get_mail_folder (MsgMessageService *self, |
55 |
|
|
MsgMessageMailFolderType type, |
56 |
|
|
GCancellable *cancellable, |
57 |
|
|
GError **error); |
58 |
|
|
|
59 |
|
|
MsgMessage * |
60 |
|
|
msg_message_service_create_draft (MsgMessageService *self, |
61 |
|
|
MsgMessage *message, |
62 |
|
|
GCancellable *cancellable, |
63 |
|
|
GError **error); |
64 |
|
|
|
65 |
|
|
gboolean |
66 |
|
|
msg_message_service_delete (MsgMessageService *self, |
67 |
|
|
MsgMessage *message, |
68 |
|
|
GCancellable *cancellable, |
69 |
|
|
GError **error); |
70 |
|
|
|
71 |
|
|
|