[evolution-ews] Move EwsFolderType to e-ews-enums.h.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Move EwsFolderType to e-ews-enums.h.
- Date: Sat, 4 Aug 2012 01:30:39 +0000 (UTC)
commit 3b1b92a4ad3deaa95c0b848415101f03c315b476
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Aug 3 20:22:00 2012 -0400
Move EwsFolderType to e-ews-enums.h.
Also give the type name and enum values a proper 'E' prefix.
src/addressbook/e-book-backend-ews.c | 2 +-
src/camel/camel-ews-store.c | 6 +-
src/camel/camel-ews-utils.c | 18 ++++----
src/collection/e-ews-backend.c | 20 ++++----
src/configuration/e-ews-config-utils.c | 12 +++---
src/configuration/e-ews-edit-folder-permissions.c | 6 +-
src/configuration/e-ews-edit-folder-permissions.h | 2 +-
src/server/e-ews-connection.c | 50 ++++++++++----------
src/server/e-ews-connection.h | 14 +++---
src/server/e-ews-enums.h | 9 ++++
src/server/e-ews-folder.c | 16 +++---
src/server/e-ews-folder.h | 14 +-----
src/utils/e-ews-query-to-restriction.c | 18 ++++----
src/utils/e-ews-query-to-restriction.h | 2 +-
src/utils/ews-test-finditem-query.c | 8 ++--
15 files changed, 99 insertions(+), 98 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index a3c534c..eb4fa32 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -1424,7 +1424,7 @@ e_book_backend_ews_get_contact_list (EBookBackend *backend,
e_ews_connection_find_folder_items_sync (
priv->cnc, EWS_PRIORITY_MEDIUM,
fid, "IdOnly", NULL, NULL, query,
- EWS_FOLDER_TYPE_CONTACTS,
+ E_EWS_FOLDER_TYPE_CONTACTS,
&includes_last_item,
&items, (EwsConvertQueryCallback) (e_ews_query_to_restriction),
cancellable, &error);
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index 615565a..3e771a8 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -555,7 +555,7 @@ folder_info_from_store_summary (CamelEwsStore *store,
gint64 ftype;
ftype = camel_ews_store_summary_get_folder_type (ews_summary, l->data, NULL);
- if (ftype != EWS_FOLDER_TYPE_MAILBOX)
+ if (ftype != E_EWS_FOLDER_TYPE_MAILBOX)
continue;
fi = camel_ews_utils_build_folder_info (store, l->data);
@@ -759,7 +759,7 @@ ews_create_folder_sync (CamelStore *store,
success = e_ews_connection_create_folder_sync (
connection,
EWS_PRIORITY_MEDIUM, fid,
- FALSE, folder_name, EWS_FOLDER_TYPE_MAILBOX,
+ FALSE, folder_name, E_EWS_FOLDER_TYPE_MAILBOX,
&folder_id, cancellable, &local_error);
g_object_unref (connection);
@@ -781,7 +781,7 @@ ews_create_folder_sync (CamelStore *store,
ews_summary, folder_id->id,
fid, folder_id->change_key,
folder_name,
- EWS_FOLDER_TYPE_MAILBOX,
+ E_EWS_FOLDER_TYPE_MAILBOX,
0, 0);
fi = camel_ews_utils_build_folder_info (ews_store, folder_id->id);
e_ews_folder_id_free (folder_id);
diff --git a/src/camel/camel-ews-utils.c b/src/camel/camel-ews-utils.c
index 21ac75c..45a7f5e 100644
--- a/src/camel/camel-ews-utils.c
+++ b/src/camel/camel-ews-utils.c
@@ -327,7 +327,7 @@ sync_deleted_folders (CamelEwsStore *store,
for (l = deleted_folders; l != NULL; l = g_slist_next (l)) {
const gchar *fid = l->data;
- EwsFolderType ftype;
+ EEwsFolderType ftype;
CamelFolderInfo *fi;
GError *error = NULL;
@@ -335,7 +335,7 @@ sync_deleted_folders (CamelEwsStore *store,
continue;
ftype = camel_ews_store_summary_get_folder_type (ews_summary, fid, NULL);
- if (ftype == EWS_FOLDER_TYPE_MAILBOX) {
+ if (ftype == E_EWS_FOLDER_TYPE_MAILBOX) {
fi = camel_ews_utils_build_folder_info (store, fid);
camel_ews_store_summary_remove_folder (ews_summary, fid, &error);
@@ -348,7 +348,7 @@ sync_deleted_folders (CamelEwsStore *store,
static gboolean
ews_utils_rename_folder (CamelEwsStore *store,
- EwsFolderType ftype,
+ EEwsFolderType ftype,
const gchar *fid,
const gchar *changekey,
const gchar *pfid,
@@ -365,7 +365,7 @@ ews_utils_rename_folder (CamelEwsStore *store,
if (pfid)
camel_ews_store_summary_set_parent_folder_id (ews_summary, fid, pfid);
- if (ftype == EWS_FOLDER_TYPE_MAILBOX) {
+ if (ftype == E_EWS_FOLDER_TYPE_MAILBOX) {
fi = camel_ews_utils_build_folder_info (store, fid);
camel_store_folder_renamed ((CamelStore *) store, old_fname, fi);
}
@@ -382,13 +382,13 @@ sync_updated_folders (CamelEwsStore *store,
for (l = updated_folders; l != NULL; l = g_slist_next (l)) {
EEwsFolder *ews_folder = (EEwsFolder *) l->data;
- EwsFolderType ftype;
+ EEwsFolderType ftype;
gchar *folder_name;
gchar *display_name;
const EwsFolderId *fid, *pfid;
ftype = e_ews_folder_get_folder_type (ews_folder);
- if (ftype != EWS_FOLDER_TYPE_MAILBOX)
+ if (ftype != E_EWS_FOLDER_TYPE_MAILBOX)
continue;
fid = e_ews_folder_get_id (ews_folder);
@@ -487,12 +487,12 @@ sync_created_folders (CamelEwsStore *ews_store,
for (l = created_folders; l != NULL; l = g_slist_next (l)) {
EEwsFolder *folder = (EEwsFolder *) l->data;
- EwsFolderType ftype;
+ EEwsFolderType ftype;
CamelFolderInfo *fi;
const EwsFolderId *fid;
ftype = e_ews_folder_get_folder_type (folder);
- if (ftype != EWS_FOLDER_TYPE_MAILBOX)
+ if (ftype != E_EWS_FOLDER_TYPE_MAILBOX)
continue;
fid = e_ews_folder_get_id (folder);
@@ -504,7 +504,7 @@ sync_created_folders (CamelEwsStore *ews_store,
* let's worry about that in a later commit. */
add_folder_to_summary (ews_store, folder);
- if (ftype == EWS_FOLDER_TYPE_MAILBOX) {
+ if (ftype == E_EWS_FOLDER_TYPE_MAILBOX) {
fi = camel_ews_utils_build_folder_info (ews_store, fid->id);
camel_store_folder_created ((CamelStore *) ews_store, fi);
camel_folder_info_free (fi);
diff --git a/src/collection/e-ews-backend.c b/src/collection/e-ews-backend.c
index f549039..f7d0824 100644
--- a/src/collection/e-ews-backend.c
+++ b/src/collection/e-ews-backend.c
@@ -187,13 +187,13 @@ ews_backend_new_child (EEwsBackend *backend,
e_source_set_display_name (source, display_name);
switch (e_ews_folder_get_folder_type (folder)) {
- case EWS_FOLDER_TYPE_CALENDAR:
+ case E_EWS_FOLDER_TYPE_CALENDAR:
extension_name = E_SOURCE_EXTENSION_CALENDAR;
break;
- case EWS_FOLDER_TYPE_TASKS:
+ case E_EWS_FOLDER_TYPE_TASKS:
extension_name = E_SOURCE_EXTENSION_TASK_LIST;
break;
- case EWS_FOLDER_TYPE_CONTACTS:
+ case E_EWS_FOLDER_TYPE_CONTACTS:
extension_name = E_SOURCE_EXTENSION_ADDRESS_BOOK;
break;
default:
@@ -270,15 +270,15 @@ ews_backend_sync_created_folders (EEwsBackend *backend,
continue;
switch (e_ews_folder_get_folder_type (folder)) {
- case EWS_FOLDER_TYPE_CALENDAR:
+ case E_EWS_FOLDER_TYPE_CALENDAR:
source = ews_backend_new_calendar (
backend, folder);
break;
- case EWS_FOLDER_TYPE_TASKS:
+ case E_EWS_FOLDER_TYPE_TASKS:
source = ews_backend_new_task_list (
backend, folder);
break;
- case EWS_FOLDER_TYPE_CONTACTS:
+ case E_EWS_FOLDER_TYPE_CONTACTS:
source = ews_backend_new_address_book (
backend, folder);
break;
@@ -658,7 +658,7 @@ ews_backend_create_resource_sync (ECollectionBackend *backend,
{
EEwsConnection *connection;
EwsFolderId *out_folder_id = NULL;
- EwsFolderType folder_type = EWS_FOLDER_TYPE_UNKNOWN;
+ EEwsFolderType folder_type = E_EWS_FOLDER_TYPE_UNKNOWN;
const gchar *extension_name;
const gchar *parent_folder_id = NULL;
gchar *folder_name;
@@ -671,19 +671,19 @@ ews_backend_create_resource_sync (ECollectionBackend *backend,
extension_name = E_SOURCE_EXTENSION_ADDRESS_BOOK;
if (e_source_has_extension (source, extension_name)) {
- folder_type = EWS_FOLDER_TYPE_CONTACTS;
+ folder_type = E_EWS_FOLDER_TYPE_CONTACTS;
parent_folder_id = "contacts";
}
extension_name = E_SOURCE_EXTENSION_CALENDAR;
if (e_source_has_extension (source, extension_name)) {
- folder_type = EWS_FOLDER_TYPE_CALENDAR;
+ folder_type = E_EWS_FOLDER_TYPE_CALENDAR;
parent_folder_id = "calendar";
}
extension_name = E_SOURCE_EXTENSION_TASK_LIST;
if (e_source_has_extension (source, extension_name)) {
- folder_type = EWS_FOLDER_TYPE_TASKS;
+ folder_type = E_EWS_FOLDER_TYPE_TASKS;
parent_folder_id = "tasks";
}
diff --git a/src/configuration/e-ews-config-utils.c b/src/configuration/e-ews-config-utils.c
index b2727c3..2bf5970 100644
--- a/src/configuration/e-ews-config-utils.c
+++ b/src/configuration/e-ews-config-utils.c
@@ -532,7 +532,7 @@ action_folder_permissions_mail_cb (GtkAction *action,
camel_service_get_display_name (CAMEL_SERVICE (store)),
folder_path,
folder_id,
- EWS_FOLDER_TYPE_MAILBOX);
+ E_EWS_FOLDER_TYPE_MAILBOX);
g_object_unref (source);
g_free (str_folder_id);
@@ -819,7 +819,7 @@ action_folder_permissions_source_cb (GtkAction *action,
CamelSettings *settings;
const gchar *extension_name;
EwsFolderId *folder_id;
- EwsFolderType folder_type;
+ EEwsFolderType folder_type;
g_return_if_fail (action != NULL);
g_return_if_fail (shell_view != NULL);
@@ -838,13 +838,13 @@ action_folder_permissions_source_cb (GtkAction *action,
extension = e_source_get_extension (parent_source, extension_name);
settings = e_source_camel_get_settings (extension);
- folder_type = EWS_FOLDER_TYPE_MAILBOX;
+ folder_type = E_EWS_FOLDER_TYPE_MAILBOX;
if (strstr (gtk_action_get_name (action), "calendar") != NULL)
- folder_type = EWS_FOLDER_TYPE_CALENDAR;
+ folder_type = E_EWS_FOLDER_TYPE_CALENDAR;
else if (strstr (gtk_action_get_name (action), "contacts") != NULL)
- folder_type = EWS_FOLDER_TYPE_CONTACTS;
+ folder_type = E_EWS_FOLDER_TYPE_CONTACTS;
else if (strstr (gtk_action_get_name (action), "tasks") != NULL)
- folder_type = EWS_FOLDER_TYPE_TASKS;
+ folder_type = E_EWS_FOLDER_TYPE_TASKS;
e_ews_edit_folder_permissions (
NULL,
diff --git a/src/configuration/e-ews-edit-folder-permissions.c b/src/configuration/e-ews-edit-folder-permissions.c
index e7375f6..225e5dc 100644
--- a/src/configuration/e-ews-edit-folder-permissions.c
+++ b/src/configuration/e-ews-edit-folder-permissions.c
@@ -48,7 +48,7 @@ struct EEwsPermissionsDialogWidgets
ESource *source;
CamelEwsSettings *ews_settings;
EwsFolderId *folder_id;
- EwsFolderType folder_type;
+ EEwsFolderType folder_type;
EEwsConnection *conn;
@@ -874,7 +874,7 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
const gchar *account_name,
const gchar *folder_name,
const EwsFolderId *folder_id,
- EwsFolderType folder_type)
+ EEwsFolderType folder_type)
{
struct EEwsPermissionsDialogWidgets *widgets;
PangoAttrList *attrs;
@@ -895,7 +895,7 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
g_return_if_fail (folder_name != NULL);
g_return_if_fail (folder_id != NULL);
- with_freebusy = folder_type == EWS_FOLDER_TYPE_CALENDAR;
+ with_freebusy = folder_type == E_EWS_FOLDER_TYPE_CALENDAR;
widgets = g_new0 (struct EEwsPermissionsDialogWidgets, 1);
widgets->registry = g_object_ref (registry);
diff --git a/src/configuration/e-ews-edit-folder-permissions.h b/src/configuration/e-ews-edit-folder-permissions.h
index 2940bcf..9aa70a9 100644
--- a/src/configuration/e-ews-edit-folder-permissions.h
+++ b/src/configuration/e-ews-edit-folder-permissions.h
@@ -38,6 +38,6 @@ void e_ews_edit_folder_permissions (GtkWindow *parent,
const gchar *account_name,
const gchar *folder_name,
const EwsFolderId *folder_id,
- EwsFolderType folder_type);
+ EEwsFolderType folder_type);
#endif /* E_EWS_EDIT_FOLDER_PERMISSIONS_H */
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 4cedcf7..ac346b0 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -118,7 +118,7 @@ struct _EwsAsyncData {
gchar *sync_state;
gboolean includes_last_item;
EwsDelegateDeliver deliver_to;
- EwsFolderType folder_type;
+ EEwsFolderType folder_type;
};
struct _EwsNode {
@@ -1111,19 +1111,19 @@ ews_handle_create_folders_param (ESoapParameter *soapparam,
const gchar *folder_element;
switch (async_data->folder_type) {
- case EWS_FOLDER_TYPE_MAILBOX:
+ case E_EWS_FOLDER_TYPE_MAILBOX:
folder_element = "Folder";
break;
- case EWS_FOLDER_TYPE_CALENDAR:
+ case E_EWS_FOLDER_TYPE_CALENDAR:
folder_element = "CalendarFolder";
break;
- case EWS_FOLDER_TYPE_CONTACTS:
+ case E_EWS_FOLDER_TYPE_CONTACTS:
folder_element = "ContactsFolder";
break;
- case EWS_FOLDER_TYPE_SEARCH:
+ case E_EWS_FOLDER_TYPE_SEARCH:
folder_element = "SearchFolder";
break;
- case EWS_FOLDER_TYPE_TASKS:
+ case E_EWS_FOLDER_TYPE_TASKS:
folder_element = "TasksFolder";
break;
default:
@@ -3124,7 +3124,7 @@ e_ews_connection_find_folder_items (EEwsConnection *cnc,
EwsAdditionalProps *add_props,
EwsSortOrder *sort_order,
const gchar *query,
- EwsFolderType type,
+ EEwsFolderType type,
EwsConvertQueryCallback convert_query_cb,
GCancellable *cancellable,
GAsyncReadyCallback callback,
@@ -3214,7 +3214,7 @@ e_ews_connection_find_folder_items_sync (EEwsConnection *cnc,
EwsAdditionalProps *add_props,
EwsSortOrder *sort_order,
const gchar *query,
- EwsFolderType type,
+ EEwsFolderType type,
gboolean *includes_last_item,
GSList **items,
EwsConvertQueryCallback convert_query_cb,
@@ -4873,7 +4873,7 @@ e_ews_connection_create_folder (EEwsConnection *cnc,
const gchar *parent_folder_id,
gboolean is_distinguished_id,
const gchar *folder_name,
- EwsFolderType folder_type,
+ EEwsFolderType folder_type,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -4903,19 +4903,19 @@ e_ews_connection_create_folder (EEwsConnection *cnc,
e_soap_message_end_element (msg);
switch (folder_type) {
- case EWS_FOLDER_TYPE_MAILBOX:
+ case E_EWS_FOLDER_TYPE_MAILBOX:
folder_element = "Folder";
break;
- case EWS_FOLDER_TYPE_CALENDAR:
+ case E_EWS_FOLDER_TYPE_CALENDAR:
folder_element = "CalendarFolder";
break;
- case EWS_FOLDER_TYPE_CONTACTS:
+ case E_EWS_FOLDER_TYPE_CONTACTS:
folder_element = "ContactsFolder";
break;
- case EWS_FOLDER_TYPE_SEARCH:
+ case E_EWS_FOLDER_TYPE_SEARCH:
folder_element = "SearchFolder";
break;
- case EWS_FOLDER_TYPE_TASKS:
+ case E_EWS_FOLDER_TYPE_TASKS:
folder_element = "TasksFolder";
break;
default:
@@ -4983,7 +4983,7 @@ e_ews_connection_create_folder_sync (EEwsConnection *cnc,
const gchar *parent_folder_id,
gboolean is_distinguished_id,
const gchar *folder_name,
- EwsFolderType folder_type,
+ EEwsFolderType folder_type,
EwsFolderId **folder_id,
GCancellable *cancellable,
GError **error)
@@ -6977,7 +6977,7 @@ void
e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
gint pri,
EwsFolderId *folder_id,
- EwsFolderType folder_type,
+ EEwsFolderType folder_type,
const GSList *permissions,
GCancellable *cancellable,
GAsyncReadyCallback callback,
@@ -7006,19 +7006,19 @@ e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
switch (folder_type) {
default:
- case EWS_FOLDER_TYPE_MAILBOX:
+ case E_EWS_FOLDER_TYPE_MAILBOX:
e_soap_message_start_element (msg, "Folder", NULL, NULL);
break;
- case EWS_FOLDER_TYPE_CALENDAR:
+ case E_EWS_FOLDER_TYPE_CALENDAR:
e_soap_message_start_element (msg, "CalendarFolder", NULL, NULL);
break;
- case EWS_FOLDER_TYPE_CONTACTS:
+ case E_EWS_FOLDER_TYPE_CONTACTS:
e_soap_message_start_element (msg, "ContactsFolder", NULL, NULL);
break;
- case EWS_FOLDER_TYPE_SEARCH:
+ case E_EWS_FOLDER_TYPE_SEARCH:
e_soap_message_start_element (msg, "SearchFolder", NULL, NULL);
break;
- case EWS_FOLDER_TYPE_TASKS:
+ case E_EWS_FOLDER_TYPE_TASKS:
e_soap_message_start_element (msg, "TasksFolder", NULL, NULL);
break;
}
@@ -7033,7 +7033,7 @@ e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
if (!perm)
continue;
- if (folder_type == EWS_FOLDER_TYPE_CALENDAR)
+ if (folder_type == E_EWS_FOLDER_TYPE_CALENDAR)
e_soap_message_start_element (msg, "CalendarPermission", NULL, NULL);
else
e_soap_message_start_element (msg, "Permission", NULL, NULL);
@@ -7085,7 +7085,7 @@ e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
msg, "DeleteItems", NULL,
(perm->rights & E_EWS_PERMISSION_BIT_DELETE_ANY) != 0 ? "All" :
(perm->rights & E_EWS_PERMISSION_BIT_DELETE_OWNED) != 0 ? "Owned" : "None");
- if (folder_type == EWS_FOLDER_TYPE_CALENDAR)
+ if (folder_type == E_EWS_FOLDER_TYPE_CALENDAR)
e_ews_message_write_string_parameter (
msg, "ReadItems", NULL,
(perm->rights & E_EWS_PERMISSION_BIT_READ_ANY) != 0 ? "FullDetails" :
@@ -7099,7 +7099,7 @@ e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
e_ews_message_write_string_parameter (
msg,
- folder_type == EWS_FOLDER_TYPE_CALENDAR ? "CalendarPermissionLevel" : "PermissionLevel", NULL,
+ folder_type == E_EWS_FOLDER_TYPE_CALENDAR ? "CalendarPermissionLevel" : "PermissionLevel", NULL,
perm_level_name);
e_soap_message_end_element (msg); /* Permission/CalendarPermission */
@@ -7151,7 +7151,7 @@ gboolean
e_ews_connection_set_folder_permissions_sync (EEwsConnection *cnc,
gint pri,
EwsFolderId *folder_id,
- EwsFolderType folder_type,
+ EEwsFolderType folder_type,
const GSList *permissions,
GCancellable *cancellable,
GError **error)
diff --git a/src/server/e-ews-connection.h b/src/server/e-ews-connection.h
index 7d08a5a..b510c57 100644
--- a/src/server/e-ews-connection.h
+++ b/src/server/e-ews-connection.h
@@ -264,7 +264,7 @@ gboolean e_ews_connection_sync_folder_items_sync
typedef void (*EwsConvertQueryCallback) (ESoapMessage *msg,
const gchar *query,
- EwsFolderType type);
+ EEwsFolderType type);
void e_ews_connection_find_folder_items
(EEwsConnection *cnc,
@@ -274,7 +274,7 @@ void e_ews_connection_find_folder_items
EwsAdditionalProps *add_props,
EwsSortOrder *sort_order,
const gchar *query,
- EwsFolderType type,
+ EEwsFolderType type,
EwsConvertQueryCallback convert_query_cb,
GCancellable *cancellable,
GAsyncReadyCallback callback,
@@ -293,7 +293,7 @@ gboolean e_ews_connection_find_folder_items_sync
EwsAdditionalProps *add_props,
EwsSortOrder *sort_order,
const gchar *query,
- EwsFolderType type,
+ EEwsFolderType type,
gboolean *includes_last_item,
GSList **items,
EwsConvertQueryCallback convert_query_cb,
@@ -520,7 +520,7 @@ void e_ews_connection_create_folder (EEwsConnection *cnc,
const gchar *parent_folder_id,
gboolean is_distinguished_id,
const gchar *folder_name,
- EwsFolderType folder_type,
+ EEwsFolderType folder_type,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -535,7 +535,7 @@ gboolean e_ews_connection_create_folder_sync
const gchar *parent_folder_id,
gboolean is_distinguished_id,
const gchar *folder_name,
- EwsFolderType folder_type,
+ EEwsFolderType folder_type,
EwsFolderId **folder_id,
GCancellable *cancellable,
GError **error);
@@ -891,7 +891,7 @@ void e_ews_connection_set_folder_permissions
(EEwsConnection *cnc,
gint pri,
EwsFolderId *folder_id,
- EwsFolderType folder_type,
+ EEwsFolderType folder_type,
const GSList *permissions,
GCancellable *cancellable,
GAsyncReadyCallback callback,
@@ -904,7 +904,7 @@ gboolean e_ews_connection_set_folder_permissions_sync
(EEwsConnection *cnc,
gint pri,
EwsFolderId *folder_id,
- EwsFolderType folder_type,
+ EEwsFolderType folder_type,
const GSList *permissions,
GCancellable *cancellable,
GError **error);
diff --git a/src/server/e-ews-enums.h b/src/server/e-ews-enums.h
index ab064b5..89ff1cd 100644
--- a/src/server/e-ews-enums.h
+++ b/src/server/e-ews-enums.h
@@ -30,6 +30,15 @@ typedef enum {
} EEwsExternalAudience;
typedef enum {
+ E_EWS_FOLDER_TYPE_UNKNOWN,
+ E_EWS_FOLDER_TYPE_MAILBOX,
+ E_EWS_FOLDER_TYPE_CALENDAR,
+ E_EWS_FOLDER_TYPE_CONTACTS,
+ E_EWS_FOLDER_TYPE_SEARCH,
+ E_EWS_FOLDER_TYPE_TASKS
+} EEwsFolderType;
+
+typedef enum {
E_EWS_OOF_STATE_DISABLED,
E_EWS_OOF_STATE_ENABLED,
E_EWS_OOF_STATE_SCHEDULED
diff --git a/src/server/e-ews-folder.c b/src/server/e-ews-folder.c
index 02d52d5..f5dfbf0 100644
--- a/src/server/e-ews-folder.c
+++ b/src/server/e-ews-folder.c
@@ -33,7 +33,7 @@ struct _EEwsFolderPrivate {
EwsFolderId *fid;
EwsFolderId *parent_fid;
gchar *folder_class;
- EwsFolderType folder_type;
+ EEwsFolderType folder_type;
guint32 unread;
guint32 total;
guint32 child_count;
@@ -108,7 +108,7 @@ e_ews_folder_init (EEwsFolder *folder)
priv = g_new0 (EEwsFolderPrivate, 1);
folder->priv = priv;
- priv->folder_type = EWS_FOLDER_TYPE_MAILBOX;
+ priv->folder_type = E_EWS_FOLDER_TYPE_MAILBOX;
}
/* FIXME pick it from folder_type and make it set folder_type */
@@ -139,13 +139,13 @@ e_ews_folder_set_from_soap_parameter (EEwsFolder *folder,
g_return_val_if_fail (param != NULL, FALSE);
if ((node = e_soap_parameter_get_first_child_by_name (param, "Folder")))
- priv->folder_type = EWS_FOLDER_TYPE_MAILBOX;
+ priv->folder_type = E_EWS_FOLDER_TYPE_MAILBOX;
else if ((node = e_soap_parameter_get_first_child_by_name (param, "CalendarFolder")))
- priv->folder_type = EWS_FOLDER_TYPE_CALENDAR;
+ priv->folder_type = E_EWS_FOLDER_TYPE_CALENDAR;
else if ((node = e_soap_parameter_get_first_child_by_name (param, "ContactsFolder")))
- priv->folder_type = EWS_FOLDER_TYPE_CONTACTS;
+ priv->folder_type = E_EWS_FOLDER_TYPE_CONTACTS;
else if ((node = e_soap_parameter_get_first_child_by_name (param, "TasksFolder")))
- priv->folder_type = EWS_FOLDER_TYPE_TASKS;
+ priv->folder_type = E_EWS_FOLDER_TYPE_TASKS;
else {
g_warning ("Unable to find the Folder node \n");
return FALSE;
@@ -292,7 +292,7 @@ e_ews_folder_set_parent_id (EEwsFolder *folder,
priv->parent_fid = parent_fid;
}
-EwsFolderType
+EEwsFolderType
e_ews_folder_get_folder_type (EEwsFolder *folder)
{
g_return_val_if_fail (E_IS_EWS_FOLDER (folder), -1);
@@ -302,7 +302,7 @@ e_ews_folder_get_folder_type (EEwsFolder *folder)
void
e_ews_folder_set_folder_type (EEwsFolder *folder,
- EwsFolderType folder_type)
+ EEwsFolderType folder_type)
{
g_return_if_fail (E_IS_EWS_FOLDER (folder));
diff --git a/src/server/e-ews-folder.h b/src/server/e-ews-folder.h
index 504a250..bc39ceb 100644
--- a/src/server/e-ews-folder.h
+++ b/src/server/e-ews-folder.h
@@ -22,6 +22,7 @@
#ifndef E_EWS_FOLDER_H
#define E_EWS_FOLDER_H
+#include "e-ews-enums.h"
#include "e-soap-message.h"
G_BEGIN_DECLS
@@ -45,15 +46,6 @@ struct _EEwsFolderClass {
GObjectClass parent_class;
};
-typedef enum {
- EWS_FOLDER_TYPE_UNKNOWN,
- EWS_FOLDER_TYPE_MAILBOX,
- EWS_FOLDER_TYPE_CALENDAR,
- EWS_FOLDER_TYPE_CONTACTS,
- EWS_FOLDER_TYPE_SEARCH,
- EWS_FOLDER_TYPE_TASKS
-} EwsFolderType;
-
typedef struct {
gchar *id;
gchar *change_key;
@@ -74,8 +66,8 @@ guint32 e_ews_folder_get_unread_count (EEwsFolder *folder);
guint32 e_ews_folder_get_child_count (EEwsFolder *folder);
gboolean e_ews_folder_get_is_writable (EEwsFolder *folder);
void e_ews_folder_set_is_writable (EEwsFolder *folder, gboolean writable);
-EwsFolderType e_ews_folder_get_folder_type (EEwsFolder *folder);
-void e_ews_folder_set_folder_type (EEwsFolder *folder, EwsFolderType folder_type);
+EEwsFolderType e_ews_folder_get_folder_type (EEwsFolder *folder);
+void e_ews_folder_set_folder_type (EEwsFolder *folder, EEwsFolderType folder_type);
EwsFolderId * e_ews_folder_id_new (const gchar *id,
const gchar *change_key,
diff --git a/src/utils/e-ews-query-to-restriction.c b/src/utils/e-ews-query-to-restriction.c
index 9a28575..166e866 100644
--- a/src/utils/e-ews-query-to-restriction.c
+++ b/src/utils/e-ews-query-to-restriction.c
@@ -1124,7 +1124,7 @@ static struct {
static void
e_ews_convert_sexp_to_restriction (ESoapMessage *msg,
const gchar *query,
- EwsFolderType type)
+ EEwsFolderType type)
{
ESExp *sexp;
ESExpResult *r;
@@ -1132,7 +1132,7 @@ e_ews_convert_sexp_to_restriction (ESoapMessage *msg,
sexp = e_sexp_new ();
- if (type == EWS_FOLDER_TYPE_CONTACTS) {
+ if (type == E_EWS_FOLDER_TYPE_CONTACTS) {
for (i = 0; i < G_N_ELEMENTS (contact_symbols); i++) {
if (contact_symbols[i].immediate)
e_sexp_add_ifunction (
@@ -1144,7 +1144,7 @@ e_ews_convert_sexp_to_restriction (ESoapMessage *msg,
contact_symbols[i].func, msg);
}
- } else if (type == EWS_FOLDER_TYPE_CALENDAR || type == EWS_FOLDER_TYPE_TASKS) {
+ } else if (type == E_EWS_FOLDER_TYPE_CALENDAR || type == E_EWS_FOLDER_TYPE_TASKS) {
for (i = 0; i < G_N_ELEMENTS (calendar_symbols); i++) {
if (calendar_symbols[i].immediate)
e_sexp_add_ifunction (
@@ -1155,7 +1155,7 @@ e_ews_convert_sexp_to_restriction (ESoapMessage *msg,
sexp, 0, calendar_symbols[i].name,
calendar_symbols[i].func, msg);
}
- } else if (type == EWS_FOLDER_TYPE_MAILBOX) {
+ } else if (type == E_EWS_FOLDER_TYPE_MAILBOX) {
for (i = 0; i < G_N_ELEMENTS (message_symbols); i++) {
if (message_symbols[i].immediate)
e_sexp_add_ifunction (
@@ -1182,24 +1182,24 @@ e_ews_convert_sexp_to_restriction (ESoapMessage *msg,
static gboolean
e_ews_check_is_query (const gchar *query,
- EwsFolderType type)
+ EEwsFolderType type)
{
if (!query)
return FALSE;
- if (type == EWS_FOLDER_TYPE_CONTACTS) {
+ if (type == E_EWS_FOLDER_TYPE_CONTACTS) {
if (!g_strcmp0 (query, "(contains \"x-evolution-any-field\" \"\")"))
return FALSE;
else
return TRUE;
- } else if (type == EWS_FOLDER_TYPE_CALENDAR || type == EWS_FOLDER_TYPE_TASKS) {
+ } else if (type == E_EWS_FOLDER_TYPE_CALENDAR || type == E_EWS_FOLDER_TYPE_TASKS) {
if (!g_strcmp0 (query, "(contains? \"summary\" \"\")"))
return FALSE;
else
return TRUE;
- } else if (type == EWS_FOLDER_TYPE_MAILBOX) {
+ } else if (type == E_EWS_FOLDER_TYPE_MAILBOX) {
return TRUE;
} else
return FALSE;
@@ -1208,7 +1208,7 @@ e_ews_check_is_query (const gchar *query,
void
e_ews_query_to_restriction (ESoapMessage *msg,
const gchar *query,
- EwsFolderType type)
+ EEwsFolderType type)
{
gboolean is_query;
diff --git a/src/utils/e-ews-query-to-restriction.h b/src/utils/e-ews-query-to-restriction.h
index f369f4c..893ec98 100644
--- a/src/utils/e-ews-query-to-restriction.h
+++ b/src/utils/e-ews-query-to-restriction.h
@@ -23,4 +23,4 @@
#include "server/e-soap-message.h"
#include "server/e-ews-folder.h"
-void e_ews_query_to_restriction (ESoapMessage *msg, const gchar *query, EwsFolderType type);
+void e_ews_query_to_restriction (ESoapMessage *msg, const gchar *query, EEwsFolderType type);
diff --git a/src/utils/ews-test-finditem-query.c b/src/utils/ews-test-finditem-query.c
index ba56a75..9a72ab6 100644
--- a/src/utils/ews-test-finditem-query.c
+++ b/src/utils/ews-test-finditem-query.c
@@ -101,7 +101,7 @@ op_test_finditem_run (void)
const gchar *password;
const gchar *uri, *folder_name = NULL;
EEwsConnection *cnc;
- EwsFolderType folder_type;
+ EEwsFolderType folder_type;
EwsFolderId *fid = NULL;
CamelEwsSettings *settings;
GCancellable *cancellable;
@@ -126,7 +126,7 @@ op_test_finditem_run (void)
/*Check for contact folder*/
folder_name = "contacts";
- folder_type = EWS_FOLDER_TYPE_CONTACTS;
+ folder_type = E_EWS_FOLDER_TYPE_CONTACTS;
fid = g_new0 (EwsFolderId, 1);
fid->id = g_strdup (folder_name);
fid->is_distinguished_id = TRUE;
@@ -140,7 +140,7 @@ op_test_finditem_run (void)
/*Check for calendar folder*/
folder_name = "calendar";
- folder_type = EWS_FOLDER_TYPE_CALENDAR;
+ folder_type = E_EWS_FOLDER_TYPE_CALENDAR;
fid = g_new0 (EwsFolderId, 1);
fid->id = g_strdup (folder_name);
fid->is_distinguished_id = TRUE;
@@ -154,7 +154,7 @@ op_test_finditem_run (void)
/*Check for mail folder*/
folder_name = "inbox";
- folder_type = EWS_FOLDER_TYPE_MAILBOX;
+ folder_type = E_EWS_FOLDER_TYPE_MAILBOX;
fid = g_new0 (EwsFolderId, 1);
fid->id = g_strdup (folder_name);
fid->is_distinguished_id = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]