[OpenSER-Devel] dialog callbacks: mi enhancements

Dan Pascu dan at ag-projects.com
Thu Apr 17 23:31:43 CEST 2008


On Thursday 17 April 2008, Ovidiu Sas wrote:
> Well ... define generic.
> This particular callback is meant to be used via the MI interface.
> You can define other type of callbacks and reuse the extra pointer
> that was defined (see void **x_param inside struct dlg_cb_params).

That's exactly my point. I was asking the question with a purpose, that is 
to highlight that the proposed change would define a dialog callback that 
can only be used by one module and in a very specific context, callback 
that is on the other hand made public. What is the use of a callback that 
is advertised as public, but can only be used by one module for a very 
specific task?

I mean, can't that module export a public API that the dialog module can 
use to get the information it needs? That would be more clean, yet it 
would still be an awkward reverse dependency.

IMO, I still find such a dependency to be very problematic to be forged 
into any kind of generic interface. The direct dependency is fine. Any 
module built on top of the dialog module can use the dialog's public API 
to access the dialog state/events. But when you have it the other way 
around, the dialog module cannot possibly know what modules will be built 
on top of it to be able to generically extract information from them. 
This kind of dependency is not only awkward, but it is very narrow in its 
scope, which hardly justifies it being put in a public API that none 
uses, except that module.

I'm sure that if we would know in more detail what problem you are trying 
to solve (as opposed to how you try to solve it), many people here could 
offer good suggestions that may turn into a better design.

-- 
Dan



More information about the Devel mailing list