ICameraService.aidl revision fbf0ecabac5d7a929628b43ffe8f4f953e47bd54
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 17package android.hardware; 18 19import android.hardware.ICamera; 20import android.hardware.ICameraClient; 21import android.hardware.camera2.ICameraDeviceUser; 22import android.hardware.camera2.ICameraDeviceCallbacks; 23import android.hardware.camera2.impl.CameraMetadataNative; 24import android.hardware.camera2.utils.BinderHolder; 25import android.hardware.ICameraServiceListener; 26import android.hardware.CameraInfo; 27 28/** @hide */ 29interface ICameraService 30{ 31 /** 32 * Keep up-to-date with frameworks/av/include/camera/ICameraService.h 33 */ 34 int getNumberOfCameras(); 35 36 // rest of 'int' return values in this file are actually status_t 37 38 int getCameraInfo(int cameraId, out CameraInfo info); 39 40 int connect(ICameraClient client, int cameraId, 41 String opPackageName, 42 int clientUid, 43 // Container for an ICamera object 44 out BinderHolder device); 45 46 int connectDevice(ICameraDeviceCallbacks callbacks, int cameraId, 47 String opPackageName, 48 int clientUid, 49 // Container for an ICameraDeviceUser object 50 out BinderHolder device); 51 52 int addListener(ICameraServiceListener listener); 53 int removeListener(ICameraServiceListener listener); 54 55 int getCameraCharacteristics(int cameraId, out CameraMetadataNative info); 56 57 /** 58 * The java stubs for this method are not intended to be used. Please use 59 * the native stub in frameworks/av/include/camera/ICameraService.h instead. 60 * The BinderHolder output is being used as a placeholder, and will not be 61 * well-formatted in the generated java method. 62 */ 63 int getCameraVendorTagDescriptor(out BinderHolder desc); 64 65 // Writes the camera1 parameters into a single-element array. 66 int getLegacyParameters(int cameraId, out String[] parameters); 67 // Determines if a particular API version is supported; see ICameraService.h for version defines 68 int supportsCameraApi(int cameraId, int apiVersion); 69 70 int connectLegacy(ICameraClient client, int cameraId, 71 int halVersion, 72 String opPackageName, 73 int clientUid, 74 // Container for an ICamera object 75 out BinderHolder device); 76 77 int setTorchMode(String CameraId, boolean enabled, IBinder clientBinder); 78 79 /** 80 * Notify the camera service of a system event. Should only be called from system_server. 81 * 82 * Callers require the android.permission.CAMERA_SEND_SYSTEM_EVENTS permission. 83 */ 84 oneway void notifySystemEvent(int eventId, int arg0); 85} 86