[Dev] [Cynara] Async admin API proposal

Jacek Bukarewicz j.bukarewicz at samsung.com
Mon Aug 25 13:06:43 GMT 2014


On 08/25/2014 01:50 PM, Jussi Laako wrote:
> On 25.8.2014 13:44, Zofia Abramowska wrote:
>> Well... as you can see, in cynara_response_callback there's an argument
>> 'int response' which as well can contain error code (and probably 
>> will in
>> some cases
>> even when cynara_async_check will return error codes).
>> Any constraining design on user_data is not required.
>
> I would strongly object mixing response and error codes. I think 
> response should be an enum and for error codes there can be a separate 
> argument, or even better a getter.
>
> Usually application cannot do anything about the failure/error 
> situation and thus reason for the error is only useful for debug 
> builds and is unnecessary for production builds.
>
> _______________________________________________
> Dev mailing list
> Dev at lists.tizen.org
> https://lists.tizen.org/listinfo/dev
>
In my opinion mixing them is acceptable as long as they can be easily 
differentiated. For example, negative values for errors, non-negative 
for responses. Unfortunately, that's currently not the case where 
"access granted" response is 0, "access denied" is -1 and error codes 
are also negative.

Best regards,

-- 
Jacek Bukarewicz
Samsung R&D Institute Poland
Samsung Electronics
j.bukarewicz at samsung.com



More information about the Dev mailing list