Zhijun He | 8486e41 | 2016-09-12 15:30:51 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 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.camera.provider@2.4; |
| 18 | |
| 19 | import android.hardware.camera.common@1.0::types; |
| 20 | |
| 21 | /** |
| 22 | * Callback functions for a camera provider HAL to use to inform the camera |
| 23 | * service of changes to the camera subsystem. |
| 24 | */ |
| 25 | interface ICameraProviderCallback { |
| 26 | |
| 27 | /** |
| 28 | * cameraDeviceStatusChange: |
| 29 | * |
| 30 | * Callback to the camera service to indicate that the state of a specific |
| 31 | * camera device has changed. |
| 32 | * |
| 33 | * On camera service startup, when ICameraProvider::setCallback is invoked, |
| 34 | * the camera service must assume that all internal camera devices are in |
| 35 | * the CAMERA_DEVICE_STATUS_PRESENT state. |
| 36 | * |
| 37 | * The provider must call this method to inform the camera service of any |
| 38 | * initially NOT_PRESENT devices, and of any external camera devices that |
| 39 | * are already present, as soon as the callbacks are available through |
| 40 | * setCallback. |
| 41 | * |
| 42 | * @param cameraDeviceServiceName The name of the camera device that has a |
| 43 | * new status. |
| 44 | * @param newStatus The new status that device is in. |
| 45 | * |
| 46 | */ |
| 47 | cameraDeviceStatusChange(string cameraDeviceName, |
| 48 | CameraDeviceStatus newStatus); |
| 49 | |
| 50 | /** |
| 51 | * torchModeStatusChange: |
| 52 | * |
| 53 | * Callback to the camera service to indicate that the state of the torch |
| 54 | * mode of the flash unit associated with a specific camera device has |
| 55 | * changed. At provider registration time, the camera service must assume |
| 56 | * the torch modes are in the TORCH_MODE_STATUS_AVAILABLE_OFF state if |
| 57 | * android.flash.info.available is reported as true via the |
| 58 | * ICameraDevice::getCameraCharacteristics call. |
| 59 | * |
| 60 | * @param cameraDeviceServiceName The name of the camera device that has a |
| 61 | * new status. |
| 62 | * @param newStatus The new status that device is in. |
| 63 | * |
| 64 | */ |
| 65 | torchModeStatusChange(string cameraDeviceName, |
| 66 | TorchModeStatus newStatus); |
| 67 | |
| 68 | }; |