| // camera/mojo/cros_camera_service.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_CROS_CAMERA_SERVICE_MOJOM_TEST_UTILS_H_ |
| #define CAMERA_MOJO_CROS_CAMERA_SERVICE_MOJOM_TEST_UTILS_H_ |
| |
| #include "camera/mojo/cros_camera_service.mojom.h" |
| |
| |
| namespace cros::mojom { |
| |
| |
| class CameraHalDispatcherInterceptorForTesting : public CameraHalDispatcher { |
| virtual CameraHalDispatcher* GetForwardingInterface() = 0; |
| void RegisterClientWithToken(::mojo::PendingRemote<CameraHalClient> client, CameraClientType type, ::mojo_base::mojom::UnguessableTokenPtr auth_token, RegisterClientWithTokenCallback callback) override; |
| }; |
| class CameraHalDispatcherAsyncWaiter { |
| public: |
| explicit CameraHalDispatcherAsyncWaiter(CameraHalDispatcher* proxy); |
| |
| CameraHalDispatcherAsyncWaiter(const CameraHalDispatcherAsyncWaiter&) = delete; |
| CameraHalDispatcherAsyncWaiter& operator=(const CameraHalDispatcherAsyncWaiter&) = delete; |
| |
| ~CameraHalDispatcherAsyncWaiter(); |
| void RegisterClientWithToken( |
| ::mojo::PendingRemote<CameraHalClient> client, CameraClientType type, ::mojo_base::mojom::UnguessableTokenPtr auth_token, int32_t* out_result); |
| int32_t RegisterClientWithToken(::mojo::PendingRemote<CameraHalClient> client, CameraClientType type, ::mojo_base::mojom::UnguessableTokenPtr auth_token); |
| |
| private: |
| CameraHalDispatcher* const proxy_; |
| }; |
| |
| |
| class CameraHalClientInterceptorForTesting : public CameraHalClient { |
| virtual CameraHalClient* GetForwardingInterface() = 0; |
| void SetUpChannel(::mojo::PendingRemote<::cros::mojom::CameraModule> camera_module) override; |
| }; |
| class CameraHalClientAsyncWaiter { |
| public: |
| explicit CameraHalClientAsyncWaiter(CameraHalClient* proxy); |
| |
| CameraHalClientAsyncWaiter(const CameraHalClientAsyncWaiter&) = delete; |
| CameraHalClientAsyncWaiter& operator=(const CameraHalClientAsyncWaiter&) = delete; |
| |
| ~CameraHalClientAsyncWaiter(); |
| |
| private: |
| CameraHalClient* const proxy_; |
| }; |
| |
| |
| class CrosCameraServiceObserverInterceptorForTesting : public CrosCameraServiceObserver { |
| virtual CrosCameraServiceObserver* GetForwardingInterface() = 0; |
| void CameraDeviceActivityChange(int32_t camera_id, bool opened, CameraClientType type) override; |
| void CameraPrivacySwitchStateChange(CameraPrivacySwitchState state, int32_t camera_id) override; |
| void CameraSWPrivacySwitchStateChange(CameraPrivacySwitchState state) override; |
| void CameraEffectChange(::cros::mojom::EffectsConfigPtr config) override; |
| }; |
| class CrosCameraServiceObserverAsyncWaiter { |
| public: |
| explicit CrosCameraServiceObserverAsyncWaiter(CrosCameraServiceObserver* proxy); |
| |
| CrosCameraServiceObserverAsyncWaiter(const CrosCameraServiceObserverAsyncWaiter&) = delete; |
| CrosCameraServiceObserverAsyncWaiter& operator=(const CrosCameraServiceObserverAsyncWaiter&) = delete; |
| |
| ~CrosCameraServiceObserverAsyncWaiter(); |
| |
| private: |
| CrosCameraServiceObserver* const proxy_; |
| }; |
| |
| |
| class CrosCameraServiceInterceptorForTesting : public CrosCameraService { |
| virtual CrosCameraService* GetForwardingInterface() = 0; |
| void GetCameraModule(CameraClientType type, GetCameraModuleCallback callback) override; |
| void SetTracingEnabled(bool enabled) override; |
| void SetAutoFramingState(CameraAutoFramingState state) override; |
| void GetCameraSWPrivacySwitchState(GetCameraSWPrivacySwitchStateCallback callback) override; |
| void SetCameraSWPrivacySwitchState(CameraPrivacySwitchState state) override; |
| void GetAutoFramingSupported(GetAutoFramingSupportedCallback callback) override; |
| void SetCameraEffect(::cros::mojom::EffectsConfigPtr config, SetCameraEffectCallback callback) override; |
| void AddCrosCameraServiceObserver(::mojo::PendingRemote<CrosCameraServiceObserver> observer) override; |
| }; |
| class CrosCameraServiceAsyncWaiter { |
| public: |
| explicit CrosCameraServiceAsyncWaiter(CrosCameraService* proxy); |
| |
| CrosCameraServiceAsyncWaiter(const CrosCameraServiceAsyncWaiter&) = delete; |
| CrosCameraServiceAsyncWaiter& operator=(const CrosCameraServiceAsyncWaiter&) = delete; |
| |
| ~CrosCameraServiceAsyncWaiter(); |
| void GetCameraModule( |
| CameraClientType type, ::mojo::PendingRemote<::cros::mojom::CameraModule>* out_camera_module_receiver); |
| ::mojo::PendingRemote<::cros::mojom::CameraModule> GetCameraModule(CameraClientType type); |
| void GetCameraSWPrivacySwitchState( |
| CameraPrivacySwitchState* out_state); |
| CameraPrivacySwitchState GetCameraSWPrivacySwitchState(); |
| void GetAutoFramingSupported( |
| bool* out_supported); |
| bool GetAutoFramingSupported(); |
| void SetCameraEffect( |
| ::cros::mojom::EffectsConfigPtr config, SetEffectResult* out_result); |
| SetEffectResult SetCameraEffect(::cros::mojom::EffectsConfigPtr config); |
| |
| private: |
| CrosCameraService* const proxy_; |
| }; |
| |
| |
| |
| |
| } // cros::mojom |
| |
| #endif // CAMERA_MOJO_CROS_CAMERA_SERVICE_MOJOM_TEST_UTILS_H_ |