e_load_book_source_async() is a mess.  It invents its own async pattern,
doesn't allow for cancellation and has no way to report errors.

I would like to fix this before it ships in 2.32.  Since it's in
libedataserverui, it shouldn't affect much more than Evolution.

Proposed API uses GIO's async pattern:

   e_load_book_source_async (ESource *source,
                             GtkWindow *parent,
                             GCancellable *cancellable,
                             GAsyncReadyCallback callback,
                             gpointer user_data);

   EBook *
   e_load_book_source_finish (ESource *source,
                              GAsyncResult *result,
                              GError **error);

I don't see the point of holding an unusable EBook object, so under this
API you don't get the EBook until it is successfully connected, opened
and authenticated.  If something goes wrong, the finish function returns
NULL and sets the GError.

Any objections?

evolution-hackers mailing list
To change your list options or unsubscribe, visit ...

Reply via email to