| // camera/mojo/camera3.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_CAMERA3_MOJOM_TEST_UTILS_H_ |
| #define CAMERA_MOJO_CAMERA3_MOJOM_TEST_UTILS_H_ |
| |
| #include "camera/mojo/camera3.mojom.h" |
| |
| |
| namespace cros::mojom { |
| |
| |
| class Camera3CallbackOpsInterceptorForTesting : public Camera3CallbackOps { |
| virtual Camera3CallbackOps* GetForwardingInterface() = 0; |
| void ProcessCaptureResult(Camera3CaptureResultPtr result) override; |
| void Notify(Camera3NotifyMsgPtr msg) override; |
| void RequestStreamBuffers(std::vector<Camera3BufferRequestPtr> buffer_reqs, RequestStreamBuffersCallback callback) override; |
| void ReturnStreamBuffers(std::vector<Camera3StreamBufferPtr> buffers) override; |
| }; |
| class Camera3CallbackOpsAsyncWaiter { |
| public: |
| explicit Camera3CallbackOpsAsyncWaiter(Camera3CallbackOps* proxy); |
| |
| Camera3CallbackOpsAsyncWaiter(const Camera3CallbackOpsAsyncWaiter&) = delete; |
| Camera3CallbackOpsAsyncWaiter& operator=(const Camera3CallbackOpsAsyncWaiter&) = delete; |
| |
| ~Camera3CallbackOpsAsyncWaiter(); |
| void RequestStreamBuffers( |
| std::vector<Camera3BufferRequestPtr> buffer_reqs, Camera3BufferRequestStatus* out_result, std::vector<Camera3StreamBufferRetPtr>* out_returned_buf_reqs); |
| |
| |
| private: |
| Camera3CallbackOps* const proxy_; |
| }; |
| |
| |
| class Camera3DeviceOpsInterceptorForTesting : public Camera3DeviceOps { |
| virtual Camera3DeviceOps* GetForwardingInterface() = 0; |
| void Initialize(::mojo::PendingRemote<Camera3CallbackOps> callback_ops, InitializeCallback callback) override; |
| void ConfigureStreams(Camera3StreamConfigurationPtr config, ConfigureStreamsCallback callback) override; |
| void ConstructDefaultRequestSettings(Camera3RequestTemplate type, ConstructDefaultRequestSettingsCallback callback) override; |
| void ProcessCaptureRequest(Camera3CaptureRequestPtr request, ProcessCaptureRequestCallback callback) override; |
| void Dump(::mojo::ScopedHandle fd) override; |
| void Flush(FlushCallback callback) override; |
| void RegisterBuffer(uint64_t buffer_id, Camera3DeviceOps::BufferType type, std::vector<::mojo::ScopedHandle> fds, uint32_t drm_format, HalPixelFormat hal_pixel_format, uint32_t width, uint32_t height, const std::vector<uint32_t>& strides, const std::vector<uint32_t>& offsets, RegisterBufferCallback callback) override; |
| void Close(CloseCallback callback) override; |
| void ConfigureStreamsAndGetAllocatedBuffers(Camera3StreamConfigurationPtr config, ConfigureStreamsAndGetAllocatedBuffersCallback callback) override; |
| void SignalStreamFlush(const std::vector<uint64_t>& stream_ids) override; |
| void OnNewBuffer(CameraBufferHandlePtr buffer, OnNewBufferCallback callback) override; |
| void OnBufferRetired(uint64_t buffer_id) override; |
| }; |
| class Camera3DeviceOpsAsyncWaiter { |
| public: |
| explicit Camera3DeviceOpsAsyncWaiter(Camera3DeviceOps* proxy); |
| |
| Camera3DeviceOpsAsyncWaiter(const Camera3DeviceOpsAsyncWaiter&) = delete; |
| Camera3DeviceOpsAsyncWaiter& operator=(const Camera3DeviceOpsAsyncWaiter&) = delete; |
| |
| ~Camera3DeviceOpsAsyncWaiter(); |
| void Initialize( |
| ::mojo::PendingRemote<Camera3CallbackOps> callback_ops, int32_t* out_result); |
| int32_t Initialize(::mojo::PendingRemote<Camera3CallbackOps> callback_ops); |
| void ConfigureStreams( |
| Camera3StreamConfigurationPtr config, int32_t* out_result, Camera3StreamConfigurationPtr* out_updated_config); |
| |
| void ConstructDefaultRequestSettings( |
| Camera3RequestTemplate type, ::cros::mojom::CameraMetadataPtr* out_settings); |
| ::cros::mojom::CameraMetadataPtr ConstructDefaultRequestSettings(Camera3RequestTemplate type); |
| void ProcessCaptureRequest( |
| Camera3CaptureRequestPtr request, int32_t* out_result); |
| int32_t ProcessCaptureRequest(Camera3CaptureRequestPtr request); |
| void Flush( |
| int32_t* out_result); |
| int32_t Flush(); |
| void RegisterBuffer( |
| uint64_t buffer_id, Camera3DeviceOps::BufferType type, std::vector<::mojo::ScopedHandle> fds, uint32_t drm_format, HalPixelFormat hal_pixel_format, uint32_t width, uint32_t height, const std::vector<uint32_t>& strides, const std::vector<uint32_t>& offsets, int32_t* out_result); |
| int32_t RegisterBuffer(uint64_t buffer_id, Camera3DeviceOps::BufferType type, std::vector<::mojo::ScopedHandle> fds, uint32_t drm_format, HalPixelFormat hal_pixel_format, uint32_t width, uint32_t height, const std::vector<uint32_t>& strides, const std::vector<uint32_t>& offsets); |
| void Close( |
| int32_t* out_result); |
| int32_t Close(); |
| void ConfigureStreamsAndGetAllocatedBuffers( |
| Camera3StreamConfigurationPtr config, int32_t* out_result, Camera3StreamConfigurationPtr* out_updated_config, base::flat_map<uint64_t, std::vector<Camera3StreamBufferPtr>>* out_allocated_buffers); |
| |
| void OnNewBuffer( |
| CameraBufferHandlePtr buffer, int32_t* out_result); |
| int32_t OnNewBuffer(CameraBufferHandlePtr buffer); |
| |
| private: |
| Camera3DeviceOps* const proxy_; |
| }; |
| |
| |
| |
| |
| } // cros::mojom |
| |
| #endif // CAMERA_MOJO_CAMERA3_MOJOM_TEST_UTILS_H_ |