Re: [Evolution-hackers] Relating async queries and answers in e-d-s


El dom, 08-08-2004 a las 12:47, Alvaro del Castillo escribió:
> Hi guys!
> I am coding the planner resource importer for e-d-s and now I am trying
> to make all the queries async in the importer in order the GUI could
> work in the waiting response time.
> My problem is that I let the user to cancel async queries son I need to
> drop some asyn answers if the user has cancelled them.
> I understand that it could be nearly imposible to offer a cancel async
> query, because I suppose async queries will be a best effort remote
> operation.
> What I need is some way to associate the async query id that returns
> guint last_query_id = e_book_async_get_contacts  (client, query,
> eds_receive_contacts_cb,(gpointer) plugin);
> with the answer I receive in:
> static void
> eds_receive_contacts_cb (EBook         *book, 
> 			 EBookStatus    status, 
> 			 GList         *contacts, 
> 			 gpointer       plugin)
> I can't put the query_id in the gpointer so if the query_id doesn't come
> with the async answer, how can I relate async queries and answers?

Ups, I have seen in e-book.c that the guint that returns
e_book_async_get_contacts isn't a identifier but a "boolean" abouth the
sucessfull of the query.

And thinking with a more fresh brain now, I can create the query id and
put it in the gpointer, so this is the way I will follow to relate
queries and answers.

Sorry for the noise.


> I am nearly finishing the GPL resource importer for Planner and I will
> announce it when it is released you can take a look ;-)
> If someone is interested in the actual code, just ask for it.
> Cheers
> -- Alvaro

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente

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