From: Sarfraaz Ahmed Date: Thu, 21 Jul 2005 14:45:57 +0000 (+0000) Subject: Add the separated esource handling code files. Added new Reinclude the X-Git-Tag: upstream/3.7.4~7195 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bcced1c6dde06fa5a325389495c2c8078dd7e826;p=platform%2Fupstream%2Fevolution-data-server.git Add the separated esource handling code files. Added new Reinclude the 2005-07-21 Sarfraaz Ahmed * storage/Makefile.am : Add the separated esource handling code files. * storage/exchange-esource.[ch] : Added new * storage/e-folder-exchange.c : Reinclude the esource creation code. * storage/exchange-account.c : Add a new fresh_folder list. This has the latest list of folders available for the account, excluding the folders that were deleted in the current session. (exchange_account_rescan_tree) : Add a scan for fetching any new folders apart from scanning the existing folder properties. (exchange_account_get_folders): First check for the fresh_folder list if available and get the list from that. * storage/exchange-hierarchy-favorites.c : Reinclude the esource removal code. * storage/exchange-hierarchy-foreign.c : Similar * storage/exchange-hierarchy-gal.c : Similar * storage/exchange-hierarchy-webdav.c : Similar --- diff --git a/servers/exchange/ChangeLog b/servers/exchange/ChangeLog index 33174fc..fae42be 100644 --- a/servers/exchange/ChangeLog +++ b/servers/exchange/ChangeLog @@ -1,3 +1,21 @@ +2005-07-21 Sarfraaz Ahmed + + * storage/Makefile.am : Add the separated esource handling code files. + * storage/exchange-esource.[ch] : Added new + * storage/e-folder-exchange.c : Reinclude the esource creation code. + * storage/exchange-account.c : Add a new fresh_folder list. This has + the latest list of folders available for the account, excluding the + folders that were deleted in the current session. + (exchange_account_rescan_tree) : Add a scan for fetching any new + folders apart from scanning the existing folder properties. + (exchange_account_get_folders): First check for the fresh_folder list + if available and get the list from that. + * storage/exchange-hierarchy-favorites.c : Reinclude the esource + removal code. + * storage/exchange-hierarchy-foreign.c : Similar + * storage/exchange-hierarchy-gal.c : Similar + * storage/exchange-hierarchy-webdav.c : Similar + 2005-07-15 Arunprakash * storage/exchange-account.c (exchange_account_connect) : Update the diff --git a/servers/exchange/storage/Makefile.am b/servers/exchange/storage/Makefile.am index d0d428e..29333d4 100644 --- a/servers/exchange/storage/Makefile.am +++ b/servers/exchange/storage/Makefile.am @@ -34,6 +34,8 @@ libexchange_storage_1_2_la_SOURCES = \ e-storage.h \ exchange-account.c \ exchange-account.h \ + exchange-esource.c \ + exchange-esource.h \ exchange-folder-size.c \ exchange-folder-size.h \ exchange-hierarchy-favorites.c \ diff --git a/servers/exchange/storage/e-folder-exchange.c b/servers/exchange/storage/e-folder-exchange.c index 86d9787..8ff7fed 100644 --- a/servers/exchange/storage/e-folder-exchange.c +++ b/servers/exchange/storage/e-folder-exchange.c @@ -23,6 +23,7 @@ #include "e-folder-exchange.h" #include "exchange-account.h" +#include "exchange-esource.h" #include "exchange-hierarchy.h" #include "e2k-uri.h" #include "e2k-path.h" @@ -183,8 +184,6 @@ e_folder_exchange_new (ExchangeHierarchy *hier, const char *name, efe->priv->path = e2k_uri_path (e_folder_get_physical_uri (ef)); efe->priv->outlook_class = g_strdup (outlook_class); -#if 0 -SURF : /* Add ESources */ if (hier->type == EXCHANGE_HIERARCHY_PERSONAL || hier->type == EXCHANGE_HIERARCHY_FAVORITES) { @@ -211,7 +210,6 @@ SURF : physical_uri); } } -#endif return ef; } @@ -932,8 +930,6 @@ e_folder_exchange_delete (EFolder *folder, E2kOperation *op) const char *folder_type, *physical_uri; g_return_val_if_fail (E_IS_FOLDER_EXCHANGE (folder), E2K_HTTP_MALFORMED); -#if 0 -SURF : /* remove ESources */ hier = e_folder_exchange_get_hierarchy (folder); @@ -961,7 +957,7 @@ SURF : physical_uri); } } -#endif + return e2k_context_delete (E_FOLDER_EXCHANGE_CONTEXT (folder), op, E_FOLDER_EXCHANGE_URI (folder)); } diff --git a/servers/exchange/storage/exchange-account.c b/servers/exchange/storage/exchange-account.c index 423e33f..aae868c 100644 --- a/servers/exchange/storage/exchange-account.c +++ b/servers/exchange/storage/exchange-account.c @@ -71,7 +71,7 @@ struct _ExchangeAccountPrivate { GPtrArray *hierarchies; GHashTable *hierarchies_by_folder, *foreign_hierarchies; ExchangeHierarchy *favorites_hierarchy; - GHashTable *folders; + GHashTable *folders, *fresh_folders; char *uri_authority, *http_uri_schema; gboolean uris_use_email, offline_sync; @@ -154,6 +154,7 @@ init (GObject *object) account->priv->hierarchies_by_folder = g_hash_table_new (NULL, NULL); account->priv->foreign_hierarchies = g_hash_table_new (g_str_hash, g_str_equal); account->priv->folders = g_hash_table_new (g_str_hash, g_str_equal); + account->priv->fresh_folders = NULL; account->priv->discover_data_lock = g_mutex_new (); account->priv->account_online = TRUE; account->priv->nt_domain = NULL; @@ -222,6 +223,12 @@ dispose (GObject *object) account->priv->folders = NULL; } + if (account->priv->fresh_folders) { + g_hash_table_foreach (account->priv->fresh_folders, free_folder, NULL); + g_hash_table_destroy (account->priv->fresh_folders); + account->priv->fresh_folders = NULL; + } + G_OBJECT_CLASS (parent_class)->dispose (object); } @@ -313,8 +320,19 @@ exchange_account_rescan_tree (ExchangeAccount *account) g_return_if_fail (EXCHANGE_IS_ACCOUNT (account)); - for (i = 0; i < account->priv->hierarchies->len; i++) + if (account->priv->fresh_folders) { + g_hash_table_foreach (account->priv->fresh_folders, free_folder, NULL); + g_hash_table_destroy (account->priv->fresh_folders); + account->priv->fresh_folders = NULL; + } + account->priv->fresh_folders = g_hash_table_new (g_str_hash, g_str_equal); + + for (i = 0; i < account->priv->hierarchies->len; i++) { + exchange_hierarchy_scan_subtree (account->priv->hierarchies->pdata[i], + EXCHANGE_HIERARCHY (account->priv->hierarchies->pdata[i])->toplevel, + FALSE); exchange_hierarchy_rescan (account->priv->hierarchies->pdata[i]); + } } /* @@ -342,6 +360,14 @@ hierarchy_new_folder (ExchangeHierarchy *hier, EFolder *folder, folder); table_updated = 1; } + + if (account->priv->fresh_folders) { + g_object_ref (folder); + g_hash_table_insert (account->priv->fresh_folders, + (char *)e_folder_exchange_get_path (folder), + folder); + } + if (!g_hash_table_lookup (account->priv->folders, e_folder_get_physical_uri (folder))) { /* Avoid dupilcations since the user could add a folder as @@ -1822,7 +1848,10 @@ exchange_account_get_folders (ExchangeAccount *account) g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account), NULL); folders = g_ptr_array_new (); - g_hash_table_foreach (account->priv->folders, add_folder, folders); + if (account->priv->fresh_folders) + g_hash_table_foreach (account->priv->fresh_folders, add_folder, folders); + else + g_hash_table_foreach (account->priv->folders, add_folder, folders); qsort (folders->pdata, folders->len, sizeof (EFolder *), folder_comparator); diff --git a/servers/exchange/storage/exchange-esource.c b/servers/exchange/storage/exchange-esource.c new file mode 100644 index 0000000..cb53cf0 --- /dev/null +++ b/servers/exchange/storage/exchange-esource.c @@ -0,0 +1,287 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +/* Copyright (C) 2001-2004 Novell, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "exchange-esource.h" + +#include +#include +#include + +#include +#include + +void +add_folder_esource (ExchangeAccount *account, + FolderType folder_type, + const char *folder_name, + const char *physical_uri) +{ + ESource *source = NULL; + ESourceGroup *source_group = NULL; + char *relative_uri = NULL; + GSList *ids; + GConfClient *client; + gboolean is_contacts_folder = TRUE, group_new = FALSE, source_new = FALSE; + const char *offline = NULL; + int mode; + ESourceList *source_list = NULL; + + client = gconf_client_get_default (); + + if (folder_type == EXCHANGE_CONTACTS_FOLDER) { + source_list = e_source_list_new_for_gconf ( client, + CONF_KEY_CONTACTS); + } + else if (folder_type == EXCHANGE_CALENDAR_FOLDER) { + source_list = e_source_list_new_for_gconf ( client, + CONF_KEY_CAL); + relative_uri = g_strdup (physical_uri + strlen (EXCHANGE_URI_PREFIX)); + is_contacts_folder = FALSE; + } + else if (folder_type == EXCHANGE_TASKS_FOLDER) { + source_list = e_source_list_new_for_gconf ( client, + CONF_KEY_TASKS); + relative_uri = g_strdup (physical_uri + strlen (EXCHANGE_URI_PREFIX)); + is_contacts_folder = FALSE; + } + + exchange_account_is_offline_sync_set (account, &mode); + + if ((source_group = e_source_list_peek_group_by_name (source_list, + account->account_name)) == NULL) { + source_group = e_source_group_new (account->account_name, + EXCHANGE_URI_PREFIX); + if (!e_source_list_add_group (source_list, source_group, -1)) { + g_object_unref (source_list); + g_object_unref (source_group); + g_object_unref (client); + g_free (relative_uri); + return; + } + if (is_contacts_folder) + source = e_source_new_with_absolute_uri (folder_name, + physical_uri); + else + source = e_source_new (folder_name, relative_uri); + + if (mode == OFFLINE_MODE) { + /* If account is marked for offline sync during account + * creation, mark all the folders for offline sync + */ + e_source_set_property (source, "offline_sync", "1"); + } + e_source_group_add_source (source_group, source, -1); + e_source_list_sync (source_list, NULL); + group_new = source_new = TRUE; + } + else { + /* source group already exists*/ + if((source = e_source_group_peek_source_by_name (source_group, + folder_name)) == NULL) { + printf("old group, new source\n"); + if (is_contacts_folder) + source = e_source_new_with_absolute_uri ( + folder_name, physical_uri); + else + source = e_source_new (folder_name, relative_uri); + + if (mode == OFFLINE_MODE) + e_source_set_property (source, "offline_sync", "1"); + + e_source_group_add_source (source_group, source, -1); + source_new = TRUE; + e_source_list_sync (source_list, NULL); + } else { + /* source group and source both already exist */ + offline = e_source_get_property (source, "offline_sync"); + if (!offline) { + /* Folder doesn't have any offline property set */ + if (mode == OFFLINE_MODE) + e_source_set_property (source, "offline_sync", "1"); + } + } + } + + if (source && !is_contacts_folder) { + + /* Select the folder created */ + if (folder_type == EXCHANGE_CALENDAR_FOLDER) { + ids = gconf_client_get_list (client, + CONF_KEY_SELECTED_CAL_SOURCES, + GCONF_VALUE_STRING, NULL); + ids = g_slist_append (ids, + g_strdup (e_source_peek_uid (source))); + gconf_client_set_list (client, + CONF_KEY_SELECTED_CAL_SOURCES, + GCONF_VALUE_STRING, ids, NULL); + g_slist_foreach (ids, (GFunc) g_free, NULL); + g_slist_free (ids); + } + else if (folder_type == EXCHANGE_TASKS_FOLDER) { + + ids = gconf_client_get_list (client, + CONF_KEY_SELECTED_TASKS_SOURCES, + GCONF_VALUE_STRING, NULL); + + ids = g_slist_append (ids, + g_strdup (e_source_peek_uid (source))); + gconf_client_set_list (client, + CONF_KEY_SELECTED_TASKS_SOURCES, + GCONF_VALUE_STRING, ids, NULL); + g_slist_foreach (ids, (GFunc) g_free, NULL); + g_slist_free (ids); + } + } + + g_free (relative_uri); + + if (source_new) + g_object_unref (source); + if (group_new) + g_object_unref (source_group); + g_object_unref (source_list); + g_object_unref (client); +} + +void +remove_folder_esource (ExchangeAccount *account, + FolderType folder_type, + const char *physical_uri) +{ + ESourceGroup *group; + ESource *source; + GSList *groups; + GSList *sources; + gboolean found_group, is_contacts_folder = TRUE; + char *relative_uri = NULL; + const char *source_uid; + GSList *ids, *temp_ids, *node_to_be_deleted; + GConfClient *client; + ESourceList *source_list = NULL; + + client = gconf_client_get_default (); + + /* Remove ESource for a given folder */ + if (folder_type == EXCHANGE_CONTACTS_FOLDER) { + source_list = e_source_list_new_for_gconf ( client, + CONF_KEY_CONTACTS); + } + else if (folder_type == EXCHANGE_CALENDAR_FOLDER) { + source_list = e_source_list_new_for_gconf ( client, + CONF_KEY_CAL); + relative_uri = g_strdup (physical_uri + strlen (EXCHANGE_URI_PREFIX)); + is_contacts_folder = FALSE; + } + else if (folder_type == EXCHANGE_TASKS_FOLDER) { + source_list = e_source_list_new_for_gconf ( client, + CONF_KEY_TASKS); + relative_uri = g_strdup (physical_uri + strlen (EXCHANGE_URI_PREFIX)); + is_contacts_folder = FALSE; + } + + groups = e_source_list_peek_groups (source_list); + found_group = FALSE; + + for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) { + group = E_SOURCE_GROUP (groups->data); + + if (strcmp (e_source_group_peek_name (group), account->account_name) == 0 + && + strcmp (e_source_group_peek_base_uri (group), EXCHANGE_URI_PREFIX) == 0) { + + sources = e_source_group_peek_sources (group); + + for( ; sources != NULL; sources = g_slist_next (sources)) { + + source = E_SOURCE (sources->data); + + if (((!is_contacts_folder && + strcmp (e_source_peek_relative_uri (source), + relative_uri) == 0)) || + (is_contacts_folder && + strcmp (e_source_peek_absolute_uri (source), + physical_uri) == 0)) { + + source_uid = e_source_peek_uid (source); + /* Folder Deleted - Remove only the source */ + /* + e_source_group_remove_source_by_uid ( + group, + source_uid); + */ + e_source_group_remove_source ( + group, + source); + e_source_list_sync (source_list, NULL); + if (!is_contacts_folder) { + /* Remove from the selected folders */ + if (folder_type == EXCHANGE_CALENDAR_FOLDER) { + ids = gconf_client_get_list ( + client, + CONF_KEY_SELECTED_CAL_SOURCES, + GCONF_VALUE_STRING, NULL); + if (ids) { + node_to_be_deleted = g_slist_find_custom (ids, + source_uid, + (GCompareFunc) strcmp); + if (node_to_be_deleted) { + g_free (node_to_be_deleted->data); + ids = g_slist_delete_link (ids, + node_to_be_deleted); + } + } + temp_ids = ids; + for (; temp_ids != NULL; temp_ids = g_slist_next (temp_ids)) + g_free (temp_ids->data); + g_slist_free (ids); + } + else if (folder_type == EXCHANGE_TASKS_FOLDER) { + ids = gconf_client_get_list (client, + CONF_KEY_SELECTED_TASKS_SOURCES, + GCONF_VALUE_STRING, NULL); + if (ids) { + node_to_be_deleted = g_slist_find_custom (ids, + source_uid, + (GCompareFunc) strcmp); + if (node_to_be_deleted) { + g_free (node_to_be_deleted->data); + ids = g_slist_delete_link (ids, + node_to_be_deleted); + } + } + temp_ids = ids; + for (; temp_ids != NULL; temp_ids = g_slist_next (temp_ids)) + g_free (temp_ids->data); + g_slist_free (ids); + } + } + found_group = TRUE; + break; + } + } + } + } + g_object_unref (source_list); + g_free (relative_uri); + g_object_unref (client); +} diff --git a/servers/exchange/storage/exchange-esource.h b/servers/exchange/storage/exchange-esource.h new file mode 100644 index 0000000..b7cdc1b --- /dev/null +++ b/servers/exchange/storage/exchange-esource.h @@ -0,0 +1,29 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* Copyright (C) 2001-2004 Novell, Inc. */ + +#ifndef __EXCHANGE_ESOURCE_H__ +#define __EXCHANGE_ESOURCE_H__ + +#include "exchange-constants.h" +#include "exchange-account.h" + +#ifdef __cplusplus +extern "C" { +#pragma } +#endif /* __cplusplus */ + +#define CONF_KEY_SELECTED_CAL_SOURCES "/apps/evolution/calendar/display/selected_calendars" +#define CONF_KEY_SELECTED_TASKS_SOURCES "/apps/evolution/calendar/tasks/selected_tasks" +#define CONF_KEY_CAL "/apps/evolution/calendar/sources" +#define CONF_KEY_TASKS "/apps/evolution/tasks/sources" +#define CONF_KEY_CONTACTS "/apps/evolution/addressbook/sources" +#define EXCHANGE_URI_PREFIX "exchange://" + +void add_folder_esource (ExchangeAccount *account, FolderType folder_type, const char *folder_name, const char *physical_uri); +void remove_folder_esource (ExchangeAccount *account, FolderType folder_type, const char *physical_uri); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __EXCHANGE_ESOURCE_H__ */ diff --git a/servers/exchange/storage/exchange-hierarchy-favorites.c b/servers/exchange/storage/exchange-hierarchy-favorites.c index 9f13472..be887d0 100644 --- a/servers/exchange/storage/exchange-hierarchy-favorites.c +++ b/servers/exchange/storage/exchange-hierarchy-favorites.c @@ -27,12 +27,11 @@ #include "exchange-hierarchy-favorites.h" #include "exchange-account.h" -//#include "exchange-constants.h" #include "e-folder-exchange.h" #include "e2k-propnames.h" #include "e2k-uri.h" #include "e2k-utils.h" -//#include "exchange-config-listener.h" +#include "exchange-esource.h" #include @@ -217,8 +216,6 @@ remove_folder (ExchangeHierarchy *hier, EFolder *folder) exchange_hierarchy_removed_folder (hier, folder); } -#if 0 -SURF : Find a proper palce to fix this /* Temp Fix for remove fav folders. see #59168 */ /* remove ESources */ folder_type = e_folder_get_type_string (folder); @@ -240,7 +237,6 @@ SURF : Find a proper palce to fix this physical_uri); } -#endif return exchange_hierarchy_webdav_status_to_folder_result (status); } diff --git a/servers/exchange/storage/exchange-hierarchy-foreign.c b/servers/exchange/storage/exchange-hierarchy-foreign.c index 76a1af5..bbe97d6 100644 --- a/servers/exchange/storage/exchange-hierarchy-foreign.c +++ b/servers/exchange/storage/exchange-hierarchy-foreign.c @@ -31,7 +31,7 @@ #include "e2k-propnames.h" #include "e2k-uri.h" #include "e2k-utils.h" -//#include "exchange-config-listener.h" +#include "exchange-esource.h" #include "exchange-types.h" #include "e2k-types.h" @@ -341,8 +341,6 @@ create_folder (ExchangeHierarchy *hier, EFolder *parent, static ExchangeAccountFolderResult remove_folder (ExchangeHierarchy *hier, EFolder *folder) { -/* This should be moved to plugins */ -#if 0 const char *folder_type, *physical_uri; /* Temp Fix for remove fav folders. see #59168 */ @@ -365,7 +363,6 @@ remove_folder (ExchangeHierarchy *hier, EFolder *folder) EXCHANGE_CONTACTS_FOLDER, physical_uri); } -#endif if (folder != hier->toplevel) exchange_hierarchy_removed_folder (hier, folder); @@ -429,9 +426,8 @@ exchange_hierarchy_foreign_add_folder (ExchangeHierarchy *hier, char *new_folder_name; result = create_internal (hier, hier->toplevel, folder_name, NULL, folder); -#if 0 if (result == EXCHANGE_ACCOUNT_FOLDER_OK) { - // Add the esources + /* Add the esources */ folder_type = e_folder_get_type_string (*folder); physical_uri = e_folder_get_physical_uri (*folder); new_folder_name = g_strdup_printf("%s's %s", @@ -461,7 +457,6 @@ exchange_hierarchy_foreign_add_folder (ExchangeHierarchy *hier, } g_free (new_folder_name); } -#endif return result; } diff --git a/servers/exchange/storage/exchange-hierarchy-gal.c b/servers/exchange/storage/exchange-hierarchy-gal.c index 9ee7693..cf44fc1 100644 --- a/servers/exchange/storage/exchange-hierarchy-gal.c +++ b/servers/exchange/storage/exchange-hierarchy-gal.c @@ -29,7 +29,7 @@ #include "exchange-hierarchy-gal.h" #include "exchange-account.h" #include "e-folder-exchange.h" -//#include "exchange-config-listener.h" +#include "exchange-esource.h" #include @@ -59,12 +59,9 @@ exchange_hierarchy_gal_new (ExchangeAccount *account, exchange_hierarchy_construct (hier, account, EXCHANGE_HIERARCHY_GAL, toplevel, NULL, NULL, NULL); -#if 0 -SURF : /* Add ESource */ add_folder_esource (hier->account, EXCHANGE_CONTACTS_FOLDER, hierarchy_name, physical_uri_prefix); -#endif g_object_unref (toplevel); diff --git a/servers/exchange/storage/exchange-hierarchy-webdav.c b/servers/exchange/storage/exchange-hierarchy-webdav.c index 0a41d53..2e90343 100644 --- a/servers/exchange/storage/exchange-hierarchy-webdav.c +++ b/servers/exchange/storage/exchange-hierarchy-webdav.c @@ -28,15 +28,14 @@ #include "exchange-hierarchy-webdav.h" #include "exchange-account.h" -//#include "exchange-constants.h" #include "e-folder-exchange.h" #include "e2k-context.h" #include "e2k-propnames.h" #include "e2k-restriction.h" #include "e2k-uri.h" #include "e2k-utils.h" -//#include "exchange-config-listener.h" #include "exchange-folder-size.h" +#include "exchange-esource.h" #include #include "e2k-path.h" @@ -385,7 +384,6 @@ xfer_folder (ExchangeHierarchy *hier, EFolder *source, const char *folder_type = NULL, *source_folder_name; ExchangeAccountFolderResult ret_code; int offline; - gdouble f_size; exchange_account_is_offline (hier->account, &offline); if (offline != ONLINE_MODE) @@ -444,8 +442,6 @@ xfer_folder (ExchangeHierarchy *hier, EFolder *source, } /* Remove the ESource of the source folder, in case of rename/move */ -#if 0 -SURF : if ((hier->type == EXCHANGE_HIERARCHY_PERSONAL || hier->type == EXCHANGE_HIERARCHY_FAVORITES) && remove_source && ret_code == EXCHANGE_ACCOUNT_FOLDER_OK) { @@ -469,7 +465,6 @@ SURF : physical_uri); } } -#endif if (physical_uri) g_free (physical_uri); return ret_code; @@ -642,7 +637,7 @@ exchange_hierarchy_webdav_parse_folder (ExchangeHierarchyWebDAV *hwd, */ permanenturl = e2k_properties_get_prop (result->props, E2K_PR_EXCHANGE_PERMANENTURL); - // Check for errors + /* Check for errors */ folder = e_folder_webdav_new (EXCHANGE_HIERARCHY (hwd), result->href, parent,