35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
#ifndef CAMERA_HAL_ICAMERA_DEVICE_H
|
|
#define CAMERA_HAL_ICAMERA_DEVICE_H
|
|
|
|
#include "types.h"
|
|
#include <cstdint>
|
|
|
|
namespace camera_hal {
|
|
|
|
// ICameraDevice AIDL v4 interface
|
|
// Mirrors: hardware/interfaces/camera/device/aidl/android/hardware/camera/device/ICameraDevice.aidl
|
|
class ICameraDevice {
|
|
public:
|
|
virtual ~ICameraDevice() = default;
|
|
|
|
virtual int32_t open(void* callback) = 0;
|
|
virtual int32_t openInjectionSession(void* callback) = 0;
|
|
virtual int32_t setTorchMode(bool enabled) = 0;
|
|
virtual int32_t dumpState(int32_t fd) = 0;
|
|
virtual int32_t getCameraCharacteristics(void* characteristics) = 0;
|
|
virtual int32_t getPhysicalCameraCharacteristics(
|
|
const char* physical_camera_id,
|
|
void* characteristics) = 0;
|
|
virtual int32_t close() = 0;
|
|
};
|
|
|
|
// Function pointer types for dlsym
|
|
typedef int32_t (*ICameraDevice_open_t)(void* self, void* callback);
|
|
typedef int32_t (*ICameraDevice_close_t)(void* self);
|
|
typedef int32_t (*ICameraDevice_getCameraCharacteristics_t)(
|
|
void* self, void* characteristics);
|
|
|
|
} // namespace camera_hal
|
|
|
|
#endif // CAMERA_HAL_ICAMERA_DEVICE_H
|