[evolution-data-server] Split camel-imapx library and merge into camel so that providers can be written on top of imapx
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Split camel-imapx library and merge into camel so that providers can be written on top of imapx
- Date: Tue, 8 May 2012 09:42:50 +0000 (UTC)
commit 7d7a889699586c092750638ac89da080eacb0129
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Tue May 8 14:47:04 2012 +0530
Split camel-imapx library and merge into camel so that providers can be written on top of imapx
camel/Makefile.am | 28 +++++++++++++++-
camel/{providers/imapx => }/camel-imapx-command.c | 0
camel/{providers/imapx => }/camel-imapx-command.h | 6 ++-
.../imapx => }/camel-imapx-conn-manager.c | 0
.../imapx => }/camel-imapx-conn-manager.h | 5 +++
camel/{providers/imapx => }/camel-imapx-folder.c | 0
camel/{providers/imapx => }/camel-imapx-folder.h | 9 +++++-
camel/{providers/imapx => }/camel-imapx-job.c | 0
camel/{providers/imapx => }/camel-imapx-job.h | 7 +++-
camel/{providers/imapx => }/camel-imapx-server.c | 0
camel/{providers/imapx => }/camel-imapx-server.h | 8 ++++-
camel/{providers/imapx => }/camel-imapx-settings.c | 0
camel/{providers/imapx => }/camel-imapx-settings.h | 4 ++
.../imapx => }/camel-imapx-store-summary.c | 1 +
.../imapx => }/camel-imapx-store-summary.h | 7 +++-
camel/{providers/imapx => }/camel-imapx-store.c | 10 +++++-
camel/{providers/imapx => }/camel-imapx-store.h | 5 +++
camel/{providers/imapx => }/camel-imapx-stream.c | 2 +
camel/{providers/imapx => }/camel-imapx-stream.h | 7 +++-
camel/{providers/imapx => }/camel-imapx-summary.c | 5 +++
camel/{providers/imapx => }/camel-imapx-summary.h | 8 ++++-
camel/{providers/imapx => }/camel-imapx-tokens.txt | 0
camel/{providers/imapx => }/camel-imapx-utils.c | 0
camel/{providers/imapx => }/camel-imapx-utils.h | 7 +++-
camel/camel.h | 11 ++++++
camel/providers/imapx/Makefile.am | 34 +------------------
camel/providers/imapx/camel-imapx-provider.c | 11 +------
camel/providers/imapx/test-imapx.c | 2 -
28 files changed, 121 insertions(+), 56 deletions(-)
---
diff --git a/camel/Makefile.am b/camel/Makefile.am
index acf2a2e..e9ceed4 100644
--- a/camel/Makefile.am
+++ b/camel/Makefile.am
@@ -22,6 +22,9 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_in_files = camel.pc.in
pkgconfig_DATA = $(pkgconfig_in_files:.pc.in=-$(API_VERSION).pc)
+camel-imapx-tokenise.h: camel-imapx-tokens.txt
+ @GPERF@ -H imapx_hash -N imapx_tokenise_struct -L ANSI-C -o -t -k1,$$ $< --output-file=$@
+
libcamelincludedir = $(privincludedir)/camel
camellibexecdir = $(libexecdir)
@@ -35,7 +38,7 @@ glib_enum_output=camel-enumtypes
glib_enum_define=CAMEL
glib_enum_prefix=camel
-ENUM_GENERATED = camel-enumtypes.h camel-enumtypes.c
+ENUM_GENERATED = camel-enumtypes.h camel-enumtypes.c camel-imapx-tokenise.h
libcamel_1_2_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
@@ -169,6 +172,17 @@ libcamel_1_2_la_SOURCES = \
camel-vee-store.c \
camel-vee-summary.c \
camel-vtrash-folder.c \
+ camel-imapx-command.c \
+ camel-imapx-job.c \
+ camel-imapx-settings.c \
+ camel-imapx-server.c \
+ camel-imapx-conn-manager.c \
+ camel-imapx-folder.c \
+ camel-imapx-store-summary.c \
+ camel-imapx-store.c \
+ camel-imapx-stream.c \
+ camel-imapx-summary.c \
+ camel-imapx-utils.c \
camel.c \
$(LIBCAMEL_PLATFORM_DEP_SOURCES)
@@ -292,6 +306,17 @@ libcamelinclude_HEADERS = \
camel-vee-store.h \
camel-vee-summary.h \
camel-vtrash-folder.h \
+ camel-imapx-command.h \
+ camel-imapx-conn-manager.h \
+ camel-imapx-folder.h \
+ camel-imapx-job.h \
+ camel-imapx-settings.h \
+ camel-imapx-server.h \
+ camel-imapx-store-summary.h \
+ camel-imapx-store.h \
+ camel-imapx-stream.h \
+ camel-imapx-summary.h \
+ camel-imapx-utils.h \
camel.h
libcamel_1_2_la_LDFLAGS = -version-info $(LIBCAMEL_CURRENT):$(LIBCAMEL_REVISION):$(LIBCAMEL_AGE) $(NO_UNDEFINED) \
@@ -394,6 +419,7 @@ BUILT_SOURCES = \
EXTRA_DIST = \
$(pkgconfig_in_files) \
+ camel-imapx-tokens.txt \
camel-marshal.list \
gentables.pl \
README
diff --git a/camel/providers/imapx/camel-imapx-command.c b/camel/camel-imapx-command.c
similarity index 100%
rename from camel/providers/imapx/camel-imapx-command.c
rename to camel/camel-imapx-command.c
diff --git a/camel/providers/imapx/camel-imapx-command.h b/camel/camel-imapx-command.h
similarity index 97%
rename from camel/providers/imapx/camel-imapx-command.h
rename to camel/camel-imapx-command.h
index 49f8f39..b1dff50 100644
--- a/camel/providers/imapx/camel-imapx-command.h
+++ b/camel/camel-imapx-command.h
@@ -16,11 +16,13 @@
*
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
#ifndef CAMEL_IMAPX_COMMAND_H
#define CAMEL_IMAPX_COMMAND_H
-#include <camel/camel.h>
-
#include "camel-imapx-utils.h"
#define CAMEL_IS_IMAPX_COMMAND(command) \
diff --git a/camel/providers/imapx/camel-imapx-conn-manager.c b/camel/camel-imapx-conn-manager.c
similarity index 100%
rename from camel/providers/imapx/camel-imapx-conn-manager.c
rename to camel/camel-imapx-conn-manager.c
diff --git a/camel/providers/imapx/camel-imapx-conn-manager.h b/camel/camel-imapx-conn-manager.h
similarity index 95%
rename from camel/providers/imapx/camel-imapx-conn-manager.h
rename to camel/camel-imapx-conn-manager.h
index 5ac1385..1fe1600 100644
--- a/camel/providers/imapx/camel-imapx-conn-manager.h
+++ b/camel/camel-imapx-conn-manager.h
@@ -19,6 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
+
#ifndef _CAMEL_IMAPX_CONN_MANAGER_H
#define _CAMEL_IMAPX_CONN_MANAGER_H
diff --git a/camel/providers/imapx/camel-imapx-folder.c b/camel/camel-imapx-folder.c
similarity index 100%
rename from camel/providers/imapx/camel-imapx-folder.c
rename to camel/camel-imapx-folder.c
diff --git a/camel/providers/imapx/camel-imapx-folder.h b/camel/camel-imapx-folder.h
similarity index 90%
rename from camel/providers/imapx/camel-imapx-folder.h
rename to camel/camel-imapx-folder.h
index 885640f..16c187b 100644
--- a/camel/providers/imapx/camel-imapx-folder.h
+++ b/camel/camel-imapx-folder.h
@@ -21,10 +21,17 @@
* Boston, MA 02110-1301, USA.
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
#ifndef CAMEL_IMAPX_FOLDER_H
#define CAMEL_IMAPX_FOLDER_H
-#include <camel/camel.h>
+#include <camel/camel-offline-folder.h>
+#include <camel/camel-data-cache.h>
+#include <camel/camel-folder-search.h>
+#include <camel/camel-store.h>
/* Standard GObject macros */
#define CAMEL_TYPE_IMAPX_FOLDER \
diff --git a/camel/providers/imapx/camel-imapx-job.c b/camel/camel-imapx-job.c
similarity index 100%
rename from camel/providers/imapx/camel-imapx-job.c
rename to camel/camel-imapx-job.c
diff --git a/camel/providers/imapx/camel-imapx-job.h b/camel/camel-imapx-job.h
similarity index 94%
rename from camel/providers/imapx/camel-imapx-job.h
rename to camel/camel-imapx-job.h
index d4eaed0..c07ca5d 100644
--- a/camel/providers/imapx/camel-imapx-job.h
+++ b/camel/camel-imapx-job.h
@@ -16,11 +16,14 @@
*
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
+
#ifndef CAMEL_IMAPX_JOB_H
#define CAMEL_IMAPX_JOB_H
-#include <camel/camel.h>
-
#include "camel-imapx-server.h"
#define CAMEL_IS_IMAPX_JOB(job) \
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/camel-imapx-server.c
similarity index 100%
rename from camel/providers/imapx/camel-imapx-server.c
rename to camel/camel-imapx-server.c
diff --git a/camel/providers/imapx/camel-imapx-server.h b/camel/camel-imapx-server.h
similarity index 97%
rename from camel/providers/imapx/camel-imapx-server.h
rename to camel/camel-imapx-server.h
index e793dde..d442a17 100644
--- a/camel/providers/imapx/camel-imapx-server.h
+++ b/camel/camel-imapx-server.h
@@ -17,10 +17,16 @@
* Boston, MA 02110-1301, USA.
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
+
#ifndef CAMEL_IMAPX_SERVER_H
#define CAMEL_IMAPX_SERVER_H
-#include <camel/camel.h>
+#include <camel/camel-session.h>
+#include <camel/camel-store.h>
#include "camel-imapx-command.h"
#include "camel-imapx-stream.h"
diff --git a/camel/providers/imapx/camel-imapx-settings.c b/camel/camel-imapx-settings.c
similarity index 100%
rename from camel/providers/imapx/camel-imapx-settings.c
rename to camel/camel-imapx-settings.c
diff --git a/camel/providers/imapx/camel-imapx-settings.h b/camel/camel-imapx-settings.h
similarity index 97%
rename from camel/providers/imapx/camel-imapx-settings.h
rename to camel/camel-imapx-settings.h
index fbd1084..9d7c478 100644
--- a/camel/providers/imapx/camel-imapx-settings.h
+++ b/camel/camel-imapx-settings.h
@@ -16,6 +16,10 @@
*
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
#ifndef CAMEL_IMAPX_SETTINGS_H
#define CAMEL_IMAPX_SETTINGS_H
diff --git a/camel/providers/imapx/camel-imapx-store-summary.c b/camel/camel-imapx-store-summary.c
similarity index 99%
rename from camel/providers/imapx/camel-imapx-store-summary.c
rename to camel/camel-imapx-store-summary.c
index 8a8142e..6e8021c 100644
--- a/camel/providers/imapx/camel-imapx-store-summary.c
+++ b/camel/camel-imapx-store-summary.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <unistd.h>
+#include <camel/camel-file-utils.h>
#include "camel-imapx-utils.h"
#include "camel-imapx-store-summary.h"
diff --git a/camel/providers/imapx/camel-imapx-store-summary.h b/camel/camel-imapx-store-summary.h
similarity index 96%
rename from camel/providers/imapx/camel-imapx-store-summary.h
rename to camel/camel-imapx-store-summary.h
index 485e13e..e4ea6b5 100644
--- a/camel/providers/imapx/camel-imapx-store-summary.h
+++ b/camel/camel-imapx-store-summary.h
@@ -19,10 +19,15 @@
* Boston, MA 02110-1301, USA.
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
+
#ifndef CAMEL_IMAPX_STORE_SUMMARY_H
#define CAMEL_IMAPX_STORE_SUMMARY_H
-#include <camel/camel.h>
+#include <camel/camel-store-summary.h>
/* Standard GObject macros */
#define CAMEL_TYPE_IMAPX_STORE_SUMMARY \
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/camel-imapx-store.c
similarity index 99%
rename from camel/providers/imapx/camel-imapx-store.c
rename to camel/camel-imapx-store.c
index 2253f84..45a1787 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/camel-imapx-store.c
@@ -256,7 +256,15 @@ imapx_authenticate_sync (CamelService *service,
server, mechanism, cancellable, error);
}
-extern CamelServiceAuthType camel_imapx_password_authtype;
+CamelServiceAuthType camel_imapx_password_authtype = {
+ N_("Password"),
+
+ N_("This option will connect to the IMAP server using a "
+ "plaintext password."),
+
+ "",
+ TRUE
+};
static GList *
imapx_query_auth_types_sync (CamelService *service,
diff --git a/camel/providers/imapx/camel-imapx-store.h b/camel/camel-imapx-store.h
similarity index 95%
rename from camel/providers/imapx/camel-imapx-store.h
rename to camel/camel-imapx-store.h
index 6449b16..cb2f350 100644
--- a/camel/providers/imapx/camel-imapx-store.h
+++ b/camel/camel-imapx-store.h
@@ -21,6 +21,11 @@
* Boston, MA 02110-1301, USA.
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
+
#ifndef CAMEL_IMAPX_STORE_H
#define CAMEL_IMAPX_STORE_H
diff --git a/camel/providers/imapx/camel-imapx-stream.c b/camel/camel-imapx-stream.c
similarity index 99%
rename from camel/providers/imapx/camel-imapx-stream.c
rename to camel/camel-imapx-stream.c
index a7c8a03..449fb10 100644
--- a/camel/providers/imapx/camel-imapx-stream.c
+++ b/camel/camel-imapx-stream.c
@@ -31,6 +31,8 @@
#include <glib/gi18n-lib.h>
+#include <camel/camel-stream-mem.h>
+
#include "camel-imapx-utils.h"
#include "camel-imapx-stream.h"
diff --git a/camel/providers/imapx/camel-imapx-stream.h b/camel/camel-imapx-stream.h
similarity index 96%
rename from camel/providers/imapx/camel-imapx-stream.h
rename to camel/camel-imapx-stream.h
index b288f3f..9385fdf 100644
--- a/camel/providers/imapx/camel-imapx-stream.h
+++ b/camel/camel-imapx-stream.h
@@ -20,10 +20,15 @@
* Boston, MA 02110-1301, USA.
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
+
#ifndef CAMEL_IMAPX_STREAM_H
#define CAMEL_IMAPX_STREAM_H
-#include <camel/camel.h>
+#include <camel/camel-stream.h>
/* Standard GObject macros */
#define CAMEL_TYPE_IMAPX_STREAM \
diff --git a/camel/providers/imapx/camel-imapx-summary.c b/camel/camel-imapx-summary.c
similarity index 99%
rename from camel/providers/imapx/camel-imapx-summary.c
rename to camel/camel-imapx-summary.c
index f913f78..dd2766f 100644
--- a/camel/providers/imapx/camel-imapx-summary.c
+++ b/camel/camel-imapx-summary.c
@@ -31,6 +31,11 @@
#include <unistd.h>
#include <sys/stat.h>
+
+#include <camel/camel-db.h>
+#include <camel/camel-store.h>
+#include <camel/camel-string-utils.h>
+
#include "camel-imapx-summary.h"
#define CAMEL_IMAPX_SUMMARY_VERSION (4)
diff --git a/camel/providers/imapx/camel-imapx-summary.h b/camel/camel-imapx-summary.h
similarity index 93%
rename from camel/providers/imapx/camel-imapx-summary.h
rename to camel/camel-imapx-summary.h
index 311341b..6fe947a 100644
--- a/camel/providers/imapx/camel-imapx-summary.h
+++ b/camel/camel-imapx-summary.h
@@ -20,10 +20,16 @@
* Boston, MA 02110-1301, USA.
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
+
#ifndef CAMEL_IMAPX_SUMMARY_H
#define CAMEL_IMAPX_SUMMARY_H
-#include <camel/camel.h>
+#include <camel/camel-folder-summary.h>
+#include <camel/camel-folder.h>
/* Standard GObject macros */
#define CAMEL_TYPE_IMAPX_SUMMARY \
diff --git a/camel/providers/imapx/camel-imapx-tokens.txt b/camel/camel-imapx-tokens.txt
similarity index 100%
rename from camel/providers/imapx/camel-imapx-tokens.txt
rename to camel/camel-imapx-tokens.txt
diff --git a/camel/providers/imapx/camel-imapx-utils.c b/camel/camel-imapx-utils.c
similarity index 100%
rename from camel/providers/imapx/camel-imapx-utils.c
rename to camel/camel-imapx-utils.c
diff --git a/camel/providers/imapx/camel-imapx-utils.h b/camel/camel-imapx-utils.h
similarity index 98%
rename from camel/providers/imapx/camel-imapx-utils.h
rename to camel/camel-imapx-utils.h
index e4bafa4..fd3d9fb 100644
--- a/camel/providers/imapx/camel-imapx-utils.h
+++ b/camel/camel-imapx-utils.h
@@ -17,10 +17,15 @@
* Boston, MA 02110-1301, USA.
*/
+#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
+#error "Only <camel/camel.h> can be included directly."
+#endif
+
+
#ifndef CAMEL_IMAPX_UTILS_H
#define CAMEL_IMAPX_UTILS_H
-#include <camel/camel.h>
+#include <camel/camel-store.h>
struct _CamelIMAPXStream;
struct _CamelFlag;
diff --git a/camel/camel.h b/camel/camel.h
index 47dd056..e21246f 100644
--- a/camel/camel.h
+++ b/camel/camel.h
@@ -141,6 +141,17 @@
#include <camel/camel-vee-store.h>
#include <camel/camel-vee-summary.h>
#include <camel/camel-vtrash-folder.h>
+#include <camel/camel-imapx-command.h>
+#include <camel/camel-imapx-job.h>
+#include <camel/camel-imapx-conn-manager.h>
+#include <camel/camel-imapx-folder.h>
+#include <camel/camel-imapx-server.h>
+#include <camel/camel-imapx-store-summary.h>
+#include <camel/camel-imapx-store.h>
+#include <camel/camel-imapx-stream.h>
+#include <camel/camel-imapx-summary.h>
+#include <camel/camel-imapx-settings.h>
+#include <camel/camel-imapx-utils.h>
#undef __CAMEL_H_INSIDE__
diff --git a/camel/providers/imapx/Makefile.am b/camel/providers/imapx/Makefile.am
index 3e6567f..8ba0185 100644
--- a/camel/providers/imapx/Makefile.am
+++ b/camel/providers/imapx/Makefile.am
@@ -13,34 +13,7 @@ libcamelimapx_la_CPPFLAGS = \
$(NULL)
libcamelimapx_la_SOURCES = \
- camel-imapx-command.c \
- camel-imapx-conn-manager.c \
- camel-imapx-folder.c \
- camel-imapx-job.c \
- camel-imapx-provider.c \
- camel-imapx-server.c \
- camel-imapx-settings.c \
- camel-imapx-store-summary.c \
- camel-imapx-store.c \
- camel-imapx-stream.c \
- camel-imapx-summary.c \
- camel-imapx-utils.c
-
-noinst_HEADERS = \
- camel-imapx-command.h \
- camel-imapx-conn-manager.h \
- camel-imapx-folder.h \
- camel-imapx-job.h \
- camel-imapx-server.h \
- camel-imapx-settings.h \
- camel-imapx-store-summary.h \
- camel-imapx-store.h \
- camel-imapx-stream.h \
- camel-imapx-summary.h \
- camel-imapx-utils.h
-
-camel-imapx-tokenise.h: camel-imapx-tokens.txt
- @GPERF@ -H imapx_hash -N imapx_tokenise_struct -L ANSI-C -o -t -k1,$$ $< --output-file=$@
+ camel-imapx-provider.c
libcamelimapx_la_LIBADD = \
$(top_builddir)/camel/libcamel-1.2.la \
@@ -65,9 +38,6 @@ test_imapx_LDADD = \
$(CAMEL_LIBS) \
$(top_builddir)/camel/libcamel-1.2.la
-BUILT_SOURCES = camel-imapx-tokenise.h
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = libcamelimapx.urls camel-imapx-tokens.txt
+EXTRA_DIST = libcamelimapx.urls
-include $(top_srcdir)/git.mk
diff --git a/camel/providers/imapx/camel-imapx-provider.c b/camel/providers/imapx/camel-imapx-provider.c
index aa99fd9..c789976 100644
--- a/camel/providers/imapx/camel-imapx-provider.c
+++ b/camel/providers/imapx/camel-imapx-provider.c
@@ -30,8 +30,6 @@
#include <camel/camel.h>
#include <glib/gi18n-lib.h>
-#include "camel-imapx-store.h"
-
static guint imapx_url_hash (gconstpointer key);
static gint imapx_url_equal (gconstpointer a, gconstpointer b);
@@ -114,15 +112,8 @@ static CamelProvider imapx_provider = {
/* ... */
};
-CamelServiceAuthType camel_imapx_password_authtype = {
- N_("Password"),
-
- N_("This option will connect to the IMAP server using a "
- "plaintext password."),
- "",
- TRUE
-};
+extern CamelServiceAuthType camel_imapx_password_authtype;
void camel_imapx_module_init (void);
diff --git a/camel/providers/imapx/test-imapx.c b/camel/providers/imapx/test-imapx.c
index 79e3392..37fb532 100644
--- a/camel/providers/imapx/test-imapx.c
+++ b/camel/providers/imapx/test-imapx.c
@@ -17,8 +17,6 @@
* Boston, MA 02110-1301, USA.
*/
-#include "camel-imapx-store.h"
-#include "camel-imapx-folder.h"
#include <camel/camel.h>
gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]