[evolution-kolab/ek-wip-porting-imapx] CamelKolabIMAPXSettings: added new GObject
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting-imapx] CamelKolabIMAPXSettings: added new GObject
- Date: Fri, 2 Dec 2011 18:36:18 +0000 (UTC)
commit 707849517c899b0fc71c21457dd028009bfd5572
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri Dec 2 19:25:56 2011 +0100
CamelKolabIMAPXSettings: added new GObject
* added CamelKolabIMAPXSettings as a descendant of
CamelIMAPXSettings
* needed for new upstream settings management
src/camel/Makefile.am | 2 +
src/camel/camel-kolab-imapx-settings.c | 97 ++++++++++++++++++++++++++++++++
src/camel/camel-kolab-imapx-settings.h | 83 +++++++++++++++++++++++++++
3 files changed, 182 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/Makefile.am b/src/camel/Makefile.am
index b211fd7..2ff318b 100644
--- a/src/camel/Makefile.am
+++ b/src/camel/Makefile.am
@@ -10,6 +10,7 @@ libcamelkolab_la_SOURCES = \
camel-kolab-imapx-metadata.c \
camel-kolab-imapx-provider.c \
camel-kolab-imapx-server.c \
+ camel-kolab-imapx-settings.c \
camel-kolab-imapx-store.c \
camel-kolab-imapx-transport.c \
camel-kolab-session.c \
@@ -65,6 +66,7 @@ noinst_HEADERS = \
camel-kolab-imapx-metadata.h \
camel-kolab-imapx-provider.h \
camel-kolab-imapx-server.h \
+ camel-kolab-imapx-settings.h \
camel-kolab-imapx-store.h \
camel-kolab-imapx-transport.h \
camel-kolab-session.h \
diff --git a/src/camel/camel-kolab-imapx-settings.c b/src/camel/camel-kolab-imapx-settings.c
new file mode 100644
index 0000000..b4271c7
--- /dev/null
+++ b/src/camel/camel-kolab-imapx-settings.c
@@ -0,0 +1,97 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+* camel-kolab-imapx-settings.c
+*
+* 2011-12-02, 19:11:12
+* Copyright 2011, Christian Hilberg
+* <hilberg unix-ag org>
+****************************************************************************/
+
+/*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2.1 of the License, or (at your option) any later version.
+*
+* 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
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with main.c; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+*/
+
+/*----------------------------------------------------------------------------*/
+
+#include "camel-kolab-imapx-settings.h"
+
+/*----------------------------------------------------------------------------*/
+
+typedef struct _CamelKolabIMAPXSettingsPrivate CamelKolabIMAPXSettingsPrivate;
+struct _CamelKolabIMAPXSettingsPrivate {
+ gint foo; /* FIXME */
+};
+
+#define CAMEL_KOLAB_IMAPX_SETTINGS_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CAMEL_TYPE_KOLAB_IMAPX_SETTINGS, CamelKolabIMAPXSettingsPrivate))
+
+G_DEFINE_TYPE (CamelKolabIMAPXSettings, camel_kolab_imapx_settings, CAMEL_TYPE_IMAPX_SETTINGS)
+
+/*----------------------------------------------------------------------------*/
+/* object/class init */
+
+static void
+camel_kolab_imapx_settings_init (CamelKolabIMAPXSettings *object)
+{
+ CamelKolabIMAPXSettings *self = NULL;
+ CamelKolabIMAPXSettingsPrivate *priv = NULL;
+
+ g_assert (CAMEL_IS_KOLAB_IMAPX_SETTINGS (object));
+
+ self = object;
+ priv = CAMEL_KOLAB_IMAPX_SETTINGS_PRIVATE (self);
+
+ priv->foo = 0; /* FIXME */
+}
+
+static void
+camel_kolab_imapx_settings_dispose (GObject *object)
+{
+ g_assert (CAMEL_IS_KOLAB_IMAPX_SETTINGS (object));
+
+ G_OBJECT_CLASS (camel_kolab_imapx_settings_parent_class)->dispose (object);
+}
+
+static void
+camel_kolab_imapx_settings_finalize (GObject *object)
+{
+ CamelKolabIMAPXSettings *self = NULL;
+ CamelKolabIMAPXSettingsPrivate *priv = NULL;
+
+ g_assert (CAMEL_IS_KOLAB_IMAPX_SETTINGS (object));
+
+ self = CAMEL_KOLAB_IMAPX_SETTINGS (object);
+ priv = CAMEL_KOLAB_IMAPX_SETTINGS_PRIVATE (self);
+
+ priv->foo = 0; /* FIXME */
+
+ G_OBJECT_CLASS (camel_kolab_imapx_settings_parent_class)->finalize (object);
+}
+
+static void
+camel_kolab_imapx_settings_class_init (CamelKolabIMAPXSettingsClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (CamelKolabIMAPXSettingsPrivate));
+
+ object_class->dispose = camel_kolab_imapx_settings_dispose;
+ object_class->finalize = camel_kolab_imapx_settings_finalize;
+}
+
+/*----------------------------------------------------------------------------*/
+/* API functions */
+
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/camel/camel-kolab-imapx-settings.h b/src/camel/camel-kolab-imapx-settings.h
new file mode 100644
index 0000000..84cb814
--- /dev/null
+++ b/src/camel/camel-kolab-imapx-settings.h
@@ -0,0 +1,83 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+* camel-kolab-imapx-settings.h
+*
+* 2011-12-02, 19:11:11
+* Copyright 2011, Christian Hilberg
+* <hilberg unix-ag org>
+****************************************************************************/
+
+/*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2.1 of the License, or (at your option) any later version.
+*
+* 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
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with main.c; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+*/
+
+/*----------------------------------------------------------------------------*/
+
+#ifndef _CAMEL_KOLAB_IMAPX_SETTINGS_H_
+#define _CAMEL_KOLAB_IMAPX_SETTINGS_H_
+
+/*----------------------------------------------------------------------------*/
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <camel/providers/imapx/camel-imapx-settings.h>
+
+/*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*/
+/* Standard GObject macros */
+
+#define CAMEL_TYPE_KOLAB_IMAPX_SETTINGS \
+ (camel_kolab_imapx_settings_get_type ())
+#define CAMEL_KOLAB_IMAPX_SETTINGS(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), CAMEL_TYPE_KOLAB_IMAPX_SETTINGS, CamelKolabIMAPXSettings))
+#define CAMEL_KOLAB_IMAPX_SETTINGS_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((klass), CAMEL_TYPE_KOLAB_IMAPX_SETTINGS, CamelKolabIMAPXSettingsClass))
+#define CAMEL_IS_KOLAB_IMAPX_SETTINGS(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), CAMEL_TYPE_KOLAB_IMAPX_SETTINGS))
+#define CAMEL_IS_KOLAB_IMAPX_SETTINGS_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((klass), CAMEL_TYPE_KOLAB_IMAPX_SETTINGS))
+#define CAMEL_KOLAB_IMAPX_SETTINGS_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), CAMEL_TYPE_KOLAB_IMAPX_SETTINGS, CamelKolabIMAPXSettingsClass))
+
+G_BEGIN_DECLS
+
+typedef struct _CamelKolabIMAPXSettings CamelKolabIMAPXSettings;
+typedef struct _CamelKolabIMAPXSettingsClass CamelKolabIMAPXSettingsClass;
+
+struct _CamelKolabIMAPXSettings {
+ CamelIMAPXSettings parent;
+};
+
+struct _CamelKolabIMAPXSettingsClass {
+ CamelIMAPXSettingsClass parent_class;
+};
+
+GType
+camel_kolab_imapx_settings_get_type (void);
+
+G_END_DECLS
+
+/*----------------------------------------------------------------------------*/
+
+#endif /* CAMEL_KOLAB_IMAPX_SETTINGS_H_ */
+
+/*----------------------------------------------------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]