On Thu, 2002-12-12 at 10:06, Dave Kelly wrote:
> Hello
> 
> In trying to understand the camel provider model I have a few questions:
> 
> 0) How can I get some debugging output out of a camel provider ? printf, 
> fprintf and g_print all seem to have no effect.

since the evolution-mail process is spawned by oafd (which redirects all
stdout and stderr to /dev/null), you'll need to get by this by starting
evolution-mail yourself in a terminal window.

Once it prints "Evolution Mail is now Ready", you can start evolution in
another terminal window (well, you could Control-Z and `bg` the
evolution-mail process, but then you mix the output of both processes
and it becomes hard to tell what belongs to who).

> 
> 1) I am writing a provider for a remote store. When setting up a new 
> account using the config druid, an attempt is made to log on to the 
> remote store but it does not seem possible to be able to prompt for a 
> password. I have lifted the following code out of the IMAP provider:
> 
> prompt = g_strdup_printf (_("%sPlease enter the IMAP "
>                       "password for %s@%s"),
>                     errbuf ? errbuf : "",
>                     service->url->user,
>                     service->url->host);
>          service->url->passwd =
>             camel_session_get_password (
>                session, prompt, TRUE,
>                service, "password", ex);
>          g_free (prompt);
>          g_free (errbuf);
> 
> 
> This is never displayed in the druid.

I don't think it's ever supposed to be displayed in the druid, as the
druid doesn't actually prompt for passwords or ever try to login. At
worst, I think it just connects to query for authentication types.

> 
> The issue I have here is that, on my remote store, it is possible to 
> lock an account after a number of unsuccessful login attempts. If the 
> druid fails to login, which it always does, this will increment the 
> failed login count on the server.
> 
> I'd like to be able to drop out of the routine if the call is being made 
> from the druid. I thought that CAMEL_IS_SESSION would solve this as 
> that's one of the assertions in camel_session_get_password but adding a 
> check for this has no effect.

this assertion won't do anything, it just makes sure that the pointer is
a CamelSession object by checking the class magic.

> 
> 2) What is the flow of calls to a provider ?

The first thing that happens will be that the UI will call
camel_sevice_connect() which will call your store's connect() method (if
you set one up, which hopefully you did since you are writing a remote
store).

After that, the UI will query for folder-info's.

>From here on out till the UI gets shut down, it's all up to the user.

>  I have set up a call to the 
> get_folder_info method of a store class so that it immediately returns 
> an exception but, probably related to question (0), I am seeing no 
> output. I would like to know when, in the process of using the mail 
> client, each method of the store and folder classes is called.

Perhaps Evolution is not trying to connect your store? Dioes it appear
in the folder-tree? If so, try clicking on it I guess.

Jeff

> 
> Any help is much appreciated.
> 
> Cheers
> 
> Dave.
> 
> 
> _______________________________________________
> evolution-hackers maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/evolution-hackers
-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
[EMAIL PROTECTED]  - www.ximian.com


_______________________________________________
evolution-hackers maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/evolution-hackers

Reply via email to