| 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 <mail/msg-mail-folder.h> | ||
| 23 | #include <mail/msg-mail-message.h> | ||
| 24 | #include <msg-service.h> | ||
| 25 | |||
| 26 | #define MSG_TYPE_MAIL_SERVICE (msg_mail_service_get_type ()) | ||
| 27 | |||
| 28 | 24 | G_DECLARE_FINAL_TYPE (MsgMailService, msg_mail_service, MSG, MAIL_SERVICE, MsgService); | |
| 29 | |||
| 30 | MsgMailService *msg_mail_service_new (MsgAuthorizer *authorizer); | ||
| 31 | |||
| 32 | GList * | ||
| 33 | msg_mail_service_get_messages (MsgMailService *self, | ||
| 34 | MsgMailFolder *folder, | ||
| 35 | const char *next_link, | ||
| 36 | char **out_next_link, | ||
| 37 | const char *delta_link, | ||
| 38 | char **out_delta_link, | ||
| 39 | int max_page_size, | ||
| 40 | GCancellable *cancellable, | ||
| 41 | GError **error); | ||
| 42 | |||
| 43 | GList * | ||
| 44 | msg_mail_service_get_mail_folders (MsgMailService *self, | ||
| 45 | char *delta_url, | ||
| 46 | char **delta_url_out, | ||
| 47 | GCancellable *cancellable, | ||
| 48 | GError **error); | ||
| 49 | |||
| 50 | MsgMailFolder * | ||
| 51 | msg_mail_service_get_mail_folder (MsgMailService *self, | ||
| 52 | MsgMailFolderType type, | ||
| 53 | GCancellable *cancellable, | ||
| 54 | GError **error); | ||
| 55 | |||
| 56 | MsgMailMessage * | ||
| 57 | msg_mail_service_create_draft_message (MsgMailService *self, | ||
| 58 | MsgMailMessage *mail, | ||
| 59 | GCancellable *cancellable, | ||
| 60 | GError **error); | ||
| 61 | |||
| 62 | gboolean | ||
| 63 | msg_mail_service_delete_message (MsgMailService *self, | ||
| 64 | MsgMailMessage *mail, | ||
| 65 | GCancellable *cancellable, | ||
| 66 | GError **error); | ||
| 67 | |||
| 68 | GBytes * | ||
| 69 | msg_mail_service_get_mime_message (MsgMailService *self, | ||
| 70 | MsgMailMessage *mail, | ||
| 71 | GCancellable *cancellable, | ||
| 72 | GError **error); | ||
| 73 | |||
| 74 | char * | ||
| 75 | msg_mail_service_get_folder_id (MsgMailService *self, | ||
| 76 | MsgMailFolderType type, | ||
| 77 | GCancellable *cancellable, | ||
| 78 | GError **error); | ||
| 79 | |||
| 80 |