GCC Code Coverage Report


Directory: src/
File: src/drive/msg-drive-service.h
Date: 2024-05-18 00:53:33
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

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 #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
25 #include <drive/msg-drive.h>
26 #include <drive/msg-drive-item.h>
27 #include <msg-service.h>
28
29 G_BEGIN_DECLS
30
31 #define MSG_TYPE_DRIVE_SERVICE (msg_drive_service_get_type ())
32
33 66 G_DECLARE_FINAL_TYPE (MsgDriveService, msg_drive_service, MSG, DRIVE_SERVICE, MsgService);
34
35 MsgDriveService *
36 msg_drive_service_new (MsgAuthorizer *authorizer);
37
38 GList *
39 msg_drive_service_get_drives (MsgDriveService *self,
40 GCancellable *cancellable,
41 GError **error);
42
43 MsgDriveItem *
44 msg_drive_service_get_root (MsgDriveService *self,
45 MsgDrive *drive,
46 GCancellable *cancellable,
47 GError **error);
48
49 GList *
50 msg_drive_service_list_children (MsgDriveService *self,
51 MsgDriveItem *item,
52 GCancellable *cancellable,
53 GError **error);
54
55 GInputStream *
56 msg_drive_service_download_url (MsgDriveService *self,
57 const char *url,
58 GCancellable *cancellable,
59 GError **error);
60
61 GInputStream *
62 msg_drive_service_download_item (MsgDriveService *self,
63 MsgDriveItem *item,
64 GCancellable *cancellable,
65 GError **error);
66
67 /* Write support */
68
69 MsgDriveItem *
70 msg_drive_service_rename (MsgDriveService *self,
71 MsgDriveItem *item,
72 const char *new_name,
73 GCancellable *cancellable,
74 GError **error);
75
76
77 MsgDriveItem *
78 msg_drive_service_create_folder (MsgDriveService *self,
79 MsgDriveItem *parent,
80 const char *name,
81 GCancellable *cancellable,
82 GError **error);
83
84 gboolean
85 msg_drive_service_delete (MsgDriveService *self,
86 MsgDriveItem *item,
87 GCancellable *cancellable,
88 GError **error);
89
90 GOutputStream *
91 msg_drive_service_update (MsgDriveService *self,
92 MsgDriveItem *item,
93 GCancellable *cancellable,
94 GError **error);
95
96 MsgDriveItem *
97 msg_drive_service_update_finish (MsgDriveService *self,
98 MsgDriveItem *item,
99 GOutputStream *stream,
100 GCancellable *cancellable,
101 GError **error);
102
103 MsgDriveItem *
104 msg_drive_service_add_item_to_folder (MsgDriveService *self,
105 MsgDriveItem *parent,
106 MsgDriveItem *item,
107 GCancellable *cancellable,
108 GError **error);
109
110 GList *
111 msg_drive_service_get_shared_with_me (MsgDriveService *self,
112 GCancellable *cancellable,
113 GError **error);
114
115 gboolean
116 msg_drive_service_copy_file (MsgDriveService *self,
117 MsgDriveItem *file,
118 MsgDriveItem *destination,
119 GCancellable *cancellable,
120 GError **error);
121
122 MsgDriveItem *
123 msg_drive_service_move_file (MsgDriveService *self,
124 MsgDriveItem *file,
125 MsgDriveItem *destination,
126 GCancellable *cancellable,
127 GError **error);
128
129 G_END_DECLS
130