[evolution-kolab/ek-wip-gui: 14/16] libekolab: added data types for Kolab folders and accounts
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-gui: 14/16] libekolab: added data types for Kolab folders and accounts
- Date: Fri, 17 Feb 2012 20:21:16 +0000 (UTC)
commit 629f56ab2c47c90de3a0c854989c4fa832f2b79a
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri Feb 17 21:06:24 2012 +0100
libekolab: added data types for Kolab folders and accounts
* added Kolab folder permission data structure
plus handler functions
* added Kolab server account data structure
plus handler functions
* sorted sources lexically in Makefile.am
src/libekolab/Makefile.am | 40 ++++++++-------
src/libekolab/kolab-data-folder-permissions.c | 67 +++++++++++++++++++++++++
src/libekolab/kolab-data-folder-permissions.h | 58 +++++++++++++++++++++
src/libekolab/kolab-data-imap-account.c | 67 +++++++++++++++++++++++++
src/libekolab/kolab-data-imap-account.h | 58 +++++++++++++++++++++
5 files changed, 272 insertions(+), 18 deletions(-)
---
diff --git a/src/libekolab/Makefile.am b/src/libekolab/Makefile.am
index 4e30905..1573b92 100644
--- a/src/libekolab/Makefile.am
+++ b/src/libekolab/Makefile.am
@@ -19,26 +19,30 @@ AM_CPPFLAGS = \
## --- libekolab ---------------------------------------------------------------
-libekolab_la_SOURCES = \
+libekolab_la_SOURCES = \
+ kolab-data-imap-account.c \
+ kolab-data-folder-permissions.c \
kolab-settings-handler.c
noinst_HEADERS = \
- kolab-types.h \
- kolab-settings-handler.h \
+ kolab-backend-types.h \
+ kolab-data-imap-account.h \
+ kolab-data-folder-permissions.h \
+ kolab-folder-summary.h \
kolab-mail-access.h \
- kolab-mail-side-cache.h \
- kolab-mail-synchronizer.h \
- kolab-mail-handle.h \
kolab-mail-handle-friend.h \
+ kolab-mail-handle.h \
+ kolab-mail-imap-client.h \
+ kolab-mail-info-db-record.h \
kolab-mail-info-db.h \
kolab-mail-mime-builder.h \
+ kolab-mail-side-cache.h \
kolab-mail-summary.h \
- kolab-mail-imap-client.h \
- kolab-backend-types.h \
- kolab-folder-summary.h \
- kolab-util-backend.h \
- kolab-mail-info-db-record.h
-
+ kolab-mail-synchronizer.h \
+ kolab-settings-handler.h \
+ kolab-types.h \
+ kolab-util-backend.h
+
libekolab_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DG_LOG_DOMAIN=\"kolab-libekolab\"
@@ -57,17 +61,17 @@ libekolab_la_LDFLAGS = -module -avoid-version
## --- libekolabbackend --------------------------------------------------------
libekolabbackend_la_SOURCES = \
+ kolab-folder-summary.c \
kolab-mail-access.c \
- kolab-mail-side-cache.c \
- kolab-mail-synchronizer.c \
kolab-mail-handle.c \
+ kolab-mail-imap-client.c \
+ kolab-mail-info-db-record.c \
kolab-mail-info-db.c \
kolab-mail-mime-builder.c \
+ kolab-mail-side-cache.c \
kolab-mail-summary.c \
- kolab-mail-imap-client.c \
- kolab-folder-summary.c \
- kolab-util-backend.c \
- kolab-mail-info-db-record.c
+ kolab-mail-synchronizer.c \
+ kolab-util-backend.c
libekolabbackend_la_LDFLAGS = -module -avoid-version
diff --git a/src/libekolab/kolab-data-folder-permissions.c b/src/libekolab/kolab-data-folder-permissions.c
new file mode 100644
index 0000000..7f46a58
--- /dev/null
+++ b/src/libekolab/kolab-data-folder-permissions.c
@@ -0,0 +1,67 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ * kolab-data-folder-permissions.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-permissions.h"
+
+/*----------------------------------------------------------------------------*/
+
+KolabDataFolderPermissions*
+kolab_data_folder_permissions_new (void)
+{
+ KolabDataFolderPermissions *data = NULL;
+ data = g_new0 (KolabDataFolderPermissions, 1);
+ /* FIXME set field defaults */
+ return data;
+}
+
+KolabDataFolderPermissions*
+kolab_data_folder_permissions_clone (const KolabDataFolderPermissions *srcdata)
+{
+ KolabDataFolderPermissions *data = NULL;
+
+ if (srcdata == NULL)
+ return NULL;
+
+ data = g_new0 (KolabDataFolderPermissions, 1);
+
+ /* FIXME set fields from srcdata */
+ data->foo = srcdata->foo;
+
+ return data;
+}
+
+void
+kolab_data_folder_permissions_free (KolabDataFolderPermissions *data)
+{
+ if (data == NULL)
+ return;
+ /* FIXME free fields */
+ g_free (data);
+}
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/libekolab/kolab-data-folder-permissions.h b/src/libekolab/kolab-data-folder-permissions.h
new file mode 100644
index 0000000..4d901ba
--- /dev/null
+++ b/src/libekolab/kolab-data-folder-permissions.h
@@ -0,0 +1,58 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ * kolab-data-folder-permissions.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_PERMISSIONS_H_
+#define _KOLAB_DATA_FOLDER_PERMISSIONS_H_
+
+/*----------------------------------------------------------------------------*/
+
+#include <glib.h>
+
+/*----------------------------------------------------------------------------*/
+
+typedef struct _KolabDataFolderPermissions KolabDataFolderPermissions;
+struct _KolabDataFolderPermissions {
+ gboolean foo; /* FIXME */
+};
+
+/*----------------------------------------------------------------------------*/
+
+KolabDataFolderPermissions*
+kolab_data_folder_permissions_new (void);
+
+KolabDataFolderPermissions*
+kolab_data_folder_permissions_clone (const KolabDataFolderPermissions *srcdata);
+
+void
+kolab_data_folder_permissions_free (KolabDataFolderPermissions *data);
+
+/*----------------------------------------------------------------------------*/
+
+#endif /* _KOLAB_DATA_FOLDER_PERMISSIONS_H_ */
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/libekolab/kolab-data-imap-account.c b/src/libekolab/kolab-data-imap-account.c
new file mode 100644
index 0000000..e689fe5
--- /dev/null
+++ b/src/libekolab/kolab-data-imap-account.c
@@ -0,0 +1,67 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ * kolab-data-imap-account.c
+ *
+ * Fri Feb 17 17:23: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-imap-account.h"
+
+/*----------------------------------------------------------------------------*/
+
+KolabDataImapAccount*
+kolab_data_imap_account_new (void)
+{
+ KolabDataImapAccount *data = NULL;
+ data = g_new0 (KolabDataImapAccount, 1);
+ /* FIXME set field defaults */
+ return data;
+}
+
+KolabDataImapAccount*
+kolab_data_imap_account_clone (const KolabDataImapAccount *srcdata)
+{
+ KolabDataImapAccount *data = NULL;
+
+ if (srcdata == NULL)
+ return NULL;
+
+ data = g_new0 (KolabDataImapAccount, 1);
+
+ /* FIXME set fields from srcdata */
+ data->foo = srcdata->foo;
+
+ return data;
+}
+
+void
+kolab_data_imap_account_free (KolabDataImapAccount *data)
+{
+ if (data == NULL)
+ return;
+ /* FIXME free fields */
+ g_free (data);
+}
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/libekolab/kolab-data-imap-account.h b/src/libekolab/kolab-data-imap-account.h
new file mode 100644
index 0000000..059b090
--- /dev/null
+++ b/src/libekolab/kolab-data-imap-account.h
@@ -0,0 +1,58 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ * kolab-data-imap-account.h
+ *
+ * Fri Feb 17 17:15: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_IMAP_ACCOUNT_H_
+#define _KOLAB_DATA_IMAP_ACCOUNT_H_
+
+/*----------------------------------------------------------------------------*/
+
+#include <glib.h>
+
+/*----------------------------------------------------------------------------*/
+
+typedef struct _KolabDataImapAccount KolabDataImapAccount;
+struct _KolabDataImapAccount {
+ gboolean foo; /* FIXME */
+};
+
+/*----------------------------------------------------------------------------*/
+
+KolabDataImapAccount*
+kolab_data_imap_account_new (void);
+
+KolabDataImapAccount*
+kolab_data_imap_account_clone (const KolabDataImapAccount *srcdata);
+
+void
+kolab_data_imap_account_free (KolabDataImapAccount *data);
+
+/*----------------------------------------------------------------------------*/
+
+#endif /* _KOLAB_DATA_IMAP_ACCOUNT_H_ */
+
+/*----------------------------------------------------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]