Opened 14 years ago
Closed 13 years ago
#27 closed enhancement (fixed)
get/set_property type checking
Reported by: | Suren A. Chilingaryan | Owned by: | Matthias Vogelgesang |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | libuca | Version: | |
Keywords: | Cc: |
Description
I think it is quite dangerous to accept pointers on void* values and write there values of properties having different size. The library user can easily confuse types and the types inside library are sometimes changing.
I would propose the following option to solve this. The user just should supply type specification from property_map with the call. UCA can detect that types does not match any more and report error. Also it can provide users with type conversion in some cases if it's useful.
To save time and avoid implementing it for each camera, may be we can hide the real call to the cam->set_property behind uca_set_property which will do type checking for all cameras and, then, call appropriate set_property method.
With the move to GObject this is fixed.