Proposals for 3.0.0 API changes

Mark Doliner mark at kingant.net
Thu Jan 24 14:49:07 EST 2008


On Wed, 23 Jan 2008 08:18:24 +0000, Will Thompson wrote
> On Mon, Dec 31, 2007 at 03:24:34PM -0500, Sadrul Habib Chowdhury wrote:
> > * Will Thompson had this to say on [31 Dec 2007, 17:09:08 +0000]:
> > > So when the request_action UiOp is called, Haze has no way to figure out
> > > what it's being asked without a massive lookup table looking something
> > > like:
> > > 
> > >     if (strcmp (primary, _("Accept chat invitation?"))
> > >     {
> > >         // * create a new muc
> > >         // * add self to local_pending
> > >         // * hook up accepting to the first callback (which we happen to
> > >         //   know from reading server.c is "accept").
> > >         // * hook up declining to the second.
> > >     }
> > >     else if (strcmp (primary, _("SSL Certificate Verification")))
> > >     {
> > >         ...
> > > 
> > 
> > What happens for an unhandled request?
> 
> To clarify, this isn't what Haze actually does. The massive,
> doing-it-wrong chain of localized string comparisons was meant to
> illustrate why the request API is a problem in Haze-land. "What does
> Haze actually do?", I hear you ask. Well: nothing. The request UiOps 
> are not implemented (modulo a compile-time flag that enables implementations
> that just dump the message text to the debug stream and then return).
> But if Haze did do this, for unhandled requests it would have to either
> drop it on the floor, or call the default callback. However, a quick
> survey revealed that most requests pass NO_DEFAULT (although I think
> Mark started fixing this the other day?), and in any case I'd eventually
> like to support both accepting and rejecting chats. :-)

Yes, I set the default callback in places where I thought there was an option
that the user would most likely choose (generally "ok" or "yes").  In some
places there is no clear default ("allow msn mobile pages?"), and I left those
unchanged.

-Mark




More information about the Devel mailing list