diff options
Diffstat (limited to 'include/camera/ICameraService.h')
-rw-r--r-- | include/camera/ICameraService.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/include/camera/ICameraService.h b/include/camera/ICameraService.h index aaf6eb3..f342122 100644 --- a/include/camera/ICameraService.h +++ b/include/camera/ICameraService.h @@ -28,17 +28,25 @@ class ICameraClient; class IProCameraUser; class IProCameraCallbacks; class ICameraServiceListener; +class ICameraDeviceUser; +class ICameraDeviceCallbacks; +class CameraMetadata; class ICameraService : public IInterface { public: + /** + * Keep up-to-date with ICameraService.aidl in frameworks/base + */ enum { GET_NUMBER_OF_CAMERAS = IBinder::FIRST_CALL_TRANSACTION, GET_CAMERA_INFO, CONNECT, CONNECT_PRO, + CONNECT_DEVICE, ADD_LISTENER, REMOVE_LISTENER, + GET_CAMERA_CHARACTERISTICS, }; enum { @@ -52,6 +60,9 @@ public: virtual status_t getCameraInfo(int cameraId, struct CameraInfo* cameraInfo) = 0; + virtual status_t getCameraCharacteristics(int cameraId, + CameraMetadata* cameraInfo) = 0; + // Returns 'OK' if operation succeeded // - Errors: ALREADY_EXISTS if the listener was already added virtual status_t addListener(const sp<ICameraServiceListener>& listener) @@ -65,15 +76,27 @@ public: * clientUid == USE_CALLING_UID, then the calling UID is used instead. Only * trusted callers can set a clientUid other than USE_CALLING_UID. */ - virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient, + virtual status_t connect(const sp<ICameraClient>& cameraClient, + int cameraId, + const String16& clientPackageName, + int clientUid, + /*out*/ + sp<ICamera>& device) = 0; + + virtual status_t connectPro(const sp<IProCameraCallbacks>& cameraCb, int cameraId, const String16& clientPackageName, - int clientUid) = 0; + int clientUid, + /*out*/ + sp<IProCameraUser>& device) = 0; - virtual sp<IProCameraUser> connect(const sp<IProCameraCallbacks>& cameraCb, + virtual status_t connectDevice( + const sp<ICameraDeviceCallbacks>& cameraCb, int cameraId, const String16& clientPackageName, - int clientUid) = 0; + int clientUid, + /*out*/ + sp<ICameraDeviceUser>& device) = 0; }; // ---------------------------------------------------------------------------- |