[evolution-kolab/ek-wip-gui: 19/22] libekolab: added data types for Kolab folder metadata



commit a26b4d4fe85b9b89f95ef64cf3b2b9e3b74b4f7e
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Sat Feb 18 20:21:02 2012 +0100

    libekolab: added data types for Kolab folder metadata
    
    * added Kolab folder metadata data structure
      plus handler functions
    * sorted sources lexically in Makefile.am

 src/libekolab/Makefile.am                  |    6 ++-
 src/libekolab/kolab-data-folder-metadata.c |   67 ++++++++++++++++++++++++++++
 src/libekolab/kolab-data-folder-metadata.h |   58 ++++++++++++++++++++++++
 3 files changed, 129 insertions(+), 2 deletions(-)
---
diff --git a/src/libekolab/Makefile.am b/src/libekolab/Makefile.am
index 1573b92..edf8291 100644
--- a/src/libekolab/Makefile.am
+++ b/src/libekolab/Makefile.am
@@ -20,14 +20,16 @@ AM_CPPFLAGS =			\
 ## --- libekolab ---------------------------------------------------------------
 
 libekolab_la_SOURCES =			\
-	kolab-data-imap-account.c	\
+	kolab-data-folder-metadata.c	\
 	kolab-data-folder-permissions.c	\
+	kolab-data-imap-account.c	\
 	kolab-settings-handler.c
 
 noinst_HEADERS =			\
 	kolab-backend-types.h		\
-	kolab-data-imap-account.h	\
+	kolab-data-folder-metadata.h	\
 	kolab-data-folder-permissions.h	\
+	kolab-data-imap-account.h	\
 	kolab-folder-summary.h		\
 	kolab-mail-access.h		\
 	kolab-mail-handle-friend.h	\
diff --git a/src/libekolab/kolab-data-folder-metadata.c b/src/libekolab/kolab-data-folder-metadata.c
new file mode 100644
index 0000000..d6cfc88
--- /dev/null
+++ b/src/libekolab/kolab-data-folder-metadata.c
@@ -0,0 +1,67 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ *            kolab-data-folder-metadata.c
+ *
+ *  Fri Feb 17 17:19:05 2012
+ *  Copyright  2012  Christian Hilberg
+ *  <hilberg kernelconcepts de>
+ *
+ ****************************************************************************/
+
+/*
+ * 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ */
+
+/*----------------------------------------------------------------------------*/
+
+#include "kolab-data-folder-metadata.h"
+
+/*----------------------------------------------------------------------------*/
+
+KolabDataFolderMetadata*
+kolab_data_folder_metadata_new (void)
+{
+	KolabDataFolderMetadata *data = NULL;
+	data = g_new0 (KolabDataFolderMetadata, 1);
+	/* FIXME set field defaults */
+	return data;
+}
+
+KolabDataFolderMetadata*
+kolab_data_folder_metadata_clone (const KolabDataFolderMetadata *srcdata)
+{
+	KolabDataFolderMetadata *data = NULL;
+
+	if (srcdata == NULL)
+		return NULL;
+
+	data = g_new0 (KolabDataFolderMetadata, 1);
+
+	/* FIXME set fields from srcdata */
+	data->foo = srcdata->foo;
+
+	return data;
+}
+
+void
+kolab_data_folder_metadata_free (KolabDataFolderMetadata *data)
+{
+	if (data == NULL)
+		return;
+	/* FIXME free fields */
+	g_free (data);
+}
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/libekolab/kolab-data-folder-metadata.h b/src/libekolab/kolab-data-folder-metadata.h
new file mode 100644
index 0000000..9884607
--- /dev/null
+++ b/src/libekolab/kolab-data-folder-metadata.h
@@ -0,0 +1,58 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ *            kolab-data-folder-metadata.h
+ *
+ *  Fri Feb 17 17:07:05 2012
+ *  Copyright  2012  Christian Hilberg
+ *  <hilberg kernelconcepts de>
+ *
+ ****************************************************************************/
+
+/*
+ * 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ */
+
+/*----------------------------------------------------------------------------*/
+
+#ifndef _KOLAB_DATA_FOLDER_METADATA_H_
+#define _KOLAB_DATA_FOLDER_METADATA_H_
+
+/*----------------------------------------------------------------------------*/
+
+#include <glib.h>
+
+/*----------------------------------------------------------------------------*/
+
+typedef struct _KolabDataFolderMetadata KolabDataFolderMetadata;
+struct _KolabDataFolderMetadata {
+	gboolean foo; /* FIXME */
+};
+
+/*----------------------------------------------------------------------------*/
+
+KolabDataFolderMetadata*
+kolab_data_folder_metadata_new (void);
+
+KolabDataFolderMetadata*
+kolab_data_folder_metadata_clone (const KolabDataFolderMetadata *srcdata);
+
+void
+kolab_data_folder_metadata_free (KolabDataFolderMetadata *data);
+
+/*----------------------------------------------------------------------------*/
+
+#endif /* _KOLAB_DATA_FOLDER_METADATA_H_ */
+
+/*----------------------------------------------------------------------------*/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]