2 * e-server-side-source.h
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) version 3.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with the program; if not, see <http://www.gnu.org/licenses/>
19 #if !defined (__LIBEBACKEND_H_INSIDE__) && !defined (LIBEBACKEND_COMPILATION)
20 #error "Only <libebackend/libebackend.h> should be included directly."
23 #ifndef E_SERVER_SIDE_SOURCE_H
24 #define E_SERVER_SIDE_SOURCE_H
26 #include <libedataserver/libedataserver.h>
28 #include <libebackend/e-source-registry-server.h>
30 /* Standard GObject macros */
31 #define E_TYPE_SERVER_SIDE_SOURCE \
32 (e_server_side_source_get_type ())
33 #define E_SERVER_SIDE_SOURCE(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST \
35 ((obj), E_TYPE_SERVER_SIDE_SOURCE, EServerSideSource))
36 #define E_SERVER_SIDE_SOURCE_CLASS(cls) \
37 (G_TYPE_CHECK_CLASS_CAST \
38 ((cls), E_TYPE_SERVER_SIDE_SOURCE, EServerSideSourceClass))
39 #define E_IS_SERVER_SIDE_SOURCE(obj) \
40 (G_TYPE_CHECK_INSTANCE_TYPE \
41 ((obj), E_TYPE_SERVER_SIDE_SOURCE))
42 #define E_IS_SERVER_SIDE_SOURCE_CLASS(cls) \
43 (G_TYPE_CHECK_CLASS_TYPE \
44 ((cls), E_TYPE_SERVER_SIDE_SOURCE))
45 #define E_SERVER_SIDE_SOURCE_GET_CLASS(obj) \
46 (G_TYPE_INSTANCE_GET_CLASS \
47 ((obj), E_TYPE_SERVER_SIDE_SOURCE, EServerSideSourceClass))
51 typedef struct _EServerSideSource EServerSideSource;
52 typedef struct _EServerSideSourceClass EServerSideSourceClass;
53 typedef struct _EServerSideSourcePrivate EServerSideSourcePrivate;
58 * Contains only private data that should be read and manipulated using the
63 struct _EServerSideSource {
65 EServerSideSourcePrivate *priv;
68 struct _EServerSideSourceClass {
69 ESourceClass parent_class;
72 GType e_server_side_source_get_type (void) G_GNUC_CONST;
73 const gchar * e_server_side_source_get_user_dir
75 GFile * e_server_side_source_new_user_file
77 gchar * e_server_side_source_uid_from_file
80 ESource * e_server_side_source_new (ESourceRegistryServer *server,
83 ESource * e_server_side_source_new_memory_only
84 (ESourceRegistryServer *server,
87 gboolean e_server_side_source_load (EServerSideSource *source,
88 GCancellable *cancellable,
90 GFile * e_server_side_source_get_file (EServerSideSource *source);
91 GNode * e_server_side_source_get_node (EServerSideSource *source);
92 ESourceRegistryServer *
93 e_server_side_source_get_server (EServerSideSource *source);
94 gboolean e_server_side_source_get_allow_auth_prompt
95 (EServerSideSource *source);
96 void e_server_side_source_set_allow_auth_prompt
97 (EServerSideSource *source,
98 gboolean allow_auth_prompt);
99 gboolean e_server_side_source_get_exported
100 (EServerSideSource *source);
101 const gchar * e_server_side_source_get_write_directory
102 (EServerSideSource *source);
103 void e_server_side_source_set_write_directory
104 (EServerSideSource *source,
105 const gchar *write_directory);
106 void e_server_side_source_set_removable
107 (EServerSideSource *source,
109 void e_server_side_source_set_writable
110 (EServerSideSource *source,
112 void e_server_side_source_set_remote_creatable
113 (EServerSideSource *source,
114 gboolean remote_creatable);
115 void e_server_side_source_set_remote_deletable
116 (EServerSideSource *source,
117 gboolean remote_deletable);
121 #endif /* E_SERVER_SIDE_SOURCE_H */