| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: (C) 1999-2008 Novell, Inc. (www.novell.com) |
| 3 |
* SPDX-FileContributor: JP Rosevear <[email protected]> |
| 4 |
* SPDX-FileContributor: Rodrigo Moya <[email protected]> |
| 5 |
* SPDX-License-Identifier: LGPL-2.1-or-later |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef E_EWS_CONNECTION_H |
| 9 |
#define E_EWS_CONNECTION_H |
| 10 |
|
| 11 |
#include <glib-object.h> |
| 12 |
#include <gio/gio.h> |
| 13 |
#include <libsoup/soup.h> |
| 14 |
#include <libedataserver/libedataserver.h> |
| 15 |
#include <libebackend/libebackend.h> |
| 16 |
|
| 17 |
#include "e-soap-request.h" |
| 18 |
#include "e-soap-response.h" |
| 19 |
#include "ews-errors.h" |
| 20 |
#include "e-ews-folder.h" |
| 21 |
#include "e-ews-item.h" |
| 22 |
#include "e-ews-oof-settings.h" |
| 23 |
#include "camel-ews-settings.h" |
| 24 |
|
| 25 |
/* For network stream reading */ |
| 26 |
#define EWS_BUFFER_SIZE 16384 |
| 27 |
|
| 28 |
/* Standard GObject macros */ |
| 29 |
#define E_TYPE_EWS_CONNECTION \ |
| 30 |
(e_ews_connection_get_type ()) |
| 31 |
#define E_EWS_CONNECTION(obj) \ |
| 32 |
(G_TYPE_CHECK_INSTANCE_CAST \ |
| 33 |
((obj), E_TYPE_EWS_CONNECTION, EEwsConnection)) |
| 34 |
#define E_EWS_CONNECTION_CLASS(cls) \ |
| 35 |
(G_TYPE_CHECK_CLASS_CAST \ |
| 36 |
((cls), E_TYPE_EWS_CONNECTION, EEwsConnectionClass)) |
| 37 |
#define E_IS_EWS_CONNECTION(obj) \ |
| 38 |
(G_TYPE_CHECK_INSTANCE_TYPE \ |
| 39 |
((obj), E_TYPE_EWS_CONNECTION)) |
| 40 |
#define E_IS_EWS_CONNECTION_CLASS(cls) \ |
| 41 |
(G_TYPE_CHECK_CLASS_TYPE \ |
| 42 |
((cls), E_TYPE_EWS_CONNECTION)) |
| 43 |
#define E_EWS_CONNECTION_GET_CLASS(obj) \ |
| 44 |
(G_TYPE_INSTANCE_GET_CLASS \ |
| 45 |
((obj), E_TYPE_EWS_CONNECTION, EEwsConnectionClass)) |
| 46 |
|
| 47 |
G_BEGIN_DECLS |
| 48 |
|
| 49 |
typedef struct _EEwsConnection EEwsConnection; |
| 50 |
typedef struct _EEwsConnectionClass EEwsConnectionClass; |
| 51 |
typedef struct _EEwsConnectionPrivate EEwsConnectionPrivate; |
| 52 |
|
| 53 |
struct _EEwsConnection { |
| 54 |
GObject parent; |
| 55 |
EEwsConnectionPrivate *priv; |
| 56 |
}; |
| 57 |
|
| 58 |
struct _EEwsConnectionClass { |
| 59 |
GObjectClass parent_class; |
| 60 |
|
| 61 |
void (* password_will_expire) (EEwsConnection *connection, |
| 62 |
gint in_days, |
| 63 |
const gchar *service_url); |
| 64 |
}; |
| 65 |
|
| 66 |
enum { |
| 67 |
EWS_PRIORITY_LOW, |
| 68 |
EWS_PRIORITY_MEDIUM, |
| 69 |
EWS_PRIORITY_HIGH |
| 70 |
}; |
| 71 |
|
| 72 |
typedef gboolean(*EEwsRequestCreationCallback) (ESoapRequest *request, |
| 73 |
gpointer user_data, |
| 74 |
GError **error); |
| 75 |
typedef void (*EEwsResponseCallback) (ESoapResponse *response, |
| 76 |
GSimpleAsyncResult *simple); |
| 77 |
typedef gboolean(*EEwsStreamingEventsReadCallback) |
| 78 |
(gconstpointer buffer, |
| 79 |
gssize nread, |
| 80 |
gpointer user_data, |
| 81 |
GCancellable *cancellable, |
| 82 |
GError **error); |
| 83 |
typedef void (*EEwsStreamingEventsFinishedCallback) |
| 84 |
(gpointer user_data, |
| 85 |
const GError *error); |
| 86 |
|
| 87 |
typedef enum { |
| 88 |
EWS_SEARCH_AD, |
| 89 |
EWS_SEARCH_AD_CONTACTS, |
| 90 |
EWS_SEARCH_CONTACTS, |
| 91 |
EWS_SEARCH_CONTACTS_AD |
| 92 |
} EwsContactsSearchScope; |
| 93 |
|
| 94 |
typedef enum { |
| 95 |
EWS_HARD_DELETE = 1, |
| 96 |
EWS_SOFT_DELETE, |
| 97 |
EWS_MOVE_TO_DELETED_ITEMS |
| 98 |
} EwsDeleteType; |
| 99 |
|
| 100 |
typedef enum { |
| 101 |
EWS_SEND_TO_NONE = 1, |
| 102 |
EWS_SEND_ONLY_TO_ALL, |
| 103 |
EWS_SEND_TO_ALL_AND_SAVE_COPY |
| 104 |
} EwsSendMeetingCancellationsType; |
| 105 |
|
| 106 |
typedef enum { |
| 107 |
EWS_NONE_OCCURRENCES = 0, |
| 108 |
EWS_ALL_OCCURRENCES, |
| 109 |
EWS_SPECIFIED_OCCURRENCE_ONLY |
| 110 |
} EwsAffectedTaskOccurrencesType; |
| 111 |
|
| 112 |
typedef enum { |
| 113 |
E_EWS_SIZE_REQUESTED_UNKNOWN = 0, |
| 114 |
E_EWS_SIZE_REQUESTED_48X48 = 48, |
| 115 |
E_EWS_SIZE_REQUESTED_64X64 = 64, |
| 116 |
E_EWS_SIZE_REQUESTED_96X96 = 96, |
| 117 |
E_EWS_SIZE_REQUESTED_120X120 = 120, |
| 118 |
E_EWS_SIZE_REQUESTED_240X240 = 240, |
| 119 |
E_EWS_SIZE_REQUESTED_360X360 = 360, |
| 120 |
E_EWS_SIZE_REQUESTED_432X432 = 432, |
| 121 |
E_EWS_SIZE_REQUESTED_504X504 = 504, |
| 122 |
E_EWS_SIZE_REQUESTED_648X648 = 648 |
| 123 |
} EEwsSizeRequested; |
| 124 |
|
| 125 |
typedef enum { |
| 126 |
E_EWS_USER_CONFIGURATION_PROPERTIES_UNKNOWN = -1, |
| 127 |
E_EWS_USER_CONFIGURATION_PROPERTIES_ID, |
| 128 |
E_EWS_USER_CONFIGURATION_PROPERTIES_DICTIONARY, |
| 129 |
E_EWS_USER_CONFIGURATION_PROPERTIES_XMLDATA, |
| 130 |
E_EWS_USER_CONFIGURATION_PROPERTIES_BINARYDATA /*, |
| 131 |
E_EWS_USER_CONFIGURATION_PROPERTIES_ALL - skip it, be specific */ |
| 132 |
} EEwsUserConfigurationProperties; |
| 133 |
|
| 134 |
typedef struct { |
| 135 |
gchar *id; |
| 136 |
gchar *dn; |
| 137 |
gchar *name; |
| 138 |
} EwsOAL; |
| 139 |
|
| 140 |
typedef struct { |
| 141 |
gchar *type; |
| 142 |
guint32 seq; |
| 143 |
guint32 ver; |
| 144 |
guint32 size; |
| 145 |
guint32 uncompressed_size; |
| 146 |
gchar *sha; |
| 147 |
gchar *filename; |
| 148 |
} EwsOALDetails; |
| 149 |
|
| 150 |
typedef struct { |
| 151 |
gchar *sid; |
| 152 |
gchar *primary_smtp; |
| 153 |
gchar *display_name; |
| 154 |
gchar *distinguished_user; |
| 155 |
gchar *external_user; |
| 156 |
} EwsUserId; |
| 157 |
|
| 158 |
typedef enum { |
| 159 |
EwsPermissionLevel_Unknown = 0, |
| 160 |
EwsPermissionLevel_None, |
| 161 |
EwsPermissionLevel_Reviewer, |
| 162 |
EwsPermissionLevel_Author, |
| 163 |
EwsPermissionLevel_Editor, |
| 164 |
EwsPermissionLevel_Custom |
| 165 |
} EwsPermissionLevel; |
| 166 |
|
| 167 |
typedef struct { |
| 168 |
EwsUserId *user_id; |
| 169 |
EwsPermissionLevel calendar, tasks, inbox, contacts, notes, journal; |
| 170 |
gboolean meetingcopies; |
| 171 |
gboolean view_priv_items; |
| 172 |
} EwsDelegateInfo; |
| 173 |
|
| 174 |
typedef enum { |
| 175 |
EwsDelegateDeliver_DelegatesOnly, |
| 176 |
EwsDelegateDeliver_DelegatesAndMe, |
| 177 |
EwsDelegateDeliver_DelegatesAndSendInformationToMe |
| 178 |
} EwsDelegateDeliver; |
| 179 |
|
| 180 |
typedef enum { |
| 181 |
NORMAL_FIELD_URI, |
| 182 |
INDEXED_FIELD_URI, |
| 183 |
EXTENDED_FIELD_URI |
| 184 |
} EwsFieldURIType; |
| 185 |
|
| 186 |
typedef struct { |
| 187 |
gchar *distinguished_prop_set_id; |
| 188 |
gchar *prop_set_id; |
| 189 |
gchar *prop_tag; |
| 190 |
gchar *prop_name; |
| 191 |
gchar *prop_id; |
| 192 |
gchar *prop_type; |
| 193 |
} EEwsExtendedFieldURI; |
| 194 |
|
| 195 |
typedef struct { |
| 196 |
gchar *field_uri; |
| 197 |
gchar *field_index; |
| 198 |
} EEwsIndexedFieldURI; |
| 199 |
|
| 200 |
typedef struct { |
| 201 |
gchar *field_uri; |
| 202 |
GSList *extended_furis; |
| 203 |
GSList *indexed_furis; |
| 204 |
} EEwsAdditionalProps; |
| 205 |
|
| 206 |
typedef struct { |
| 207 |
gchar *order; |
| 208 |
gint uri_type; |
| 209 |
gpointer field_uri; |
| 210 |
} EwsSortOrder; |
| 211 |
|
| 212 |
typedef struct { |
| 213 |
gchar *id; |
| 214 |
gsize len; |
| 215 |
} EwsPhotoAttachmentInfo; |
| 216 |
|
| 217 |
typedef enum { |
| 218 |
E_EWS_NOTIFICATION_EVENT_COPIED = 0, |
| 219 |
E_EWS_NOTIFICATION_EVENT_CREATED, |
| 220 |
E_EWS_NOTIFICATION_EVENT_DELETED, |
| 221 |
E_EWS_NOTIFICATION_EVENT_MODIFIED, |
| 222 |
E_EWS_NOTIFICATION_EVENT_MOVED, |
| 223 |
E_EWS_NOTIFICATION_EVENT_STATUS |
| 224 |
} EEwsNotificationEventType; |
| 225 |
|
| 226 |
typedef struct { |
| 227 |
EEwsNotificationEventType type; |
| 228 |
gboolean is_item; |
| 229 |
gchar *folder_id; |
| 230 |
gchar *old_folder_id; |
| 231 |
} EEwsNotificationEvent; |
| 232 |
|
| 233 |
/* |
| 234 |
* <To Kind=""/> |
| 235 |
*/ |
| 236 |
typedef struct { |
| 237 |
gchar *kind; |
| 238 |
gchar *value; |
| 239 |
} EEwsCalendarTo; |
| 240 |
|
| 241 |
/* |
| 242 |
* <AbsoluteDateTransition> |
| 243 |
* <To/> |
| 244 |
* <DateTime/> |
| 245 |
* </AbsoluteDateTransition> |
| 246 |
*/ |
| 247 |
typedef struct { |
| 248 |
EEwsCalendarTo *to; |
| 249 |
gchar *date_time; |
| 250 |
} EEwsCalendarAbsoluteDateTransition; |
| 251 |
|
| 252 |
/* |
| 253 |
* <RecurringDayTransition> |
| 254 |
* <To/> |
| 255 |
* <TimeOffset/> |
| 256 |
* <Month/> |
| 257 |
* <DayOfWeek/> |
| 258 |
* <Ocurrence/> |
| 259 |
* </RecurringDayTransition> |
| 260 |
*/ |
| 261 |
typedef struct { |
| 262 |
EEwsCalendarTo *to; |
| 263 |
gchar *time_offset; |
| 264 |
gchar *month; |
| 265 |
gchar *day_of_week; |
| 266 |
gchar *occurrence; |
| 267 |
} EEwsCalendarRecurringDayTransition; |
| 268 |
|
| 269 |
/* |
| 270 |
* <RecurringDateTransition> |
| 271 |
* <To/> |
| 272 |
* <TimeOffset/> |
| 273 |
* <Month/> |
| 274 |
* <Day/> |
| 275 |
* </RecurringDateTransition> |
| 276 |
*/ |
| 277 |
typedef struct { |
| 278 |
EEwsCalendarTo *to; |
| 279 |
gchar *time_offset; |
| 280 |
gchar *month; |
| 281 |
gchar *day; |
| 282 |
} EEwsCalendarRecurringDateTransition; |
| 283 |
|
| 284 |
/* |
| 285 |
* <Period Bias="" Name="" Id=""/> |
| 286 |
*/ |
| 287 |
typedef struct { |
| 288 |
gchar *bias; |
| 289 |
gchar *name; |
| 290 |
gchar *id; |
| 291 |
} EEwsCalendarPeriod; |
| 292 |
|
| 293 |
/* |
| 294 |
* <TransitionsGroup Id=""> |
| 295 |
* <Transition> |
| 296 |
* <To/> |
| 297 |
* <Transition> |
| 298 |
* <AbsoluteDateTransition/> |
| 299 |
* <RecurringDayTransition/> |
| 300 |
* <RecurringDateTransition/> |
| 301 |
* </TransitionsGroup> |
| 302 |
*/ |
| 303 |
typedef struct { |
| 304 |
gchar *id; |
| 305 |
EEwsCalendarTo *transition; |
| 306 |
GSList *absolute_date_transitions; /* EEwsCalendarAbsoluteDateTransition */ |
| 307 |
GSList *recurring_day_transitions; /* EEwsCalendarRecurringDayTransition */ |
| 308 |
GSList *recurring_date_transitions; /* EEwsCalendarRecurringDateTransition */ |
| 309 |
} EEwsCalendarTransitionsGroup; |
| 310 |
|
| 311 |
/* |
| 312 |
* <Transitions Id=""> |
| 313 |
* <Transition> |
| 314 |
* <To/> |
| 315 |
* <Transition> |
| 316 |
* <AbsoluteDateTransition/> |
| 317 |
* <RecurringDayTransition/> |
| 318 |
* <RecurringDateTransition/> |
| 319 |
* </Transitions> |
| 320 |
*/ |
| 321 |
typedef struct { |
| 322 |
EEwsCalendarTo *transition; |
| 323 |
GSList *absolute_date_transitions; /* EEwsCalendarAbsoluteDateTransition */ |
| 324 |
GSList *recurring_day_transitions; /* EEwsCalendarRecurringDayTransition */ |
| 325 |
GSList *recurring_date_transitions; /* EEwsCalendarRecurringDateTransition */ |
| 326 |
} EEwsCalendarTransitions; |
| 327 |
|
| 328 |
/* |
| 329 |
* <TimeZoneDefinition Id="" Name=""> |
| 330 |
* <Periods> |
| 331 |
* <Period/> |
| 332 |
* </Periods> |
| 333 |
* <TransitionsGroups> |
| 334 |
* <TransitionsGroup/> |
| 335 |
* </TransitionsGroups> |
| 336 |
* <Transitions/> |
| 337 |
* </TimeZoneDefinition> |
| 338 |
*/ |
| 339 |
typedef struct { |
| 340 |
gchar *name; |
| 341 |
gchar *id; |
| 342 |
GSList *periods; /* EEwsCalendarPeriod */ |
| 343 |
GSList *transitions_groups; /* EEwsCalendarTrasitionsGroup */ |
| 344 |
EEwsCalendarTransitions *transitions; |
| 345 |
} EEwsCalendarTimeZoneDefinition; |
| 346 |
|
| 347 |
EEwsCalendarTo * |
| 348 |
e_ews_calendar_to_new (void); |
| 349 |
void e_ews_calendar_to_free (EEwsCalendarTo *to); |
| 350 |
|
| 351 |
EEwsCalendarAbsoluteDateTransition * |
| 352 |
e_ews_calendar_absolute_date_transition_new |
| 353 |
(void); |
| 354 |
void e_ews_calendar_absolute_date_transition_free |
| 355 |
(EEwsCalendarAbsoluteDateTransition *adt); |
| 356 |
|
| 357 |
EEwsCalendarRecurringDayTransition * |
| 358 |
e_ews_calendar_recurring_day_transition_new |
| 359 |
(void); |
| 360 |
void e_ews_calendar_recurring_day_transition_free |
| 361 |
(EEwsCalendarRecurringDayTransition *rdayt); |
| 362 |
|
| 363 |
EEwsCalendarRecurringDateTransition * |
| 364 |
e_ews_calendar_recurring_date_transition_new |
| 365 |
(void); |
| 366 |
void e_ews_calendar_recurring_date_transition_free |
| 367 |
(EEwsCalendarRecurringDateTransition *rdatet); |
| 368 |
|
| 369 |
EEwsCalendarPeriod * |
| 370 |
e_ews_calendar_period_new (void); |
| 371 |
void e_ews_calendar_period_free (EEwsCalendarPeriod *period); |
| 372 |
|
| 373 |
EEwsCalendarTransitionsGroup * |
| 374 |
e_ews_calendar_transitions_group_new |
| 375 |
(void); |
| 376 |
void e_ews_calendar_transitions_group_free |
| 377 |
(EEwsCalendarTransitionsGroup *tg); |
| 378 |
|
| 379 |
EEwsCalendarTransitions * |
| 380 |
e_ews_calendar_transitions_new (void); |
| 381 |
void e_ews_calendar_transitions_free (EEwsCalendarTransitions *transitions); |
| 382 |
|
| 383 |
EEwsCalendarTimeZoneDefinition * |
| 384 |
e_ews_calendar_time_zone_definition_new |
| 385 |
(void); |
| 386 |
void e_ews_calendar_time_zone_definition_free |
| 387 |
(EEwsCalendarTimeZoneDefinition *tzd); |
| 388 |
|
| 389 |
EEwsExtendedFieldURI * |
| 390 |
e_ews_extended_field_uri_new (void); |
| 391 |
void e_ews_extended_field_uri_free (EEwsExtendedFieldURI *ex_field_uri); |
| 392 |
|
| 393 |
EEwsIndexedFieldURI * |
| 394 |
e_ews_indexed_field_uri_new (const gchar *uri, |
| 395 |
const gchar *index); |
| 396 |
void e_ews_indexed_field_uri_free (EEwsIndexedFieldURI *id_field_uri); |
| 397 |
|
| 398 |
EEwsAdditionalProps * |
| 399 |
e_ews_additional_props_new (void); |
| 400 |
void e_ews_additional_props_free (EEwsAdditionalProps *add_props); |
| 401 |
|
| 402 |
EEwsNotificationEvent * |
| 403 |
e_ews_notification_event_new (void); |
| 404 |
void e_ews_notification_event_free (EEwsNotificationEvent *event); |
| 405 |
|
| 406 |
void ews_oal_free (EwsOAL *oal); |
| 407 |
void ews_oal_details_free (EwsOALDetails *details); |
| 408 |
|
| 409 |
GType e_ews_connection_get_type (void); |
| 410 |
EEwsConnection *e_ews_connection_new (ESource *source, |
| 411 |
const gchar *uri, |
| 412 |
CamelEwsSettings *settings); |
| 413 |
EEwsConnection *e_ews_connection_new_full (ESource *source, |
| 414 |
const gchar *uri, |
| 415 |
CamelEwsSettings *settings, |
| 416 |
gboolean allow_connection_reuse); |
| 417 |
EEwsConnection *e_ews_connection_new_for_backend(EBackend *backend, |
| 418 |
ESourceRegistry *registry, |
| 419 |
const gchar *uri, |
| 420 |
CamelEwsSettings *settings); |
| 421 |
void e_ews_connection_set_testing_sources |
| 422 |
(EEwsConnection *cnc, |
| 423 |
gboolean testing_sources); |
| 424 |
gboolean e_ews_connection_get_testing_sources |
| 425 |
(EEwsConnection *cnc); |
| 426 |
void e_ews_connection_update_credentials |
| 427 |
(EEwsConnection *cnc, |
| 428 |
const ENamedParameters *credentials); |
| 429 |
ESourceAuthenticationResult |
| 430 |
e_ews_connection_try_credentials_sync |
| 431 |
(EEwsConnection *cnc, |
| 432 |
const ENamedParameters *credentials, |
| 433 |
ESource *use_source, |
| 434 |
gchar **out_certificate_pem, |
| 435 |
GTlsCertificateFlags *out_certificate_errors, |
| 436 |
GCancellable *cancellable, |
| 437 |
GError **error); |
| 438 |
ESource * e_ews_connection_get_source (EEwsConnection *cnc); |
| 439 |
gboolean e_ews_connection_get_ssl_error_details |
| 440 |
(EEwsConnection *cnc, |
| 441 |
gchar **out_certificate_pem, |
| 442 |
GTlsCertificateFlags *out_certificate_errors); |
| 443 |
const gchar * e_ews_connection_get_uri (EEwsConnection *cnc); |
| 444 |
gchar * e_ews_connection_dup_password (EEwsConnection *cnc); |
| 445 |
void e_ews_connection_set_password (EEwsConnection *cnc, |
| 446 |
const gchar *password); |
| 447 |
const gchar * e_ews_connection_get_impersonate_user |
| 448 |
(EEwsConnection *cnc); |
| 449 |
GProxyResolver * |
| 450 |
e_ews_connection_ref_proxy_resolver |
| 451 |
(EEwsConnection *cnc); |
| 452 |
void e_ews_connection_set_proxy_resolver |
| 453 |
(EEwsConnection *cnc, |
| 454 |
GProxyResolver *proxy_resolver); |
| 455 |
CamelEwsSettings * |
| 456 |
e_ews_connection_ref_settings (EEwsConnection *cnc); |
| 457 |
gboolean e_ews_connection_get_backoff_enabled |
| 458 |
(EEwsConnection *cnc); |
| 459 |
void e_ews_connection_set_backoff_enabled |
| 460 |
(EEwsConnection *cnc, |
| 461 |
gboolean enabled); |
| 462 |
gboolean e_ews_connection_get_disconnected_flag |
| 463 |
(EEwsConnection *cnc); |
| 464 |
void e_ews_connection_set_disconnected_flag |
| 465 |
(EEwsConnection *cnc, |
| 466 |
gboolean disconnected_flag); |
| 467 |
gchar * e_ews_connection_dup_last_subscription_id |
| 468 |
(EEwsConnection *cnc); |
| 469 |
void e_ews_connection_set_last_subscription_id |
| 470 |
(EEwsConnection *cnc, |
| 471 |
const gchar *subscription_id); |
| 472 |
EEwsConnection *e_ews_connection_find (const gchar *uri, |
| 473 |
CamelEwsSettings *ews_settings); |
| 474 |
GSList * e_ews_connection_list_existing (void); /* EEwsConnection * */ |
| 475 |
|
| 476 |
gboolean e_ews_autodiscover_ws_url_sync (ESource *source, |
| 477 |
CamelEwsSettings *settings, |
| 478 |
const gchar *email_address, |
| 479 |
const gchar *password, |
| 480 |
gchar **out_certificate_pem, |
| 481 |
GTlsCertificateFlags *out_certificate_errors, |
| 482 |
GCancellable *cancellable, |
| 483 |
GError **error); |
| 484 |
const gchar * e_ews_connection_get_mailbox (EEwsConnection *cnc); |
| 485 |
void e_ews_connection_set_mailbox (EEwsConnection *cnc, |
| 486 |
const gchar *email); |
| 487 |
|
| 488 |
EEwsServerVersion |
| 489 |
e_ews_connection_get_server_version |
| 490 |
(EEwsConnection *cnc); |
| 491 |
void e_ews_connection_set_server_version |
| 492 |
(EEwsConnection *cnc, |
| 493 |
EEwsServerVersion version); |
| 494 |
void e_ews_connection_set_server_version_from_string |
| 495 |
(EEwsConnection *cnc, |
| 496 |
const gchar *version); |
| 497 |
gboolean e_ews_connection_satisfies_server_version |
| 498 |
(EEwsConnection *cnc, |
| 499 |
EEwsServerVersion versio); |
| 500 |
|
| 501 |
void ews_user_id_free (EwsUserId *id); |
| 502 |
void ews_delegate_info_free (EwsDelegateInfo *info); |
| 503 |
|
| 504 |
gboolean e_ews_connection_sync_folder_items_sync |
| 505 |
(EEwsConnection *cnc, |
| 506 |
gint pri, |
| 507 |
const gchar *old_sync_state, |
| 508 |
const gchar *fid, |
| 509 |
const gchar *default_props, |
| 510 |
const EEwsAdditionalProps *add_props, |
| 511 |
guint max_entries, |
| 512 |
gchar **out_new_sync_state, |
| 513 |
gboolean *out_includes_last_item, |
| 514 |
GSList **out_items_created, /* EEwsItem * */ |
| 515 |
GSList **items_updated, /* EEwsItem * */ |
| 516 |
GSList **items_deleted, /* gchar * */ |
| 517 |
GCancellable *cancellable, |
| 518 |
GError **error); |
| 519 |
|
| 520 |
typedef void (*EwsConvertQueryCallback) (ESoapRequest *request, |
| 521 |
const gchar *query, |
| 522 |
EEwsFolderType type); |
| 523 |
|
| 524 |
gboolean e_ews_connection_find_folder_items_sync |
| 525 |
(EEwsConnection *cnc, |
| 526 |
gint pri, |
| 527 |
EwsFolderId *fid, |
| 528 |
const gchar *default_props, |
| 529 |
const EEwsAdditionalProps *add_props, |
| 530 |
EwsSortOrder *sort_order, |
| 531 |
const gchar *query, |
| 532 |
GPtrArray *only_ids, /* element-type utf8 */ |
| 533 |
EEwsFolderType type, |
| 534 |
gboolean *out_includes_last_item, |
| 535 |
GSList **out_items, /* EEwsItem * */ |
| 536 |
EwsConvertQueryCallback convert_query_cb, |
| 537 |
GCancellable *cancellable, |
| 538 |
GError **error); |
| 539 |
gboolean e_ews_connection_get_items_sync (EEwsConnection *cnc, |
| 540 |
gint pri, |
| 541 |
const GSList *ids, /* gchar * */ |
| 542 |
const gchar *default_props, |
| 543 |
const EEwsAdditionalProps *add_props, |
| 544 |
gboolean include_mime, |
| 545 |
const gchar *mime_directory, |
| 546 |
EEwsBodyType body_type, |
| 547 |
GSList **out_items, /* EEwsItem * */ |
| 548 |
ESoapResponseProgressFn progress_fn, |
| 549 |
gpointer progress_data, |
| 550 |
GCancellable *cancellable, |
| 551 |
GError **error); |
| 552 |
gboolean e_ews_connection_delete_items_sync |
| 553 |
(EEwsConnection *cnc, |
| 554 |
gint pri, |
| 555 |
const GSList *ids, /* gchar * */ |
| 556 |
EwsDeleteType delete_type, |
| 557 |
EwsSendMeetingCancellationsType send_cancels, |
| 558 |
EwsAffectedTaskOccurrencesType affected_tasks, |
| 559 |
GCancellable *cancellable, |
| 560 |
GError **error); |
| 561 |
gboolean e_ews_connection_delete_items_in_chunks_sync |
| 562 |
(EEwsConnection *cnc, |
| 563 |
gint pri, |
| 564 |
const GSList *ids, /* gchar * */ |
| 565 |
EwsDeleteType delete_type, |
| 566 |
EwsSendMeetingCancellationsType send_cancels, |
| 567 |
EwsAffectedTaskOccurrencesType affected_tasks, |
| 568 |
GCancellable *cancellable, |
| 569 |
GError **error); |
| 570 |
gboolean e_ews_connection_delete_item_sync |
| 571 |
(EEwsConnection *cnc, |
| 572 |
gint pri, |
| 573 |
EwsId *id, |
| 574 |
guint index, |
| 575 |
EwsDeleteType delete_type, |
| 576 |
EwsSendMeetingCancellationsType send_cancels, |
| 577 |
EwsAffectedTaskOccurrencesType affected_tasks, |
| 578 |
GCancellable *cancellable, |
| 579 |
GError **error); |
| 580 |
gboolean e_ews_connection_update_items_sync |
| 581 |
(EEwsConnection *cnc, |
| 582 |
gint pri, |
| 583 |
const gchar *conflict_res, |
| 584 |
const gchar *msg_disposition, |
| 585 |
const gchar *send_invites, |
| 586 |
const gchar *folder_id, |
| 587 |
EEwsRequestCreationCallback create_cb, |
| 588 |
gpointer create_user_data, |
| 589 |
GSList **out_items, /* EEwsItem * */ |
| 590 |
GCancellable *cancellable, |
| 591 |
GError **error); |
| 592 |
gboolean e_ews_connection_create_items_sync |
| 593 |
(EEwsConnection *cnc, |
| 594 |
gint pri, |
| 595 |
const gchar *msg_disposition, |
| 596 |
const gchar *send_invites, |
| 597 |
const EwsFolderId *fid, |
| 598 |
EEwsRequestCreationCallback create_cb, |
| 599 |
gpointer create_user_data, |
| 600 |
GSList **out_items, /* EEwsItem * */ |
| 601 |
GCancellable *cancellable, |
| 602 |
GError **error); |
| 603 |
gboolean e_ews_connection_sync_folder_hierarchy_sync |
| 604 |
(EEwsConnection *cnc, |
| 605 |
gint pri, |
| 606 |
const gchar *old_sync_state, |
| 607 |
gchar **new_sync_state, |
| 608 |
gboolean *includes_last_folder, |
| 609 |
GSList **folders_created, |
| 610 |
GSList **folders_updated, |
| 611 |
GSList **folders_deleted, |
| 612 |
GCancellable *cancellable, |
| 613 |
GError **error); |
| 614 |
gboolean e_ews_connection_resolve_names_sync |
| 615 |
(EEwsConnection *cnc, |
| 616 |
gint pri, |
| 617 |
const gchar *resolve_name, |
| 618 |
EwsContactsSearchScope scope, |
| 619 |
GSList *parent_folder_ids, |
| 620 |
gboolean fetch_contact_data, |
| 621 |
gboolean *out_includes_last_item, |
| 622 |
GSList **out_mailboxes, /* EwsMailbox * */ |
| 623 |
GSList **out_contact_items, /* EEwsItem * */ |
| 624 |
GCancellable *cancellable, |
| 625 |
GError **error); |
| 626 |
gboolean e_ews_connection_expand_dl_sync (EEwsConnection *cnc, |
| 627 |
gint pri, |
| 628 |
const EwsMailbox *mb, |
| 629 |
gboolean *out_includes_last_item, |
| 630 |
GSList **out_mailboxes, /* EwsMailbox * */ |
| 631 |
GCancellable *cancellable, |
| 632 |
GError **error); |
| 633 |
gboolean e_ews_connection_ex_to_smtp_sync |
| 634 |
(EEwsConnection *cnc, |
| 635 |
gint pri, |
| 636 |
const gchar *name, |
| 637 |
const gchar *ex_address, |
| 638 |
gchar **smtp_address, |
| 639 |
GCancellable *cancellable, |
| 640 |
GError **error); |
| 641 |
gboolean e_ews_connection_create_folder_sync |
| 642 |
(EEwsConnection *cnc, |
| 643 |
gint pri, |
| 644 |
const gchar *parent_folder_id, |
| 645 |
gboolean is_distinguished_id, |
| 646 |
const gchar *folder_name, |
| 647 |
EEwsFolderType folder_type, |
| 648 |
EwsFolderId **out_folder_id, |
| 649 |
GCancellable *cancellable, |
| 650 |
GError **error); |
| 651 |
gboolean e_ews_connection_delete_folder_sync |
| 652 |
(EEwsConnection *cnc, |
| 653 |
gint pri, |
| 654 |
const gchar *folder_id, |
| 655 |
gboolean is_distinguished_id, |
| 656 |
const gchar *delete_type, |
| 657 |
GCancellable *cancellable, |
| 658 |
GError **error); |
| 659 |
gboolean e_ews_connection_empty_folder_sync |
| 660 |
(EEwsConnection *cnc, |
| 661 |
gint pri, |
| 662 |
const gchar *folder_id, |
| 663 |
gboolean is_distinguished_id, |
| 664 |
const gchar *delete_type, |
| 665 |
gboolean delete_subfolders, |
| 666 |
GCancellable *cancellable, |
| 667 |
GError **error); |
| 668 |
gboolean e_ews_connection_update_folder_sync |
| 669 |
(EEwsConnection *cnc, |
| 670 |
gint pri, |
| 671 |
EEwsRequestCreationCallback create_cb, |
| 672 |
gpointer create_user_data, |
| 673 |
GCancellable *cancellable, |
| 674 |
GError **error); |
| 675 |
gboolean e_ews_connection_move_folder_sync |
| 676 |
(EEwsConnection *cnc, |
| 677 |
gint pri, |
| 678 |
const gchar *to_folder, |
| 679 |
const gchar *folder, |
| 680 |
GCancellable *cancellable, |
| 681 |
GError **error); |
| 682 |
gboolean e_ews_connection_get_folder_sync |
| 683 |
(EEwsConnection *cnc, |
| 684 |
gint pri, |
| 685 |
const gchar *folder_shape, |
| 686 |
const EEwsAdditionalProps *add_props, |
| 687 |
GSList *folder_ids, /* EwsFolderId * */ |
| 688 |
GSList **out_folders, /* EEwsFolder * */ |
| 689 |
GCancellable *cancellable, |
| 690 |
GError **error); |
| 691 |
gboolean e_ews_connection_move_items_sync |
| 692 |
(EEwsConnection *cnc, |
| 693 |
gint pri, |
| 694 |
const gchar *folder_id, |
| 695 |
gboolean docopy, |
| 696 |
const GSList *ids, /* gchar * */ |
| 697 |
GSList **out_items, /* EEwsItem * */ |
| 698 |
GCancellable *cancellable, |
| 699 |
GError **error); |
| 700 |
gboolean e_ews_connection_move_items_in_chunks_sync |
| 701 |
(EEwsConnection *cnc, |
| 702 |
gint pri, |
| 703 |
const gchar *folder_id, |
| 704 |
gboolean docopy, |
| 705 |
const GSList *ids, /* gchar * */ |
| 706 |
GSList **out_items, /* EEwsItems * */ |
| 707 |
GCancellable *cancellable, |
| 708 |
GError **error); |
| 709 |
gboolean e_ews_connection_create_attachments_sync |
| 710 |
(EEwsConnection *cnc, |
| 711 |
gint pri, |
| 712 |
const EwsId *parent, |
| 713 |
const GSList *files, /* EEwsAttachmentInfo * */ |
| 714 |
gboolean is_contact_photo, |
| 715 |
gchar **out_change_key, |
| 716 |
GSList **out_attachments_ids, /* gchar * */ |
| 717 |
GCancellable *cancellable, |
| 718 |
GError **error); |
| 719 |
gboolean e_ews_connection_delete_attachments_sync |
| 720 |
(EEwsConnection *cnc, |
| 721 |
gint pri, |
| 722 |
const GSList *attachments_ids, /* gchar * */ |
| 723 |
gchar **out_new_change_key, |
| 724 |
GCancellable *cancellable, |
| 725 |
GError **error); |
| 726 |
gboolean e_ews_connection_get_attachments_sync |
| 727 |
(EEwsConnection *cnc, |
| 728 |
gint pri, |
| 729 |
const gchar *uid, |
| 730 |
const GSList *ids, /* const gchar * */ |
| 731 |
const gchar *cache_directory, |
| 732 |
gboolean include_mime, |
| 733 |
GSList **out_attachments, /* EEwsAttachmentInfo * */ |
| 734 |
ESoapResponseProgressFn progress_fn, |
| 735 |
gpointer progress_data, |
| 736 |
GCancellable *cancellable, |
| 737 |
GError **error); |
| 738 |
gboolean e_ews_connection_get_oal_list_sync |
| 739 |
(EEwsConnection *cnc, |
| 740 |
GSList **out_oals, /* EwsOAL * */ |
| 741 |
GCancellable *cancellable, |
| 742 |
GError **error); |
| 743 |
gboolean e_ews_connection_get_oal_detail_sync |
| 744 |
(EEwsConnection *cnc, |
| 745 |
const gchar *oal_uri, |
| 746 |
const gchar *oal_id, |
| 747 |
const gchar *oal_element, |
| 748 |
const gchar *old_etag, |
| 749 |
GSList **out_elements, /* EwsOALDetails * */ |
| 750 |
gchar **out_etag, |
| 751 |
GCancellable *cancellable, |
| 752 |
GError **error); |
| 753 |
gboolean e_ews_connection_download_oal_file_sync |
| 754 |
(EEwsConnection *cnc, |
| 755 |
const gchar *oal_uri, |
| 756 |
const gchar *cache_filename, |
| 757 |
ESoapResponseProgressFn progress_fn, |
| 758 |
gpointer progress_data, |
| 759 |
GCancellable *cancellable, |
| 760 |
GError **error); |
| 761 |
gboolean e_ews_connection_get_free_busy_sync |
| 762 |
(EEwsConnection *cnc, |
| 763 |
gint pri, |
| 764 |
EEwsRequestCreationCallback free_busy_cb, |
| 765 |
gpointer create_user_data, |
| 766 |
GSList **out_free_busy, /* ICalComponent * */ |
| 767 |
GCancellable *cancellable, |
| 768 |
GError **error); |
| 769 |
gboolean e_ews_connection_get_delegate_sync |
| 770 |
(EEwsConnection *cnc, |
| 771 |
gint pri, |
| 772 |
const gchar *mail_id, |
| 773 |
gboolean include_permissions, |
| 774 |
EwsDelegateDeliver *out_deliver_to, |
| 775 |
GSList **out_delegates, /* EwsDelegateInfo * */ |
| 776 |
GCancellable *cancellable, |
| 777 |
GError **error); |
| 778 |
gboolean e_ews_connection_add_delegate_sync |
| 779 |
(EEwsConnection *cnc, |
| 780 |
gint pri, |
| 781 |
const gchar *mail_id, |
| 782 |
const GSList *delegates, /* EwsDelegateInfo * */ |
| 783 |
GCancellable *cancellable, |
| 784 |
GError **error); |
| 785 |
gboolean e_ews_connection_remove_delegate_sync |
| 786 |
(EEwsConnection *cnc, |
| 787 |
gint pri, |
| 788 |
const gchar *mail_id, |
| 789 |
const GSList *delegate_ids, /* EwsUserId * */ |
| 790 |
GCancellable *cancellable, |
| 791 |
GError **error); |
| 792 |
gboolean e_ews_connection_update_delegate_sync |
| 793 |
(EEwsConnection *cnc, |
| 794 |
gint pri, |
| 795 |
const gchar *mail_id, |
| 796 |
EwsDelegateDeliver deliver_to, |
| 797 |
const GSList *delegates, /* EwsDelegateInfo * */ |
| 798 |
GCancellable *cancellable, |
| 799 |
GError **error); |
| 800 |
gboolean e_ews_connection_get_folder_permissions_sync |
| 801 |
(EEwsConnection *cnc, |
| 802 |
gint pri, |
| 803 |
EwsFolderId *folder_id, |
| 804 |
GSList **out_permissions, /* EEwsPermission * */ |
| 805 |
GCancellable *cancellable, |
| 806 |
GError **error); |
| 807 |
gboolean e_ews_connection_set_folder_permissions_sync |
| 808 |
(EEwsConnection *cnc, |
| 809 |
gint pri, |
| 810 |
EwsFolderId *folder_id, |
| 811 |
EEwsFolderType folder_type, |
| 812 |
const GSList *permissions, /* EEwsPermission * */ |
| 813 |
GCancellable *cancellable, |
| 814 |
GError **error); |
| 815 |
gboolean e_ews_connection_get_password_expiration_sync |
| 816 |
(EEwsConnection *cnc, |
| 817 |
gint pri, |
| 818 |
const gchar *mail_id, |
| 819 |
gchar **out_exp_date, |
| 820 |
GCancellable *cancellable, |
| 821 |
GError **error); |
| 822 |
gboolean e_ews_connection_get_folder_info_sync |
| 823 |
(EEwsConnection *cnc, |
| 824 |
gint pri, |
| 825 |
const gchar *mail_id, |
| 826 |
const EwsFolderId *folder_id, |
| 827 |
EEwsFolder **out_folder, |
| 828 |
GCancellable *cancellable, |
| 829 |
GError **error); |
| 830 |
gboolean e_ews_connection_find_folder_sync |
| 831 |
(EEwsConnection *cnc, |
| 832 |
gint pri, |
| 833 |
const EwsFolderId *fid, |
| 834 |
gboolean *out_includes_last_item, |
| 835 |
GSList **out_folders, /* EEwsFolder * */ |
| 836 |
GCancellable *cancellable, |
| 837 |
GError **error); |
| 838 |
gboolean e_ews_connection_query_auth_methods_sync |
| 839 |
(EEwsConnection *cnc, |
| 840 |
gint pri, |
| 841 |
GSList **out_auth_methods, /* gchar * */ |
| 842 |
GCancellable *cancellable, |
| 843 |
GError **error); |
| 844 |
void e_ews_connection_enable_notifications_sync |
| 845 |
(EEwsConnection *cnc, |
| 846 |
GSList *folders, |
| 847 |
guint *subscription_key); |
| 848 |
void e_ews_connection_disable_notifications_sync |
| 849 |
(EEwsConnection *cnc, |
| 850 |
guint subscription_key); |
| 851 |
gboolean e_ews_connection_get_server_time_zones_sync |
| 852 |
(EEwsConnection *cnc, |
| 853 |
gint pri, |
| 854 |
const GSList *msdn_locations, /* gchar * */ |
| 855 |
GSList **out_tzds, /* EEwsCalendarTimeZoneDefinition */ |
| 856 |
GCancellable *cancellable, |
| 857 |
GError **error); |
| 858 |
gboolean e_ews_connection_get_user_photo_sync |
| 859 |
(EEwsConnection *cnc, |
| 860 |
gint pri, |
| 861 |
const gchar *email, |
| 862 |
EEwsSizeRequested size_requested, |
| 863 |
gchar **out_picture_data, /* base64-encoded */ |
| 864 |
GCancellable *cancellable, |
| 865 |
GError **error); |
| 866 |
gboolean e_ews_connection_get_user_configuration_sync |
| 867 |
(EEwsConnection *cnc, |
| 868 |
gint pri, |
| 869 |
const EwsFolderId *fid, |
| 870 |
const gchar *config_name, |
| 871 |
EEwsUserConfigurationProperties props, |
| 872 |
gchar **out_properties, |
| 873 |
GCancellable *cancellable, |
| 874 |
GError **error); |
| 875 |
gboolean e_ews_connection_convert_id_sync(EEwsConnection *cnc, |
| 876 |
gint pri, |
| 877 |
const gchar *email, |
| 878 |
const gchar *folder_id, |
| 879 |
const gchar *from_format, |
| 880 |
const gchar *to_format, |
| 881 |
gchar **out_converted_id, |
| 882 |
GCancellable *cancellable, |
| 883 |
GError **error); |
| 884 |
gboolean e_ews_connection_get_user_oof_settings_sync |
| 885 |
(EEwsConnection *cnc, |
| 886 |
gint pri, |
| 887 |
EEwsOofSettings *inout_oof_settings, /* caller-allocates */ |
| 888 |
GCancellable *cancellable, |
| 889 |
GError **error); |
| 890 |
gboolean e_ews_connection_set_user_oof_settings_sync |
| 891 |
(EEwsConnection *cnc, |
| 892 |
gint pri, |
| 893 |
EEwsOofState state, |
| 894 |
EEwsExternalAudience external_audience, |
| 895 |
const GDateTime *date_start, |
| 896 |
const GDateTime *date_end, |
| 897 |
const gchar *internal_reply, |
| 898 |
const gchar *external_reply, |
| 899 |
GCancellable *cancellable, |
| 900 |
GError **error); |
| 901 |
gboolean e_ews_connection_subscribe_sync (EEwsConnection *cnc, |
| 902 |
gint pri, |
| 903 |
const GSList *folder_ids, /* gchar * */ |
| 904 |
gchar **out_subscription_id, |
| 905 |
GCancellable *cancellable, |
| 906 |
GError **error); |
| 907 |
gboolean e_ews_connection_unsubscribe_sync |
| 908 |
(EEwsConnection *cnc, |
| 909 |
gint pri, |
| 910 |
const gchar *subscription_id, |
| 911 |
GCancellable *cancellable, |
| 912 |
GError **error); |
| 913 |
GInputStream * e_ews_connection_prepare_streaming_events_sync |
| 914 |
(EEwsConnection *cnc, |
| 915 |
gint pri, |
| 916 |
const gchar *subscription_id, |
| 917 |
ESoupSession **out_session, |
| 918 |
SoupMessage **out_message, |
| 919 |
GCancellable *cancellable, |
| 920 |
GError **error); |
| 921 |
|
| 922 |
G_END_DECLS |
| 923 |
|
| 924 |
#endif |