diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2014-07-25 18:32:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-07-24 15:37:54 +0000 |
commit | 4ad1309c0c86464ba0fb05401780a3707f0e5204 (patch) | |
tree | f3d0da9c8b456cdeb497a090531a074b5d9a9a20 /include | |
parent | 6d37e6ac6d84e83416478f89bcf0d2c777409fe3 (diff) | |
parent | c984be747d009fcd5376c9c629c6fc897ba1f76f (diff) | |
download | hardware_libhardware-4ad1309c0c86464ba0fb05401780a3707f0e5204.zip hardware_libhardware-4ad1309c0c86464ba0fb05401780a3707f0e5204.tar.gz hardware_libhardware-4ad1309c0c86464ba0fb05401780a3707f0e5204.tar.bz2 |
Merge "Camera: Define error codes for remaining camera_module methods." into lmp-dev
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware/camera_common.h | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/include/hardware/camera_common.h b/include/hardware/camera_common.h index 0ee929e..322ed93 100644 --- a/include/hardware/camera_common.h +++ b/include/hardware/camera_common.h @@ -268,8 +268,29 @@ typedef struct camera_module { /** * Common methods of the camera module. This *must* be the first member of * camera_module as users of this structure will cast a hw_module_t to - * camera_module pointer in contexts where it's known the hw_module_t references a - * camera_module. + * camera_module pointer in contexts where it's known the hw_module_t + * references a camera_module. + * + * The return values for common.methods->open for camera_module are: + * + * 0: On a successful open of the camera device. + * + * -ENODEV: The camera device cannot be opened due to an internal + * error. + * + * -EINVAL: The input arguments are invalid, i.e. the id is invalid, + * and/or the module is invalid. + * + * -EBUSY: The camera device was already opened for this camera id + * (by using this method or open_legacy), + * regardless of the device HAL version it was opened as. + * + * -EUSERS: The maximal number of camera devices that can be + * opened concurrently were opened already, either by + * this method or the open_legacy method. + * + * All other return values from common.methods->open will be treated as + * -ENODEV. */ hw_module_t common; @@ -293,6 +314,15 @@ typedef struct camera_module { * Return the static camera information for a given camera device. This * information may not change for a camera device. * + * Return values: + * + * 0: On a successful operation + * + * -ENODEV: The information cannot be provided due to an internal + * error. + * + * -EINVAL: The input arguments are invalid, i.e. the id is invalid, + * and/or the module is invalid. */ int (*get_camera_info)(int camera_id, struct camera_info *info); @@ -315,6 +345,15 @@ typedef struct camera_module { * * Valid to be called by the framework. * + * Return values: + * + * 0: On a successful operation + * + * -ENODEV: The operation cannot be completed due to an internal + * error. + * + * -EINVAL: The input arguments are invalid, i.e. the callbacks are + * null */ int (*set_callbacks)(const camera_module_callbacks_t *callbacks); |