Re: [Evolution-hackers] New 'eclient' branch in eds



On Tue, 2011-04-19 at 13:12 -0400, Matthew Barnes wrote:
> Then I can pass that ECredentials object any time I need to create a
> new EClient.  I just call e_cal_client_new() or e_book_client_new(),
> pass the ECredentials object along with some ESource, wait for the
> callback, and I'm done.  I can start making calls to the calendar or
> address book right away.  If I'm in offline mode, then certain calls
> will error out. That's fine.  And if for some the connection needs to
> re-authenticate with the server, the EClient already has my
> ECredentials object so it can handle everything itself.

	Hi,
what about a compromise here, having (async only):

void e_client_open_new (ESource *source, gboolean (* auth_cb) (EClient
*client, ECredentials *credentials, gpointer user_data), gpointer
user_data);

gboolean e_client_open_new_finish (GAsyncResult *result, EClient
**client, GError **error);

As I mentioned in the previous mail, the ECredentials is used
differently, on both client and server sides, and offers much more
freedom than yours proposal. And it definitely doesn't block the usage
of a different centralized place to get password from, also because
there is only one place to change, the
libedataserverui/e-client-authenticate.c:e_credentials_authenticate_helper

Does it sound good?
	Bye,
	Milan



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