Changes in Request API

Sadrul H Chowdhury imadil at
Wed Nov 14 21:20:57 EST 2007

With the new 'hint' stuff, I believe we are going to need a major
version bump, since we change the signature of functions in
PurpleRequestUiOps. I think we should undo the changes before the next
release, or do some magic using the paddings to accommodate the
change, instead of bumping the major right now, especially since there
are a number of defects/tasks targeted to happen for 3.0.0.

Also, with the addition of 'hint', and the (account, who,
conversation) tuple added a while back, we now require the use of 4
extra parameters that the UI may not care about (eg. Finch). At the
same time, we may find more stuff useful for other UIs later. So
instead of creating new _with_stuff functions with new parameters (I
don't know about others, but I don't like using functions with
uncountable number of parameters), perhaps we should consider some
common approach like:

struct {
   PurpleAccount *account;
   const char *who;
   PurpleBuddy *buddy;
   PurpleConversation *conv;
} PurpleLotsOfData;

struct {
   PurpleLotsOfData data;
   const char *hint;
} PurpleLotsOfDataRequest;


We can also have some util functions on PurpleLotsOfData, for example:
"purple_lots_of_data_get_buddy" can return the 'buddy' if not NULL,
otherwise find the buddy using the other data available (account, who,
conv), etc. We can also consider including 'user_data' in
PurpleLotsOfData, in which case we will need some easy way of creating
and disposing PurpleLotsOfData. We may also want to use some better
term, like PurpleContext or something.

I don't have any complete plan of the whole thing yet. It'd be good to
have some discussions/ideas about this.


More information about the Devel mailing list