[evolution-data-server/mmeeks-gdbus-import] Set the right parent class
- From: Michael Meeks <michael src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/mmeeks-gdbus-import] Set the right parent class
- Date: Thu, 4 Mar 2010 17:20:56 +0000 (UTC)
commit 0cb368bca9f9f59d810e9b7381a87d8a9208b916
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Wed Mar 3 06:24:43 2010 +0530
Set the right parent class
camel/providers/imapx/camel-imapx-folder.c | 9 ++++++---
camel/providers/imapx/camel-imapx-folder.h | 5 +++--
camel/providers/imapx/camel-imapx-store.c | 4 ++--
3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-folder.c b/camel/providers/imapx/camel-imapx-folder.c
index 51a85b9..6d2b253 100644
--- a/camel/providers/imapx/camel-imapx-folder.c
+++ b/camel/providers/imapx/camel-imapx-folder.c
@@ -53,7 +53,8 @@
#define d(x)
#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(o)))
-static CamelFolderClass *parent_class;
+static CamelObjectClass *parent_class;
+static CamelOfflineFolderClass *offline_folder_class = NULL;
CamelFolder *
camel_imapx_folder_new(CamelStore *store, const gchar *folder_dir, const gchar *folder_name, CamelException *ex)
@@ -397,6 +398,8 @@ imapx_search_by_expression (CamelFolder *folder, const gchar *expression, CamelE
static void
imap_folder_class_init (CamelIMAPXFolderClass *klass)
{
+ offline_folder_class = CAMEL_OFFLINE_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_offline_folder_get_type ()));
+
((CamelFolderClass *)klass)->refresh_info = imapx_refresh_info;
((CamelFolderClass *)klass)->sync = imapx_sync;
((CamelFolderClass *)klass)->search_by_expression = imapx_search_by_expression;
@@ -445,14 +448,14 @@ camel_imapx_folder_get_type (void)
static CamelType camel_imapx_folder_type = CAMEL_INVALID_TYPE;
if (!camel_imapx_folder_type) {
- camel_imapx_folder_type = camel_type_register (CAMEL_FOLDER_TYPE, "CamelIMAPXFolder",
+ parent_class = camel_offline_folder_get_type();
+ camel_imapx_folder_type = camel_type_register (parent_class, "CamelIMAPXFolder",
sizeof (CamelIMAPXFolder),
sizeof (CamelIMAPXFolderClass),
(CamelObjectClassInitFunc)imap_folder_class_init,
NULL,
imap_folder_init,
(CamelObjectFinalizeFunc) imap_finalize);
- parent_class = (CamelFolderClass *)camel_folder_get_type();
}
return camel_imapx_folder_type;
diff --git a/camel/providers/imapx/camel-imapx-folder.h b/camel/providers/imapx/camel-imapx-folder.h
index b331bec..e005ad7 100644
--- a/camel/providers/imapx/camel-imapx-folder.h
+++ b/camel/providers/imapx/camel-imapx-folder.h
@@ -29,6 +29,7 @@ extern "C" {
#pragma }
#endif /* __cplusplus }*/
+#include <camel/camel-offline-folder.h>
#include <camel/camel-folder.h>
#include <camel/camel-data-cache.h>
@@ -38,7 +39,7 @@ extern "C" {
#define CAMEL_IS_IMAPX_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAPX_FOLDER_TYPE))
typedef struct _CamelIMAPXFolder {
- CamelFolder parent_object;
+ CamelOfflineFolder parent_object;
gchar *raw_name;
CamelDataCache *cache;
@@ -51,7 +52,7 @@ typedef struct _CamelIMAPXFolder {
} CamelIMAPXFolder;
typedef struct _CamelIMAPXFolderClass {
- CamelFolderClass parent_class;
+ CamelOfflineFolderClass parent_class;
} CamelIMAPXFolderClass;
/* Standard Camel function */
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 20b17cf..ce7e2ca 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -61,7 +61,7 @@
/* Specified in RFC 2060 section 2.1 */
#define IMAP_PORT 143
-static CamelStoreClass *parent_class = NULL;
+static CamelOfflineStoreClass *parent_class = NULL;
static guint
imapx_name_hash(gconstpointer key)
@@ -852,7 +852,7 @@ camel_imapx_store_class_init(CamelIMAPXStoreClass *klass)
CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(klass);
CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS(klass);
- parent_class = CAMEL_STORE_CLASS(camel_type_get_global_classfuncs(camel_store_get_type()));
+ parent_class = CAMEL_OFFLINE_STORE_CLASS (camel_type_get_global_classfuncs (camel_offline_store_get_type ()));
camel_service_class->construct = imapx_construct;
camel_service_class->query_auth_types = imapx_query_auth_types;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]