1 /* 2 * e-source-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 (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION) 19 #error "Only <libedataserver/libedataserver.h> should be included directly." 20 #endif 21 22 #ifndef E_SOURCE_ENUMS_H 23 #define E_SOURCE_ENUMS_H 24 25 /** 26 * EMdnResponsePolicy: 27 * @E_MDN_RESPONSE_POLICY_NEVER: 28 * Never respond to an MDN request. 29 * @E_MDN_RESPONSE_POLICY_ALWAYS: 30 * Always respond to an MDN request. 31 * @E_MDN_RESPONSE_POLICY_ASK: 32 * Ask the user before responding to an MDN request. 33 * 34 * Policy for responding to Message Disposition Notification requests 35 * (i.e. a Disposition-Notification-To header) when receiving messages. 36 * See RFC 2298 for more information about MDN requests. 37 * 38 * Since: 3.6 39 **/ 40 typedef enum { 41 E_MDN_RESPONSE_POLICY_NEVER, 42 E_MDN_RESPONSE_POLICY_ALWAYS, 43 E_MDN_RESPONSE_POLICY_ASK 44 } EMdnResponsePolicy; 45 46 /** 47 * EProxyMethod: 48 * @E_PROXY_METHOD_DEFAULT: 49 * Use the default #GProxyResolver (see g_proxy_resolver_get_default()). 50 * @E_PROXY_METHOD_MANUAL: 51 * Use the FTP/HTTP/HTTPS/SOCKS settings defined in #ESourceProxy. 52 * @E_PROXY_METHOD_AUTO: 53 * Use the autoconfiguration URL defined in #ESourceProxy. 54 * @E_PROXY_METHOD_NONE: 55 * Direct connection; do not use a network proxy. 56 * 57 * Network proxy configuration methods. 58 * 59 * Since: 3.12 60 **/ 61 typedef enum { 62 E_PROXY_METHOD_DEFAULT, 63 E_PROXY_METHOD_MANUAL, 64 E_PROXY_METHOD_AUTO, 65 E_PROXY_METHOD_NONE 66 } EProxyMethod; 67 68 /** 69 * ESourceAuthenticationResult: 70 * @E_SOURCE_AUTHENTICATION_UNKNOWN: 71 * Unknown error occurred while authenticating. Since: 3.26 72 * @E_SOURCE_AUTHENTICATION_ERROR: 73 * An error occurred while authenticating. 74 * @E_SOURCE_AUTHENTICATION_ERROR_SSL_FAILED: 75 * An SSL certificate check failed. Since: 3.16. 76 * @E_SOURCE_AUTHENTICATION_ACCEPTED: 77 * Server requesting authentication accepted password. 78 * @E_SOURCE_AUTHENTICATION_REJECTED: 79 * Server requesting authentication rejected password. 80 * @E_SOURCE_AUTHENTICATION_REQUIRED: 81 * Server requesting authentication, but none was given. 82 * 83 * Status codes used by the #EBackend authentication wrapper. 84 * 85 * Since: 3.6 86 **/ 87 typedef enum { 88 E_SOURCE_AUTHENTICATION_UNKNOWN = -1, 89 E_SOURCE_AUTHENTICATION_ERROR, 90 E_SOURCE_AUTHENTICATION_ERROR_SSL_FAILED, 91 E_SOURCE_AUTHENTICATION_ACCEPTED, 92 E_SOURCE_AUTHENTICATION_REJECTED, 93 E_SOURCE_AUTHENTICATION_REQUIRED 94 } ESourceAuthenticationResult; 95 96 /** 97 * ETrustPromptResponse: 98 * @E_TRUST_PROMPT_RESPONSE_UNKNOWN: Unknown response, usually due to some error 99 * @E_TRUST_PROMPT_RESPONSE_REJECT: Reject permanently 100 * @E_TRUST_PROMPT_RESPONSE_ACCEPT: Accept permanently 101 * @E_TRUST_PROMPT_RESPONSE_ACCEPT_TEMPORARILY: Accept temporarily 102 * @E_TRUST_PROMPT_RESPONSE_REJECT_TEMPORARILY: Reject temporarily 103 * 104 * Response codes for the trust prompt. 105 * 106 * Since: 3.8 107 **/ 108 typedef enum { 109 E_TRUST_PROMPT_RESPONSE_UNKNOWN = -1, 110 E_TRUST_PROMPT_RESPONSE_REJECT = 0, 111 E_TRUST_PROMPT_RESPONSE_ACCEPT = 1, 112 E_TRUST_PROMPT_RESPONSE_ACCEPT_TEMPORARILY = 2, 113 E_TRUST_PROMPT_RESPONSE_REJECT_TEMPORARILY = 3 114 } ETrustPromptResponse; 115 116 /** 117 * ESourceConnectionStatus: 118 * @E_SOURCE_CONNECTION_STATUS_DISCONNECTED: 119 * The source is currently disconnected from its (possibly remote) data store. 120 * @E_SOURCE_CONNECTION_STATUS_AWAITING_CREDENTIALS: 121 * The source asked for credentials with a 'credentials-required' signal and 122 * is currently awaiting for them. 123 * @E_SOURCE_CONNECTION_STATUS_SSL_FAILED: 124 * A user rejected SSL certificate trust for the connection. 125 * @E_SOURCE_CONNECTION_STATUS_CONNECTING: 126 * The source is currently connecting to its (possibly remote) data store. 127 * @E_SOURCE_CONNECTION_STATUS_CONNECTED: 128 * The source is currently connected to its (possibly remote) data store. 129 * 130 * Connection status codes used by the #ESource to indicate its connection state. 131 * This is used in combination with authentication of the ESource. For example, 132 * if there are multiple clients asking for a password and a user enters the password 133 * in one of them, then the status will change into 'connecting', which is a signal 134 * do close the password prompt in the other client, because the credentials had 135 * been already provided. 136 * 137 * Since: 3.16 138 **/ 139 typedef enum { 140 E_SOURCE_CONNECTION_STATUS_DISCONNECTED, 141 E_SOURCE_CONNECTION_STATUS_AWAITING_CREDENTIALS, 142 E_SOURCE_CONNECTION_STATUS_SSL_FAILED, 143 E_SOURCE_CONNECTION_STATUS_CONNECTING, 144 E_SOURCE_CONNECTION_STATUS_CONNECTED 145 } ESourceConnectionStatus; 146 147 /** 148 * ESourceCredentialsReason: 149 * @E_SOURCE_CREDENTIALS_REASON_UNKNOWN: 150 * A return value when there was no 'credentials-required' signal emitted yet, 151 * or a pair 'authenticate' signal had been received. This value should not 152 * be used in the call of 'credentials-required'. 153 * @E_SOURCE_CREDENTIALS_REASON_REQUIRED: 154 * This is the first attempt to get credentials for the source. It's usually 155 * used right after the source is opened and the authentication continues with 156 * a stored credentials, if any. 157 * @E_SOURCE_CREDENTIALS_REASON_REJECTED: 158 * The previously used credentials had been rejected by the server. That 159 * usually means that the user should be asked to provide/correct the credentials. 160 * @E_SOURCE_CREDENTIALS_REASON_SSL_FAILED: 161 * A secured connection failed due to some server-side certificate issues. 162 * @E_SOURCE_CREDENTIALS_REASON_ERROR: 163 * The server returned an error. It is not possible to connect to it 164 * at the moment usually. 165 * 166 * An ESource's authentication reason, used by an ESource::CredentialsRequired method. 167 * 168 * Since: 3.16 169 **/ 170 typedef enum { 171 E_SOURCE_CREDENTIALS_REASON_UNKNOWN, 172 E_SOURCE_CREDENTIALS_REASON_REQUIRED, 173 E_SOURCE_CREDENTIALS_REASON_REJECTED, 174 E_SOURCE_CREDENTIALS_REASON_SSL_FAILED, 175 E_SOURCE_CREDENTIALS_REASON_ERROR 176 } ESourceCredentialsReason; 177 178 /** 179 * ESourceLDAPAuthentication: 180 * @E_SOURCE_LDAP_AUTHENTICATION_NONE: 181 * Use none authentication type. 182 * @E_SOURCE_LDAP_AUTHENTICATION_EMAIL: 183 * Use an email address for authentication. 184 * @E_SOURCE_LDAP_AUTHENTICATION_BINDDN: 185 * Use a bind DN for authentication. 186 * 187 * Defines authentication types for LDAP sources. 188 * 189 * Since: 3.18 190 **/ 191 typedef enum { 192 E_SOURCE_LDAP_AUTHENTICATION_NONE, 193 E_SOURCE_LDAP_AUTHENTICATION_EMAIL, 194 E_SOURCE_LDAP_AUTHENTICATION_BINDDN 195 } ESourceLDAPAuthentication; 196 197 /** 198 * ESourceLDAPScope: 199 * @E_SOURCE_LDAP_SCOPE_ONELEVEL: 200 * One level search scope. 201 * @E_SOURCE_LDAP_SCOPE_SUBTREE: 202 * Sub-tree search scope. 203 * 204 * Defines search scope for LDAP sources. 205 * 206 * Since: 3.18 207 **/ 208 typedef enum { 209 E_SOURCE_LDAP_SCOPE_ONELEVEL, 210 E_SOURCE_LDAP_SCOPE_SUBTREE 211 } ESourceLDAPScope; 212 213 /** 214 * ESourceLDAPSecurity: 215 * @E_SOURCE_LDAP_SECURITY_NONE: 216 * Connect insecurely. 217 * @E_SOURCE_LDAP_SECURITY_LDAPS: 218 * Connect using secure LDAP (LDAPS). 219 * @E_SOURCE_LDAP_SECURITY_STARTTLS: 220 * Connect using STARTTLS. 221 * 222 * Defines what connection security should be used for LDAP sources. 223 * 224 * Since: 3.18 225 **/ 226 typedef enum { 227 E_SOURCE_LDAP_SECURITY_NONE, 228 E_SOURCE_LDAP_SECURITY_LDAPS, 229 E_SOURCE_LDAP_SECURITY_STARTTLS 230 } ESourceLDAPSecurity; 231 232 /** 233 * ESourceWeatherUnits: 234 * @E_SOURCE_WEATHER_UNITS_FAHRENHEIT: 235 * Fahrenheit units 236 * @E_SOURCE_WEATHER_UNITS_CENTIGRADE: 237 * Centigrade units 238 * @E_SOURCE_WEATHER_UNITS_KELVIN: 239 * Kelvin units 240 * 241 * Units to be used in an #ESourceWeather extension. 242 * 243 * Since: 3.18 244 **/ 245 typedef enum { 246 E_SOURCE_WEATHER_UNITS_FAHRENHEIT = 0, 247 E_SOURCE_WEATHER_UNITS_CENTIGRADE, 248 E_SOURCE_WEATHER_UNITS_KELVIN 249 } ESourceWeatherUnits; 250 251 /** 252 * ESourceMailCompositionReplyStyle: 253 * @E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_DEFAULT: 254 * Use default reply style. 255 * @E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_QUOTED: 256 * Use quoted reply style. 257 * @E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_DO_NOT_QUOTE: 258 * Do not quote anything in replies. 259 * @E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_ATTACH: 260 * Attach original message in replies. 261 * @E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_OUTLOOK: 262 * Use Outlook reply style. 263 * 264 * Set of preferred reply styles for an #ESourceMailComposition extension. 265 * 266 * Since: 3.20 267 **/ 268 typedef enum { 269 E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_DEFAULT = 0, 270 E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_QUOTED, 271 E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_DO_NOT_QUOTE, 272 E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_ATTACH, 273 E_SOURCE_MAIL_COMPOSITION_REPLY_STYLE_OUTLOOK 274 } ESourceMailCompositionReplyStyle; 275 276 /** 277 * EThreeState: 278 * @E_THREE_STATE_OFF: the three-state value is Off 279 * @E_THREE_STATE_ON: the three-state value is On 280 * @E_THREE_STATE_INCONSISTENT: the three-state value is neither On, nor Off 281 * 282 * Describes a three-state value, which can be either Off, On or Inconsistent. 283 * 284 * Since: 3.26 285 **/ 286 typedef enum { 287 E_THREE_STATE_OFF = 0, 288 E_THREE_STATE_ON, 289 E_THREE_STATE_INCONSISTENT 290 } EThreeState; 291 292 /** 293 * EConflictResolution: 294 * @E_CONFLICT_RESOLUTION_FAIL: Fail when a write-conflict occurs. 295 * @E_CONFLICT_RESOLUTION_USE_NEWER: Use newer version of the object, 296 * which can be either the server version or the local version of it. 297 * @E_CONFLICT_RESOLUTION_KEEP_SERVER: Keep server object on conflict. 298 * @E_CONFLICT_RESOLUTION_KEEP_LOCAL: Write local version of the object on conflict. 299 * @E_CONFLICT_RESOLUTION_WRITE_COPY: Create a new copy of the object on conflict. 300 * 301 * Defines what to do when a conflict between the locally stored and 302 * remotely stored object versions happen during object modify or remove. 303 * 304 * Since: 3.26 305 **/ 306 typedef enum { 307 E_CONFLICT_RESOLUTION_FAIL = 0, 308 E_CONFLICT_RESOLUTION_USE_NEWER, 309 E_CONFLICT_RESOLUTION_KEEP_SERVER, 310 E_CONFLICT_RESOLUTION_KEEP_LOCAL, 311 E_CONFLICT_RESOLUTION_WRITE_COPY 312 } EConflictResolution; 313 314 #endif /* E_SOURCE_ENUMS_H */ 315