Re: [evolution-patches] Patch for integrating exchange x-c-s with mailer.



Hi,

I am now handling owa url reading from the plugin.

I need to authenticate user and get host and
global catalog server names once he enters
owa url value, as done in ximian-connector-setup.

I am using a camel API to do this.
Can you please review the attached patch.

Thanks,
Sushma.

>>> Not Zed <notzed ximian com> 01/10/05 08:28 AM >>>

In a word, absolutely not.

1. do not add what appears to be a hack to camel-url to extract some
embedded url out of the url.  i dont actually know what you're doing
here, & is used for cgi argument separation only.  This only appears to
have been done so you can hack into em-account-editor, but that is
unacceptable too.
2. e-config shouldn't need changing.  why exactly are you changing it?
3. you can't add owa specific hacks to mail-config either - thats the
entire point of the plugin system.


On Sun, 2005-01-09 at 09:42 -0700, Sushma Rai wrote:

> Hi,
> 
> Attched are the patch files for achieving
> ximian-connector-setupfunctionality mail configuration. 
> 
> X-C-S reads owa URL, user name and password and detects rest of the
> settings after authenticating the user.
> 
> I have added an entry to read OWA URL to the glade file
> and handled it in CamelProviderConfEntry structure. 
> (As hostname,user name and path are currently handled).
> 
> Asking for the password is done by the page check 
> plugin "exchange-account-setup". The plugin code is 
> available in CVS.Authenticating user is done using 
> camel API, which would authenticatethe user if the 
> provider supports. (similar to auto_detect)
> 
> Now, since the source and transport URLs need to 
> contain OWA url also,I am handling this in decoding of 
> camel url, using "&" as the delimiter for owa url, and 
> I hope it is ok to use it.
> 
> I was getting error while overwriting the labels in
> receive page andhiding the sections (like SSL). 
> I have made some modifications related to them also. 
> 
> Thanks,
> Sushma.
> 
> 

-- 

Michael Zucchi <notzed ximian com>
"Ride, Work, Sleep. Beer."
Novell's Evolution and Free Software
Developer

Index: camel/camel-provider.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-provider.c,v
retrieving revision 1.36
diff -u -r1.36 camel-provider.c
--- camel/camel-provider.c	2 Dec 2004 08:03:30 -0000	1.36
+++ camel/camel-provider.c	10 Jan 2005 11:31:10 -0000
@@ -414,3 +414,32 @@
 		return 0;
 	}
 }
+
+/**
+ * camel_provider_validate_user:
+ *
+ * @provider: camel provider
+ * @camel_url: camel URL
+ * @ex: exception
+ * @url: Input url string, which provider uses.
+ *
+ * If url is read insted of hostname, the provider can authenticate
+ * user, based on url and user name entered.
+ *
+ * If the provider does not support this, this just returns a TRUE.
+ *
+ * Returns TRUE on success or not supported, and  FALSE on fail.
+ **/
+gboolean
+camel_provider_validate_user (CamelProvider *provider, CamelURL *camel_url, 
+			      char *url, CamelException *ex)
+{
+	g_return_val_if_fail (provider != NULL, -1);
+
+	if (provider->validate_user) {
+		return provider->validate_user (url, camel_url, ex);
+	}
+	else {
+		return TRUE; /* FIXME */
+	}
+}
Index: camel/camel-provider.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-provider.h,v
retrieving revision 1.43
diff -u -r1.43 camel-provider.h
--- camel/camel-provider.h	20 Sep 2004 05:59:53 -0000	1.43
+++ camel/camel-provider.h	10 Jan 2005 11:31:21 -0000
@@ -136,6 +136,7 @@
 #define CAMEL_PROVIDER_CONF_DEFAULT_PATH      { CAMEL_PROVIDER_CONF_ENTRY, "path", NULL, N_("_Path:"), "" }
 
 typedef int (*CamelProviderAutoDetectFunc) (CamelURL *url, GHashTable **auto_detected, CamelException *ex);
+typedef gboolean (*CamelProviderValidateUserFunc) (CamelURL *camel_url, char *url, CamelException *ex);
 
 typedef struct {
 	/* Provider name used in CamelURLs. */
@@ -169,6 +170,8 @@
 	
 	/* auto-detection function */
 	CamelProviderAutoDetectFunc auto_detect;
+
+	CamelProviderValidateUserFunc validate_user;
 	
 	/* CamelType(s) of its store and/or transport. If both are
 	 * set, then they are assumed to be linked together and the
@@ -223,6 +226,8 @@
 int camel_provider_auto_detect (CamelProvider *provider, CamelURL *url,
 				GHashTable **auto_detected, CamelException *ex);
 
+gboolean camel_provider_validate_user (CamelProvider *provider, CamelURL *camel_url, 
+					char *url, CamelException *ex);
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */


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