[evolution-kolab/ek-wip-porting-imapx: 3/4] CamelIMAPXFolder: expose symbols for subclasses
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting-imapx: 3/4] CamelIMAPXFolder: expose symbols for subclasses
- Date: Tue, 7 Feb 2012 19:01:24 +0000 (UTC)
commit bad15abe05298181ed6f0b53e1502ebce40077b0
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Tue Feb 7 19:41:58 2012 +0100
CamelIMAPXFolder: expose symbols for subclasses
* added a "friend" API with its own header file,
exposing internal CamelIMAPXFolder functions
needed by CamelIMAPXExtdFolder
* added a header file with temporary declarations
of CamelIMAPXFolder-internal macros and strucutres
for use inside CamelIMAPXExtdFolder
* both of these can be dropped once upstream picks up
the extended versions of our IMAPX classes
src/camel/providers/imapx/Makefile.am | 2 +
.../providers/imapx/camel-imapx-folder-defs.h | 50 ++++++++++++++++++++
.../providers/imapx/camel-imapx-folder-friend.h | 47 ++++++++++++++++++
src/camel/providers/imapx/camel-imapx-folder.c | 10 ++++
4 files changed, 109 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/providers/imapx/Makefile.am b/src/camel/providers/imapx/Makefile.am
index b7194a1..95e109b 100644
--- a/src/camel/providers/imapx/Makefile.am
+++ b/src/camel/providers/imapx/Makefile.am
@@ -47,6 +47,8 @@ noinst_HEADERS = \
camel-imapx-conn-manager-friend.h \
camel-imapx-extd-conn-manager.h \
camel-imapx-folder.h \
+ camel-imapx-folder-defs.h \
+ camel-imapx-folder-friend.h \
camel-imapx-extd-folder.h \
camel-imapx-job.h \
camel-imapx-metadata.h \
diff --git a/src/camel/providers/imapx/camel-imapx-folder-defs.h b/src/camel/providers/imapx/camel-imapx-folder-defs.h
new file mode 100644
index 0000000..37ad05a
--- /dev/null
+++ b/src/camel/providers/imapx/camel-imapx-folder-defs.h
@@ -0,0 +1,50 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ * camel-imapx-folder-defs.h
+ *
+ * 2012-02-02, 18:22:18
+ * Copyright 2012, 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
+ */
+
+/* This file holds definitions needed by CamelIMAPXExtdFolder,
+ * but not exported by its parent class. In order not to mess with
+ * upstream code, we (temporarily) dupe the symbols here.
+ * Once the *Extd* classes get merged into their upstream counterparts,
+ * these dupes can be removed
+ */
+
+/*----------------------------------------------------------------------------*/
+
+#ifndef _CAMEL_IMAPX_FOLDER_DEFS_H_
+#define _CAMEL_IMAPX_FOLDER_DEFS_H_
+
+/*----------------------------------------------------------------------------*/
+
+/* dupe from camel-imapx-folder.c */
+enum {
+ PROP_0,
+ PROP_APPLY_FILTERS = 0x2501
+};
+
+/*----------------------------------------------------------------------------*/
+
+#endif /* _CAMEL_IMAPX_FOLDER_DEFS_H_ */
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/camel/providers/imapx/camel-imapx-folder-friend.h b/src/camel/providers/imapx/camel-imapx-folder-friend.h
new file mode 100644
index 0000000..36dcfe8
--- /dev/null
+++ b/src/camel/providers/imapx/camel-imapx-folder-friend.h
@@ -0,0 +1,47 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ * camel-imapx-folder-friend.h
+ *
+ * 2012-01-20, 16:44:18
+ * Copyright 2012, 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
+ */
+
+/* This file holds function prototypes needed by CamelIMAPXExtdFolder,
+ * but not exported by its parent class. In order not to mess with
+ * upstream code, we (temporarily) declare the symbols here.
+ * Once the *Extd* classes get merged into their upstream counterparts,
+ * these can be removed
+ */
+
+/*----------------------------------------------------------------------------*/
+
+#ifndef _CAMEL_IMAPX_FOLDER_FRIEND_H_
+#define _CAMEL_IMAPX_FOLDER_FRIEND_H_
+
+/*----------------------------------------------------------------------------*/
+
+gboolean
+camel_imapx_folder_get_apply_filters (CamelIMAPXFolder *folder);
+
+/*----------------------------------------------------------------------------*/
+
+#endif /* _CAMEL_IMAPX_FOLDER_FRIEND_H_ */
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/camel/providers/imapx/camel-imapx-folder.c b/src/camel/providers/imapx/camel-imapx-folder.c
index 24deaf5..fdd1032 100644
--- a/src/camel/providers/imapx/camel-imapx-folder.c
+++ b/src/camel/providers/imapx/camel-imapx-folder.c
@@ -765,3 +765,13 @@ camel_imapx_folder_init (CamelIMAPXFolder *imapx_folder)
camel_folder_set_lock_async (folder, TRUE);
}
+/*----------------------------------------------------------------------------*/
+/* "friend" API for subclasses */
+
+#include "camel-imapx-folder-friend.h"
+
+gboolean
+camel_imapx_folder_get_apply_filters (CamelIMAPXFolder *folder)
+{
+ return imapx_folder_get_apply_filters (folder);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]