platform_hardware_interfaces/camera/provider/2.4/ICameraProviderCallback.hal
Zhijun He 8486e4179c Camera: HIDLized camera HALs, first set
* Common camera definitions (camera.common/1.0)
  * Basic status codes, shared types
* Provider 2.4 API (camera.provider/2.4), including vendor tag APIs
  * Enumerate and acquire camera device instances
  * Mostly equivalent to legacy camera module v2.4.
* Device 1.0 API (camera.device/1.0)
  * Mostly equivalent to legacy camera HAL v1.0.
* Device 3.2 API (camera.device/3.2)
  * Mostly equivalent to legacy camera HAL v3.2.
* Metadata 3.2 API (camera.metadata/3.2)
  * Definitions for valid metadata fields for device 3.2

Only the key initial interfaces are added; default implementations are
in a later CL. Other interfaces that will likely need to be added:

* Other provider minor versions
* Other device 3.x minor versions

Test: make -j32
Bug: 30985004
Bug: 32991603
Change-Id: I1c6a9a269bf45276055707bbc58cfc50d29fa919
2016-12-02 19:43:39 +00:00

68 lines
2.5 KiB
Text

/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.camera.provider@2.4;
import android.hardware.camera.common@1.0::types;
/**
* Callback functions for a camera provider HAL to use to inform the camera
* service of changes to the camera subsystem.
*/
interface ICameraProviderCallback {
/**
* cameraDeviceStatusChange:
*
* Callback to the camera service to indicate that the state of a specific
* camera device has changed.
*
* On camera service startup, when ICameraProvider::setCallback is invoked,
* the camera service must assume that all internal camera devices are in
* the CAMERA_DEVICE_STATUS_PRESENT state.
*
* The provider must call this method to inform the camera service of any
* initially NOT_PRESENT devices, and of any external camera devices that
* are already present, as soon as the callbacks are available through
* setCallback.
*
* @param cameraDeviceServiceName The name of the camera device that has a
* new status.
* @param newStatus The new status that device is in.
*
*/
cameraDeviceStatusChange(string cameraDeviceName,
CameraDeviceStatus newStatus);
/**
* torchModeStatusChange:
*
* Callback to the camera service to indicate that the state of the torch
* mode of the flash unit associated with a specific camera device has
* changed. At provider registration time, the camera service must assume
* the torch modes are in the TORCH_MODE_STATUS_AVAILABLE_OFF state if
* android.flash.info.available is reported as true via the
* ICameraDevice::getCameraCharacteristics call.
*
* @param cameraDeviceServiceName The name of the camera device that has a
* new status.
* @param newStatus The new status that device is in.
*
*/
torchModeStatusChange(string cameraDeviceName,
TorchModeStatus newStatus);
};