[evolution-ews] Revert all the EEwsOperation changes.



commit 10cf2f1808497fd0021eef198e0153f9123aaf48
Author: David Woodhouse <David Woodhouse intel com>
Date:   Thu May 5 15:11:14 2011 +0100

    Revert all the EEwsOperation changes.
    
    We'll re-use *some* of this code, but for now let's start again from scratch.
    
    In particular, we don't want separate subclasses for *every* operation. We
    want an EEwsOperation class, but *all* operations should have that class.
    
    We want a 'create request' function for each server operation, which
    returns an EEwsOperation with the appropriate SoapMessage content.
    
    The caller will:
     - Call the appropriate 'create request' function.
     - Complete the request SoapMessage if necessary (replacing the create_cb
       callbacks for UpdateItem etc.)
     - Set any other optional parameters like progress_fn, streaming to file
       (replacing the progress_fn and similar arguments which were causing the
        e_ews_connection_get_items_start() and similar function prototypes to
        grow without bounds).
     - Override the default response parsing callback, if desired.
     - Submit the message, asynchronously or synchronously.

 src/camel/camel-ews-folder.c               |   18 +-
 src/camel/camel-ews-folder.h               |    1 -
 src/camel/camel-ews-store.c                |   23 ++-
 src/camel/camel-ews-store.h                |    3 -
 src/server/Makefile.am                     |    6 -
 src/server/e-ews-connection.c              |  156 ++--------------
 src/server/e-ews-connection.h              |   19 +--
 src/server/e-ews-create-folder-operation.c |  281 ---------------------------
 src/server/e-ews-create-folder-operation.h |   73 -------
 src/server/e-ews-delete-folder-operation.c |  260 -------------------------
 src/server/e-ews-delete-folder-operation.h |   73 -------
 src/server/e-ews-folder.c                  |   14 --
 src/server/e-ews-folder.h                  |    1 -
 src/server/e-ews-item.h                    |    6 +-
 src/server/e-ews-move-folder-operation.c   |  260 -------------------------
 src/server/e-ews-move-folder-operation.h   |   71 -------
 src/server/e-ews-move-items-operation.c    |  289 ----------------------------
 src/server/e-ews-move-items-operation.h    |   71 -------
 src/server/e-ews-operation.c               |  221 ---------------------
 src/server/e-ews-operation.h               |   71 -------
 src/server/e-ews-utils.c                   |   52 -----
 src/server/e-ews-utils.h                   |   47 -----
 22 files changed, 45 insertions(+), 1971 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index bf3ec5c..22fc2c5 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -1050,6 +1050,7 @@ ews_transfer_messages_to_sync	(CamelFolder *source,
 	GError *rerror = NULL;
 	GSList *ids = NULL, *ret_items = NULL;
 	gint i = 0;
+	EVO2(GCancellable *cancellable = NULL);
 
 	dst_full_name = camel_folder_get_full_name (destination);
 	dst_ews_store = (CamelEwsStore *) camel_folder_get_parent_store (destination);
@@ -1066,9 +1067,10 @@ ews_transfer_messages_to_sync	(CamelFolder *source,
 		ids = g_slist_append(ids, (gchar *)uids->pdata[i]);
 	}
 
-	ret_items = e_ews_move_items_operation_sync (cnc, dst_id, !delete_originals,ids, &rerror);
-	
-	if (ret_items) {
+	if (e_ews_connection_move_items	(cnc, EWS_PRIORITY_MEDIUM,
+					 dst_id, !delete_originals,
+					 ids, &ret_items,
+					 cancellable, &rerror)) {
 		if (delete_originals) {
 			changes = camel_folder_change_info_new ();
 			for (i=0; i < uids->len; i++) {
@@ -1083,15 +1085,13 @@ ews_transfer_messages_to_sync	(CamelFolder *source,
 		ews_refresh_info_sync (source, EVO3(cancellable,) NULL);
 		ews_refresh_info_sync (destination, EVO3(cancellable,) NULL);
 	}
-	else {
-		if (rerror)
-			g_propagate_error (error, rerror);
-	}
-	
 	g_free (dst_id);
+
+	if (rerror)
+		g_propagate_error (error, rerror);
+
 	g_object_unref (cnc);
 	g_slist_free (ids);
-	g_slist_foreach (ret_items, (GFunc) e_ews_free_id, NULL);
 	g_slist_free (ret_items);
 
 	return !rerror;
diff --git a/src/camel/camel-ews-folder.h b/src/camel/camel-ews-folder.h
index a8906ff..b4d1a4d 100644
--- a/src/camel/camel-ews-folder.h
+++ b/src/camel/camel-ews-folder.h
@@ -30,7 +30,6 @@
 #include <camel/camel.h>
 
 #include "camel-ews-summary.h"
-#include <e-ews-move-items-operation.h>
 
 /* Standard GObject macros */
 #define CAMEL_TYPE_EWS_FOLDER \
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index ee730ea..1db63ec 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -551,7 +551,8 @@ ews_create_folder_sync (CamelStore *store,
 	CamelEwsStoreSummary *ews_summary = ews_store->summary;
 	gchar *fid = NULL;
 	gchar *full_name;
-	EwsFolderId *folder_id = NULL;
+	EwsFolderId *folder_id;
+	EVO2(GCancellable *cancellable = NULL;)
 	CamelFolderInfo *fi = NULL;
 
 	
@@ -566,10 +567,11 @@ ews_create_folder_sync (CamelStore *store,
 		}
 	}
 
-	/* Make the call with new API*/
-	if (!e_ews_create_folder_operation_sync (ews_store->priv->cnc,
-						 fid, FALSE, folder_name, &folder_id,
-						 error)) {
+	/* Make the call */
+	if (!e_ews_connection_create_folder (ews_store->priv->cnc,
+					     EWS_PRIORITY_MEDIUM, fid,
+					     FALSE, folder_name, &folder_id,
+					     cancellable, error)) {
 		g_free (fid);
 		return NULL;
 	}
@@ -604,6 +606,7 @@ ews_delete_folder_sync	(CamelStore *store,
 	CamelEwsStore *ews_store = CAMEL_EWS_STORE (store);
 	CamelEwsStoreSummary *ews_summary = ews_store->summary;
 	gchar *fid;
+	EVO2(GCancellable *cancellable = NULL;)
 	CamelFolderInfo *fi = NULL;
 
 	fid = camel_ews_store_summary_get_folder_id_from_name (ews_summary,
@@ -614,9 +617,10 @@ ews_delete_folder_sync	(CamelStore *store,
 		return FALSE;
 	}
 
-	if (!e_ews_delete_folder_operation_sync (ews_store->priv->cnc,
+	if (!e_ews_connection_delete_folder (ews_store->priv->cnc,
+					     EWS_PRIORITY_MEDIUM,
 					     fid, FALSE, "HardDelete",
-					     error)) {
+					     cancellable, error)) {
 		g_free (fid);
 		return FALSE;
 	}
@@ -667,10 +671,10 @@ ews_rename_folder_sync	(CamelStore *store,
 	CamelEwsStore *ews_store = CAMEL_EWS_STORE (store);
 	CamelEwsStoreSummary *ews_summary = ews_store->summary;
 	const gchar *old_slash, *new_slash;
+	EVO2(GCancellable *cancellable = NULL;)
 	gchar *fid;
 	gchar *changekey;
 	gboolean res = FALSE;
-	EVO2(GCancellable *cancellable = NULL;)
 
 	if (!strcmp (old_name, new_name))
 		return TRUE;
@@ -763,7 +767,8 @@ ews_rename_folder_sync	(CamelStore *store,
 				goto out;
 			}
 		}
-		if (!e_ews_move_folder_operation_sync (ews_store->priv->cnc, pfid, fid, error)) {
+		if (!e_ews_connection_move_folder (ews_store->priv->cnc, EWS_PRIORITY_MEDIUM,
+						   pfid, fid, cancellable, error)) {
 			g_free (pfid);
 			goto out;
 		}
diff --git a/src/camel/camel-ews-store.h b/src/camel/camel-ews-store.h
index c8eae68..65497b1 100644
--- a/src/camel/camel-ews-store.h
+++ b/src/camel/camel-ews-store.h
@@ -27,9 +27,6 @@
 #include <camel/camel.h>
 
 #include <e-ews-connection.h>
-#include <e-ews-create-folder-operation.h>
-#include <e-ews-delete-folder-operation.h>
-#include <e-ews-move-folder-operation.h>
 #include "camel-ews-store-summary.h"
 
 /* Standard GObject macros */
diff --git a/src/server/Makefile.am b/src/server/Makefile.am
index 73bda2c..2632e53 100644
--- a/src/server/Makefile.am
+++ b/src/server/Makefile.am
@@ -35,12 +35,6 @@ libeews_1_2_la_SOURCES =		\
 	ews-marshal.c			\
 	e-ews-connection.c		\
 	e-ews-connection.h		\
-	e-ews-operation.c		\
-	e-ews-utils.c			\
-	e-ews-create-folder-operation.c	\
-	e-ews-delete-folder-operation.c	\
-	e-ews-move-folder-operation.c	\
-	e-ews-move-items-operation.c	\
 	e-ews-folder.c			\
 	e-ews-item.c			\
 	e-ews-item-change.c		\
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 6d4b973..f9591b5 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -50,7 +50,6 @@ static gint comp_func (gconstpointer a, gconstpointer b);
 
 typedef void (*response_cb) (ESoapParameter *param, struct _EwsNode *enode);
 static void ews_response_cb (SoupSession *session, SoupMessage *msg, gpointer data);
-static void ews_operation_response_cb (SoupSession *session, SoupMessage *msg, gpointer data);
 
 static void
 ews_connection_authenticate	(SoupSession *sess, SoupMessage *msg,
@@ -101,16 +100,12 @@ struct _EwsNode {
 	EEwsConnection *cnc;
 	GSimpleAsyncResult *simple;
 	gboolean complete_sync;
-	gboolean multi_value_response;
-
 
 	gint pri;		/* the command priority */
 	response_cb cb;
 
 	GCancellable *cancellable;
 	gulong cancel_handler_id;
-
-	SoupSessionCallback callback;
 };
 
 typedef struct {
@@ -288,7 +283,7 @@ ews_next_request (gpointer _cnc)
 	/* Add to active job queue */
 	cnc->priv->active_job_queue = g_slist_append (cnc->priv->active_job_queue, node);
 
-	soup_session_queue_message (cnc->priv->soup_session, SOUP_MESSAGE (node->msg), node->callback, node);
+	soup_session_queue_message (cnc->priv->soup_session, SOUP_MESSAGE (node->msg), ews_response_cb, node);
 
 	QUEUE_UNLOCK (cnc);
 	return FALSE;
@@ -357,7 +352,7 @@ ews_cancel_request (GCancellable *cancellable,
 }
 
 static void
-ews_connection_queue_request (EEwsConnection *cnc, ESoapMessage *msg, response_cb cb, gint pri, GCancellable *cancellable, GSimpleAsyncResult *simple, gboolean complete_sync,gboolean multi_value_response)
+ews_connection_queue_request (EEwsConnection *cnc, ESoapMessage *msg, response_cb cb, gint pri, GCancellable *cancellable, GSimpleAsyncResult *simple, gboolean complete_sync)
 {
 	EwsNode *node;
 
@@ -368,8 +363,6 @@ ews_connection_queue_request (EEwsConnection *cnc, ESoapMessage *msg, response_c
 	node->cnc = cnc;
 	node->complete_sync = complete_sync;
 	node->simple = simple;
-	node->multi_value_response = multi_value_response;
-	node->callback = ews_response_cb;
 
 	QUEUE_LOCK (cnc);
 	cnc->priv->jobs = g_slist_insert_sorted (cnc->priv->jobs, (gpointer *) node, (GCompareFunc) comp_func);
@@ -385,91 +378,7 @@ ews_connection_queue_request (EEwsConnection *cnc, ESoapMessage *msg, response_c
 	ews_trigger_next_request(cnc);
 }
 
-static void
-ews_connection_queue_operation_request (EEwsConnection *cnc, ESoapMessage *msg, EwsOperationPriority priority, GCancellable *cancellable, GSimpleAsyncResult *simple)
-{
-	EwsNode *node;
-
-	node = ews_node_new ();
-	node->msg = msg;
-	node->pri = priority;
-	node->cnc = cnc;
-	node->simple = simple;
-	node->callback = ews_operation_response_cb;
-
-	QUEUE_LOCK (cnc);
-	cnc->priv->jobs = g_slist_insert_sorted (cnc->priv->jobs, (gpointer *) node, (GCompareFunc) comp_func);
-	QUEUE_UNLOCK (cnc);
-
-	if (cancellable) {
-		node->cancellable = cancellable;
-		node->cancel_handler_id = g_cancellable_connect	(cancellable,
-								 G_CALLBACK (ews_cancel_request),
-								 (gpointer) node, NULL);
-	}
-
-	ews_trigger_next_request(cnc);
-}
-
 /* Response callbacks */
-static void
-ews_operation_response_cb (SoupSession *session, SoupMessage *msg, gpointer data)
-{
-	EwsNode *enode = (EwsNode *) data;
-	ESoapResponse *response = NULL;
-	ESoapParameter *param;
-	GError *error = NULL;
-
-	// check for cancelled state
-	if (enode->cancellable && g_cancellable_is_cancelled (enode->cancellable))
-		goto exit;
-
-	// no "401 Unauthorized"
-	if (msg->status_code == SOUP_STATUS_UNAUTHORIZED) {
-		g_simple_async_result_set_error (enode->simple,
-						 EWS_CONNECTION_ERROR,
-						 EWS_CONNECTION_ERROR_AUTHENTICATION_FAILED,
-						 _("Authentication failed"));
-		goto exit;
-	}
-
-	// got a response
-	response = e_soap_message_parse_response ((ESoapMessage *) msg);
-
-	if (!response) {
-		g_simple_async_result_set_error	(enode->simple,
-						 EWS_CONNECTION_ERROR,
-						 EWS_CONNECTION_ERROR_NORESPONSE,
-						 _("No response"));
-
-		goto exit;
-	}
-
-	// dump response if expected to
-	if (g_getenv ("EWS_DEBUG") && (atoi (g_getenv ("EWS_DEBUG")) >= 1))
-		e_soap_response_dump_response (response, stdout);
-
-	// TODO: validate response using xml schema
-
-	// prepare value returned to callback
-	param = e_soap_response_get_first_parameter_by_name (response, "ResponseMessages");
-	if (param)
-		g_simple_async_result_set_op_res_gpointer (enode->simple, g_object_ref (response), g_object_unref);
-	else
-		ews_parse_soap_fault (response, &error);
-
-	if (error) {
-		g_simple_async_result_set_from_error (enode->simple, error);
-		g_clear_error (&error);
-	}
-
-exit:
-	g_simple_async_result_complete_in_idle (enode->simple);
-
-	ews_active_job_done (enode->cnc, enode);
-
-	g_object_unref (response);
-}
 
 static void
 ews_response_cb (SoupSession *session, SoupMessage *msg, gpointer data)
@@ -699,25 +608,6 @@ ews_create_folder_cb (ESoapParameter *soapparam, EwsNode *enode)
 	async_data->items_created = fids;
 }
 
-void
-e_ews_connection_queue_operation (EEwsConnection *cnc,
-						ESoapMessage *msg,
-						GCancellable *cancellable,
-						EwsOperationPriority priority,
-						GAsyncReadyCallback cb,
-						GObject *source,
-						gpointer user_data)
-{
-	GSimpleAsyncResult *simple;
-
-	simple = g_simple_async_result_new (source,
-					    cb,
-					    user_data,
-					    e_ews_connection_queue_operation);
-
-	ews_connection_queue_operation_request (cnc, msg, priority, cancellable, simple);
-}
-
 static void
 e_ews_connection_dispose (GObject *object)
 {
@@ -898,22 +788,6 @@ ews_connection_authenticate	(SoupSession *sess, SoupMessage *msg,
 	g_signal_emit (cnc, signals[AUTHENTICATE], 0, msg, auth, retrying);
 }
 
-const gchar *
-e_ews_connection_get_uri (EEwsConnection *cnc)
-{
-	g_return_val_if_fail (E_IS_EWS_CONNECTION (cnc), NULL);
-
-	return cnc->priv->uri;
-}
-
-const gchar *
-e_ews_connection_get_email (EEwsConnection *cnc)
-{
-	g_return_val_if_fail (E_IS_EWS_CONNECTION (cnc), NULL);
-
-	return cnc->priv->email;
-}
-
 void
 e_ews_connection_authenticate (EEwsConnection *cnc,
 			       SoupAuth *auth, const gchar *user,
@@ -1407,7 +1281,7 @@ e_ews_connection_sync_folder_items_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, sync_folder_items_response_cb, pri,
-				      cancellable, simple, cb == ews_sync_reply_cb,FALSE);
+				      cancellable, simple, cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -1519,7 +1393,7 @@ e_ews_connection_sync_folder_hierarchy_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, sync_hierarchy_response_cb, pri,
-				      cancellable, simple, cb == ews_sync_reply_cb,FALSE);
+				      cancellable, simple, cb == ews_sync_reply_cb);
 }
 
 
@@ -1669,7 +1543,7 @@ e_ews_connection_get_items_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, get_items_response_cb, pri,
-				      cancellable, simple, cb == ews_sync_reply_cb,TRUE);
+				      cancellable, simple, cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -1783,7 +1657,7 @@ e_ews_connection_delete_items_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, NULL, pri, cancellable, simple,
-				      cb == ews_sync_reply_cb,TRUE);
+				      cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -1894,7 +1768,7 @@ e_ews_connection_update_items_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, get_items_response_cb, pri, cancellable, simple,
-				      cb == ews_sync_reply_cb,TRUE);
+				      cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -2011,7 +1885,7 @@ e_ews_connection_create_items_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, get_items_response_cb, pri,
-				      cancellable, simple, cb == ews_sync_reply_cb,TRUE);
+				      cancellable, simple, cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -2156,7 +2030,7 @@ e_ews_connection_resolve_names_start 	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, resolve_names_response_cb, pri,
-				      cancellable, simple, cb == ews_sync_reply_cb,FALSE);
+				      cancellable, simple, cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -2262,7 +2136,7 @@ e_ews_connection_update_folder_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, NULL, pri, cancellable, simple,
-				      cb == ews_sync_reply_cb,FALSE);
+				      cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -2359,7 +2233,7 @@ e_ews_connection_move_folder_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, NULL, pri, cancellable, simple,
-				      cb == ews_sync_reply_cb,FALSE);
+				      cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -2460,7 +2334,7 @@ e_ews_connection_create_folder_start	(EEwsConnection *cnc,
 	g_simple_async_result_set_op_res_gpointer (
 		simple, async_data, (GDestroyNotify) async_data_free);
 
-	ews_connection_queue_request (cnc, msg, ews_create_folder_cb, pri, cancellable, simple, cb == ews_sync_reply_cb,FALSE);
+	ews_connection_queue_request (cnc, msg, ews_create_folder_cb, pri, cancellable, simple, cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -2572,7 +2446,7 @@ e_ews_connection_move_items_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, get_items_response_cb, pri, cancellable, simple,
-				      cb == ews_sync_reply_cb,TRUE);
+				      cb == ews_sync_reply_cb);
 }
 
 gboolean
@@ -2683,7 +2557,7 @@ e_ews_connection_delete_folder_start	(EEwsConnection *cnc,
 	g_simple_async_result_set_op_res_gpointer (
 		simple, async_data, (GDestroyNotify) async_data_free);
 
-	ews_connection_queue_request (cnc, msg, NULL, pri, cancellable, simple, cb == ews_sync_reply_cb,FALSE);
+	ews_connection_queue_request (cnc, msg, NULL, pri, cancellable, simple, cb == ews_sync_reply_cb);
 }
 
 
@@ -2806,7 +2680,7 @@ e_ews_connection_get_attachments_start	(EEwsConnection *cnc,
 		simple, async_data, (GDestroyNotify) async_data_free);
 
 	ews_connection_queue_request (cnc, msg, get_attachments_response_cb, pri,
-				      cancellable, simple, cb == ews_sync_reply_cb,TRUE);
+				      cancellable, simple, cb == ews_sync_reply_cb);
 }
 
 gboolean
diff --git a/src/server/e-ews-connection.h b/src/server/e-ews-connection.h
index 6690d83..849d59a 100644
--- a/src/server/e-ews-connection.h
+++ b/src/server/e-ews-connection.h
@@ -55,11 +55,11 @@ struct _EEwsConnectionClass {
 	void (*authenticate) (EEwsConnection *cnc);
 };
 
-typedef enum {
+enum {
 	EWS_PRIORITY_LOW,
 	EWS_PRIORITY_MEDIUM,
 	EWS_PRIORITY_HIGH
-} EwsOperationPriority;;
+};
 
 typedef void (*EEwsRequestCreationCallback) (ESoapMessage *msg,
 					     gpointer user_data);
@@ -93,21 +93,6 @@ void		e_ews_autodiscover_ws_url	(EEwsAutoDiscoverCallback cb,
 						 gchar *password);
 void		e_ews_connection_set_mailbox	(EEwsConnection *cnc,
 						 const gchar *email);
-
-/* API for queuing messages */
-void		e_ews_connection_queue_operation (EEwsConnection *cnc,
-						ESoapMessage *msg,
-						GCancellable *cancellable,
-						EwsOperationPriority priority,
-						GAsyncReadyCallback cb,
-						GObject *source,
-						gpointer user_data);
-
-/* Expose uri and mail for a new API */
-const gchar * e_ews_connection_get_uri (EEwsConnection *cnc);
-
-const gchar * e_ews_connection_get_email (EEwsConnection *cnc);
-
 /* Sync folder items */
 void		e_ews_connection_sync_folder_items_start
 						(EEwsConnection *cnc,
diff --git a/src/server/e-ews-folder.c b/src/server/e-ews-folder.c
index 4b3c66d..366ca57 100644
--- a/src/server/e-ews-folder.c
+++ b/src/server/e-ews-folder.c
@@ -206,20 +206,6 @@ e_ews_folder_new_from_soap_parameter (ESoapParameter *param)
 	return folder;
 }
 
-EwsFolderId *
-e_ews_folder_fid_copy (const EwsFolderId *fid)
-{
-	EwsFolderId *fid_copy;
-
-	if (!fid) return NULL;
-
-	fid_copy = g_new0 (EwsFolderId, 1);
-	fid_copy->id = g_strdup(fid->id);
-	fid_copy->change_key = g_strdup(fid->change_key);
-	fid_copy->is_distinguished_id = fid->is_distinguished_id;
-
-	return fid_copy;
-}
 void
 e_ews_folder_free_fid (EwsFolderId *fid)
 {
diff --git a/src/server/e-ews-folder.h b/src/server/e-ews-folder.h
index 24b8b7f..c6d2f17 100644
--- a/src/server/e-ews-folder.h
+++ b/src/server/e-ews-folder.h
@@ -76,7 +76,6 @@ 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);
 
-EwsFolderId *	e_ews_folder_fid_copy (const EwsFolderId *fid);
 void		e_ews_folder_free_fid (EwsFolderId *fid);
 
 G_END_DECLS
diff --git a/src/server/e-ews-item.h b/src/server/e-ews-item.h
index 067fc71..7b45e4f 100644
--- a/src/server/e-ews-item.h
+++ b/src/server/e-ews-item.h
@@ -24,7 +24,6 @@
 
 #include "e-soap-message.h"
 #include "e-soap-response.h"
-#include <e-ews-utils.h>
 
 G_BEGIN_DECLS
 
@@ -68,6 +67,11 @@ struct _EEwsItemClass {
 };
 
 typedef struct {
+	gchar *id;
+	gchar *change_key;
+} EwsId;
+
+typedef struct {
 	gchar *name;
 	gchar *email;
 } EwsMailbox;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]