[asterisk-dev] [Code Review] New manager actions for xmldoc

Olle E. Johansson oej at edvina.net
Thu Jul 22 02:20:44 CDT 2010


21 jul 2010 kl. 23.14 skrev paul.belanger at polybeacon.com:

> 
> 
>> On 2010-04-28 16:32:34, Russell Bryant wrote:
>>> /trunk/include/asterisk/manager.h, lines 139-182
>>> <https://reviewboard.asterisk.org/r/627/diff/2/?file=9567#file9567line139>
>>> 
>>>    I'm not a huge fan of this part of the patch.
>>> 
>>>    It breaks API and ABI.  While it is trunk, we should always avoid both types of change when possible.
>>> 
>>>    I don't understand the purpose of registering a manager event.  It seems to be overloading the register API call for actions, which is for registering callbacks.  If a register API call events really is needed, then I'd rather see it as a separate API call, instead of overloading this one and causing the API disruption in the tree.
>>> 
>>>    Instead of requiring registration of each event, why not just open the XML doc and traverse it for ami_events?
>> 
>> pabelanger wrote:
>>    My logic for this was since events and commands _seemed_ very similar, I might as well mash them into the same structure. I don't have a problem changing this.
>> 
>> Russell Bryant wrote:
>>    I suppose one benefit to going the registration route is that the events available in the documentation reflect what events are actually supported given what modules have been loaded and the options they were compiled with.  The same goes for the other XML documentation types, since they are loaded at entity registration time.
>> 
>>    However, if we were to proceed with having the event docs registered, then I think it should be its own API call.
>> 
>>    Another complexity with registering events is figuring out who is responsible for registering the more common event types that are used in more than one place.  How would that be handled?
>> 
>>    I'm a little torn, and tempted to just recommend going with loading the docs straight from the XML doc in this case.
> 
> If you have spare time, perhaps we call talk this week?
> 
While I see the need to document manager events, I don't understand why there should be code registering them. I really do not see any benefit.

/O


More information about the asterisk-dev mailing list