|
From: Bill S. <we...@ri...> - 2001-01-13 07:32:57
|
On Fri, 12 Jan 2001, Denis V. Dmitrienko wrote:
> > I'm also tossing around the idea of leaving the old methods in for
> > convenience. So someone could still use icq_SendMessage(icqlink, uin,
> > message) for instance. It will be up to the coder to decide which
> > interface to use - the functional interface will probably work better for
> > quick and dirty programs and scripts, while the event structure would
> > probably work better for larger, object-oriented applications because
> > they can use them directly.
>
> How hard do you think it will be to implement/support both APIs?
Well, my plans to implement this event thing have always gone like this:
1) write the icq_event code. don't export it yet
2) make all the existing functions use the event code internally, in
order to test it
e.g.
int icq_SendMessage(int destination_uin, const char *msg, ... )
{
icq_MessageEvent message_event = icq_MessageEventNew();
message_event->uin = destination_uin;
message_event->message = msg;
icq_SendEvent(message_event, ...);
}
3) wait a while until all the bugs are squashed...
4) export the icq event interface
So basically we'll just leave the other methods there after the event
interface is exported, keep both. Won't be hard at all!
Bill
|