On Saturday 19 April 2008, Dan Pascu wrote: > > can create two wrappers around the generic dialog callback: > > - one would be the existing run_dlg_callback (and keep the existing > > signature), - the other one would be run_mi_callback. > > Again, I do not see these just as the same thing. I see them as 2 > different interfaces. The existing one and a new one to move > information the other way around. > They may look the same because one will most likely implement this new > interface using a callback mechanism too, but the distinction of which > interface moves data in which direction is important IMO.
If I think a bit more of this, the new interface doesn't have to be callback based. It can just be a simple function each module that wishes to participate in providing extra MI information would register, and this function should return a node list. Something like: // in the module built on top of dialog struct mi_node* dialog_mi_helper(struct dlg_cell *dlg, void **param) { // build node list return node_list; } ... dlg_api.register_mi_helper(dialog_mi_helper, param); ... // in the dialog module ... mi_helper = module_mi_helper_list; // simple linked list while (mi_helper) { node_list = mi_helper->function(dlg, mi_helper->param); // process node_list for displaying it mi_helper = mi_helper->next; } ... -- Dan _______________________________________________ Devel mailing list Devel@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/devel