[Dev] [Cynara] Async admin API proposal

José Bollo jose.bollo at open.eurogiciel.org
Fri Aug 22 13:23:30 GMT 2014

On ven, 2014-08-22 at 15:13 +0200, Jacek Bukarewicz wrote:
> >
> >> My (and Aleksanders) main concerns about cynara_async_check returning answer immediately are:
> >> 1. client will be forced to handle two ways of returning answer, which involves:
> >>     - in case of cynara_async_check() returning cached value through return value, user even after passing response_callback,
> >>       will have to additionally handle cynara_async_check() return value
> > that's also my opinion, using the return value is bad.
> >
> The thing is that caller often needs to know if access is allowed or 
> denied. That's the case for dbus daemon. If the result is not available 
> via return value then callback would have to be made responsible for 
> passing it via user data.
> This also implies that existing structures couldn't be used directly but 
> would have to be wrapped by another structure containing response field.
> It's not a big deal but still something we need to consider.

I fully agree with you.

My point is that having 2 separate treatments of the answer is making
much job for the programmer, the maintainer, the reviewer and is more
difficult to test (coverage). 

Best regards
> Best regards,

More information about the Dev mailing list