[evolution-activesync] Split camel-ews-settings out into separate libevoeas, fix eplugin



commit 65890a821a8f9f127a3fbea816c71d06f9747da9
Author: David Woodhouse <David Woodhouse intel com>
Date:   Mon May 21 20:37:17 2012 +0100

    Split camel-ews-settings out into separate libevoeas, fix eplugin

 Makefile.am                               |    4 ++--
 camel/Makefile.am                         |   10 +++++-----
 configure.ac                              |    5 +++++
 eplugin/Makefile.am                       |   10 ++++++----
 eplugin/activesync-account-setup.c        |   10 ++--------
 libevoeas/Makefile.am                     |   15 +++++++++++++++
 {camel => libevoeas}/camel-eas-settings.c |   22 ----------------------
 {camel => libevoeas}/camel-eas-settings.h |    3 ---
 8 files changed, 35 insertions(+), 44 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 6a5a20c..d7474c8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,7 +10,7 @@ if ENABLE_QT_CONFIG_TOOL
 endif
 
 if ENABLE_CAMEL_BACKEND
-  CAMEL_DIR = camel
+  CAMEL_DIRS = camel libevoeas
 endif
 
 if ENABLE_EPLUGIN
@@ -20,7 +20,7 @@ endif
 # full set of directories for "make dist"
 DIST_SUBDIRS = . libeasaccount/src libeasclient libeasaccount/tests eas-daemon check_tests camel eplugin meego QtActivesyncdConfig po
 # subset of that list for "make && make install"
-SUBDIRS = . libeasaccount/src libeasclient libeasaccount/tests eas-daemon check_tests $(CAMEL_DIR) $(EPLUGIN_DIR) $(MEEGO_DIR) $(QTCONFIG_DIR) po
+SUBDIRS = . libeasaccount/src libeasclient libeasaccount/tests eas-daemon check_tests $(CAMEL_DIRS) $(EPLUGIN_DIR) $(MEEGO_DIR) $(QTCONFIG_DIR) po
 
 EXTRA_DIST = autogen.sh
 
diff --git a/camel/Makefile.am b/camel/Makefile.am
index bbd13b3..65fb360 100644
--- a/camel/Makefile.am
+++ b/camel/Makefile.am
@@ -16,7 +16,8 @@ libcameleas_la_CPPFLAGS = \
 	$(DBUS_GLIB_CFLAGS)			\
 	-DG_LOG_DOMAIN=\"camel-eas-provider\"	\
 	-I$(top_srcdir)/camel			\
-	-I$(top_srcdir)/libeasclient
+	-I$(top_srcdir)/libeasclient		\
+	-I$(top_srcdir)/libevoeas
 
 libcameleas_la_SOURCES = 			\
 	camel-eas-folder.c                	\
@@ -26,8 +27,7 @@ libcameleas_la_SOURCES = 			\
 	camel-eas-provider.c			\
 	camel-eas-utils.c			\
 	camel-eas-transport.c			\
-	camel-eas-compat.c			\
-	camel-eas-settings.c
+	camel-eas-compat.c
 
 noinst_HEADERS =         			\
 	camel-eas-folder.h			\
@@ -37,13 +37,13 @@ noinst_HEADERS =         			\
 	camel-eas-summary.h			\
 	camel-eas-utils.h			\
 	camel-eas-transport.h                   \
-        camel-eas-compat.h			\
-	camel-eas-settings.h
+        camel-eas-compat.h
 
 libcameleas_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED)
 
 libcameleas_la_LIBADD =					\
 	$(top_builddir)/libeasclient/libeasclient.la	\
+	$(top_builddir)/libevoeas/libevoeas.la		\
 	$(CAMEL_LIBS)                                   \
 	$(EVOLUTION_PLUGIN_LIBS)			\
 	$(LIBEDATASERVER_LIBS)				\
diff --git a/configure.ac b/configure.ac
index f78ed0f..600f07b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,6 +112,10 @@ AC_SUBST(EVOLUTION_PLUGIN_errordir)
 EVOLUTION_imagesdir="`$PKG_CONFIG --variable=imagesdir evolution-shell`"
 AC_SUBST(EVOLUTION_imagesdir)
 
+EVOLUTION_privlibdir=`$PKG_CONFIG --variable=privlibdir evolution-data-server-1.2`
+AC_SUBST(EVOLUTION_privlibdir)
+
+
 AC_PATH_PROGS(ASKPASS, [ssh-askpass gnome-ssh-askpass], [ssh-askpass], [path = $PATH:/usr/libexec:/usr/libexec/ssh:/usr/libexec/openssh:$libexecdir:$libexecdir/ssh:$libexecdir/openssh])
 AC_SUBST(ASKPASS)
 
@@ -153,6 +157,7 @@ AC_CONFIG_FILES([
     libeasaccount/tests/Makefile
     check_tests/Makefile
     camel/Makefile
+    libevoeas/Makefile
     meego/Makefile
     QtActivesyncdConfig/Makefile
     po/Makefile.in
diff --git a/eplugin/Makefile.am b/eplugin/Makefile.am
index 0b1192b..7c31eec 100644
--- a/eplugin/Makefile.am
+++ b/eplugin/Makefile.am
@@ -15,9 +15,9 @@
 ### EVO_PLUGIN_RULE ### end ###
 
 
-# plugin_DATA = org-gnome-exchange-activesync.eplug
-# plugin_LTLIBRARIES = liborg-gnome-exchange-activesync.la
-noinst_LTLIBRARIES = liborg-gnome-exchange-activesync.la
+plugin_DATA = org-gnome-exchange-activesync.eplug
+plugin_LTLIBRARIES = liborg-gnome-exchange-activesync.la
+#noinst_LTLIBRARIES = liborg-gnome-exchange-activesync.la
 
 liborg_gnome_exchange_activesync_la_CPPFLAGS = \
 	$(AM_CPPFLAGS) \
@@ -27,7 +27,8 @@ liborg_gnome_exchange_activesync_la_CPPFLAGS = \
 	$(EVOLUTION_MAIL_CFLAGS) \
 	$(LDAP_CFLAGS)		\
 	$(SYNCEVOLUTION_DBUS_CFLAGS) \
-	-I$(top_srcdir)/libeasaccount/src -I$(top_srcdir)/libeasclient -I$(top_srcdir)/camel
+	-I$(top_srcdir)/libeasaccount/src -I$(top_srcdir)/libeasclient -I$(top_srcdir)/camel -I$(top_srcdir)/libevoeas
+
 
 
 liborg_gnome_exchange_activesync_la_SOURCES = 	\
@@ -37,6 +38,7 @@ liborg_gnome_exchange_activesync_la_SOURCES = 	\
 
 liborg_gnome_exchange_activesync_la_LIBADD = \
 	$(top_builddir)/libeasclient/libeasclient.la \
+	$(top_builddir)/libevoeas/libevoeas.la		\
 	$(EVOLUTION_DATA_SERVER_LIBS) \
 	$(EVOLUTION_PLUGIN_LIBS) \
 	$(EVOLUTION_SHELL_LIBS) \
diff --git a/eplugin/activesync-account-setup.c b/eplugin/activesync-account-setup.c
index 09d3f66..d263f06 100644
--- a/eplugin/activesync-account-setup.c
+++ b/eplugin/activesync-account-setup.c
@@ -114,9 +114,6 @@ url_entry_changed(GtkWidget *entry, EConfig *config)
 		g_free (key);
 		g_object_unref (client);
 
-		camel_eas_settings_set_owaurl ((CamelEasSettings *) target->storage_settings, uri);
-		camel_eas_settings_set_owaurl ((CamelEasSettings *)target->transport_settings, uri);
-	
 		camel_eas_settings_set_account_uid ((CamelEasSettings *)target->storage_settings, address);
 		camel_eas_settings_set_account_uid ((CamelEasSettings *)target->transport_settings, address);
 
@@ -250,9 +247,6 @@ discover_server_url (GtkWidget *button, EConfig  *config)
 	if (!error && uri && *uri)
 		gtk_entry_set_text ((GtkEntry *) entry, uri);
 
-	camel_eas_settings_set_owaurl ((CamelEasSettings *)target->storage_settings, uri);
-	camel_eas_settings_set_owaurl ((CamelEasSettings *)target->transport_settings, uri);
-	
 	camel_eas_settings_set_account_uid ((CamelEasSettings *)target->storage_settings, address);
 	camel_eas_settings_set_account_uid ((CamelEasSettings *)target->transport_settings, address);
 
@@ -334,7 +328,7 @@ org_gnome_exchange_server_url(EPlugin *epl, EConfigHookItemFactoryData *data)
 	target_account = (EMConfigTargetSettings *)data->config->target;
 	settings = target_account->storage_settings;
 
-	if (!CAMEL_IS_EWS_SETTINGS (settings)) {
+	if (!CAMEL_IS_EAS_SETTINGS (settings)) {
 		if (data->old
 		    && (label = g_object_get_data((GObject *)data->old, "authenticate-label")))
 			gtk_widget_destroy(label);
@@ -548,7 +542,7 @@ org_gnome_exchange_check_options(EPlugin *epl, EConfigHookPageCheckData *data)
 	CamelEasSettings *eas_settings;
 	gint status = TRUE;
 
-	if (!CAMEL_IS_EWS_SETTINGS (target->storage_settings))
+	if (!CAMEL_IS_EAS_SETTINGS (target->storage_settings))
 		return TRUE;
 
 	eas_settings = CAMEL_EAS_SETTINGS (target->storage_settings);
diff --git a/libevoeas/Makefile.am b/libevoeas/Makefile.am
new file mode 100644
index 0000000..123e4a8
--- /dev/null
+++ b/libevoeas/Makefile.am
@@ -0,0 +1,15 @@
+EVOLUTION_privlib_LTLIBRARIES = libevoeas.la
+
+libevoeas_la_CPPFLAGS = \
+	$(CAMEL_CFLAGS)
+
+libevoeas_la_SOURCES =					\
+	camel-eas-settings.c				\
+	camel-eas-settings.h
+
+libevoeas_la_LIBADD =					\
+	$(CAMEL_LIBS)
+
+libevoeas_la_LDFLAGS = $(NO_UNDEFINED)
+
+-include $(top_srcdir)/git.mk
diff --git a/camel/camel-eas-settings.c b/libevoeas/camel-eas-settings.c
similarity index 93%
rename from camel/camel-eas-settings.c
rename to libevoeas/camel-eas-settings.c
index 2a0f666..3874616 100644
--- a/camel/camel-eas-settings.c
+++ b/libevoeas/camel-eas-settings.c
@@ -24,7 +24,6 @@
 
 struct _CamelEasSettingsPrivate {
 	gboolean check_all;	
-	gchar *owaurl;
 	gchar *account_uid;
 };
 
@@ -167,7 +166,6 @@ eas_settings_finalize (GObject *object)
 
 	priv = CAMEL_EAS_SETTINGS_GET_PRIVATE (object);
 
-	g_free (priv->owaurl);
 	g_free (priv->account_uid);
 
 	/* Chain up to parent's finalize() method. */
@@ -246,26 +244,6 @@ camel_eas_settings_init (CamelEasSettings *settings)
 
 
 const gchar *
-camel_eas_settings_get_oaburl (CamelEasSettings *settings)
-{
-	g_return_val_if_fail (CAMEL_IS_EAS_SETTINGS (settings), NULL);
-
-	return settings->priv->owaurl;
-}
-
-void
-camel_eas_settings_set_owaurl (CamelEasSettings *settings,
-                                const gchar *url)
-{
-	g_return_if_fail (CAMEL_IS_EAS_SETTINGS (settings));
-
-	g_free (settings->priv->owaurl);
-	settings->priv->owaurl = g_strdup (url);
-
-	g_object_notify (G_OBJECT (settings), "owaurl");
-}
-
-const gchar *
 camel_eas_settings_get_account_uid (CamelEasSettings *settings)
 {
 	g_return_val_if_fail (CAMEL_IS_EAS_SETTINGS (settings), NULL);
diff --git a/camel/camel-eas-settings.h b/libevoeas/camel-eas-settings.h
similarity index 92%
rename from camel/camel-eas-settings.h
rename to libevoeas/camel-eas-settings.h
index eb2ecf6..46f01b5 100644
--- a/camel/camel-eas-settings.h
+++ b/libevoeas/camel-eas-settings.h
@@ -59,9 +59,6 @@ GType		camel_eas_settings_get_type			(void) G_GNUC_CONST;
 gboolean	camel_eas_settings_get_check_all		(CamelEasSettings *settings);
 void		camel_eas_settings_set_check_all		(CamelEasSettings *settings,
 								 gboolean check_all);
-const gchar *	camel_eas_settings_get_owaurl			(CamelEasSettings *settings);
-void		camel_eas_settings_set_owaurl			(CamelEasSettings *settings,
-								 const gchar *url);
 const gchar *	camel_eas_settings_get_account_uid		(CamelEasSettings *settings);
 void		camel_eas_settings_set_account_uid		(CamelEasSettings *settings,
 								 const gchar *uid);



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