Index: libebackend/e-data-server-module.c
===================================================================
--- libebackend/e-data-server-module.c	(revision 0)
+++ libebackend/e-data-server-module.c	(working copy)
@@ -28,7 +28,7 @@
 
 #include <gmodule.h>
 
-#include "libedataserver-private.h"
+#include "libedataserver/libedataserver-private.h"
 
 #define E_DATA_SERVER_TYPE_MODULE    	        (e_data_server_module_get_type ())
 #define E_DATA_SERVER_MODULE(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), E_DATA_SERVER_TYPE_MODULE, EDataServerModule))
@@ -263,7 +263,7 @@
 	module_objects = g_list_prepend (module_objects, object);
 }
 
-/**
+/*
  * Unref all loaded modules, so that unused modules are unloaded from the
  * system.
  */
Index: libebackend/e-file-cache.c
===================================================================
--- libebackend/e-file-cache.c	(revision 0)
+++ libebackend/e-file-cache.c	(working copy)
@@ -27,8 +27,8 @@
 #include <glib/gstdio.h>
 
 #include "e-file-cache.h"
-#include "e-data-server-util.h"
-#include "e-xml-hash-utils.h"
+#include "libedataserver/e-data-server-util.h"
+#include "libedataserver/e-xml-hash-utils.h"
 
 struct _EFileCachePrivate {
 	char *filename;
Index: libebackend/libebackend.pc.in
===================================================================
--- libebackend/libebackend.pc.in	(revision 0)
+++ libebackend/libebackend.pc.in	(revision 0)
@@ -0,0 +1,15 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+
+privincludedir=@privincludedir@
+
+Name: libebackend
+Description: Utility library for Evolution Data Server Backends
+Version: @VERSION@
+Requires: glib-2.0
+Libs: -L${libdir} -lbackend-@API_VERSION@
+Cflags: -I${privincludedir}
Index: libebackend/Makefile.am
===================================================================
--- libebackend/Makefile.am	(revision 0)
+++ libebackend/Makefile.am	(revision 0)
@@ -0,0 +1,40 @@
+INCLUDES =								\
+	-I$(top_srcdir)							\
+	-DG_LOG_DOMAIN=\"e-data-server\"				\
+	-DE_DATA_SERVER_EXTENSIONDIR=\"$(extensiondir)\"		\
+	$(DB_CFLAGS)							\
+	$(E_BACKEND_CFLAGS)
+
+lib_LTLIBRARIES = libebackend-1.2.la
+
+libebackend_1_2_la_SOURCES =		\
+	e-data-server-module.c		\
+	e-dbhash.c			\
+	e-db3-utils.c			\
+	e-file-cache.c
+
+libebackend_1_2_la_LIBADD = 				\
+	$(E_BACKEND_LIBS)				\
+	$(DB_LIBS)
+
+libebackend_1_2_la_LDFLAGS = \
+	-version-info $(LIBEDATASERVER_CURRENT):$(LIBEDATASERVER_REVISION):$(LIBEDATASERVER_AGE) $(NO_UNDEFINED)
+
+libebackendincludedir = $(privincludedir)/libebackend
+
+libebackendinclude_HEADERS =		\
+	e-data-server-module.h		\
+	e-db3-utils.h			\
+	e-dbhash.h			\
+	e-file-cache.h
+
+%-$(API_VERSION).pc: %.pc
+	 cp $< $@
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libebackend-$(API_VERSION).pc
+
+EXTRA_DIST = 						\
+	$(pkgconfig_DATA:-$(API_VERSION).pc=.pc.in)
+
+DISTCLEANFILES = $(pkgconfig_DATA)
Index: configure.in
===================================================================
--- configure.in	(revision 8670)
+++ configure.in	(working copy)
@@ -1397,7 +1397,7 @@
 dnl Flags for the various libraries we build
 dnl ****************************************
 
-dnl --- libedataserver and libedataserverui flags
+dnl --- libedataserver, libedataserverui, libebackend flags
 
 E_DATA_SERVER_DEPS="libxml-2.0 libbonobo-2.0 gconf-2.0 $mozilla_nspr"
 
@@ -1411,6 +1411,12 @@
 AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
 AC_SUBST(E_DATA_SERVER_UI_LIBS)
 
+E_BACKEND_DEPS="gobject-2.0 libxml-2.0"
+
+EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
+AC_SUBST(E_BACKEND_CFLAGS)
+AC_SUBST(E_BACKEND_LIBS)
+
 dnl --- evolution-addressbook flags
 
 EVOLUTION_ADDRESSBOOK_DEPS="libxml-2.0 libgnome-2.0 gobject-2.0 gthread-2.0 gconf-2.0"
@@ -1657,6 +1663,8 @@
 camel/camel.pc
 camel/camel-provider.pc
 libdb/Makefile
+libebackend/Makefile
+libebackend/libebackend.pc
 libedataserver/Makefile
 libedataserver/libedataserver.pc
 libedataserverui/Makefile
@@ -1687,6 +1695,7 @@
 docs/reference/camel/Makefile
 docs/reference/libedataserver/Makefile
 docs/reference/libedataserverui/Makefile
+docs/reference/libebackend/Makefile
 po/Makefile.in
 ])
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 8674)
+++ ChangeLog	(working copy)
@@ -1,3 +1,37 @@
+2008-04-23  Rob Bradford  <rob@openedhand.com>
+
+	* Makefile.am:
+	* configure.in:
+	* libebackend/Makefile.am:
+	* libebackend/libebackend.pc.in:
+	Build framework for new libebackend library.
+
+	* libedataserver/Makefile.am:
+	Remove files that have moved to libebackend.
+
+	* libedataserver/e-data-server-module.[ch]:
+	* libedataserver/e-db3-utils.[ch]:
+	* libedataserver/e-dbhash.[ch]:
+	* libedataserer/e-file-cache.[ch]:
+	Moved to libebackend.
+
+	* src/Makefile.am:
+	* src/server.c:
+	Use libebackend headers and link to the library.
+
+	* docs/reference/Makefile.am:
+	* docs/reference/libebackend/Makefile.am:
+	* docs/reference/libebackend/libebackend-docs.xml:
+	* docs/reference/libebackend/libebackend-sections.txt:
+	* docs/reference/libebackend/libebackend.types:
+	Add documentation for new libebackend library.
+
+	* docs/reference/libedataserver/libedataserver.types:
+	Remove types that have been moved to libebackend.
+
+	* docs/reference/calendar/libedata-cal/Makefile.am:
+	Add libebackend to the gtk-doc scanner libraries.
+
 2008-04-23  Srinivasa Ragavan  <sragavan@novell.com>
 	
 	* configure.in: Version bump to 2.23.1
Index: src/server.c
===================================================================
--- src/server.c	(revision 8670)
+++ src/server.c	(working copy)
@@ -42,7 +42,7 @@
 #include <bonobo/bonobo-generic-factory.h>
 #include <gconf/gconf-client.h>
 
-#include <libedataserver/e-data-server-module.h>
+#include <libebackend/e-data-server-module.h>
 #include <libedata-book/e-data-book-factory.h>
 #if ENABLE_CALENDAR
 #include <libedata-cal/e-data-cal-factory.h>
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 8670)
+++ src/Makefile.am	(working copy)
@@ -57,6 +57,7 @@
 endif
 
 evolution_data_server_LDADD =                     			\
+        $(top_builddir)/libebackend/libebackend-1.2.la			\
         $(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la  \
         $(E_DATA_CAL_LIBS)                                      	\
         $(E_FACTORY_LIBS)						\
Index: docs/reference/libebackend/libebackend.types
===================================================================
--- docs/reference/libebackend/libebackend.types	(revision 0)
+++ docs/reference/libebackend/libebackend.types	(revision 0)
@@ -0,0 +1,3 @@
+#include <libebackend/e-file-cache.h>
+
+e_file_cache_get_type
Index: docs/reference/libebackend/libebackend-sections.txt
===================================================================
--- docs/reference/libebackend/libebackend-sections.txt	(revision 0)
+++ docs/reference/libebackend/libebackend-sections.txt	(revision 0)
@@ -0,0 +1,59 @@
+<SECTION>
+<FILE>e-file-cache</FILE>
+EFileCachePrivate
+<TITLE>EFileCache</TITLE>
+EFileCache
+e_file_cache_new
+e_file_cache_remove
+e_file_cache_clean
+e_file_cache_get_object
+e_file_cache_get_objects
+e_file_cache_get_keys
+e_file_cache_add_object
+e_file_cache_replace_object
+e_file_cache_remove_object
+e_file_cache_freeze_changes
+e_file_cache_thaw_changes
+e_file_cache_get_filename
+<SUBSECTION Standard>
+E_FILE_CACHE
+E_IS_FILE_CACHE
+E_TYPE_FILE_CACHE
+e_file_cache_get_type
+E_FILE_CACHE_CLASS
+E_IS_FILE_CACHE_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>e-dbhash</FILE>
+EDbHashStatus
+EDbHash
+EDbHashPrivate
+EDbHashFunc
+e_dbhash_new
+e_dbhash_add
+e_dbhash_remove
+e_dbhash_compare
+e_dbhash_foreach_key
+e_dbhash_write
+e_dbhash_destroy
+</SECTION>
+
+<SECTION>
+<FILE>e-data-server-module</FILE>
+e_data_server_module_init
+e_data_server_get_extensions_for_type
+e_data_server_extension_list_free
+e_data_server_module_remove_unused
+e_data_server_module_add_type
+eds_module_initialize
+eds_module_shutdown
+eds_module_list_types
+</SECTION>
+
+<SECTION>
+<FILE>e-db3-utils</FILE>
+e_db3_utils_maybe_recover
+e_db3_utils_upgrade_format
+</SECTION>
+
Index: docs/reference/libebackend/libebackend-docs.xml
===================================================================
--- docs/reference/libebackend/libebackend-docs.xml	(revision 0)
+++ docs/reference/libebackend/libebackend-docs.xml	(revision 0)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+  <bookinfo>
+    <title>Evolution API Reference: libebackend, backend utility library</title>
+  </bookinfo>
+
+  <chapter>
+    <title>Evolution API Reference: libebackend, backend utility library</title>
+    <xi:include href="xml/e-file-cache.xml"/>
+    <xi:include href="xml/e-dbhash.xml"/>
+    <xi:include href="xml/e-data-server-module.xml"/>
+    <xi:include href="xml/e-db3-utils.xml"/>
+  </chapter>
+</book>
Index: docs/reference/libebackend/Makefile.am
===================================================================
--- docs/reference/libebackend/Makefile.am	(revision 0)
+++ docs/reference/libebackend/Makefile.am	(revision 0)
@@ -0,0 +1,174 @@
+## Process this file with automake to produce Makefile.in
+# The name of the module.
+DOC_MODULE = libebackend
+
+content_files=
+HTML_IMAGES=
+
+# The top-level SGML file.
+DOC_MAIN_SGML_FILE = libebackend-docs.xml
+
+#SCANGOBJ_OPTIONS =
+SCAN_OPTIONS = --deprecated-guards="EDS_DISABLE_DEPRECATED"
+
+DOC_SOURCE_DIR = $(top_srcdir)/libebackend
+HFILE_GLOB = $(top_srcdir)/libebackend/*.h
+CFILE_GLOB = $(top_srcdir)/libebackend/*.c
+IGNORE_HFILES = 
+
+GTKDOC_CFLAGS  =					\
+	-I$(top_srcdir)/libebackend			\
+	-I$(top_srcdir) 				\
+	-I$(top_builddir)				\
+	$(E_BACKEND_CFLAGS)
+GTKDOC_LIBS = $(top_builddir)/libebackend/libebackend-1.2.la \
+	      $(top_builddir)/libedataserver/libedataserver-1.2.la \
+	      $(E_BACKEND_LIBS)
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST = 				\
+	$(content_files)		\
+	$(HTML_IMAGES)			\
+	$(DOC_MAIN_SGML_FILE)		\
+	$(DOC_MODULE).types		\
+	$(DOC_MODULE)-sections.txt	\
+	$(DOC_MODULE)-overrides.txt
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+	   $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = 		 \
+	$(DOC_MODULE).args 	 \
+	$(DOC_MODULE).hierarchy  \
+	$(DOC_MODULE).interfaces \
+	$(DOC_MODULE).prerequisites \
+	$(DOC_MODULE).signals
+
+CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-scan.o $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB)
+	@echo '*** Scanning header files ***'
+	@-chmod -R u+w $(srcdir)
+	if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
+	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+	else \
+	    cd $(srcdir) ; \
+	    for i in $(SCANOBJ_FILES) ; do \
+               test -f $$i || touch $$i ; \
+	    done \
+	fi
+	cd $(srcdir) && \
+	  gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+	touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
+	@true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+	@echo '*** Rebuilding template files ***'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
+	touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+	@true
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
+	@echo '*** Building XML ***'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && \
+	gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml $(MKDB_OPTIONS)
+	touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+	@true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+	@echo '*** Building HTML ***'
+	@-chmod -R u+w $(srcdir)
+	rm -rf $(srcdir)/html 
+	mkdir $(srcdir)/html
+	cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+	@echo '-- Fixing Crossreferences' 
+	cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+	touch html-build.stamp
+endif
+
+##############
+
+clean-local:
+	rm -f *~ *.bak
+
+maintainer-clean-local: clean
+	cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+install-data-local:
+	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
+	(installfiles=`echo $(srcdir)/html/*`; \
+	if test "$$installfiles" = '$(srcdir)/html/*'; \
+	then echo '-- Nothing to install' ; \
+	else \
+	  for i in $$installfiles; do \
+	    echo '-- Installing '$$i ; \
+	    $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+	  done; \
+	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
+	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+	fi)
+
+uninstall-local:
+	rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+	@echo "*** gtk-doc must be installed and enabled in order to make dist"
+	@false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+	mkdir $(distdir)/tmpl
+	mkdir $(distdir)/xml
+	mkdir $(distdir)/html
+	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+	-cp $(srcdir)/xml/*.xml $(distdir)/xml
+	-cp $(srcdir)/html/* $(distdir)/html
+
+.PHONY : dist-hook-local
+
Index: docs/reference/calendar/libedata-cal/Makefile.am
===================================================================
--- docs/reference/calendar/libedata-cal/Makefile.am	(revision 8670)
+++ docs/reference/calendar/libedata-cal/Makefile.am	(working copy)
@@ -31,6 +31,7 @@
 
 GTKDOC_LIBS = \
 	$(top_builddir)/calendar/libedata-cal/libedata-cal-1.2.la	\
+	$(top_builddir)/libebackend/libebackend-1.2.la			\
 	$(EVOLUTION_CALENDAR_LIBS)
 
 ####################################
Index: docs/reference/Makefile.am
===================================================================
--- docs/reference/Makefile.am	(revision 8670)
+++ docs/reference/Makefile.am	(working copy)
@@ -1,3 +1,3 @@
-SUBDIRS = addressbook calendar camel libedataserver libedataserverui
+SUBDIRS = addressbook calendar camel libedataserver libedataserverui libebackend
 MKDB_OPTIONS=--output-format=xml
 
Index: docs/reference/libedataserver/libedataserver.types
===================================================================
--- docs/reference/libedataserver/libedataserver.types	(revision 8670)
+++ docs/reference/libedataserver/libedataserver.types	(working copy)
@@ -1,7 +1,6 @@
 #include <libedataserver/e-account.h>
 #include <libedataserver/e-account-list.h>
 #include <libedataserver/e-component-listener.h>
-#include <libedataserver/e-file-cache.h>
 #include <libedataserver/e-iterator.h>
 #include <libedataserver/e-list.h>
 #include <libedataserver/e-list-iterator.h>
@@ -12,7 +11,6 @@
 e_account_get_type
 e_account_list_get_type
 e_component_listener_get_type
-e_file_cache_get_type
 e_iterator_get_type
 e_list_get_type
 e_list_iterator_get_type
Index: libedataserver/e-file-cache.c
===================================================================
--- libedataserver/e-file-cache.c	(revision 8670)
+++ libedataserver/e-file-cache.c	(working copy)
@@ -1,497 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-file-cache.c
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU Lesser General Public
- * License as published by the Free Software Foundation.
- *
- * 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.
- *
- * Authors: Rodrigo Moya <rodrigo@ximian.com>
- */
-
-#include <config.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <glib.h>
-#include <glib/gstdio.h>
-
-#include "e-file-cache.h"
-#include "e-data-server-util.h"
-#include "e-xml-hash-utils.h"
-
-struct _EFileCachePrivate {
-	char *filename;
-	EXmlHash *xml_hash;
-	gboolean dirty;
-	gboolean frozen;
-};
-
-/* Property IDs */
-enum {
-	PROP_0,
-	PROP_FILENAME
-};
-
-G_DEFINE_TYPE (EFileCache, e_file_cache, G_TYPE_OBJECT);
-
-static void
-e_file_cache_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
-	EFileCache *cache;
-	EFileCachePrivate *priv;
-	char *dirname;
-	int result;
-
-	cache = E_FILE_CACHE (object);
-	priv = cache->priv;
-
-	/* FIXME: the property is being set twice. Need to investigate
-	 * why and fix. Until then, we just return when called the
-	 * second time*/
-	if (priv->filename)
-		return;
-
-	switch (property_id) {
-	case PROP_FILENAME :
-		/* make sure the directory for the cache exists */
-		priv->filename = g_strdup ( g_value_get_string (value));
-		dirname = g_path_get_dirname (priv->filename);
-		result = g_mkdir_with_parents (dirname, 0700);
-		g_free (dirname);
-		if (result != 0)
-			break;
-
-		if (priv->xml_hash)
-			e_xmlhash_destroy (priv->xml_hash);
-		priv->xml_hash = e_xmlhash_new (g_value_get_string (value));
-
-		/* if opening the cache file fails, remove it and try again */
-		if (!priv->xml_hash) {
-			g_unlink (g_value_get_string (value));
-			priv->xml_hash = e_xmlhash_new (g_value_get_string (value));
-			if (priv->xml_hash) {
-				g_message (G_STRLOC ": could not open not re-create cache file %s",
-					   g_value_get_string (value));
-			}
-		}
-		break;
-	default :
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-	}
-}
-
-static void
-e_file_cache_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
-	EFileCache *cache;
-	EFileCachePrivate *priv;
-
-	cache = E_FILE_CACHE (object);
-	priv = cache->priv;
-
-	switch (property_id) {
-	case PROP_FILENAME :
-		g_value_set_string (value, priv->filename);
-		break;
-	default :
-		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-	}
-}
-
-static void
-e_file_cache_finalize (GObject *object)
-{
-	EFileCache *cache;
-	EFileCachePrivate *priv;
-
-	cache = E_FILE_CACHE (object);
-	priv = cache->priv;
-
-	if (priv) {
-		if (priv->filename) {
-			g_free (priv->filename);
-			priv->filename = NULL;
-		}
-
-		if (priv->xml_hash) {
-			e_xmlhash_destroy (priv->xml_hash);
-			priv->xml_hash = NULL;
-		}
-
-		g_free (priv);
-		cache->priv = NULL;
-	}
-
-	G_OBJECT_CLASS (e_file_cache_parent_class)->finalize (object);
-}
-
-static void
-e_file_cache_class_init (EFileCacheClass *klass)
-{
-	GObjectClass *object_class;
-
-	object_class = G_OBJECT_CLASS (klass);
-	object_class->finalize = e_file_cache_finalize;
-	object_class->set_property = e_file_cache_set_property;
-	object_class->get_property = e_file_cache_get_property;
-
-	g_object_class_install_property (object_class, PROP_FILENAME,
-					 g_param_spec_string ("filename", NULL, NULL, "",
-							      G_PARAM_READABLE | G_PARAM_WRITABLE
-							      | G_PARAM_CONSTRUCT_ONLY));
-}
-
-static void
-e_file_cache_init (EFileCache *cache)
-{
-	EFileCachePrivate *priv;
-
-	priv = g_new0 (EFileCachePrivate, 1);
-	priv->dirty = FALSE;
-	priv->frozen = FALSE;
-	cache->priv = priv;
-}
-
-/**
- * e_file_cache_new
- * @filename: filename where the cache is kept.
- *
- * Creates a new #EFileCache object, which implements a cache of
- * objects, very useful for remote backends.
- *
- * Return value: The newly created object.
- */
-EFileCache *
-e_file_cache_new (const char *filename)
-{
-	EFileCache *cache;
-
-	cache = g_object_new (E_TYPE_FILE_CACHE, "filename", filename, NULL);
-
-	return cache;
-}
-
-/**
- * e_file_cache_remove:
- * @cache: A #EFileCache object.
- *
- * Remove the cache from disk.
- *
- * Returns: TRUE if successful, FALSE otherwise.
- */
-gboolean
-e_file_cache_remove (EFileCache *cache)
-{
-	EFileCachePrivate *priv;
-
-	g_return_val_if_fail (E_IS_FILE_CACHE (cache), FALSE);
-
-	priv = cache->priv;
-
-	if (priv->filename) {
-		char *dirname, *full_path;
-		const char *fname;
-		GDir *dir;
-		gboolean success;
-
-		/* remove all files in the directory */
-		dirname = g_path_get_dirname (priv->filename);
-		dir = g_dir_open (dirname, 0, NULL);
-		if (dir) {
-			while ((fname = g_dir_read_name (dir))) {
-				full_path = g_build_filename (dirname, fname, NULL);
-				if (g_unlink (full_path) != 0) {
-					g_free (full_path);
-					g_free (dirname);
-					g_dir_close (dir);
-
-					return FALSE;
-				}
-
-				g_free (full_path);
-			}
-
-			g_dir_close (dir);
-		}
-
-		/* remove the directory itself */
-		success = g_rmdir (dirname) == 0;
-
-		/* free all memory */
-		g_free (dirname);
-		g_free (priv->filename);
-		priv->filename = NULL;
-
-		e_xmlhash_destroy (priv->xml_hash);
-		priv->xml_hash = NULL;
-
-		return success;
-	}
-
-	return TRUE;
-}
-
-static void
-add_key_to_slist (const char *key, const char *value, gpointer user_data)
-{
-	GSList **keys = user_data;
-
-	*keys = g_slist_append (*keys, (char *) key);
-}
-
-/**
- * e_file_cache_clean:
- * @cache: A #EFileCache object.
- *
- * Clean up the cache's contents.
- *
- * Returns: TRUE if successful, FALSE otherwise.
- */
-gboolean
-e_file_cache_clean (EFileCache *cache)
-{
-	EFileCachePrivate *priv;
-	GSList *keys = NULL;
-
-	g_return_val_if_fail (E_IS_FILE_CACHE (cache), FALSE);
-
-	priv = cache->priv;
-
-	e_xmlhash_foreach_key (priv->xml_hash, (EXmlHashFunc) add_key_to_slist, &keys);
-	while (keys != NULL) {
-		e_file_cache_remove_object (cache, (const char *) keys->data);
-		keys = g_slist_remove (keys, keys->data);
-	}
-
-	return TRUE;
-}
-
-typedef struct {
-	const char *key;
-	gboolean found;
-	const char *found_value;
-} CacheFindData;
-
-static void
-find_object_in_hash (gpointer key, gpointer value, gpointer user_data)
-{
-	CacheFindData *find_data = user_data;
-
-	if (find_data->found)
-		return;
-
-	if (!strcmp (find_data->key, (const char *) key)) {
-		find_data->found = TRUE;
-		find_data->found_value = (const char *) value;
-	}
-}
-
-/**
- * e_file_cache_get_object:
- */
-const char *
-e_file_cache_get_object (EFileCache *cache, const char *key)
-{
-	CacheFindData find_data;
-	EFileCachePrivate *priv;
-
-	g_return_val_if_fail (E_IS_FILE_CACHE (cache), NULL);
-	g_return_val_if_fail (key != NULL, NULL);
-
-	priv = cache->priv;
-
-	find_data.key = key;
-	find_data.found = FALSE;
-	find_data.found_value = NULL;
-
-	e_xmlhash_foreach_key (priv->xml_hash, (EXmlHashFunc) find_object_in_hash, &find_data);
-
-	return find_data.found_value;
-}
-
-static void
-add_object_to_slist (const char *key, const char *value, gpointer user_data)
-{
-	GSList **list = user_data;
-
-	*list = g_slist_prepend (*list, (char *) value);
-}
-
-/**
- * e_file_cache_get_objects:
- */
-GSList *
-e_file_cache_get_objects (EFileCache *cache)
-{
-	EFileCachePrivate *priv;
-	GSList *list = NULL;
-
-	g_return_val_if_fail (E_IS_FILE_CACHE (cache), NULL);
-
-	priv = cache->priv;
-
-	e_xmlhash_foreach_key (priv->xml_hash, (EXmlHashFunc) add_object_to_slist, &list);
-
-	return list;
-}
-
-/**
- * e_file_cache_get_keys:
- */
-GSList *
-e_file_cache_get_keys (EFileCache *cache)
-{
-	EFileCachePrivate *priv;
-	GSList *list = NULL;
-
-	g_return_val_if_fail (E_IS_FILE_CACHE (cache), NULL);
-
-	priv = cache->priv;
-
-	e_xmlhash_foreach_key (priv->xml_hash, (EXmlHashFunc) add_key_to_slist, &list);
-
-	return list;
-}
-
-/**
- * e_file_cache_add_object:
- */
-gboolean
-e_file_cache_add_object (EFileCache *cache, const char *key, const char *value)
-{
-	EFileCachePrivate *priv;
-
-	g_return_val_if_fail (E_IS_FILE_CACHE (cache), FALSE);
-	g_return_val_if_fail (key != NULL, FALSE);
-
-	priv = cache->priv;
-
-	if (e_file_cache_get_object (cache, key))
-		return FALSE;
-
-	e_xmlhash_add (priv->xml_hash, key, value);
-	if (priv->frozen)
-		priv->dirty = TRUE;
-	else {
-		e_xmlhash_write (priv->xml_hash);
-		priv->dirty = FALSE;
-	}
-
-	return TRUE;
-}
-
-/**
- * e_file_cache_replace_object:
- */
-gboolean
-e_file_cache_replace_object (EFileCache *cache, const char *key, const char *new_value)
-{
-	EFileCachePrivate *priv;
-
-	g_return_val_if_fail (E_IS_FILE_CACHE (cache), FALSE);
-	g_return_val_if_fail (key != NULL, FALSE);
-
-	priv = cache->priv;
-
-	if (!e_file_cache_get_object (cache, key))
-		return FALSE;
-
-	if (!e_file_cache_remove_object (cache, key))
-		return FALSE;
-
-	return e_file_cache_add_object (cache, key, new_value);
-}
-
-/**
- * e_file_cache_remove_object:
- */
-gboolean
-e_file_cache_remove_object (EFileCache *cache, const char *key)
-{
-	EFileCachePrivate *priv;
-
-	g_return_val_if_fail (E_IS_FILE_CACHE (cache), FALSE);
-	g_return_val_if_fail (key != NULL, FALSE);
-
-	priv = cache->priv;
-
-	if (!e_file_cache_get_object (cache, key))
-		return FALSE;
-
-	e_xmlhash_remove (priv->xml_hash, key);
-	if (priv->frozen)
-		priv->dirty = TRUE;
-	else {
-		e_xmlhash_write (priv->xml_hash);
-		priv->dirty = FALSE;
-	}
-
-	return TRUE;
-}
-
-/**
- * e_file_cache_freeze_changes:
- * @cache: An #EFileCache object.
- *
- * Disables temporarily all writes to disk for the given cache object.
- */
-void
-e_file_cache_freeze_changes (EFileCache *cache)
-{
-	EFileCachePrivate *priv;
-
-	g_return_if_fail (E_IS_FILE_CACHE (cache));
-
-	priv = cache->priv;
-
-	priv->frozen = TRUE;
-}
-
-/**
- * e_file_cache_thaw_changes:
- * @cache: An #EFileCache object.
- *
- * Enables again writes to disk on every change.
- */
-void
-e_file_cache_thaw_changes (EFileCache *cache)
-{
-	EFileCachePrivate *priv;
-
-	g_return_if_fail (E_IS_FILE_CACHE (cache));
-
-	priv = cache->priv;
-
-	priv->frozen = FALSE;
-	if (priv->dirty) {
-		e_xmlhash_write (priv->xml_hash);
-		priv->dirty = FALSE;
-	}
-}
-
-/**
- * e_file_cache_get_filename:
- * @cache: A %EFileCache object.
- *
- * Gets the name of the file where the cache is being stored.
- *
- * Return value: The name of the cache.
- */
-const char *
-e_file_cache_get_filename (EFileCache *cache)
-{
-	g_return_val_if_fail (E_IS_FILE_CACHE (cache), NULL);
-	return (const char *) cache->priv->filename;
-}
-
Index: libedataserver/e-file-cache.h
===================================================================
--- libedataserver/e-file-cache.h	(revision 8670)
+++ libedataserver/e-file-cache.h	(working copy)
@@ -1,65 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-file-cache.h
- *
- * Copyright (C) 2003 Novell, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU Lesser General Public
- * License as published by the Free Software Foundation.
- *
- * 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.
- *
- * Authors: Rodrigo Moya <rodrigo@ximian.com>
- */
-
-#ifndef E_FILE_CACHE_H
-#define E_FILE_CACHE_H
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define E_TYPE_FILE_CACHE            (e_file_cache_get_type ())
-#define E_FILE_CACHE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_FILE_CACHE, EFileCache))
-#define E_FILE_CACHE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_FILE_CACHE, EFileCacheClass))
-#define E_IS_FILE_CACHE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_FILE_CACHE))
-#define E_IS_FILE_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_FILE_CACHE))
-
-typedef struct _EFileCachePrivate EFileCachePrivate;
-
-typedef struct {
-	GObject parent;
-	EFileCachePrivate *priv;
-} EFileCache;
-
-typedef struct {
-	GObjectClass parent_class;
-} EFileCacheClass;
-
-GType       e_file_cache_get_type (void);
-
-EFileCache *e_file_cache_new (const char *filename);
-gboolean    e_file_cache_remove (EFileCache *cache);
-gboolean    e_file_cache_clean (EFileCache *cache);
-
-const char *e_file_cache_get_object (EFileCache *cache, const char *key);
-GSList     *e_file_cache_get_objects (EFileCache *cache);
-GSList     *e_file_cache_get_keys (EFileCache *cache);
-gboolean    e_file_cache_add_object (EFileCache *cache, const char *key, const char *value);
-gboolean    e_file_cache_replace_object (EFileCache *cache, const char *key, const char *new_value);
-gboolean    e_file_cache_remove_object (EFileCache *cache, const char *key);
-
-void        e_file_cache_freeze_changes (EFileCache *cache);
-void        e_file_cache_thaw_changes (EFileCache *cache);
-const char *e_file_cache_get_filename (EFileCache *cache);
-
-G_END_DECLS
-
-#endif
Index: libedataserver/e-dbhash.c
===================================================================
--- libedataserver/e-dbhash.c	(revision 8670)
+++ libedataserver/e-dbhash.c	(working copy)
@@ -1,227 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- *   JP Rosevear (jpr@ximian.com)
- *
- * Copyright 2000, Ximian, Inc.
- */
-
-#include <config.h>
-
-#include "e-dbhash.h"
-
-#include <string.h>
-#include <fcntl.h>
-#include "db.h"
-
-struct _EDbHashPrivate
-{
-	DB *db;
-};
-
-EDbHash *
-e_dbhash_new (const char *filename)
-{
-	EDbHash *edbh;
-	DB *db;
-	int rv;
-
-	/* Attempt to open the database */
-	rv = db_create (&db, NULL, 0);
-	if (rv != 0) {
-		return NULL;
-	}
-
-	rv = (*db->open) (db, NULL, filename, NULL, DB_HASH, 0, 0666);
-	if (rv != 0) {
-		rv = (*db->open) (db, NULL, filename, NULL, DB_HASH, DB_CREATE, 0666);
-
-		if (rv != 0) {
-			db->close (db, 0);
-			return NULL;
-		}
-	}
-
-	edbh = g_new (EDbHash, 1);
-	edbh->priv = g_new (EDbHashPrivate, 1);
-	edbh->priv->db = db;
-
-	return edbh;
-}
-
-static void
-string_to_dbt(const char *str, DBT *dbt)
-{
-	memset (dbt, 0, sizeof (DBT));
-	dbt->data = (void*)str;
-	dbt->size = strlen (str) + 1;
-}
-
-static void
-md5_to_dbt(const guint8 str[16], DBT *dbt)
-{
-	memset (dbt, 0, sizeof (DBT));
-	dbt->data = (void*)str;
-	dbt->size = 16;
-}
-
-void
-e_dbhash_add (EDbHash *edbh, const gchar *key, const gchar *data)
-{
-	DB *db;
-	DBT dkey;
-	DBT ddata;
-	GChecksum *checksum;
-	guint8 *digest;
-	gsize length;
-
-	g_return_if_fail (edbh != NULL);
-	g_return_if_fail (edbh->priv != NULL);
-	g_return_if_fail (edbh->priv->db != NULL);
-	g_return_if_fail (key != NULL);
-	g_return_if_fail (data != NULL);
-
-	length = g_checksum_type_get_length (G_CHECKSUM_MD5);
-	digest = g_alloca (length);
-
-	db = edbh->priv->db;
-
-	/* Key dbt */
-	string_to_dbt (key, &dkey);
-
-	/* Compute MD5 checksum */
-	checksum = g_checksum_new (G_CHECKSUM_MD5);
-	g_checksum_update (checksum, (guchar *) data, -1);
-	g_checksum_get_digest (checksum, digest, &length);
-	g_checksum_free (checksum);
-
-	/* Data dbt */
-	md5_to_dbt (digest, &ddata);
-
-	/* Add to database */
-	db->put (db, NULL, &dkey, &ddata, 0);
-}
-
-void
-e_dbhash_remove (EDbHash *edbh, const char *key)
-{
-	DB *db;
-	DBT dkey;
-
-	g_return_if_fail (edbh != NULL);
-	g_return_if_fail (edbh->priv != NULL);
-	g_return_if_fail (key != NULL);
-
-	db = edbh->priv->db;
-
-	/* Key dbt */
-	string_to_dbt (key, &dkey);
-
-	/* Remove from database */
-	db->del (db, NULL, &dkey, 0);
-}
-
-void
-e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc func, gpointer user_data)
-{
-	DB *db;
-	DBT dkey;
-	DBT ddata;
-	DBC *dbc;
-	int db_error = 0;
-
-	g_return_if_fail (edbh != NULL);
-	g_return_if_fail (edbh->priv != NULL);
-	g_return_if_fail (func != NULL);
-
-	db = edbh->priv->db;
-
-	db_error = db->cursor (db, NULL, &dbc, 0);
-
-	if (db_error != 0) {
-		return;
-	}
-
-	memset(&dkey, 0, sizeof(DBT));
-	memset(&ddata, 0, sizeof(DBT));
-	db_error = dbc->c_get(dbc, &dkey, &ddata, DB_FIRST);
-
-	while (db_error == 0) {
-		(*func) ((const char *)dkey.data, user_data);
-
-		db_error = dbc->c_get(dbc, &dkey, &ddata, DB_NEXT);
-	}
-	dbc->c_close (dbc);
-}
-
-EDbHashStatus
-e_dbhash_compare (EDbHash *edbh, const char *key, const char *compare_data)
-{
-	DB *db;
-	DBT dkey;
-	DBT ddata;
-	guint8 compare_hash[16];
-	gsize length = sizeof (compare_hash);
-
-	g_return_val_if_fail (edbh != NULL, FALSE);
-	g_return_val_if_fail (edbh->priv != NULL, FALSE);
-	g_return_val_if_fail (key != NULL, FALSE);
-	g_return_val_if_fail (compare_hash != NULL, FALSE);
-
-	db = edbh->priv->db;
-
-	/* Key dbt */
-	string_to_dbt (key, &dkey);
-
-	/* Lookup in database */
-	memset (&ddata, 0, sizeof (DBT));
-	db->get (db, NULL, &dkey, &ddata, 0);
-
-	/* Compare */
-	if (ddata.data) {
-		GChecksum *checksum;
-
-		checksum = g_checksum_new (G_CHECKSUM_MD5);
-		g_checksum_update (checksum, (guchar *) compare_data, -1);
-		g_checksum_get_digest (checksum, compare_hash, &length);
-		g_checksum_free (checksum);
-
-		if (memcmp (ddata.data, compare_hash, sizeof (guchar) * 16))
-			return E_DBHASH_STATUS_DIFFERENT;
-	} else {
-		return E_DBHASH_STATUS_NOT_FOUND;
-	}
-
-	return E_DBHASH_STATUS_SAME;
-}
-
-void
-e_dbhash_write (EDbHash *edbh)
-{
-	DB *db;
-
-	g_return_if_fail (edbh != NULL);
-	g_return_if_fail (edbh->priv != NULL);
-
-	db = edbh->priv->db;
-
-	/* Flush database to disk */
-	db->sync (db, 0);
-}
-
-void
-e_dbhash_destroy (EDbHash *edbh)
-{
-	DB *db;
-
-	g_return_if_fail (edbh != NULL);
-	g_return_if_fail (edbh->priv != NULL);
-
-	db = edbh->priv->db;
-
-	/* Close datbase */
-	db->close (db, 0);
-
-	g_free (edbh->priv);
-	g_free (edbh);
-}
Index: libedataserver/e-dbhash.h
===================================================================
--- libedataserver/e-dbhash.h	(revision 8670)
+++ libedataserver/e-dbhash.h	(working copy)
@@ -1,49 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Writes hashes that go to/from disk in db form. Hash keys are strings
- *
- * Author:
- *   JP Rosevear (jpr@ximian.com)
- *
- * Copyright 2000, Ximian, Inc.
- */
-
-#ifndef __E_DBHASH_H__
-#define __E_DBHASH_H__
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-typedef enum {
-	E_DBHASH_STATUS_SAME,
-	E_DBHASH_STATUS_DIFFERENT,
-	E_DBHASH_STATUS_NOT_FOUND,
-} EDbHashStatus;
-
-typedef struct _EDbHash EDbHash;
-typedef struct _EDbHashPrivate EDbHashPrivate;
-
-struct _EDbHash
-{
-	EDbHashPrivate *priv;
-};
-
-typedef void (*EDbHashFunc) (const char *key, gpointer user_data);
-
-EDbHash *e_dbhash_new (const char *filename);
-
-void e_dbhash_add (EDbHash *edbh, const char *key, const char *data);
-void e_dbhash_remove (EDbHash *edbh, const char *key);
-
-EDbHashStatus e_dbhash_compare (EDbHash *edbh, const char *key, const char *compare_data);
-void e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc func, gpointer user_data);
-
-void e_dbhash_write (EDbHash *edbh);
-
-void e_dbhash_destroy (EDbHash *edbh);
-
-G_END_DECLS
-
-#endif /* ! __E_DBHASH_H__ */
-
Index: libedataserver/e-data-server-module.c
===================================================================
--- libedataserver/e-data-server-module.c	(revision 8670)
+++ libedataserver/e-data-server-module.c	(working copy)
@@ -1,274 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
- *  e-data-server-module.c - Interface to e-d-s extensions
- *
- *  Copyright (C) 2004 Novell, Inc.
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library 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 Library General Public
- *  License along with this library; if not, write to the Free
- *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  Authors: Chris Toshok <toshok@ximian.com>
- *           Dave Camp <dave@ximian.com>
- *
- */
-
-#include <config.h>
-#include "e-data-server-module.h"
-
-#include <gmodule.h>
-
-#include "libedataserver-private.h"
-
-#define E_DATA_SERVER_TYPE_MODULE    	        (e_data_server_module_get_type ())
-#define E_DATA_SERVER_MODULE(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), E_DATA_SERVER_TYPE_MODULE, EDataServerModule))
-#define E_DATA_SERVER_MODULE_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), E_DATA_SERVER_TYPE_MODULE, EDataServerModule))
-#define E_DATA_SERVER_IS_MODULE(obj)		(G_TYPE_INSTANCE_CHECK_TYPE ((obj), E_DATA_SERVER_TYPE_MODULE))
-#define E_DATA_SERVER_IS_MODULE_CLASS(klass)	(G_TYPE_CLASS_CHECK_CLASS_TYPE ((klass), E_DATA_SERVER_TYPE_MODULE))
-
-typedef struct _EDataServerModule        EDataServerModule;
-typedef struct _EDataServerModuleClass   EDataServerModuleClass;
-
-struct _EDataServerModule {
-	GTypeModule parent;
-
-	GModule *library;
-
-	char *path;
-
-	void (*initialize) (GTypeModule  *module);
-	void (*shutdown)   (void);
-
-	void (*list_types) (const GType **types,
-			    int          *num_types);
-
-};
-
-struct _EDataServerModuleClass {
-	GTypeModuleClass parent;
-};
-
-static GType e_data_server_module_get_type (void);
-
-static GList *module_objects = NULL;
-
-/* FIXME: hack to keep _init as the public API */
-#define e_data_server_module_init e_data_server_module_instance_init
-G_DEFINE_TYPE (EDataServerModule, e_data_server_module, G_TYPE_TYPE_MODULE)
-#undef e_data_server_module_init
-
-static gboolean
-e_data_server_module_load (GTypeModule *gmodule)
-{
-	EDataServerModule *module;
-
-	module = E_DATA_SERVER_MODULE (gmodule);
-
-	module->library = g_module_open (module->path, G_MODULE_BIND_LAZY);
-
-	if (!module->library) {
-		g_warning (g_module_error ());
-		return FALSE;
-	}
-
-	if (!g_module_symbol (module->library,
-			      "eds_module_initialize",
-			      (gpointer *)&module->initialize) ||
-	    !g_module_symbol (module->library,
-			      "eds_module_shutdown",
-			      (gpointer *)&module->shutdown) ||
-	    !g_module_symbol (module->library,
-			      "eds_module_list_types",
-			      (gpointer *)&module->list_types)) {
-
-		g_warning (g_module_error ());
-		g_module_close (module->library);
-
-		return FALSE;
-	}
-
-	module->initialize (gmodule);
-
-	return TRUE;
-}
-
-static void
-e_data_server_module_unload (GTypeModule *gmodule)
-{
-	EDataServerModule *module;
-
-	module = E_DATA_SERVER_MODULE (gmodule);
-
-	module->shutdown ();
-
-	g_module_close (module->library);
-
-	module->initialize = NULL;
-	module->shutdown = NULL;
-	module->list_types = NULL;
-}
-
-static void
-e_data_server_module_finalize (GObject *object)
-{
-	EDataServerModule *module;
-
-	module = E_DATA_SERVER_MODULE (object);
-
-	g_free (module->path);
-
-        if (G_OBJECT_CLASS (e_data_server_module_parent_class)->finalize)
-		(*G_OBJECT_CLASS (e_data_server_module_parent_class)->finalize) (object);
-}
-
-static void
-e_data_server_module_instance_init (EDataServerModule *module)
-{
-}
-
-static void
-e_data_server_module_class_init (EDataServerModuleClass *class)
-{
-	G_OBJECT_CLASS (class)->finalize = e_data_server_module_finalize;
-	G_TYPE_MODULE_CLASS (class)->load = e_data_server_module_load;
-	G_TYPE_MODULE_CLASS (class)->unload = e_data_server_module_unload;
-}
-
-static void
-module_object_weak_notify (gpointer user_data, GObject *object)
-{
-	module_objects = g_list_remove (module_objects, object);
-}
-
-static void
-add_module_objects (EDataServerModule *module)
-{
-	const GType *types;
-	int num_types;
-	int i;
-
-	module->list_types (&types, &num_types);
-
-	for (i = 0; i < num_types; i++) {
-		e_data_server_module_add_type (types[i]);
-	}
-}
-
-static EDataServerModule *
-e_data_server_module_load_file (const char *filename)
-{
-	EDataServerModule *module;
-
-	module = g_object_new (E_DATA_SERVER_TYPE_MODULE, NULL);
-	module->path = g_strdup (filename);
-
-	if (g_type_module_use (G_TYPE_MODULE (module))) {
-		add_module_objects (module);
-		g_type_module_unuse (G_TYPE_MODULE (module));
-		return module;
-	} else {
-		g_object_unref (module);
-		return NULL;
-	}
-}
-
-static void
-load_module_dir (const char *dirname)
-{
-	GDir *dir;
-
-	dir = g_dir_open (dirname, 0, NULL);
-
-	if (dir) {
-		const char *name;
-
-		while ((name = g_dir_read_name (dir))) {
-			if (g_str_has_suffix (name, "." G_MODULE_SUFFIX)) {
-				char *filename;
-
-				filename = g_build_filename (dirname,
-							     name,
-							     NULL);
-				e_data_server_module_load_file (filename);
-				g_free (filename);
-			}
-		}
-
-		g_dir_close (dir);
-	}
-}
-
-void
-e_data_server_module_init (void)
-{
-	static gboolean initialized = FALSE;
-
-	if (!initialized) {
-		initialized = TRUE;
-
-		load_module_dir (E_DATA_SERVER_EXTENSIONDIR);
-	}
-}
-
-GList *
-e_data_server_get_extensions_for_type (GType type)
-{
-	GList *l;
-	GList *ret = NULL;
-
-	for (l = module_objects; l != NULL; l = l->next) {
-		if (G_TYPE_CHECK_INSTANCE_TYPE (G_OBJECT (l->data),
-						type)) {
-			g_object_ref (l->data);
-			ret = g_list_prepend (ret, l->data);
-		}
-	}
-
-	return ret;
-}
-
-void
-e_data_server_extension_list_free (GList *extensions)
-{
-	GList *l;
-
-	for (l = extensions; l != NULL; l = l->next) {
-		g_object_unref (l->data);
-	}
-	g_list_free (extensions);
-}
-
-void
-e_data_server_module_add_type (GType type)
-{
-	GObject *object;
-
-	g_message ("adding type `%s'", g_type_name (type));
-
-	object = g_object_new (type, NULL);
-	g_object_weak_ref (object,
-			   (GWeakNotify)module_object_weak_notify,
-			   NULL);
-
-	module_objects = g_list_prepend (module_objects, object);
-}
-
-/**
- * Unref all loaded modules, so that unused modules are unloaded from the
- * system.
- */
-void
-e_data_server_module_remove_unused (void)
-{
-	g_list_foreach (module_objects, (GFunc) g_object_unref, NULL);
-}
Index: libedataserver/e-data-server-module.h
===================================================================
--- libedataserver/e-data-server-module.h	(revision 8670)
+++ libedataserver/e-data-server-module.h	(working copy)
@@ -1,47 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-data-server-module.h
- *
- * Copyright (C) 2004  Novell, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU Lesser General Public
- * License as published by the Free Software Foundation.
- *
- * 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
- * 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.
- *
- * Author: Chris Toshok <toshok@ximian.com>
- */
-
-#ifndef _E_DATA_SERVER_MODULE_H
-#define _E_DATA_SERVER_MODULE_H
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-void   e_data_server_module_init             (void);
-GList *e_data_server_get_extensions_for_type (GType type);
-void   e_data_server_extension_list_free     (GList *list);
-void   e_data_server_module_remove_unused    (void);
-
-/* Add a type to the module interface - allows EDS to add its own modules
- * without putting them in separate shared libraries */
-void   e_data_server_module_add_type         (GType  type);
-
-/* The following three functions should exist in modules that are
-   written to be dynamically loaded */
-void                 eds_module_initialize (GTypeModule *module);
-void                 eds_module_shutdown   (void);
-void                 eds_module_list_types (const GType **types, int *num_types);
-
-G_END_DECLS
-
-#endif /* _E_DATA_SERVER_MODULE_H */
Index: libedataserver/Makefile.am
===================================================================
--- libedataserver/Makefile.am	(revision 8670)
+++ libedataserver/Makefile.am	(working copy)
@@ -1,7 +1,6 @@
 INCLUDES =								\
 	-I$(top_srcdir)							\
 	-DG_LOG_DOMAIN=\"e-data-server\"				\
-	$(DB_CFLAGS)							\
 	-DE_DATA_SERVER_PREFIX=\"$(prefix)\"				\
 	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"			\
 	-DE_DATA_SERVER_EXTENSIONDIR=\"$(extensiondir)\"		\
@@ -18,10 +17,6 @@
 	e-account.c			\
 	e-categories.c			\
 	e-component-listener.c		\
-	e-data-server-module.c		\
-	e-dbhash.c			\
-	e-db3-utils.c			\
-	e-file-cache.c			\
 	e-flag.c			\
 	e-iconv.c			\
 	e-iterator.c			\
@@ -47,7 +42,6 @@
 libedataserver_1_2_la_LIBADD = 				\
 	$(E_DATA_SERVER_LIBS)				\
 	$(ICONV_LIBS)					\
-	$(DB_LIBS)					\
 	$(SOCKET_LIBS)					\
 	$(SOUP_LIBS)
 
@@ -61,10 +55,6 @@
 	e-account.h			\
 	e-categories.h			\
 	e-component-listener.h		\
-	e-data-server-module.h		\
-	e-db3-utils.h			\
-	e-dbhash.h			\
-	e-file-cache.h			\
 	e-flag.h			\
 	e-iconv.h			\
 	e-iterator.h			\
Index: libedataserver/e-db3-utils.c
===================================================================
--- libedataserver/e-db3-utils.c	(revision 8670)
+++ libedataserver/e-db3-utils.c	(working copy)
@@ -1,180 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include "config.h"
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-#include <glib.h>
-#include <glib/gstdio.h>
-
-#include "db.h"
-
-#include "e-db3-utils.h"
-
-static char *
-get_check_filename (const char *filename)
-{
-	return g_strdup_printf ("%s-upgrading", filename);
-}
-
-static char *
-get_copy_filename (const char *filename)
-{
-	return g_strdup_printf ("%s-copy", filename);
-}
-
-static int
-cp_file (const char *src, const char *dest)
-{
-	int i;
-	int o;
-	char buffer[1024];
-	int length;
-	int place;
-
-	i = g_open (src, O_RDONLY | O_BINARY, 0);
-	if (i == -1)
-		return -1;
-	o = g_open (dest, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, S_IREAD | S_IWRITE);
-	if (o == -1) {
-		close (i);
-		return -1;
-	}
-	while (1) {
-		length = read (i, &buffer, sizeof (buffer));
-
-		if (length == 0)
-			break;
-
-		if (length == -1) {
-			if (errno == EINTR)
-				continue;
-			else {
-				close (i);
-				close (o);
-				g_unlink (dest);
-				return -1;
-			}
-		}
-
-		place = 0;
-		while (length != 0) {
-			int count;
-			count = write (o, buffer + place, length);
-			if (count == -1) {
-				if (errno == EINTR)
-					continue;
-				else {
-					close (i);
-					close (o);
-					g_unlink (dest);
-					return -1;
-				}
-			}
-
-			length -= count;
-			place += count;
-		}
-	}
-	i = close (i);
-	if (close (o) == -1)
-		i = -1;
-	return (i == -1) ? -1 : 0;
-}
-
-static int
-touch_file (const char *file)
-{
-	int o;
-	o = g_open (file, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, S_IREAD | S_IWRITE);
-	if (o == -1)
-		return -1;
-
-	return close (o);
-}
-
-static int
-resume_upgrade (const char *filename, const char *copy_filename, const char *check_filename)
-{
-	DB *db;
-	int ret_val;
-
-	ret_val = db_create (&db, NULL, 0);
-
-	if (ret_val == 0)
-		ret_val = cp_file (copy_filename, filename);
-
-	if (ret_val == 0)
-		ret_val = db->upgrade (db, filename, 0);
-
-	if (ret_val == 0)
-		ret_val = g_unlink (check_filename);
-	if (ret_val == 0)
-		ret_val = g_unlink (copy_filename);
-
-	db->close (db, 0);
-
-	return ret_val;
-}
-
-int
-e_db3_utils_maybe_recover (const char *filename)
-{
-	int ret_val = 0;
-	char *copy_filename;
-	char *check_filename;
-
-	copy_filename = get_copy_filename (filename);
-	check_filename = get_check_filename (filename);
-
-	if (g_file_test(check_filename, G_FILE_TEST_EXISTS)) {
-		ret_val = resume_upgrade(filename, copy_filename, check_filename);
-	} else if (g_file_test (copy_filename, G_FILE_TEST_EXISTS)) {
-		g_unlink (copy_filename);
-	}
-
-	g_free (copy_filename);
-	g_free (check_filename);
-	return ret_val;
-}
-
-int
-e_db3_utils_upgrade_format (const char *filename)
-{
-	char *copy_filename;
-	char *check_filename;
-	DB *db;
-	int ret_val;
-
-	ret_val = db_create (&db, NULL, 0);
-	if (ret_val != 0)
-		return ret_val;
-
-	copy_filename = get_copy_filename (filename);
-	check_filename = get_check_filename (filename);
-
-	ret_val = cp_file (filename, copy_filename);
-
-	if (ret_val == 0)
-		ret_val = touch_file (check_filename);
-	if (ret_val == 0)
-		ret_val = db->upgrade (db, filename, 0);
-	if (ret_val == 0)
-		ret_val = g_unlink (check_filename);
-
-	if (ret_val == 0)
-		ret_val = g_unlink (copy_filename);
-
-	db->close (db, 0);
-
-	g_free (check_filename);
-	g_free (copy_filename);
-	return ret_val;
-}
Index: libedataserver/e-db3-utils.h
===================================================================
--- libedataserver/e-db3-utils.h	(revision 8670)
+++ libedataserver/e-db3-utils.h	(working copy)
@@ -1,24 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * db3 utils.
- *
- * Author:
- *   Chris Lahey <clahey@ximian.com>
- *
- * Copyright 2001, Ximian, Inc.
- */
-
-#ifndef __E_DB3_UTILS_H__
-#define __E_DB3_UTILS_H__
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-int e_db3_utils_maybe_recover (const char *filename);
-int e_db3_utils_upgrade_format (const char *filename);
-
-G_END_DECLS
-
-#endif /* ! __E_DB3_UTILS_H__ */
-
Index: addressbook/ChangeLog
===================================================================
--- addressbook/ChangeLog	(revision 8674)
+++ addressbook/ChangeLog	(working copy)
@@ -1,3 +1,21 @@
+2008-04-23  Rob Bradford  <rob@openedhand.com>
+
+	* backends/file/Makefile.am:
+	* backends/groupwise/Makefile.am:
+	* backends/vcf/Makefile.am:
+	* libedata-book/Makefile.am:
+	Link against the new libebackend library.
+
+	* backends/file/e-book-backend-file-factory.c:
+	* backends/file/e-book-backend-file.c:
+	* backends/groupwise/e-book-backend-groupwise-factory.c:
+	* backends/groupwise/e-book-backend-groupwise.c:
+	* backends/ldap/e-book-backend-ldap-factory.c:
+	* backends/vcf/e-book-backend-vcf-factory.c:
+	* libedata-book/e-book-backend-cache.h:
+	* libedata-book/e-data-book-factory.c:
+	Use new paths for header files that have been moved to libebackend.
+
 2008-04-19  Jaap A. Haitsma  <jaap@haitsma.org>
 
 	reviewed by: Ross Burton
Index: addressbook/backends/file/e-book-backend-file.c
===================================================================
--- addressbook/backends/file/e-book-backend-file.c	(revision 8670)
+++ addressbook/backends/file/e-book-backend-file.c	(working copy)
@@ -40,8 +40,9 @@
 #include <glib/gstdio.h>
 #include <glib/gi18n-lib.h>
 
-#include "libedataserver/e-dbhash.h"
-#include "libedataserver/e-db3-utils.h"
+#include "libebackend/e-dbhash.h"
+#include "libebackend/e-db3-utils.h"
+
 #include "libedataserver/e-data-server-util.h"
 #include "libedataserver/e-flag.h"
 
Index: addressbook/backends/file/e-book-backend-file-factory.c
===================================================================
--- addressbook/backends/file/e-book-backend-file-factory.c	(revision 8670)
+++ addressbook/backends/file/e-book-backend-file-factory.c	(working copy)
@@ -27,7 +27,7 @@
 
 #include <string.h>
 
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
 #include "libedata-book/e-book-backend-factory.h"
 #include "e-book-backend-file.h"
 
Index: addressbook/backends/file/Makefile.am
===================================================================
--- addressbook/backends/file/Makefile.am	(revision 8670)
+++ addressbook/backends/file/Makefile.am	(working copy)
@@ -18,6 +18,7 @@
 	$(top_builddir)/addressbook/libebook/libebook-1.2.la		\
 	$(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la	\
 	$(top_builddir)/libedataserver/libedataserver-1.2.la		\
+	$(top_builddir)/libebackend/libebackend-1.2.la		\
 	$(DB_LIBS)				\
 	$(EVOLUTION_ADDRESSBOOK_LIBS)
 
Index: addressbook/backends/ldap/e-book-backend-ldap-factory.c
===================================================================
--- addressbook/backends/ldap/e-book-backend-ldap-factory.c	(revision 8670)
+++ addressbook/backends/ldap/e-book-backend-ldap-factory.c	(working copy)
@@ -25,7 +25,7 @@
 #include <config.h>
 #endif
 
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
 #include "libedata-book/e-book-backend-factory.h"
 #include "e-book-backend-ldap.h"
 
Index: addressbook/backends/groupwise/e-book-backend-groupwise.c
===================================================================
--- addressbook/backends/groupwise/e-book-backend-groupwise.c	(revision 8670)
+++ addressbook/backends/groupwise/e-book-backend-groupwise.c	(working copy)
@@ -37,9 +37,10 @@
 #include <glib/gstdio.h>
 #include <glib/gi18n-lib.h>
 
+#include "libebackend/e-db3-utils.h"
+
 #include "libedataserver/e-sexp.h"
 #include "libedataserver/e-data-server-util.h"
-#include "libedataserver/e-db3-utils.h"
 #include "libedataserver/e-flag.h"
 #include "libedataserver/e-url.h"
 #include "libebook/e-contact.h"
Index: addressbook/backends/groupwise/Makefile.am
===================================================================
--- addressbook/backends/groupwise/Makefile.am	(revision 8670)
+++ addressbook/backends/groupwise/Makefile.am	(working copy)
@@ -20,6 +20,7 @@
 	$(top_builddir)/addressbook/libebook/libebook-1.2.la		\
 	$(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la	\
 	$(top_builddir)/libedataserver/libedataserver-1.2.la		\
+	$(top_builddir)/libebackend/libebackend-1.2.la		\
 	$(DB_LIBS)							\
 	$(EVOLUTION_ADDRESSBOOK_LIBS)					\
 	$(SOUP_LIBS)
Index: addressbook/backends/groupwise/e-book-backend-groupwise-factory.c
===================================================================
--- addressbook/backends/groupwise/e-book-backend-groupwise-factory.c	(revision 8670)
+++ addressbook/backends/groupwise/e-book-backend-groupwise-factory.c	(working copy)
@@ -25,7 +25,7 @@
 #include <config.h>
 #endif
 
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
 #include "libedata-book/e-book-backend-factory.h"
 #include "e-book-backend-groupwise.h"
 
Index: addressbook/backends/vcf/e-book-backend-vcf-factory.c
===================================================================
--- addressbook/backends/vcf/e-book-backend-vcf-factory.c	(revision 8670)
+++ addressbook/backends/vcf/e-book-backend-vcf-factory.c	(working copy)
@@ -25,7 +25,7 @@
 #include <config.h>
 #endif
 
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
 #include "libedata-book/e-book-backend-factory.h"
 #include "e-book-backend-vcf.h"
 
Index: addressbook/backends/vcf/Makefile.am
===================================================================
--- addressbook/backends/vcf/Makefile.am	(revision 8670)
+++ addressbook/backends/vcf/Makefile.am	(working copy)
@@ -17,6 +17,7 @@
 	$(top_builddir)/addressbook/libebook/libebook-1.2.la		\
 	$(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la	\
 	$(top_builddir)/libedataserver/libedataserver-1.2.la		\
+	$(top_builddir)/libebackend/libebackend-1.2.la		\
 	$(EVOLUTION_ADDRESSBOOK_LIBS)
 
 libebookbackendvcf_la_LDFLAGS =		\
Index: addressbook/libedata-book/e-book-backend-cache.h
===================================================================
--- addressbook/libedata-book/e-book-backend-cache.h	(revision 8670)
+++ addressbook/libedata-book/e-book-backend-cache.h	(working copy)
@@ -23,7 +23,7 @@
 #ifndef E_BOOK_BACKEND_CACHE_H
 #define E_BOOK_BACKEND_CACHE_H
 
-#include "libedataserver/e-file-cache.h"
+#include "libebackend/e-file-cache.h"
 #include <libebook/e-contact.h>
 
 G_BEGIN_DECLS
Index: addressbook/libedata-book/Makefile.am
===================================================================
--- addressbook/libedata-book/Makefile.am	(revision 8670)
+++ addressbook/libedata-book/Makefile.am	(working copy)
@@ -47,6 +47,7 @@
 	$(EVOLUTION_ADDRESSBOOK_LIBS)				\
 	$(top_builddir)/addressbook/libebook/libebook-1.2.la	\
 	$(top_builddir)/libedataserver/libedataserver-1.2.la	\
+	$(top_builddir)/libebackend/libebackend-1.2.la	\
 	$(DB_LIBS)
 
 libedata_book_1_2_la_LDFLAGS = \
Index: addressbook/libedata-book/e-data-book-factory.c
===================================================================
--- addressbook/libedata-book/e-data-book-factory.c	(revision 8670)
+++ addressbook/libedata-book/e-data-book-factory.c	(working copy)
@@ -16,7 +16,7 @@
 #include <bonobo-activation/bonobo-activation.h>
 #include <bonobo/bonobo-main.h>
 #include <bonobo/bonobo-arg.h>
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
 #include "e-data-book-factory.h"
 
 #include <backends/groupwise/e-book-backend-groupwise.h>
Index: calendar/libedata-cal/e-cal-backend-cache.h
===================================================================
--- calendar/libedata-cal/e-cal-backend-cache.h	(revision 8670)
+++ calendar/libedata-cal/e-cal-backend-cache.h	(working copy)
@@ -22,7 +22,7 @@
 #ifndef E_CAL_BACKEND_CACHE_H
 #define E_CAL_BACKEND_CACHE_H
 
-#include "libedataserver/e-file-cache.h"
+#include "libebackend/e-file-cache.h"
 #include <libecal/e-cal-component.h>
 #include <libecal/e-cal.h>
 
Index: calendar/libedata-cal/e-data-cal-factory.c
===================================================================
--- calendar/libedata-cal/e-data-cal-factory.c	(revision 8670)
+++ calendar/libedata-cal/e-data-cal-factory.c	(working copy)
@@ -25,7 +25,7 @@
 #include <bonobo/bonobo-main.h>
 #include "libedataserver/e-url.h"
 #include "libedataserver/e-source.h"
-#include "libedataserver/e-data-server-module.h"
+#include "libebackend/e-data-server-module.h"
 #include "e-cal-backend.h"
 #include "e-data-cal.h"
 #include "e-data-cal-factory.h"
Index: calendar/ChangeLog
===================================================================
--- calendar/ChangeLog	(revision 8674)
+++ calendar/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2008-04-23  Rob Bradford  <rob@openedhand.com>
+
+	* libedata-cal/e-cal-backend-cache.h:
+	* libedata-cal/e-data-cal-factory.c:
+	Use new paths for header files that have been moved to libebackend.
+
 2008-04-17  Milan Crha  <mcrha@redhat.com>
 
 	** Part of fix for bug #526741
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 8670)
+++ Makefile.am	(working copy)
@@ -9,8 +9,7 @@
 CALENDAR_DIR = calendar
 endif
 
-SUBDIRS = $(LIBDB) win32 libedataserver servers camel addressbook $(CALENDAR_DIR) libedataserverui src docs art po
-DIST_SUBDIRS= win32 libedataserver servers camel addressbook calendar libedataserverui src docs art po
+SUBDIRS = $(LIBDB) win32 libedataserver libebackend servers camel addressbook $(CALENDAR_DIR) libedataserverui src docs art po
 
 changelogs =			\
 	ChangeLog
