blob: f0201ef3f4d7ea10f8006f8f30d121384660ded5 [file] [log] [blame]
// media/capture/video/chromeos/mojom/camera_common.mojom-test-utils.h is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_CAPTURE_VIDEO_CHROMEOS_MOJOM_CAMERA_COMMON_MOJOM_TEST_UTILS_H_
#define MEDIA_CAPTURE_VIDEO_CHROMEOS_MOJOM_CAMERA_COMMON_MOJOM_TEST_UTILS_H_
#include "media/capture/video/chromeos/mojom/camera_common.mojom.h"
namespace cros::mojom {
class CameraModuleCallbacksInterceptorForTesting : public CameraModuleCallbacks {
virtual CameraModuleCallbacks* GetForwardingInterface() = 0;
void CameraDeviceStatusChange(int32_t camera_id, CameraDeviceStatus new_status) override;
void TorchModeStatusChange(int32_t camera_id, TorchModeStatus new_status) override;
};
class CameraModuleCallbacksAsyncWaiter {
public:
explicit CameraModuleCallbacksAsyncWaiter(CameraModuleCallbacks* proxy);
CameraModuleCallbacksAsyncWaiter(const CameraModuleCallbacksAsyncWaiter&) = delete;
CameraModuleCallbacksAsyncWaiter& operator=(const CameraModuleCallbacksAsyncWaiter&) = delete;
~CameraModuleCallbacksAsyncWaiter();
private:
CameraModuleCallbacks* const proxy_;
};
class VendorTagOpsInterceptorForTesting : public VendorTagOps {
virtual VendorTagOps* GetForwardingInterface() = 0;
void GetTagCount(GetTagCountCallback callback) override;
void GetAllTags(GetAllTagsCallback callback) override;
void GetSectionName(uint32_t tag, GetSectionNameCallback callback) override;
void GetTagName(uint32_t tag, GetTagNameCallback callback) override;
void GetTagType(uint32_t tag, GetTagTypeCallback callback) override;
};
class VendorTagOpsAsyncWaiter {
public:
explicit VendorTagOpsAsyncWaiter(VendorTagOps* proxy);
VendorTagOpsAsyncWaiter(const VendorTagOpsAsyncWaiter&) = delete;
VendorTagOpsAsyncWaiter& operator=(const VendorTagOpsAsyncWaiter&) = delete;
~VendorTagOpsAsyncWaiter();
void GetTagCount(
int32_t* out_result);
int32_t GetTagCount();
void GetAllTags(
std::vector<uint32_t>* out_tag_array);
std::vector<uint32_t> GetAllTags();
void GetSectionName(
uint32_t tag, std::optional<std::string>* out_name);
std::optional<std::string> GetSectionName(uint32_t tag);
void GetTagName(
uint32_t tag, std::optional<std::string>* out_name);
std::optional<std::string> GetTagName(uint32_t tag);
void GetTagType(
uint32_t tag, int32_t* out_type);
int32_t GetTagType(uint32_t tag);
private:
VendorTagOps* const proxy_;
};
class CameraModuleInterceptorForTesting : public CameraModule {
virtual CameraModule* GetForwardingInterface() = 0;
void OpenDevice(int32_t camera_id, ::mojo::PendingReceiver<::cros::mojom::Camera3DeviceOps> device_ops_receiver, OpenDeviceCallback callback) override;
void GetNumberOfCameras(GetNumberOfCamerasCallback callback) override;
void GetCameraInfo(int32_t camera_id, GetCameraInfoCallback callback) override;
void SetCallbacks(::mojo::PendingRemote<CameraModuleCallbacks> callbacks, SetCallbacksCallback callback) override;
void SetTorchMode(int32_t camera_id, bool enabled, SetTorchModeCallback callback) override;
void Init(InitCallback callback) override;
void GetVendorTagOps(::mojo::PendingReceiver<VendorTagOps> vendor_tag_ops_receiver, GetVendorTagOpsCallback callback) override;
void SetCallbacksAssociated(::mojo::PendingAssociatedRemote<CameraModuleCallbacks> callbacks, SetCallbacksAssociatedCallback callback) override;
};
class CameraModuleAsyncWaiter {
public:
explicit CameraModuleAsyncWaiter(CameraModule* proxy);
CameraModuleAsyncWaiter(const CameraModuleAsyncWaiter&) = delete;
CameraModuleAsyncWaiter& operator=(const CameraModuleAsyncWaiter&) = delete;
~CameraModuleAsyncWaiter();
void OpenDevice(
int32_t camera_id, ::mojo::PendingReceiver<::cros::mojom::Camera3DeviceOps> device_ops_receiver, int32_t* out_result);
int32_t OpenDevice(int32_t camera_id, ::mojo::PendingReceiver<::cros::mojom::Camera3DeviceOps> device_ops_receiver);
void GetNumberOfCameras(
int32_t* out_result);
int32_t GetNumberOfCameras();
void GetCameraInfo(
int32_t camera_id, int32_t* out_result, CameraInfoPtr* out_camera_info);
void SetCallbacks(
::mojo::PendingRemote<CameraModuleCallbacks> callbacks, int32_t* out_result);
int32_t SetCallbacks(::mojo::PendingRemote<CameraModuleCallbacks> callbacks);
void SetTorchMode(
int32_t camera_id, bool enabled, int32_t* out_result);
int32_t SetTorchMode(int32_t camera_id, bool enabled);
void Init(
int32_t* out_result);
int32_t Init();
void GetVendorTagOps(
::mojo::PendingReceiver<VendorTagOps> vendor_tag_ops_receiver);
void SetCallbacksAssociated(
::mojo::PendingAssociatedRemote<CameraModuleCallbacks> callbacks, int32_t* out_result);
int32_t SetCallbacksAssociated(::mojo::PendingAssociatedRemote<CameraModuleCallbacks> callbacks);
private:
CameraModule* const proxy_;
};
} // cros::mojom
#endif // MEDIA_CAPTURE_VIDEO_CHROMEOS_MOJOM_CAMERA_COMMON_MOJOM_TEST_UTILS_H_