1 /*
2  * e-backend-enums.h
3  *
4  * This library is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11  * for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library. If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #if !defined (__LIBEBACKEND_H_INSIDE__) && !defined (LIBEBACKEND_COMPILATION)
19 #error "Only <libebackend/libebackend.h> should be included directly."
20 #endif
21 
22 #ifndef E_BACKEND_ENUMS_H
23 #define E_BACKEND_ENUMS_H
24 
25 /**
26  * EAuthenticationSessionResult:
27  * @E_AUTHENTICATION_SESSION_ERROR:
28  *   An error occurred while authenticating.
29  * @E_AUTHENTICATION_SESSION_SUCCESS:
30  *   Client reported successful authentication.
31  * @E_AUTHENTICATION_SESSION_DISMISSED:
32  *   User dismissed the authentication prompt.
33  *
34  * Completion codes used by #EAuthenticationSession.
35  *
36  * Since: 3.6
37  **/
38 typedef enum {
39 	E_AUTHENTICATION_SESSION_ERROR,
40 	E_AUTHENTICATION_SESSION_SUCCESS,
41 	E_AUTHENTICATION_SESSION_DISMISSED
42 } EAuthenticationSessionResult;
43 
44 /**
45  * EDBusServerExitCode:
46  * @E_DBUS_SERVER_EXIT_NONE:
47  *   The server's run state is unchanged.
48  * @E_DBUS_SERVER_EXIT_NORMAL:
49  *   Normal termination.  The process itself may now terminate.
50  * @E_DBUS_SERVER_EXIT_RELOAD:
51  *   The server should reload its configuration and start again.
52  *   Servers that do not support reloading may wish to intercept
53  *   this exit code and stop the #EDBusServer::quit-server emission.
54  *
55  * Exit codes submitted to e_dbus_server_quit() and returned by
56  * e_dbus_server_run().
57  *
58  * Since: 3.6
59  **/
60 typedef enum {
61 	E_DBUS_SERVER_EXIT_NONE,
62 	E_DBUS_SERVER_EXIT_NORMAL,
63 	E_DBUS_SERVER_EXIT_RELOAD
64 } EDBusServerExitCode;
65 
66 /**
67  * ESourcePermissionFlags:
68  * @E_SOURCE_PERMISSION_NONE:
69  *   The data source gets no initial permissions.
70  * @E_SOURCE_PERMISSION_WRITABLE:
71  *   The data source is initially writable.
72  * @E_SOURCE_PERMISSION_REMOVABLE:
73  *   The data source is initially removable.
74  *
75  * Initial permissions for a newly-loaded data source key file.
76  *
77  * Since: 3.6
78  **/
79 typedef enum { /*< flags >*/
80 	E_SOURCE_PERMISSION_NONE = 0,
81 	E_SOURCE_PERMISSION_WRITABLE = 1 << 0,
82 	E_SOURCE_PERMISSION_REMOVABLE = 1 << 1
83 } ESourcePermissionFlags;
84 
85 /**
86  * EOfflineState:
87  * @E_OFFLINE_STATE_UNKNOWN: Unknown offline state.
88  * @E_OFFLINE_STATE_SYNCED: The object if synchnized with no local changes.
89  * @E_OFFLINE_STATE_LOCALLY_CREATED: The object is locally created.
90  * @E_OFFLINE_STATE_LOCALLY_MODIFIED: The object is locally modified.
91  * @E_OFFLINE_STATE_LOCALLY_DELETED: The object is locally deleted.
92  *
93  * Defines offline state of an object. Locally changed objects require
94  * synchronization with their remote storage.
95  *
96  * Since: 3.26
97  **/
98 typedef enum {
99 	E_OFFLINE_STATE_UNKNOWN = -1,
100 	E_OFFLINE_STATE_SYNCED,
101 	E_OFFLINE_STATE_LOCALLY_CREATED,
102 	E_OFFLINE_STATE_LOCALLY_MODIFIED,
103 	E_OFFLINE_STATE_LOCALLY_DELETED
104 } EOfflineState;
105 
106 /**
107  * ECollectionBackendParts:
108  * @E_COLLECTION_BACKEND_PART_NONE: None part.
109  * @E_COLLECTION_BACKEND_PART_CALENDAR: Check the calendar part.
110  * @E_COLLECTION_BACKEND_PART_CONTACTS: Check the contacts part.
111  * @E_COLLECTION_BACKEND_PART_MAIL: Check the mail part.
112  * @E_COLLECTION_BACKEND_PART_ANY: Shortcut to have all parts checked.
113  *
114  * Flags to check whether at least one of the asked for parts is enabled.
115  *
116  * Since: 3.40
117  **/
118 typedef enum { /*< flags >*/
119 	E_COLLECTION_BACKEND_PART_NONE = 0,
120 	E_COLLECTION_BACKEND_PART_CALENDAR = 1 << 0,
121 	E_COLLECTION_BACKEND_PART_CONTACTS = 1 << 1,
122 	E_COLLECTION_BACKEND_PART_MAIL = 1 << 2,
123 	E_COLLECTION_BACKEND_PART_ANY = ~0
124 } ECollectionBackendParts;
125 
126 #endif /* E_BACKEND_ENUMS_H */
127