diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2013-08-08 13:07:18 -0700 |
---|---|---|
committer | Ruben Brunk <rubenbrunk@google.com> | 2013-08-16 14:42:28 -0700 |
commit | 0f61d8f14aa368c9cd7076528e8096e10ed100a0 (patch) | |
tree | ed95cb70d56dd3a732f4e1909c96e7889b23ce94 /include/camera/ICameraService.h | |
parent | 75c16dde986e16ac5fd4d34b06b0cc6a90679866 (diff) | |
download | frameworks_av-0f61d8f14aa368c9cd7076528e8096e10ed100a0.zip frameworks_av-0f61d8f14aa368c9cd7076528e8096e10ed100a0.tar.gz frameworks_av-0f61d8f14aa368c9cd7076528e8096e10ed100a0.tar.bz2 |
Refactor CameraService to handle errors properly.
Bug: 10361136
-Connect calls now return status_t error flags.
Change-Id: Idca453b111e5df31327f6c99ebe853bb2e332b95
Diffstat (limited to 'include/camera/ICameraService.h')
-rw-r--r-- | include/camera/ICameraService.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/include/camera/ICameraService.h b/include/camera/ICameraService.h index fa715b7..0e10699 100644 --- a/include/camera/ICameraService.h +++ b/include/camera/ICameraService.h @@ -71,21 +71,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) = 0; + int clientUid, + /*out*/ + sp<ICamera>& device) = 0; - virtual sp<IProCameraUser> connect(const sp<IProCameraCallbacks>& cameraCb, + 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<ICameraDeviceUser> connect( + virtual status_t connectDevice( const sp<ICameraDeviceCallbacks>& cameraCb, int cameraId, const String16& clientPackageName, - int clientUid) = 0; + int clientUid, + /*out*/ + sp<ICameraDeviceUser>& device) = 0; }; // ---------------------------------------------------------------------------- |