blob: 24ae6d2d8546423afd4e3319ee66ad888c3edbbb [file] [log] [blame]
// camera/mojo/algorithm/camera_algorithm.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 CAMERA_MOJO_ALGORITHM_CAMERA_ALGORITHM_MOJOM_TEST_UTILS_H_
#define CAMERA_MOJO_ALGORITHM_CAMERA_ALGORITHM_MOJOM_TEST_UTILS_H_
#include "camera/mojo/algorithm/camera_algorithm.mojom.h"
namespace cros::mojom {
class CameraAlgorithmOpsInterceptorForTesting : public CameraAlgorithmOps {
virtual CameraAlgorithmOps* GetForwardingInterface() = 0;
void Initialize(::mojo::PendingRemote<CameraAlgorithmCallbackOps> callbacks, InitializeCallback callback) override;
void RegisterBuffer(::mojo::ScopedHandle buffer_fd, RegisterBufferCallback callback) override;
void Request(uint32_t req_id, const std::vector<uint8_t>& req_header, int32_t buffer_handle) override;
void DeregisterBuffers(const std::vector<int32_t>& buffer_handles) override;
void UpdateReturn(uint32_t upd_id, uint32_t status, ::mojo::ScopedHandle buffer_fd) override;
void Deinitialize() override;
};
class CameraAlgorithmOpsAsyncWaiter {
public:
explicit CameraAlgorithmOpsAsyncWaiter(CameraAlgorithmOps* proxy);
CameraAlgorithmOpsAsyncWaiter(const CameraAlgorithmOpsAsyncWaiter&) = delete;
CameraAlgorithmOpsAsyncWaiter& operator=(const CameraAlgorithmOpsAsyncWaiter&) = delete;
~CameraAlgorithmOpsAsyncWaiter();
void Initialize(
::mojo::PendingRemote<CameraAlgorithmCallbackOps> callbacks, int32_t* out_result);
int32_t Initialize(::mojo::PendingRemote<CameraAlgorithmCallbackOps> callbacks);
void RegisterBuffer(
::mojo::ScopedHandle buffer_fd, int32_t* out_result);
int32_t RegisterBuffer(::mojo::ScopedHandle buffer_fd);
private:
CameraAlgorithmOps* const proxy_;
};
class CameraAlgorithmCallbackOpsInterceptorForTesting : public CameraAlgorithmCallbackOps {
virtual CameraAlgorithmCallbackOps* GetForwardingInterface() = 0;
void Return(uint32_t req_id, uint32_t status, int32_t buffer_handle) override;
void Update(uint32_t upd_id, const std::vector<uint8_t>& upd_header, ::mojo::ScopedHandle buffer_fd) override;
};
class CameraAlgorithmCallbackOpsAsyncWaiter {
public:
explicit CameraAlgorithmCallbackOpsAsyncWaiter(CameraAlgorithmCallbackOps* proxy);
CameraAlgorithmCallbackOpsAsyncWaiter(const CameraAlgorithmCallbackOpsAsyncWaiter&) = delete;
CameraAlgorithmCallbackOpsAsyncWaiter& operator=(const CameraAlgorithmCallbackOpsAsyncWaiter&) = delete;
~CameraAlgorithmCallbackOpsAsyncWaiter();
private:
CameraAlgorithmCallbackOps* const proxy_;
};
} // cros::mojom
#endif // CAMERA_MOJO_ALGORITHM_CAMERA_ALGORITHM_MOJOM_TEST_UTILS_H_