[evolution-kolab/ek-wip-porting] CamelKolabIMAPXFolder: API cleanup
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting] CamelKolabIMAPXFolder: API cleanup
- Date: Fri, 13 Jan 2012 19:02:51 +0000 (UTC)
commit 552173ccf29572f812d3984cdc07a5e185f0c6e8
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri Jan 13 19:52:20 2012 +0100
CamelKolabIMAPXFolder: API cleanup
* removed API function
* moved implementation to class function, accessible
now via the parent class' API function
* sanitization of type checking in class function
src/camel/camel-kolab-imapx-folder.c | 44 ++++++++++++++++++---------------
src/camel/camel-kolab-imapx-folder.h | 4 ---
2 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/src/camel/camel-kolab-imapx-folder.c b/src/camel/camel-kolab-imapx-folder.c
index ab20ffa..9e5836b 100644
--- a/src/camel/camel-kolab-imapx-folder.c
+++ b/src/camel/camel-kolab-imapx-folder.c
@@ -64,7 +64,7 @@ camel_kolab_imapx_folder_metadata_gdestroy (gpointer data)
G_DEFINE_TYPE (CamelKolabIMAPXFolder, camel_kolab_imapx_folder, CAMEL_TYPE_IMAPX_EXTD_FOLDER)
/*----------------------------------------------------------------------------*/
-/* object/class init */
+/* object init */
static void
camel_kolab_imapx_folder_init (CamelKolabIMAPXFolder *self)
@@ -88,38 +88,42 @@ camel_kolab_imapx_folder_finalize (GObject *object)
G_OBJECT_CLASS (camel_kolab_imapx_folder_parent_class)->finalize (object);
}
+/*----------------------------------------------------------------------------*/
+/* class functions */
+
+static guint64
+kolab_imapx_folder_get_uidvalidity (CamelIMAPXExtdFolder *self,
+ GError **err)
+{
+ guint64 uval = 0;
+
+ g_assert (CAMEL_IS_KOLAB_IMAPX_FOLDER (self));
+ g_return_val_if_fail (err == NULL || *err == NULL, 0);
+
+ uval = camel_imapx_extd_folder_get_uidvalidity (self,
+ err);
+ return uval;
+}
+
+/*----------------------------------------------------------------------------*/
+/* class init */
+
static void
camel_kolab_imapx_folder_class_init (CamelKolabIMAPXFolderClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ CamelIMAPXExtdFolderClass *parent_class = CAMEL_IMAPX_EXTD_FOLDER_CLASS (klass);
/* g_type_class_add_private (klass, sizeof (CamelKolabIMAPXFolderPrivate)); */
object_class->dispose = camel_kolab_imapx_folder_dispose;
object_class->finalize = camel_kolab_imapx_folder_finalize;
+
+ parent_class->get_uidvalidity = kolab_imapx_folder_get_uidvalidity;
}
/*----------------------------------------------------------------------------*/
/* API functions */
-guint64
-camel_kolab_imapx_folder_get_uidvalidity (CamelKolabIMAPXFolder *self,
- GError **err)
-{
- guint64 uval = 0;
- GError *tmp_err = NULL;
-
- g_assert (CAMEL_IS_KOLAB_IMAPX_FOLDER (self));
- g_return_val_if_fail (err == NULL || *err == NULL, 0);
-
- uval = camel_imapx_extd_folder_get_uidvalidity (CAMEL_IMAPX_EXTD_FOLDER (self),
- &tmp_err);
- if (tmp_err != NULL) {
- g_propagate_error (err, tmp_err);
- return 0;
- }
-
- return uval;
-}
/*----------------------------------------------------------------------------*/
diff --git a/src/camel/camel-kolab-imapx-folder.h b/src/camel/camel-kolab-imapx-folder.h
index 5439393..b765540 100644
--- a/src/camel/camel-kolab-imapx-folder.h
+++ b/src/camel/camel-kolab-imapx-folder.h
@@ -92,10 +92,6 @@ struct _CamelKolabIMAPXFolderClass {
GType
camel_kolab_imapx_folder_get_type (void);
-guint64
-camel_kolab_imapx_folder_get_uidvalidity (CamelKolabIMAPXFolder *self,
- GError **err);
-
G_END_DECLS
/*----------------------------------------------------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]