Split camel-imapx library and merge into camel so that providers can be written on...
authorChenthill Palanisamy <pchenthill@novell.com>
Tue, 8 May 2012 09:17:04 +0000 (14:47 +0530)
committerChenthill Palanisamy <pchenthill@novell.com>
Tue, 8 May 2012 09:17:16 +0000 (14:47 +0530)
28 files changed:
camel/Makefile.am
camel/camel-imapx-command.c [moved from camel/providers/imapx/camel-imapx-command.c with 100% similarity]
camel/camel-imapx-command.h [moved from camel/providers/imapx/camel-imapx-command.h with 97% similarity]
camel/camel-imapx-conn-manager.c [moved from camel/providers/imapx/camel-imapx-conn-manager.c with 100% similarity]
camel/camel-imapx-conn-manager.h [moved from camel/providers/imapx/camel-imapx-conn-manager.h with 95% similarity]
camel/camel-imapx-folder.c [moved from camel/providers/imapx/camel-imapx-folder.c with 100% similarity]
camel/camel-imapx-folder.h [moved from camel/providers/imapx/camel-imapx-folder.h with 90% similarity]
camel/camel-imapx-job.c [moved from camel/providers/imapx/camel-imapx-job.c with 100% similarity]
camel/camel-imapx-job.h [moved from camel/providers/imapx/camel-imapx-job.h with 94% similarity]
camel/camel-imapx-server.c [moved from camel/providers/imapx/camel-imapx-server.c with 100% similarity]
camel/camel-imapx-server.h [moved from camel/providers/imapx/camel-imapx-server.h with 97% similarity]
camel/camel-imapx-settings.c [moved from camel/providers/imapx/camel-imapx-settings.c with 100% similarity]
camel/camel-imapx-settings.h [moved from camel/providers/imapx/camel-imapx-settings.h with 97% similarity]
camel/camel-imapx-store-summary.c [moved from camel/providers/imapx/camel-imapx-store-summary.c with 99% similarity]
camel/camel-imapx-store-summary.h [moved from camel/providers/imapx/camel-imapx-store-summary.h with 96% similarity]
camel/camel-imapx-store.c [moved from camel/providers/imapx/camel-imapx-store.c with 99% similarity]
camel/camel-imapx-store.h [moved from camel/providers/imapx/camel-imapx-store.h with 95% similarity]
camel/camel-imapx-stream.c [moved from camel/providers/imapx/camel-imapx-stream.c with 99% similarity]
camel/camel-imapx-stream.h [moved from camel/providers/imapx/camel-imapx-stream.h with 96% similarity]
camel/camel-imapx-summary.c [moved from camel/providers/imapx/camel-imapx-summary.c with 99% similarity]
camel/camel-imapx-summary.h [moved from camel/providers/imapx/camel-imapx-summary.h with 93% similarity]
camel/camel-imapx-tokens.txt [moved from camel/providers/imapx/camel-imapx-tokens.txt with 100% similarity]
camel/camel-imapx-utils.c [moved from camel/providers/imapx/camel-imapx-utils.c with 100% similarity]
camel/camel-imapx-utils.h [moved from camel/providers/imapx/camel-imapx-utils.h with 98% similarity]
camel/camel.h
camel/providers/imapx/Makefile.am
camel/providers/imapx/camel-imapx-provider.c
camel/providers/imapx/test-imapx.c

index acf2a2e..e9ceed4 100644 (file)
@@ -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
similarity index 97%
rename from camel/providers/imapx/camel-imapx-command.h
rename to camel/camel-imapx-command.h
index 49f8f39..b1dff50 100644 (file)
  *
  */
 
+#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) \
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 (file)
  * 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
 
similarity index 90%
rename from camel/providers/imapx/camel-imapx-folder.h
rename to camel/camel-imapx-folder.h
index 885640f..16c187b 100644 (file)
  * 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 \
similarity index 94%
rename from camel/providers/imapx/camel-imapx-job.h
rename to camel/camel-imapx-job.h
index d4eaed0..c07ca5d 100644 (file)
  *
  */
 
+#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) \
similarity index 97%
rename from camel/providers/imapx/camel-imapx-server.h
rename to camel/camel-imapx-server.h
index e793dde..d442a17 100644 (file)
  * 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"
similarity index 97%
rename from camel/providers/imapx/camel-imapx-settings.h
rename to camel/camel-imapx-settings.h
index fbd1084..9d7c478 100644 (file)
  *
  */
 
+#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
 
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 (file)
@@ -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"
 
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 (file)
  * 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 \
similarity index 99%
rename from camel/providers/imapx/camel-imapx-store.c
rename to camel/camel-imapx-store.c
index 2253f84..45a1787 100644 (file)
@@ -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,
similarity index 95%
rename from camel/providers/imapx/camel-imapx-store.h
rename to camel/camel-imapx-store.h
index 6449b16..cb2f350 100644 (file)
  * 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
 
similarity index 99%
rename from camel/providers/imapx/camel-imapx-stream.c
rename to camel/camel-imapx-stream.c
index a7c8a03..449fb10 100644 (file)
@@ -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"
 
similarity index 96%
rename from camel/providers/imapx/camel-imapx-stream.h
rename to camel/camel-imapx-stream.h
index b288f3f..9385fdf 100644 (file)
  * 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 \
similarity index 99%
rename from camel/providers/imapx/camel-imapx-summary.c
rename to camel/camel-imapx-summary.c
index f913f78..dd2766f 100644 (file)
 #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)
similarity index 93%
rename from camel/providers/imapx/camel-imapx-summary.h
rename to camel/camel-imapx-summary.h
index 311341b..6fe947a 100644 (file)
  * 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 \
similarity index 98%
rename from camel/providers/imapx/camel-imapx-utils.h
rename to camel/camel-imapx-utils.h
index e4bafa4..fd3d9fb 100644 (file)
  * 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;
index 47dd056..e21246f 100644 (file)
 #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__
 
index 3e6567f..8ba0185 100644 (file)
@@ -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
index aa99fd9..c789976 100644 (file)
@@ -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);
 
index 79e3392..37fb532 100644 (file)
@@ -17,8 +17,6 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include "camel-imapx-store.h"
-#include "camel-imapx-folder.h"
 #include <camel/camel.h>
 
 gint