[evolution-kolab/ek-wip-porting-imapx: 12/12] CamelKolabIMAPXProvider: build fixes



commit b605716c97e4710b6afc15337a5bd3f9ac7bfb26
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Wed Nov 30 12:18:45 2011 +0100

    CamelKolabIMAPXProvider: build fixes
    
    * include the single Camel lib header (via our
      Camel system header wrapper) instead of individual
      Camel headers (the latter is not allowed any longer)
    * replaced CamelException with GError
    * replaced CamelType with GType

 src/camel/camel-kolab-imapx-provider.c |   37 +++++++++++++------------------
 1 files changed, 16 insertions(+), 21 deletions(-)
---
diff --git a/src/camel/camel-kolab-imapx-provider.c b/src/camel/camel-kolab-imapx-provider.c
index ab0be52..dafa4d0 100644
--- a/src/camel/camel-kolab-imapx-provider.c
+++ b/src/camel/camel-kolab-imapx-provider.c
@@ -12,17 +12,17 @@
  * 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
  */
- 
+
 /*----------------------------------------------------------------------------*/
 
 #ifdef HAVE_CONFIG_H
@@ -30,21 +30,17 @@
 #endif
 
 #include <string.h>
+#include <glib/gi18n-lib.h>
 
 #include <libekolabutil/kolab-util-camel.h>
+#include <libekolabutil/camel-system-headers.h>
 
-#include <camel/camel-sasl.h>
-#include <camel/camel-provider.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-i18n.h>
-
-/* IMAPX specifics 
+/* IMAPX specifics
  *
  *      The following header files are not installed,
  *      their API is not public to Camel users, so we
  *      need to keep our own local IMAPX around.
  */
-#include <camel/providers/imapx/camel-imapx-exception.h>
 #include <camel/providers/imapx/camel-imapx-utils.h>
 
 #include "camel-kolab-imapx-provider.h"
@@ -86,7 +82,7 @@ static CamelProvider kolab_imapx_provider = {	/* http://www.go-evolution.org/Cam
 	KOLAB_CAMEL_PROVIDER_PROTOCOL,
 
 	N_(KOLAB_CAMEL_PROVIDER_NAME),
-	 
+
 	N_("For accessing Kolab2 servers."),
 	"mail",
 
@@ -118,38 +114,37 @@ static gint kolab_url_equal (gconstpointer, gconstpointer);
 /*----------------------------------------------------------------------------*/
 /* external symbols */
 
-extern void __KOLAB_camel_imapx_module_init (void);
+extern void camel_imapx_module_init (void);
 
 /*----------------------------------------------------------------------------*/
 
 void
 camel_kolab_imapx_provider_module_init (void)
 {
-	__KOLAB_camel_imapx_module_init ();
+	camel_imapx_module_init ();
 
 	kolab_imapx_provider.object_types[CAMEL_PROVIDER_STORE] = camel_kolab_imapx_store_get_type ();
-	kolab_imapx_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = CAMEL_INVALID_TYPE;
+	kolab_imapx_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = G_TYPE_INVALID;
 	kolab_imapx_provider.url_hash = kolab_url_hash;
 	kolab_imapx_provider.url_equal = kolab_url_equal;
 	kolab_imapx_provider.authtypes = camel_sasl_authtype_list(FALSE);
 	kolab_imapx_provider.authtypes = g_list_prepend (kolab_imapx_provider.authtypes,
 	                                                 &kolab_imapx_password_authtype);
 	kolab_imapx_provider.translation_domain = GETTEXT_PACKAGE;
-	kolab_imapx_provider.license = "LGPL";
 
 	/* TODO
 	bindtextdomain (GETTEXT_PACKAGE, KOLAB_LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	*/
-	g_assert (kolab_imapx_provider.object_types[CAMEL_PROVIDER_STORE] != CAMEL_INVALID_TYPE);
+	g_assert (kolab_imapx_provider.object_types[CAMEL_PROVIDER_STORE] != G_TYPE_INVALID);
 	g_debug ("%s: done", __func__);
-}     
-                                       
+}
+
 void
 camel_provider_module_init (void)
 {
 	camel_kolab_imapx_provider_module_init ();
-	
+
 	/* TODO
 	 * maybe we need to call the following from within
 	 * kolab_camel_provider_module_init ()
@@ -157,7 +152,7 @@ camel_provider_module_init (void)
 	 * needs to be initialized from within the backends
 	 * as well)
 	 */
-	g_assert (kolab_imapx_provider.object_types[CAMEL_PROVIDER_STORE] != CAMEL_INVALID_TYPE);
+	g_assert (kolab_imapx_provider.object_types[CAMEL_PROVIDER_STORE] != G_TYPE_INVALID);
 	camel_provider_register (&kolab_imapx_provider);
 	g_debug ("%s: %s provider registered",
 	         __func__, KOLAB_CAMEL_PROVIDER_PROTOCOL);
@@ -206,7 +201,7 @@ kolab_url_equal (gconstpointer a, gconstpointer b)
 {
 	const CamelURL	*u1 = a;
 	const CamelURL	*u2 = b;
-  
+
 	return kolab_check_equal (u1->protocol, u2->protocol)
 		&& kolab_check_equal (u1->user, u2->user)
 		&& kolab_check_equal (u1->authmech, u2->authmech)



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