• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2013 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.hardware;
18 
19 import android.hardware.ICamera;
20 import android.hardware.ICameraClient;
21 import android.hardware.IProCameraUser;
22 import android.hardware.IProCameraCallbacks;
23 import android.hardware.camera2.ICameraDeviceUser;
24 import android.hardware.camera2.ICameraDeviceCallbacks;
25 import android.hardware.camera2.impl.CameraMetadataNative;
26 import android.hardware.camera2.utils.BinderHolder;
27 import android.hardware.ICameraServiceListener;
28 import android.hardware.CameraInfo;
29 
30 /** @hide */
31 interface ICameraService
32 {
33     /**
34      * Keep up-to-date with frameworks/av/include/camera/ICameraService.h
35      */
getNumberOfCameras()36     int getNumberOfCameras();
37 
38     // rest of 'int' return values in this file are actually status_t
39 
getCameraInfo(int cameraId, out CameraInfo info)40     int getCameraInfo(int cameraId, out CameraInfo info);
41 
connect(ICameraClient client, int cameraId, String clientPackageName, int clientUid, out BinderHolder device)42     int connect(ICameraClient client, int cameraId,
43                     String clientPackageName,
44                     int clientUid,
45                     // Container for an ICamera object
46                     out BinderHolder device);
47 
connectPro(IProCameraCallbacks callbacks, int cameraId, String clientPackageName, int clientUid, out BinderHolder device)48     int connectPro(IProCameraCallbacks callbacks, int cameraId,
49                               String clientPackageName,
50                               int clientUid,
51                               // Container for an IProCameraUser object
52                               out BinderHolder device);
53 
connectDevice(ICameraDeviceCallbacks callbacks, int cameraId, String clientPackageName, int clientUid, out BinderHolder device)54     int connectDevice(ICameraDeviceCallbacks callbacks, int cameraId,
55                               String clientPackageName,
56                               int clientUid,
57                               // Container for an ICameraDeviceUser object
58                               out BinderHolder device);
59 
addListener(ICameraServiceListener listener)60     int addListener(ICameraServiceListener listener);
removeListener(ICameraServiceListener listener)61     int removeListener(ICameraServiceListener listener);
62 
getCameraCharacteristics(int cameraId, out CameraMetadataNative info)63     int getCameraCharacteristics(int cameraId, out CameraMetadataNative info);
64 }
65