[evolution-kolab: 5/13] camel: adapted to new upstream layout and exposed API (pt. 2/2)
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab: 5/13] camel: adapted to new upstream layout and exposed API (pt. 2/2)
- Date: Fri, 25 May 2012 16:38:19 +0000 (UTC)
commit 0d1ed02d64cdfde0c8b65a6cafcd35d9d661a22c
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri May 25 16:49:16 2012 +0200
camel: adapted to new upstream layout and exposed API (pt. 2/2)
* adapted all CamelKolab* classes to the changes
introduced with pt. 1/2 (previous commit)
* removed no-longer-needed code paths and
parent class function overrides
(CamelIMAPX* becoming subclassable and extensible)
* removed CamelHTTPStream util functions (class no
longer existing in upstream and util functions
not needed in evolution-kolab)
src/camel/camel-kolab-imapx-metadata-db.c | 5 +-
src/camel/camel-kolab-imapx-metadata.c | 29 +++-
src/camel/camel-kolab-imapx-metadata.h | 19 ++-
src/camel/camel-kolab-imapx-provider.c | 10 +-
src/camel/camel-kolab-imapx-settings.h | 4 +-
src/camel/camel-kolab-imapx-store.c | 334 +----------------------------
src/camel/camel-kolab-imapx-store.h | 6 +-
src/camel/camel-kolab-session.c | 15 +-
src/camel/camel-kolab-stream.c | 38 ----
src/camel/camel-kolab-stream.h | 1 -
10 files changed, 63 insertions(+), 398 deletions(-)
---
diff --git a/src/camel/camel-kolab-imapx-metadata-db.c b/src/camel/camel-kolab-imapx-metadata-db.c
index 7239785..a289e3e 100644
--- a/src/camel/camel-kolab-imapx-metadata-db.c
+++ b/src/camel/camel-kolab-imapx-metadata-db.c
@@ -52,10 +52,7 @@
/* Kolab error reporting */
#include <libekolabutil/kolab-util-error.h>
-#include <camel/providers/imapx/camel-imapx-utils.h>
-#include <camel/providers/imapx/camel-imapx-metadata.h>
-
-#include "camel-kolab-imapx-folder.h"
+#include "camel-imapx-metadata.h"
#include "camel-kolab-imapx-metadata.h"
#include "camel-kolab-imapx-metadata-db.h"
diff --git a/src/camel/camel-kolab-imapx-metadata.c b/src/camel/camel-kolab-imapx-metadata.c
index 7f5609a..1a1c138 100644
--- a/src/camel/camel-kolab-imapx-metadata.c
+++ b/src/camel/camel-kolab-imapx-metadata.c
@@ -34,7 +34,6 @@
#include <libekolabutil/kolab-util-error.h>
-#include "camel-kolab-imapx-folder.h"
#include "camel-kolab-imapx-metadata.h"
/*----------------------------------------------------------------------------*/
@@ -283,3 +282,31 @@ camel_kolab_imapx_metadata_update (CamelKolabImapxMetadata *kmd,
}
/*----------------------------------------------------------------------------*/
+/* Folder metadata */
+
+CamelKolabImapxFolderMetadata*
+camel_kolab_imapx_folder_metadata_new (void)
+{
+ CamelKolabImapxFolderMetadata *kfmd = NULL;
+ kfmd = g_new0 (CamelKolabImapxFolderMetadata, 1);
+ kfmd->folder_type = KOLAB_FOLDER_TYPE_INVAL;
+ return kfmd;
+}
+
+gboolean
+camel_kolab_imapx_folder_metadata_free (CamelKolabImapxFolderMetadata *kfmd)
+{
+ if (kfmd == NULL)
+ return TRUE;
+ g_free (kfmd);
+ return TRUE;
+}
+
+void
+camel_kolab_imapx_folder_metadata_gdestroy (gpointer data)
+{
+ CamelKolabImapxFolderMetadata *kfmd = (CamelKolabImapxFolderMetadata *)data;
+ (void)camel_kolab_imapx_folder_metadata_free (kfmd);
+}
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/camel/camel-kolab-imapx-metadata.h b/src/camel/camel-kolab-imapx-metadata.h
index 108e494..8d31d22 100644
--- a/src/camel/camel-kolab-imapx-metadata.h
+++ b/src/camel/camel-kolab-imapx-metadata.h
@@ -33,11 +33,9 @@
#include <glib.h>
-#include <libekolabutil/camel-system-headers.h>
#include <libekolabutil/kolab-util-folder.h>
-#include <camel/providers/imapx/camel-imapx-metadata.h>
-
+#include "camel-imapx-metadata.h"
#include "camel-kolab-imapx-metadata-db.h"
/*----------------------------------------------------------------------------*/
@@ -48,6 +46,12 @@ struct _CamelKolabImapxMetadata {
GHashTable *kolab_metadata; /* for CamelKolabFolderMetadata */
};
+typedef struct _CamelKolabImapxFolderMetadata CamelKolabImapxFolderMetadata;
+struct _CamelKolabImapxFolderMetadata {
+ /* folder name kept as key in CamelKolabImapxMetadata kolab_metadata */
+ KolabFolderTypeID folder_type;
+};
+
/*----------------------------------------------------------------------------*/
CamelKolabImapxMetadata*
@@ -75,6 +79,15 @@ camel_kolab_imapx_metadata_update (CamelKolabImapxMetadata *kmd,
CamelImapxMetadata *md,
camel_imapx_metadata_proto_t proto);
+CamelKolabImapxFolderMetadata*
+camel_kolab_imapx_folder_metadata_new (void);
+
+gboolean
+camel_kolab_imapx_folder_metadata_free (CamelKolabImapxFolderMetadata *kfmd);
+
+void
+camel_kolab_imapx_folder_metadata_gdestroy (gpointer data);
+
/*----------------------------------------------------------------------------*/
#endif /* _CAMEL_KOLAB_IMAPX_METADATA_H_ */
diff --git a/src/camel/camel-kolab-imapx-provider.c b/src/camel/camel-kolab-imapx-provider.c
index 4f82823..73853b4 100644
--- a/src/camel/camel-kolab-imapx-provider.c
+++ b/src/camel/camel-kolab-imapx-provider.c
@@ -32,16 +32,8 @@
#include <string.h>
#include <glib/gi18n-lib.h>
-#include <libekolabutil/kolab-util-camel.h>
#include <libekolabutil/camel-system-headers.h>
-
-/* IMAPX specifics
- *
- * The following header files are not installed,
- * their API is not public to Camel users, so we
- * need to keep our own local IMAPX around.
- */
-#include <camel/providers/imapx/camel-imapx-utils.h>
+#include <libekolabutil/kolab-util-camel.h>
#include "camel-kolab-imapx-provider.h"
#include "camel-kolab-imapx-store.h"
diff --git a/src/camel/camel-kolab-imapx-settings.h b/src/camel/camel-kolab-imapx-settings.h
index 5faf6f5..515f0bd 100644
--- a/src/camel/camel-kolab-imapx-settings.h
+++ b/src/camel/camel-kolab-imapx-settings.h
@@ -33,9 +33,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <camel/providers/imapx/camel-imapx-settings.h>
-
-/*----------------------------------------------------------------------------*/
+#include <libekolabutil/camel-system-headers.h>
/*----------------------------------------------------------------------------*/
/* Standard GObject macros */
diff --git a/src/camel/camel-kolab-imapx-store.c b/src/camel/camel-kolab-imapx-store.c
index e35cf1e..ecfb541 100644
--- a/src/camel/camel-kolab-imapx-store.c
+++ b/src/camel/camel-kolab-imapx-store.c
@@ -32,14 +32,9 @@
#include <glib/gi18n-lib.h>
#include <libekolabutil/camel-system-headers.h>
-
-#include <camel/providers/imapx/camel-imapx-store-summary.h>
-#include <camel/providers/imapx/camel-imapx-extd-server.h>
-#include <camel/providers/imapx/camel-imapx-utils.h>
-
#include <libekolabutil/kolab-util-error.h>
-#include "camel-kolab-imapx-conn-manager.h"
+#include "camel-imapx-extd-server.h"
#include "camel-kolab-imapx-metadata.h"
#include "camel-kolab-imapx-settings.h"
#include "camel-kolab-imapx-store.h"
@@ -64,7 +59,7 @@ static void kolab_imapx_store_subscribable_init (CamelSubscribableInterface *int
typedef struct _CamelKolabIMAPXStorePrivate CamelKolabIMAPXStorePrivate;
struct _CamelKolabIMAPXStorePrivate {
- CamelKolabIMAPXServer *server;
+ CamelIMAPXServer *server;
/* Used for syncronizing get_folder_info.
* TODO check whether we can re-use any other lock
@@ -98,28 +93,12 @@ G_DEFINE_TYPE_WITH_CODE (CamelKolabIMAPXStore,
static void
camel_kolab_imapx_store_init (CamelKolabIMAPXStore *self)
{
- CamelIMAPXStore *istore = NULL;
- CamelKolabIMAPXConnManager *cm = NULL;
CamelKolabIMAPXStorePrivate *priv = NULL;
gint ii = 0;
g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (self));
priv = CAMEL_KOLAB_IMAPX_STORE_PRIVATE (self);
- /* replace existing connection manager with
- * our own Kolab version. in case we need
- * to explicitly reference the Kolab
- * version of the connection manager, we will need
- * to override the respective parent class functions
- */
- istore = CAMEL_IMAPX_STORE (self);
- if (istore->con_man != NULL) {
- camel_imapx_extd_conn_manager_close_connections (istore->con_man);
- g_object_unref (istore->con_man);
- }
- cm = camel_kolab_imapx_conn_manager_new (self);
- istore->con_man = CAMEL_IMAPX_CONN_MANAGER (cm);
-
/* folder info lock */
priv->kolab_finfo_lock = g_mutex_new ();
@@ -155,26 +134,6 @@ camel_kolab_imapx_store_init (CamelKolabIMAPXStore *self)
static void
camel_kolab_imapx_store_dispose (GObject *object)
{
- CamelKolabIMAPXStore *self = NULL;
- CamelIMAPXStore *istore = CAMEL_IMAPX_STORE (self);
-
- self = CAMEL_KOLAB_IMAPX_STORE (object);
- istore = CAMEL_IMAPX_STORE (self);
-
- /* disconnect service and unref the connection manager.
- * see imapx_store_dispose() in camel-imapx-store.c
- */
- if (istore->con_man != NULL) {
- camel_service_disconnect_sync (CAMEL_SERVICE (self),
- TRUE,
- NULL);
- g_object_unref (istore->con_man);
- istore->con_man = NULL;
- /* this part will now be skipped
- * in the parent's dispose() function
- */
- }
-
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (camel_kolab_imapx_store_parent_class)->dispose (object);
}
@@ -256,66 +215,6 @@ imapx_store_shutdown (CamelKolabIMAPXStore *self,
return TRUE;
}
-static CamelFolder*
-imapx_store_get_folder_offline (CamelStore *self,
- const gchar *folder_name,
- guint32 flags,
- GError **err)
-{
- /* This function is a dupe of extd_store_get_folder_offline() in
- * CamelIMAPXExtdStore, which is a dupe of get_folder_offline()
- * in CamelIMAPXStore.
- * We need to dupe it in order to return a CamelKolabIMAPXFolder
- * (disguised as a CamelFolder). Upstream fixes need to be applied
- * here, too.
- */
-
- CamelKolabIMAPXStore *myself = CAMEL_KOLAB_IMAPX_STORE (self);
- CamelIMAPXStore *imapx_store = CAMEL_IMAPX_STORE (self);
- CamelService *service = CAMEL_SERVICE (self);
- CamelFolder *new_folder = NULL;
- CamelStoreInfo *si = NULL;
- const gchar *user_cache_dir = NULL;
-
- g_assert (folder_name != NULL);
- (void)flags; /* FIXME where do we need this? */
- g_return_val_if_fail (err == NULL || *err == NULL, NULL);
-
- user_cache_dir = camel_service_get_user_cache_dir (service);
-
- si = camel_store_summary_path (CAMEL_STORE_SUMMARY (imapx_store->summary), folder_name);
- if (si) {
- gchar *folder_dir, *storage_path;
-
- /* Note: Although the INBOX is defined to be case-insensitive in the IMAP RFC
- * it is still up to the server how to acutally name it in a LIST response. Since
- * we stored the name as the server provided it us in the summary we take that name
- * to look up the folder.
- * But for the on-disk cache we do always capitalize the Inbox no matter what the
- * server provided.
- */
- if (!g_ascii_strcasecmp (folder_name, "INBOX"))
- folder_name = "INBOX";
-
- storage_path = g_build_filename (user_cache_dir, "folders", NULL);
- folder_dir = imapx_path_to_physical (storage_path, folder_name);
- g_free (storage_path);
- /* FIXME */ /* (create CamelKolabIMAPXFolder) */
- new_folder = CAMEL_FOLDER (camel_kolab_imapx_folder_new (myself,
- folder_dir,
- folder_name,
- err));
- g_free (folder_dir);
- camel_store_summary_info_free (CAMEL_STORE_SUMMARY (imapx_store->summary), si);
- } else {
- g_set_error (err,
- CAMEL_STORE_ERROR,
- CAMEL_STORE_ERROR_NO_FOLDER,
- _("No such folder %s"), folder_name);
- }
-
- return new_folder;
-}
static KolabFolderTypeID
imapx_store_get_foldertype (CamelKolabIMAPXStore *self,
@@ -326,8 +225,7 @@ imapx_store_get_foldertype (CamelKolabIMAPXStore *self,
{
/* TODO better error reporting */
CamelKolabIMAPXStorePrivate *priv = NULL;
- CamelIMAPXServer *is = NULL;
- CamelIMAPXExtdServer *es = NULL;
+ CamelIMAPXExtdStore *es = NULL;
CamelImapxMetadata *md = NULL;
CamelKolabImapxFolderMetadata *kfmd = NULL;
CamelImapxMetadataSpec *spec = NULL;
@@ -341,6 +239,7 @@ imapx_store_get_foldertype (CamelKolabIMAPXStore *self,
g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
priv = CAMEL_KOLAB_IMAPX_STORE_PRIVATE (self);
+ es = CAMEL_IMAPX_EXTD_STORE (self);
/* hash table lookup */
kfmd = g_hash_table_lookup (priv->kmd->kolab_metadata,
@@ -375,18 +274,9 @@ imapx_store_get_foldertype (CamelKolabIMAPXStore *self,
__func__);
return KOLAB_FOLDER_TYPE_UNKNOWN;
}
- is = camel_imapx_store_get_server (CAMEL_IMAPX_STORE (self),
- foldername,
- cancellable,
- &tmp_err);
- if (tmp_err != NULL) {
- g_propagate_error (err, tmp_err);
- return KOLAB_FOLDER_TYPE_INVAL;
- }
- es = CAMEL_IMAPX_EXTD_SERVER (is);
/* if not in sqlite db: issue IMAP query */
- proto = camel_imapx_extd_server_metadata_get_proto (es);
+ proto = camel_imapx_extd_store_metadata_get_proto (es);
spec = camel_imapx_metadata_spec_new (proto,
foldername,
"/vendor/kolab/folder-type",
@@ -398,7 +288,7 @@ imapx_store_get_foldertype (CamelKolabIMAPXStore *self,
}
/* resect all metadata gathered so far from CamelIMAPXServer */
- md = camel_imapx_extd_server_get_metadata (es,
+ md = camel_imapx_extd_store_get_metadata (es,
spec,
TRUE,
cancellable,
@@ -446,8 +336,7 @@ imapx_store_set_foldertype (CamelKolabIMAPXStore *self,
GError **err)
{
CamelKolabIMAPXStorePrivate *priv = NULL;
- CamelIMAPXServer *is = NULL;
- CamelIMAPXExtdServer *es = NULL;
+ CamelIMAPXExtdStore *es = NULL;
CamelImapxMetadata *md = NULL;
CamelImapxMetadataAnnotation *man = NULL;
CamelImapxMetadataEntry *me = NULL;
@@ -459,12 +348,13 @@ imapx_store_set_foldertype (CamelKolabIMAPXStore *self,
gboolean db_ok = FALSE;
GError *tmp_err = NULL;
- g_assert (CAMEL_IS_KOLAB_IMAPX_SERVER (self));
+ g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (self));
g_assert (foldername != NULL);
/* cancellable may be NULL */
g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
priv = CAMEL_KOLAB_IMAPX_STORE_PRIVATE (self);
+ es = CAMEL_IMAPX_EXTD_STORE (self);
/* check whether we are online and get server */
if (! camel_offline_store_get_online (CAMEL_OFFLINE_STORE (self))) {
@@ -479,15 +369,6 @@ imapx_store_set_foldertype (CamelKolabIMAPXStore *self,
"Must be online to complete this operation");
return FALSE;
}
- is = camel_imapx_store_get_server (CAMEL_IMAPX_STORE (self),
- foldername,
- cancellable,
- &tmp_err);
- if (tmp_err != NULL) {
- g_propagate_error (err, tmp_err);
- return KOLAB_FOLDER_TYPE_INVAL;
- }
- es = CAMEL_IMAPX_EXTD_SERVER (is);
/* create local CamelImapxMetadata for setting type */
acc = CAMEL_IMAPX_METADATA_ACCESS_SHARED;
@@ -506,14 +387,14 @@ imapx_store_set_foldertype (CamelKolabIMAPXStore *self,
g_hash_table_insert (man->entries,
g_strdup ("/vendor/kolab/folder-type"),
me);
- proto = camel_imapx_extd_server_metadata_get_proto (es);
+ proto = camel_imapx_extd_store_metadata_get_proto (es);
md = camel_imapx_metadata_new (proto, FALSE);
g_hash_table_insert (md->mboxes,
g_strdup (foldername),
man);
/* set folder type on the server */
- metadata_ok = camel_imapx_extd_server_set_metadata (es,
+ metadata_ok = camel_imapx_extd_store_set_metadata (es,
md,
cancellable,
&tmp_err);
@@ -664,79 +545,6 @@ kolab_imapx_store_get_name (CamelService *service,
return name;
}
-static gboolean
-kolab_imapx_store_connect_sync (CamelService *service,
- GCancellable *cancellable,
- GError **err)
-{
- gboolean ok = FALSE;
-
- g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (service));
- /* cancellable may be NULL */
- g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
-
- ok = parent_service_class->connect_sync (service,
- cancellable,
- err);
- return ok;
-}
-
-static gboolean
-kolab_imapx_store_disconnect_sync (CamelService *service,
- gboolean clean,
- GCancellable *cancellable,
- GError **err)
-{
- gboolean ok = FALSE;
-
- g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (service));
- /* cancellable may be NULL */
- g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
-
- ok = parent_service_class->disconnect_sync (service,
- clean,
- cancellable,
- err);
- return ok;
-}
-
-static CamelAuthenticationResult
-kolab_imapx_store_authenticate_sync (CamelService *service,
- const gchar *mechanism,
- GCancellable *cancellable,
- GError **err)
-{
- CamelAuthenticationResult result = CAMEL_AUTHENTICATION_ERROR;
-
- g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (service));
- /* mechanism may be NULL */
- /* cancellable may be NULL */
- g_return_val_if_fail (err == NULL || *err == NULL, CAMEL_AUTHENTICATION_REJECTED);
-
- result = parent_service_class->authenticate_sync (service,
- mechanism,
- cancellable,
- err);
- return result;
-}
-
-static GList*
-kolab_imapx_store_query_auth_types_sync (CamelService *service,
- GCancellable *cancellable,
- GError **err)
-{
- GList *auth_types = NULL;
-
- g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (service));
- /* cancellable may be NULL */
- g_return_val_if_fail (err == NULL || *err == NULL, NULL);
-
- auth_types = parent_service_class->query_auth_types_sync (service,
- cancellable,
- err);
- return auth_types;
-}
-
static guint
kolab_imapx_store_name_hash (gconstpointer key)
{
@@ -759,47 +567,6 @@ kolab_imapx_store_name_equal (gconstpointer a,
return g_str_equal (aname, bname);
}
-static gboolean
-kolab_imapx_store_can_refresh_folder (CamelStore *self,
- CamelFolderInfo *finfo,
- GError **err)
-{
- gboolean can = FALSE;
-
- g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (self));
- g_assert (finfo != NULL);
- g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
-
- can = parent_store_class->can_refresh_folder (self,
- finfo,
- err);
- return can;
-}
-
-static CamelFolder*
-kolab_imapx_store_get_folder_sync (CamelStore *self,
- const gchar *foldername,
- CamelStoreGetFolderFlags flags,
- GCancellable *cancellable,
- GError **err)
-{
- CamelFolder *folder = NULL;
-
- g_assert (CAMEL_IS_IMAPX_EXTD_STORE (self));
- g_assert (foldername != NULL);
- (void)cancellable; /* FIXME */
- g_return_val_if_fail (err == NULL || *err == NULL, NULL);
-
- folder = imapx_store_get_folder_offline (self,
- foldername,
- flags,
- err);
- if (folder != NULL)
- g_assert (CAMEL_IS_KOLAB_IMAPX_FOLDER (folder));
-
- return folder;
-}
-
static CamelFolderInfo*
kolab_imapx_store_get_folder_info_sync (CamelStore *self,
const gchar *top,
@@ -851,59 +618,6 @@ kolab_imapx_store_get_folder_info_sync (CamelStore *self,
return k_fi;
}
-static CamelFolder*
-kolab_imapx_store_get_junk_folder_sync (CamelStore *self,
- GCancellable *cancellable,
- GError **err)
-{
- CamelFolder *folder = NULL;
-
- g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (self));
- /* cancellable may be NULL */
- g_return_val_if_fail (err == NULL || *err == NULL, NULL);
-
- folder = parent_store_class->get_junk_folder_sync (self,
- cancellable,
- err);
- /* CamelIMAPXFolder gets the junk folder from
- * its parent class, CamelFolder, and does not
- * change it to a CamelIMAPXFolder. That means,
- * if we really need a CamelKolabIMAPXFolder
- * here, we need to clone the CamelFolder into
- * a locally created instance
- */
-#if 0
- if (folder != NULL)
- g_assert (CAMEL_IS_KOLAB_IMAPX_FOLDER (folder));
-#endif
- return folder;
-}
-
-static CamelFolder*
-kolab_imapx_store_get_trash_folder_sync (CamelStore *self,
- GCancellable *cancellable,
- GError **err)
-{
- CamelFolder *folder = NULL;
-
- g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (self));
- /* cancellable may be NULL */
- g_return_val_if_fail (err == NULL || *err == NULL, NULL);
-
- folder = parent_store_class->get_trash_folder_sync (self,
- cancellable,
- err);
- /* see kolab_imapx_store_get_junk_folder_sync()
- * why we do not have a CamelIMAPXExtdFolder
- * here
- */
-#if 0
- if (folder != NULL)
- g_assert (CAMEL_IS_KOLAB_IMAPX_FOLDER (folder));
-#endif
- return folder;
-}
-
static CamelFolderInfo*
kolab_imapx_store_create_folder_sync (CamelStore *self,
const gchar *parentname,
@@ -1027,23 +741,6 @@ kolab_imapx_store_rename_folder_sync (CamelStore *self,
}
static gboolean
-kolab_imapx_store_noop_sync (CamelStore *self,
- GCancellable *cancellable,
- GError **err)
-{
- gboolean ok = FALSE;
-
- g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (self));
- /* cancellable may be NULL */
- g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
-
- ok = parent_store_class->noop_sync (self,
- cancellable,
- err);
- return ok;
-}
-
-static gboolean
kolab_imapx_store_set_folder_creation_type (CamelKolabIMAPXStore *self,
KolabFolderTypeID type_id)
{
@@ -1364,24 +1061,15 @@ camel_kolab_imapx_store_class_init (CamelKolabIMAPXStoreClass *klass)
service_class = CAMEL_SERVICE_CLASS (klass);
service_class->settings_type = CAMEL_TYPE_KOLAB_IMAPX_SETTINGS;
service_class->get_name = kolab_imapx_store_get_name;
- service_class->connect_sync = kolab_imapx_store_connect_sync;
- service_class->disconnect_sync = kolab_imapx_store_disconnect_sync;
- service_class->authenticate_sync = kolab_imapx_store_authenticate_sync;
- service_class->query_auth_types_sync = kolab_imapx_store_query_auth_types_sync;
store_class = CAMEL_STORE_CLASS (klass);
store_class->hash_folder_name = kolab_imapx_store_name_hash;
store_class->compare_folder_name = kolab_imapx_store_name_equal;
- store_class->can_refresh_folder = kolab_imapx_store_can_refresh_folder;
store_class->free_folder_info = camel_store_free_folder_info_full;
- store_class->get_folder_sync = kolab_imapx_store_get_folder_sync;
store_class->get_folder_info_sync = kolab_imapx_store_get_folder_info_sync;
- store_class->get_junk_folder_sync = kolab_imapx_store_get_junk_folder_sync;
- store_class->get_trash_folder_sync = kolab_imapx_store_get_trash_folder_sync;
store_class->create_folder_sync = kolab_imapx_store_create_folder_sync;
store_class->delete_folder_sync = kolab_imapx_store_delete_folder_sync;
store_class->rename_folder_sync = kolab_imapx_store_rename_folder_sync;
- store_class->noop_sync = kolab_imapx_store_noop_sync;
klass->set_folder_creation_type = kolab_imapx_store_set_folder_creation_type;
klass->set_folder_context = kolab_imapx_store_set_folder_context;
diff --git a/src/camel/camel-kolab-imapx-store.h b/src/camel/camel-kolab-imapx-store.h
index e761c27..af1cf3f 100644
--- a/src/camel/camel-kolab-imapx-store.h
+++ b/src/camel/camel-kolab-imapx-store.h
@@ -34,13 +34,9 @@
#include <glib-object.h>
#include <gio/gio.h>
-#include <libekolabutil/camel-system-headers.h>
#include <libekolabutil/kolab-util-folder.h>
-#include <camel/providers/imapx/camel-imapx-extd-store.h>
-
-#include "camel-kolab-imapx-folder.h"
-#include "camel-kolab-imapx-server.h"
+#include "camel-imapx-extd-store.h"
/*----------------------------------------------------------------------------*/
/* GObject macros */
diff --git a/src/camel/camel-kolab-session.c b/src/camel/camel-kolab-session.c
index 98f8a27..5f8e5b8 100644
--- a/src/camel/camel-kolab-session.c
+++ b/src/camel/camel-kolab-session.c
@@ -46,8 +46,6 @@
#include <libedataserver/e-account.h>
#include <libedataserverui/e-passwords.h>
-#include <libekolabutil/camel-system-headers.h>
-
/* Kolab error reporting */
#include <libekolabutil/kolab-util-error.h>
@@ -168,7 +166,7 @@ kolab_session_get_password (CamelSession *self,
return g_strdup (priv->passwd);
}
-static void
+static gboolean
kolab_session_forget_password (CamelSession *self,
CamelService *service,
const gchar *item,
@@ -181,7 +179,7 @@ kolab_session_forget_password (CamelSession *self,
g_assert (CAMEL_IS_KOLAB_SESSION (self));
g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (service));
- g_return_if_fail (err == NULL || *err == NULL);
+ g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
(void)item;
@@ -192,6 +190,8 @@ kolab_session_forget_password (CamelSession *self,
g_free (priv->passwd);
priv->passwd = NULL;
}
+
+ return TRUE;
}
static gboolean
@@ -345,13 +345,6 @@ camel_kolab_session_class_init (CamelKolabSessionClass *klass)
session_class->add_service = parent_class->add_service;
session_class->get_password = kolab_session_get_password;
session_class->forget_password = kolab_session_forget_password;
-#if 0
- session_class->alert_user = kolab_session_alert_user;
- session_class->get_filter_driver = kolab_session_get_filter_driver;
- session_class->lookup_addressbook = kolab_session_lookup_addressbook;
- session_class->forward_to = kolab_session_forward_to;
- session_class->get_socks_proxy = kolab_session_get_socks_proxy;
-#endif
session_class->authenticate_sync = kolab_session_authenticate_sync;
}
diff --git a/src/camel/camel-kolab-stream.c b/src/camel/camel-kolab-stream.c
index 973e1c8..b00ecc9 100644
--- a/src/camel/camel-kolab-stream.c
+++ b/src/camel/camel-kolab-stream.c
@@ -32,7 +32,6 @@
#define VERSION "0.1"
#endif
-#include <libekolabutil/camel-system-headers.h>
#include "camel-kolab-stream.h"
/*----------------------------------------------------------------------------*/
@@ -65,43 +64,6 @@ camel_kolab_stream_new_filestream (const gchar *filename,
}
CamelStream*
-camel_kolab_stream_new_httpstream (CamelSession *session,
- const gchar *url_string,
- GError **err)
-{
- CamelURL *url = NULL;
- CamelStream *stream = NULL;
- GError *tmp_err = NULL;
-
- url = camel_url_new (url_string, &tmp_err);
- if (tmp_err != NULL) {
- g_debug ("%s: CamelURL is NULL", __func__);
- goto done;
- }
-
- stream = camel_http_stream_new(CAMEL_HTTP_METHOD_GET,
- session,
- url);
- if (stream == NULL) {
- g_debug ("%s: CamelHttpStream is NULL", __func__);
- goto done;
- }
-
- /* TODO use better agent version string here */
- camel_http_stream_set_user_agent((CamelHttpStream *)stream,
- "CamelHttpStream/1.0 Evolution-kolab/" VERSION);
-
- done:
- if (url != NULL)
- camel_url_free (url);
- if (tmp_err != NULL) {
- g_propagate_error (err, tmp_err);
- return NULL;
- }
- return stream;
-}
-
-CamelStream*
camel_kolab_stream_new_memstream (GByteArray *buffer)
{
/* caution: CamelStreamMem behaves differently
diff --git a/src/camel/camel-kolab-stream.h b/src/camel/camel-kolab-stream.h
index 6ee7d05..58717a3 100644
--- a/src/camel/camel-kolab-stream.h
+++ b/src/camel/camel-kolab-stream.h
@@ -38,7 +38,6 @@
/*----------------------------------------------------------------------------*/
CamelStream* camel_kolab_stream_new_filestream (const gchar *filename, const gint flags, const mode_t mode, GError **err);
-CamelStream* camel_kolab_stream_new_httpstream (CamelSession *session, const gchar *url_string, GError **err);
CamelStream* camel_kolab_stream_new_memstream (GByteArray *buffer);
void camel_kolab_stream_free (CamelStream *stream);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]