1*4d7e907cSAndroid Build Coastguard Worker/* 2*4d7e907cSAndroid Build Coastguard Worker * Copyright (C) 2016 The Android Open Source Project 3*4d7e907cSAndroid Build Coastguard Worker * 4*4d7e907cSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*4d7e907cSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*4d7e907cSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*4d7e907cSAndroid Build Coastguard Worker * 8*4d7e907cSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*4d7e907cSAndroid Build Coastguard Worker * 10*4d7e907cSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*4d7e907cSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*4d7e907cSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*4d7e907cSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*4d7e907cSAndroid Build Coastguard Worker * limitations under the License. 15*4d7e907cSAndroid Build Coastguard Worker */ 16*4d7e907cSAndroid Build Coastguard Worker 17*4d7e907cSAndroid Build Coastguard Workerpackage [email protected]; 18*4d7e907cSAndroid Build Coastguard Worker 19*4d7e907cSAndroid Build Coastguard Workerimport [email protected]::types; 20*4d7e907cSAndroid Build Coastguard Worker 21*4d7e907cSAndroid Build Coastguard Worker/** 22*4d7e907cSAndroid Build Coastguard Worker * Callback functions for a camera provider HAL to use to inform the camera 23*4d7e907cSAndroid Build Coastguard Worker * service of changes to the camera subsystem. 24*4d7e907cSAndroid Build Coastguard Worker */ 25*4d7e907cSAndroid Build Coastguard Workerinterface ICameraProviderCallback { 26*4d7e907cSAndroid Build Coastguard Worker 27*4d7e907cSAndroid Build Coastguard Worker /** 28*4d7e907cSAndroid Build Coastguard Worker * cameraDeviceStatusChange: 29*4d7e907cSAndroid Build Coastguard Worker * 30*4d7e907cSAndroid Build Coastguard Worker * Callback to the camera service to indicate that the state of a specific 31*4d7e907cSAndroid Build Coastguard Worker * camera device has changed. 32*4d7e907cSAndroid Build Coastguard Worker * 33*4d7e907cSAndroid Build Coastguard Worker * On camera service startup, when ICameraProvider::setCallback is invoked, 34*4d7e907cSAndroid Build Coastguard Worker * the camera service must assume that all internal camera devices are in 35*4d7e907cSAndroid Build Coastguard Worker * the CAMERA_DEVICE_STATUS_PRESENT state. 36*4d7e907cSAndroid Build Coastguard Worker * 37*4d7e907cSAndroid Build Coastguard Worker * The provider must call this method to inform the camera service of any 38*4d7e907cSAndroid Build Coastguard Worker * initially NOT_PRESENT devices, and of any external camera devices that 39*4d7e907cSAndroid Build Coastguard Worker * are already present, as soon as the callbacks are available through 40*4d7e907cSAndroid Build Coastguard Worker * setCallback. 41*4d7e907cSAndroid Build Coastguard Worker * 42*4d7e907cSAndroid Build Coastguard Worker * @param cameraDeviceName The name of the camera device that has a 43*4d7e907cSAndroid Build Coastguard Worker * new status. 44*4d7e907cSAndroid Build Coastguard Worker * @param newStatus The new status that device is in. 45*4d7e907cSAndroid Build Coastguard Worker * 46*4d7e907cSAndroid Build Coastguard Worker */ 47*4d7e907cSAndroid Build Coastguard Worker cameraDeviceStatusChange(string cameraDeviceName, 48*4d7e907cSAndroid Build Coastguard Worker CameraDeviceStatus newStatus); 49*4d7e907cSAndroid Build Coastguard Worker 50*4d7e907cSAndroid Build Coastguard Worker /** 51*4d7e907cSAndroid Build Coastguard Worker * torchModeStatusChange: 52*4d7e907cSAndroid Build Coastguard Worker * 53*4d7e907cSAndroid Build Coastguard Worker * Callback to the camera service to indicate that the state of the torch 54*4d7e907cSAndroid Build Coastguard Worker * mode of the flash unit associated with a specific camera device has 55*4d7e907cSAndroid Build Coastguard Worker * changed. At provider registration time, the camera service must assume 56*4d7e907cSAndroid Build Coastguard Worker * the torch modes are in the TORCH_MODE_STATUS_AVAILABLE_OFF state if 57*4d7e907cSAndroid Build Coastguard Worker * android.flash.info.available is reported as true via the 58*4d7e907cSAndroid Build Coastguard Worker * ICameraDevice::getCameraCharacteristics call. 59*4d7e907cSAndroid Build Coastguard Worker * 60*4d7e907cSAndroid Build Coastguard Worker * @param cameraDeviceName The name of the camera device that has a 61*4d7e907cSAndroid Build Coastguard Worker * new status. 62*4d7e907cSAndroid Build Coastguard Worker * @param newStatus The new status that device is in. 63*4d7e907cSAndroid Build Coastguard Worker * 64*4d7e907cSAndroid Build Coastguard Worker */ 65*4d7e907cSAndroid Build Coastguard Worker torchModeStatusChange(string cameraDeviceName, 66*4d7e907cSAndroid Build Coastguard Worker TorchModeStatus newStatus); 67*4d7e907cSAndroid Build Coastguard Worker 68*4d7e907cSAndroid Build Coastguard Worker}; 69