[evolution-kolab/ek-wip-porting] CamelKolabIMAPXServer: implemented own new() function
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting] CamelKolabIMAPXServer: implemented own new() function
- Date: Wed, 7 Mar 2012 15:32:04 +0000 (UTC)
commit 058ff0fd85934a8e2fd22c9d5a5cf3cbb51f4b61
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Wed Mar 7 16:25:18 2012 +0100
CamelKolabIMAPXServer: implemented own new() function
* this is used in the CamelKolabIMAPXConnManager
to actually create a server of the correct type
* needs it's own function, since we bind a CamelStore
when creating a new server
src/camel/camel-kolab-imapx-server.c | 22 ++++++++++++++++++++++
src/camel/camel-kolab-imapx-server.h | 7 +++++++
2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/camel-kolab-imapx-server.c b/src/camel/camel-kolab-imapx-server.c
index 588fdb8..027c149 100644
--- a/src/camel/camel-kolab-imapx-server.c
+++ b/src/camel/camel-kolab-imapx-server.c
@@ -350,6 +350,28 @@ camel_kolab_imapx_server_class_init (CamelKolabIMAPXServerClass *klass)
/*----------------------------------------------------------------------------*/
/* API functions */
+CamelKolabIMAPXServer*
+camel_kolab_imapx_server_new (CamelKolabIMAPXStore *store)
+{
+ CamelKolabIMAPXServer *self = NULL;
+ CamelIMAPXServer *is = NULL;
+ CamelService *service = NULL;
+ CamelSession *session = NULL;
+
+ g_assert (CAMEL_IS_KOLAB_IMAPX_STORE (store));
+
+ service = CAMEL_SERVICE (store);
+ session = camel_service_get_session (service);
+
+ self = g_object_new (CAMEL_TYPE_KOLAB_IMAPX_SERVER, NULL);
+ is = CAMEL_IMAPX_SERVER (self);
+
+ is->session = g_object_ref (session);
+ is->store = CAMEL_IMAPX_STORE (store);
+
+ return self;
+}
+
CamelKolabImapxMetadata*
camel_kolab_imapx_server_get_kolab_metadata (CamelKolabIMAPXServer *self,
gboolean do_resect,
diff --git a/src/camel/camel-kolab-imapx-server.h b/src/camel/camel-kolab-imapx-server.h
index 05109a8..2fdee85 100644
--- a/src/camel/camel-kolab-imapx-server.h
+++ b/src/camel/camel-kolab-imapx-server.h
@@ -39,6 +39,10 @@
#include "camel-kolab-imapx-metadata.h"
/*----------------------------------------------------------------------------*/
+
+struct _CamelKolabIMAPXStore;
+
+/*----------------------------------------------------------------------------*/
/* Standard GObject macros */
#define CAMEL_TYPE_KOLAB_IMAPX_SERVER \
@@ -95,6 +99,9 @@ struct _CamelKolabIMAPXServerClass {
GType
camel_kolab_imapx_server_get_type (void);
+CamelKolabIMAPXServer*
+camel_kolab_imapx_server_new (struct _CamelKolabIMAPXStore *store);
+
CamelKolabImapxMetadata*
camel_kolab_imapx_server_get_kolab_metadata (CamelKolabIMAPXServer *self,
gboolean do_resect,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]