Re: [Evolution-hackers] Heads-up: EBookBackend/EBook ECalBackend/ECal ongoing API changes



On Thu, 2010-07-01 at 17:55 +0200, Patrick Ohly wrote:
> If this was about the synchronous APIs that SyncEvolution depends on,
> then I'd be really worried about this change. If those functions are not
> changed, SyncEvolution binaries from syncevolution.org  will continue to
> work (full list of called functions attached).

	Hi,
for EBook it's "only" asynchronous API callbacks signature change, for
example from:
typedef void (*EBookCallback) (EBook *book, EBookStatus status, gpointer
closure);
will be now:
typedef void (*EBookCallback) (EBook *book, const GError *error,
gpointer closure);

and with ECal it seems only the "cal_opened" signal signature change,
from
void (* cal_opened) (ECal *ecal, ECalendarStatus status);
to
void (* cal_opened) (ECal *ecal, const GError *error);
Otherwise the EBook/ECal API would stay the same.

> Having said that, are you sure that there is no way to preserve the old
> APIs? Perhaps the new implementation can be made available under a new
> name and the old one be implemented by mapping the GError to the old
> error code?

Yes, Chen asked me the same when I told him about my intention about
this change. Seeing the impact I would say that I can define
E_BOOK_DISABLE_DEPRECATED and E_CAL_DISABLE_DEPRECATED and deprecate old
API with new functions, though any backend will be broken, though with
such a change we cannot do anything anyway. The only thing is about
naming, would it be OK to use signal name like "cal-opened-ex" and
callback names EBookCallbackEx, with, for example, e_book_async_open_ex?
I would like to use "Ex" suffixes, as it makes more sense than for
example "with_error" or "Error" suffix, which might indicate something
quite different.

> I suspect that quite a few projects will have to adapt their source code
> if that's not the case. OpenOffice might be another candidate which
> tries to be binary compatible with different versions of Evolution.

Yup, I agree.
	Bye,
	Milan



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