[evolution-kolab/gnome-2-30] backend: moved camel header includes into separate file



commit ecd2670ed884d812de1b06a2dd3bada193e672d0
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Thu Nov 17 18:30:51 2011 +0100

    backend: moved camel header includes into separate file
    
    * moved camel api headers into a separate header file, which
      in turn is included where camel is needed
    * anticipates upstream plans for a single camel header
    * allows for silencing the compiler (we won't change camel
      implementation, so camel warnings are useless here)

 src/camel/camel-kolab-imapx-metadata.c             |    2 +-
 src/camel/camel-kolab-imapx-metadata.h             |    3 +-
 src/camel/camel-kolab-imapx-store.c                |    2 +-
 src/camel/camel-kolab-imapx-transport.h            |    2 +-
 src/camel/camel-kolab-session.c                    |    3 +-
 src/camel/camel-kolab-stream.c                     |   13 +----
 src/camel/providers/imapx/Makefile.am              |    5 +-
 src/libekolab/kolab-mail-mime-builder.c            |    4 -
 src/libekolab/kolab-mail-mime-builder.h            |    3 +-
 src/libekolabutil/Makefile.am                      |    3 +-
 src/libekolabutil/camel-system-headers.h           |   61 ++++++++++++++++++++
 src/libekolabutil/kolab-http-job.h                 |    2 +-
 src/libekolabutil/kolab-util-camel.c               |    3 +-
 src/libekolabutil/kolab-util-camel.h               |    2 +-
 src/libekolabutil/kolab-util-error.h               |    2 +-
 src/libekolabutil/kolab-util-http.c                |    2 +-
 src/libekolabutil/kolab-util-ldap.c                |    1 +
 .../test-camel-kolab-imapx-provider.c              |    4 +-
 .../libekolab/test-kolab-util-cal-freebusy.c       |    2 +-
 .../integration/libekolab/test-kolab-util-http.c   |    2 +-
 20 files changed, 84 insertions(+), 37 deletions(-)
---
diff --git a/src/camel/camel-kolab-imapx-metadata.c b/src/camel/camel-kolab-imapx-metadata.c
index 6641cf3..c617035 100644
--- a/src/camel/camel-kolab-imapx-metadata.c
+++ b/src/camel/camel-kolab-imapx-metadata.c
@@ -26,7 +26,7 @@
 
 #include <string.h>
 
-#include <camel/camel.h>
+#include <libekolabutil/camel-system-headers.h>
 
 #include <camel/providers/imapx/camel-imapx-store.h>
 #include <camel/providers/imapx/camel-imapx-server.h>
diff --git a/src/camel/camel-kolab-imapx-metadata.h b/src/camel/camel-kolab-imapx-metadata.h
index 779af2c..c89a4fb 100644
--- a/src/camel/camel-kolab-imapx-metadata.h
+++ b/src/camel/camel-kolab-imapx-metadata.h
@@ -32,8 +32,7 @@
 
 #include <glib.h>
 
-#include <camel/camel.h>
-
+#include <libekolabutil/camel-system-headers.h>
 #include <libekolabutil/kolab-util-folder.h>
 
 #include "camel-kolab-imapx-metadata-db.h"
diff --git a/src/camel/camel-kolab-imapx-store.c b/src/camel/camel-kolab-imapx-store.c
index fb6e9c2..aeb319d 100644
--- a/src/camel/camel-kolab-imapx-store.c
+++ b/src/camel/camel-kolab-imapx-store.c
@@ -24,7 +24,7 @@
  
 /*----------------------------------------------------------------------------*/
 
-#include <camel/camel.h>
+#include <libekolabutil/camel-system-headers.h>
 
 #include <camel/providers/imapx/camel-imapx-store-summary.h>
 #include <camel/providers/imapx/camel-imapx-server.h>
diff --git a/src/camel/camel-kolab-imapx-transport.h b/src/camel/camel-kolab-imapx-transport.h
index 160024e..f496558 100644
--- a/src/camel/camel-kolab-imapx-transport.h
+++ b/src/camel/camel-kolab-imapx-transport.h
@@ -30,7 +30,7 @@
 /*----------------------------------------------------------------------------*/
 
 #include <glib.h>
-#include <camel/camel-transport.h>
+#include <libekolabutil/camel-system-headers.h>
 
 /*----------------------------------------------------------------------------*/
 
diff --git a/src/camel/camel-kolab-session.c b/src/camel/camel-kolab-session.c
index 2060cb4..517f4eb 100644
--- a/src/camel/camel-kolab-session.c
+++ b/src/camel/camel-kolab-session.c
@@ -39,8 +39,7 @@
 #include <libedataserver/e-account.h>
 #include <libedataserverui/e-passwords.h>
 
-#include <camel/camel.h>
-#include <camel/camel-session.h>
+#include <libekolabutil/camel-system-headers.h>
 
 /* Kolab error reporting */
 #include <libekolabutil/kolab-util-error.h>
diff --git a/src/camel/camel-kolab-stream.c b/src/camel/camel-kolab-stream.c
index 595406c..59be8a5 100644
--- a/src/camel/camel-kolab-stream.c
+++ b/src/camel/camel-kolab-stream.c
@@ -31,18 +31,7 @@
 #define VERSION "0.1"
 #endif
 
-#if 0
-#include <camel/camel-sasl.h>
-#include <camel/camel-i18n.h>
-#endif
-
-#include <camel/camel-exception.h>
-#include <camel/camel-url.h>
-/* Camel.HttpStream will be removed in future! */
-#include <camel/camel-http-stream.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-
+#include <libekolabutil/camel-system-headers.h>
 #include "camel-kolab-stream.h"
 
 /*----------------------------------------------------------------------------*/
diff --git a/src/camel/providers/imapx/Makefile.am b/src/camel/providers/imapx/Makefile.am
index 677096a..457894c 100644
--- a/src/camel/providers/imapx/Makefile.am
+++ b/src/camel/providers/imapx/Makefile.am
@@ -69,7 +69,10 @@ test_imapx_SOURCES = test-imapx.c
 
 test_imapx_CFLAGS = \
 	$(CFLAGS) \
-	$(ADD_CFLAGS)
+	-std=gnu99 \
+	-Wall -Wextra -Wcast-align -Wredundant-decls -Wbad-function-cast -Wundef -Wfloat-equal -Wmissing-include-dirs -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
+	-Wno-sign-compare \
+	-Wno-missing-field-initializers
 
 test_imapx_LDADD = \
 	$(SQLITE_LIBS) \
diff --git a/src/libekolab/kolab-mail-mime-builder.c b/src/libekolab/kolab-mail-mime-builder.c
index b92ad94..6487ef2 100644
--- a/src/libekolab/kolab-mail-mime-builder.c
+++ b/src/libekolab/kolab-mail-mime-builder.c
@@ -27,10 +27,6 @@
 
 #include <string.h>
 
-#include <camel/camel-multipart.h>
-#include <camel/camel-mime-utils.h>
-#include <camel/camel-stream-mem.h>
-
 #include "kolab-util-backend.h"
 #include "kolab-mail-mime-builder.h"
 
diff --git a/src/libekolab/kolab-mail-mime-builder.h b/src/libekolab/kolab-mail-mime-builder.h
index a3b5a2f..1564f87 100644
--- a/src/libekolab/kolab-mail-mime-builder.h
+++ b/src/libekolab/kolab-mail-mime-builder.h
@@ -70,9 +70,8 @@
 #include <glib.h>
 #include <glib-object.h>
 
-#include <camel/camel-mime-message.h>
-
 #include <libekolabconv/main/src/kolab-conv.h>
+#include <libekolabutil/camel-system-headers.h>
 
 #include "kolab-backend-types.h"
 #include "kolab-settings-handler.h"
diff --git a/src/libekolabutil/Makefile.am b/src/libekolabutil/Makefile.am
index 085d85a..e76d6cf 100644
--- a/src/libekolabutil/Makefile.am
+++ b/src/libekolabutil/Makefile.am
@@ -60,7 +60,8 @@ noinst_HEADERS = \
 	kolab-util-folder.h \
 	kolab-http-job.h \
 	kolab-util-kconv.h \
-	kolab-util-sqlite.h
+	kolab-util-sqlite.h \
+	camel-system-headers.h
 
 noinstdir = \
 	$(pkgincludedir)
diff --git a/src/libekolabutil/camel-system-headers.h b/src/libekolabutil/camel-system-headers.h
new file mode 100644
index 0000000..1d2cd80
--- /dev/null
+++ b/src/libekolabutil/camel-system-headers.h
@@ -0,0 +1,61 @@
+/***************************************************************************
+ *            camel-system-headers.h
+ *
+ *  Thu Nov 17 16:33:36 2011
+ *  Copyright  2011  Christian Hilberg
+ *  <hilberg kernelconcepts de>
+ ****************************************************************************/
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 Library General Public License for more details.
+ * 
+ * You should have received a copy of the GNU 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 _CAMEL_SYSTEM_HEADERS_
+#define _CAMEL_SYSTEM_HEADERS_
+
+/*----------------------------------------------------------------------------*/
+
+#pragma GCC system_header
+
+/*----------------------------------------------------------------------------*/
+
+#include <camel/camel.h>
+#include <camel/camel-object.h>
+#include <camel/camel-url.h>
+#include <camel/camel-exception.h>
+#include <camel/camel-stream.h>
+/* Camel.HttpStream will be removed in future! */
+#include <camel/camel-http-stream.h>
+#include <camel/camel-stream-fs.h>
+#include <camel/camel-stream-mem.h>
+#include <camel/camel-transport.h>
+#include <camel/camel-session.h>
+#include <camel/camel-multipart.h>
+#include <camel/camel-mime-utils.h>
+#include <camel/camel-mime-message.h>
+
+
+#if 0
+#include <camel/camel-sasl.h>
+#include <camel/camel-i18n.h>
+#endif
+
+/*----------------------------------------------------------------------------*/
+
+#endif
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/libekolabutil/kolab-http-job.h b/src/libekolabutil/kolab-http-job.h
index 166ba15..d83f719 100644
--- a/src/libekolabutil/kolab-http-job.h
+++ b/src/libekolabutil/kolab-http-job.h
@@ -31,7 +31,7 @@
 /*----------------------------------------------------------------------------*/
 
 #include <glib.h>
-#include <camel/camel-url.h>
+#include "camel-system-headers.h"
 
 /*----------------------------------------------------------------------------*/
 
diff --git a/src/libekolabutil/kolab-util-camel.c b/src/libekolabutil/kolab-util-camel.c
index 453444b..a6fd9bb 100644
--- a/src/libekolabutil/kolab-util-camel.c
+++ b/src/libekolabutil/kolab-util-camel.c
@@ -24,10 +24,9 @@
  
 /*----------------------------------------------------------------------------*/
 
-#include <camel/camel-object.h>
-
 #include <e-util/e-util.h>
 
+#include "camel-system-headers.h"
 #include "kolab-util-error.h"
 #include "kolab-util-glib.h"
 #include "kolab-util-camel.h"
diff --git a/src/libekolabutil/kolab-util-camel.h b/src/libekolabutil/kolab-util-camel.h
index 9865c20..8b01fa7 100644
--- a/src/libekolabutil/kolab-util-camel.h
+++ b/src/libekolabutil/kolab-util-camel.h
@@ -30,7 +30,7 @@
 /*----------------------------------------------------------------------------*/
 
 #include <glib.h>
-#include <camel/camel.h>
+#include "camel-system-headers.h"
 
 /*----------------------------------------------------------------------------*/
 
diff --git a/src/libekolabutil/kolab-util-error.h b/src/libekolabutil/kolab-util-error.h
index 86b316b..15d6b4d 100644
--- a/src/libekolabutil/kolab-util-error.h
+++ b/src/libekolabutil/kolab-util-error.h
@@ -30,7 +30,7 @@
 /*----------------------------------------------------------------------------*/
 
 #include <glib.h>
-#include <camel/camel-exception.h>
+#include "camel-system-headers.h"
 
 /*----------------------------------------------------------------------------*/
 /* CamelIMAPX GError                                                          */
diff --git a/src/libekolabutil/kolab-util-http.c b/src/libekolabutil/kolab-util-http.c
index 82b58bb..f72a42b 100644
--- a/src/libekolabutil/kolab-util-http.c
+++ b/src/libekolabutil/kolab-util-http.c
@@ -52,13 +52,13 @@
 
 #include <glib.h>
 
-#include <camel/camel-stream.h>
 #include <camel/camel-kolab-stream.h>
 
 /* HTTP lib specifics */
 #include <libsoup/soup-gnome.h>
 #include <curl/curl.h>
 
+#include "camel-system-headers.h"
 #include "kolab-util-http.h"
 
 /*----------------------------------------------------------------------------*/
diff --git a/src/libekolabutil/kolab-util-ldap.c b/src/libekolabutil/kolab-util-ldap.c
index a9fdeb9..81afc6a 100644
--- a/src/libekolabutil/kolab-util-ldap.c
+++ b/src/libekolabutil/kolab-util-ldap.c
@@ -18,6 +18,7 @@
  */
 
 #include "kolab-util-ldap.h"
+#include "camel-system-headers.h"
 
 #include <camel/camel-kolab-session.h>
 
diff --git a/src/tests/integration/libcamelkolab/test-camel-kolab-imapx-provider.c b/src/tests/integration/libcamelkolab/test-camel-kolab-imapx-provider.c
index 3f85305..8ecf3d4 100644
--- a/src/tests/integration/libcamelkolab/test-camel-kolab-imapx-provider.c
+++ b/src/tests/integration/libcamelkolab/test-camel-kolab-imapx-provider.c
@@ -32,12 +32,12 @@
 /*---------------------------------------------------------------------------*/
 
 #include <glib.h>
-#include <camel/camel.h>
-#include <camel/camel-session.h>
 
 #include <camel/camel-kolab-imapx-store.h>
 #include <camel/camel-kolab-imapx-folder.h>
 
+#include <libekolabutil/camel-system-headers.h>
+
 /* TODO this test needs to be fixed. While the current kolab-imapx
  *      implementation works inside evolution, this test fails the
  *      camel_session_get_service () call (seems kolab-imapx is no
diff --git a/src/tests/integration/libekolab/test-kolab-util-cal-freebusy.c b/src/tests/integration/libekolab/test-kolab-util-cal-freebusy.c
index 0c55aa6..c5135de 100644
--- a/src/tests/integration/libekolab/test-kolab-util-cal-freebusy.c
+++ b/src/tests/integration/libekolab/test-kolab-util-cal-freebusy.c
@@ -34,12 +34,12 @@
 #include <glib.h>
 #include <stdlib.h>
 
-#include <camel/camel-stream.h>
 #include <camel/camel-kolab-stream.h>
 #include <camel/camel-kolab-session.h>
 
 #include <libecal/e-cal-component.h>
 
+#include <libekolabutil/camel-system-headers.h>
 #include <libekolabutil/kolab-util-camel.h>
 #include <libekolabutil/kolab-util-http.h>
 #include <libekolabutil/kolab-util-cal-freebusy.h>
diff --git a/src/tests/integration/libekolab/test-kolab-util-http.c b/src/tests/integration/libekolab/test-kolab-util-http.c
index fd074e7..597045d 100644
--- a/src/tests/integration/libekolab/test-kolab-util-http.c
+++ b/src/tests/integration/libekolab/test-kolab-util-http.c
@@ -34,10 +34,10 @@
 #include <glib.h>
 #include <stdlib.h>
 
-#include <camel/camel-stream.h>
 #include <camel/camel-kolab-stream.h>
 #include <camel/camel-kolab-session.h>
 
+#include <libekolabutil/camel-system-headers.h>
 #include <libekolabutil/kolab-util-camel.h>
 #include <libekolabutil/kolab-util-http.h>
 #include <libekolabutil/kolab-util-glib.h>



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