#ifndef CAMERA_HAL_ICAMERA_PROVIDER_H
#define CAMERA_HAL_ICAMERA_PROVIDER_H

#include "types.h"
#include <cstdint>

namespace camera_hal {

// ICameraProvider AIDL v3 interface
// Mirrors: hardware/interfaces/camera/provider/aidl/android/hardware/camera/provider/ICameraProvider.aidl
class ICameraProvider {
public:
    virtual ~ICameraProvider() = default;

    virtual int32_t setCallback(void* callback) = 0;
    virtual int32_t getCameraIdList(char*** camera_ids, int32_t* count) = 0;
    virtual int32_t getCameraDeviceInterface(
        const char* camera_id,
        void** out_device) = 0;
    virtual int32_t notifyDeviceStateChange(int64_t device_state) = 0;
    virtual int32_t getConcurrentStreamingCameraIds(
        char*** camera_ids, int32_t* count) = 0;
    virtual int32_t openSession(
        const char* camera_id,
        void* callback,
        void** out_session) = 0;
    virtual int32_t getVendorTags(void* tags) = 0;
    virtual int32_t getCameraCharacteristics(
        const char* camera_id,
        void* characteristics) = 0;
};

typedef int32_t (*ICameraProvider_getCameraIdList_t)(
    void* self, char*** camera_ids, int32_t* count);
typedef int32_t (*ICameraProvider_getCameraDeviceInterface_t)(
    void* self, const char* camera_id, void** out_device);
typedef int32_t (*ICameraProvider_openSession_t)(
    void* self, const char* camera_id, void* callback, void** out_session);

} // namespace camera_hal

#endif // CAMERA_HAL_ICAMERA_PROVIDER_H
