| // services/audio/public/mojom/debug_recording.mojom-params-data.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 SERVICES_AUDIO_PUBLIC_MOJOM_DEBUG_RECORDING_MOJOM_PARAMS_DATA_H_ |
| #define SERVICES_AUDIO_PUBLIC_MOJOM_DEBUG_RECORDING_MOJOM_PARAMS_DATA_H_ |
| |
| #include "mojo/public/cpp/bindings/lib/bindings_internal.h" |
| #include "mojo/public/cpp/bindings/lib/buffer.h" |
| |
| #if defined(__clang__) |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wunused-private-field" |
| #endif |
| |
| namespace mojo::internal { |
| class ValidationContext; |
| } |
| |
| |
| namespace audio::mojom { |
| namespace internal { |
| class DebugRecordingFileProvider_CreateWavFile_Params_Data { |
| public: |
| static bool Validate(const void* data, |
| mojo::internal::ValidationContext* validation_context); |
| |
| mojo::internal::StructHeader header_; |
| int32_t stream_type; |
| uint32_t id; |
| |
| private: |
| friend class mojo::internal::MessageFragment<DebugRecordingFileProvider_CreateWavFile_Params_Data>; |
| |
| DebugRecordingFileProvider_CreateWavFile_Params_Data(); |
| ~DebugRecordingFileProvider_CreateWavFile_Params_Data() = delete; |
| }; |
| static_assert(sizeof(DebugRecordingFileProvider_CreateWavFile_Params_Data) == 16, |
| "Bad sizeof(DebugRecordingFileProvider_CreateWavFile_Params_Data)"); |
| class DebugRecordingFileProvider_CreateWavFile_ResponseParams_Data { |
| public: |
| static bool Validate(const void* data, |
| mojo::internal::ValidationContext* validation_context); |
| |
| mojo::internal::StructHeader header_; |
| mojo::internal::Pointer<::mojo_base::mojom::internal::File_Data> file; |
| |
| private: |
| friend class mojo::internal::MessageFragment<DebugRecordingFileProvider_CreateWavFile_ResponseParams_Data>; |
| |
| DebugRecordingFileProvider_CreateWavFile_ResponseParams_Data(); |
| ~DebugRecordingFileProvider_CreateWavFile_ResponseParams_Data() = delete; |
| }; |
| static_assert(sizeof(DebugRecordingFileProvider_CreateWavFile_ResponseParams_Data) == 16, |
| "Bad sizeof(DebugRecordingFileProvider_CreateWavFile_ResponseParams_Data)"); |
| class DebugRecordingFileProvider_CreateAecdumpFile_Params_Data { |
| public: |
| static bool Validate(const void* data, |
| mojo::internal::ValidationContext* validation_context); |
| |
| mojo::internal::StructHeader header_; |
| uint32_t id; |
| uint8_t padfinal_[4]; |
| |
| private: |
| friend class mojo::internal::MessageFragment<DebugRecordingFileProvider_CreateAecdumpFile_Params_Data>; |
| |
| DebugRecordingFileProvider_CreateAecdumpFile_Params_Data(); |
| ~DebugRecordingFileProvider_CreateAecdumpFile_Params_Data() = delete; |
| }; |
| static_assert(sizeof(DebugRecordingFileProvider_CreateAecdumpFile_Params_Data) == 16, |
| "Bad sizeof(DebugRecordingFileProvider_CreateAecdumpFile_Params_Data)"); |
| class DebugRecordingFileProvider_CreateAecdumpFile_ResponseParams_Data { |
| public: |
| static bool Validate(const void* data, |
| mojo::internal::ValidationContext* validation_context); |
| |
| mojo::internal::StructHeader header_; |
| mojo::internal::Pointer<::mojo_base::mojom::internal::File_Data> file; |
| |
| private: |
| friend class mojo::internal::MessageFragment<DebugRecordingFileProvider_CreateAecdumpFile_ResponseParams_Data>; |
| |
| DebugRecordingFileProvider_CreateAecdumpFile_ResponseParams_Data(); |
| ~DebugRecordingFileProvider_CreateAecdumpFile_ResponseParams_Data() = delete; |
| }; |
| static_assert(sizeof(DebugRecordingFileProvider_CreateAecdumpFile_ResponseParams_Data) == 16, |
| "Bad sizeof(DebugRecordingFileProvider_CreateAecdumpFile_ResponseParams_Data)"); |
| class DebugRecording_Enable_Params_Data { |
| public: |
| static bool Validate(const void* data, |
| mojo::internal::ValidationContext* validation_context); |
| |
| mojo::internal::StructHeader header_; |
| mojo::internal::Interface_Data file_provider; |
| |
| private: |
| friend class mojo::internal::MessageFragment<DebugRecording_Enable_Params_Data>; |
| |
| DebugRecording_Enable_Params_Data(); |
| ~DebugRecording_Enable_Params_Data() = delete; |
| }; |
| static_assert(sizeof(DebugRecording_Enable_Params_Data) == 16, |
| "Bad sizeof(DebugRecording_Enable_Params_Data)"); |
| |
| } // namespace internal |
| |
| |
| class DebugRecordingFileProvider_CreateWavFile_ParamsDataView { |
| public: |
| DebugRecordingFileProvider_CreateWavFile_ParamsDataView() = default; |
| |
| DebugRecordingFileProvider_CreateWavFile_ParamsDataView( |
| internal::DebugRecordingFileProvider_CreateWavFile_Params_Data* data, |
| mojo::Message* message) |
| : data_(data) {} |
| |
| bool is_null() const { return !data_; } |
| template <typename UserType> |
| [[nodiscard]] bool ReadStreamType(UserType* output) const { |
| auto data_value = data_->stream_type; |
| return mojo::internal::Deserialize<::audio::mojom::DebugRecordingStreamType>( |
| data_value, output); |
| } |
| DebugRecordingStreamType stream_type() const { |
| return ::mojo::internal::ToKnownEnumValueHelper( |
| static_cast<::audio::mojom::DebugRecordingStreamType>(data_->stream_type)); |
| } |
| uint32_t id() const { |
| return data_->id; |
| } |
| private: |
| internal::DebugRecordingFileProvider_CreateWavFile_Params_Data* data_ = nullptr; |
| }; |
| |
| |
| class DebugRecordingFileProvider_CreateWavFile_ResponseParamsDataView { |
| public: |
| DebugRecordingFileProvider_CreateWavFile_ResponseParamsDataView() = default; |
| |
| DebugRecordingFileProvider_CreateWavFile_ResponseParamsDataView( |
| internal::DebugRecordingFileProvider_CreateWavFile_ResponseParams_Data* data, |
| mojo::Message* message) |
| : data_(data), message_(message) {} |
| |
| bool is_null() const { return !data_; } |
| inline void GetFileDataView( |
| ::mojo_base::mojom::FileDataView* output); |
| |
| template <typename UserType> |
| [[nodiscard]] bool ReadFile(UserType* output) { |
| |
| static_assert( |
| mojo::internal::IsValidUserTypeForOptionalValue< |
| ::mojo_base::mojom::FileDataView, UserType>(), |
| "Attempting to read the optional `file` field into a type which " |
| "cannot represent a null value. Either wrap the destination object " |
| "with std::optional, ensure that any corresponding " |
| "{Struct/Union/Array/String}Traits define the necessary IsNull and " |
| "SetToNull methods, or use `MaybeReadFile` instead " |
| "of `ReadFile if you're fine with null values being " |
| "silently ignored in this case."); |
| auto* pointer = data_->file.Get(); |
| return mojo::internal::Deserialize<::mojo_base::mojom::FileDataView>( |
| pointer, output, message_); |
| } |
| private: |
| internal::DebugRecordingFileProvider_CreateWavFile_ResponseParams_Data* data_ = nullptr; |
| mojo::Message* message_ = nullptr; |
| }; |
| |
| |
| class DebugRecordingFileProvider_CreateAecdumpFile_ParamsDataView { |
| public: |
| DebugRecordingFileProvider_CreateAecdumpFile_ParamsDataView() = default; |
| |
| DebugRecordingFileProvider_CreateAecdumpFile_ParamsDataView( |
| internal::DebugRecordingFileProvider_CreateAecdumpFile_Params_Data* data, |
| mojo::Message* message) |
| : data_(data) {} |
| |
| bool is_null() const { return !data_; } |
| uint32_t id() const { |
| return data_->id; |
| } |
| private: |
| internal::DebugRecordingFileProvider_CreateAecdumpFile_Params_Data* data_ = nullptr; |
| }; |
| |
| |
| class DebugRecordingFileProvider_CreateAecdumpFile_ResponseParamsDataView { |
| public: |
| DebugRecordingFileProvider_CreateAecdumpFile_ResponseParamsDataView() = default; |
| |
| DebugRecordingFileProvider_CreateAecdumpFile_ResponseParamsDataView( |
| internal::DebugRecordingFileProvider_CreateAecdumpFile_ResponseParams_Data* data, |
| mojo::Message* message) |
| : data_(data), message_(message) {} |
| |
| bool is_null() const { return !data_; } |
| inline void GetFileDataView( |
| ::mojo_base::mojom::FileDataView* output); |
| |
| template <typename UserType> |
| [[nodiscard]] bool ReadFile(UserType* output) { |
| |
| static_assert( |
| mojo::internal::IsValidUserTypeForOptionalValue< |
| ::mojo_base::mojom::FileDataView, UserType>(), |
| "Attempting to read the optional `file` field into a type which " |
| "cannot represent a null value. Either wrap the destination object " |
| "with std::optional, ensure that any corresponding " |
| "{Struct/Union/Array/String}Traits define the necessary IsNull and " |
| "SetToNull methods, or use `MaybeReadFile` instead " |
| "of `ReadFile if you're fine with null values being " |
| "silently ignored in this case."); |
| auto* pointer = data_->file.Get(); |
| return mojo::internal::Deserialize<::mojo_base::mojom::FileDataView>( |
| pointer, output, message_); |
| } |
| private: |
| internal::DebugRecordingFileProvider_CreateAecdumpFile_ResponseParams_Data* data_ = nullptr; |
| mojo::Message* message_ = nullptr; |
| }; |
| |
| |
| class DebugRecording_Enable_ParamsDataView { |
| public: |
| DebugRecording_Enable_ParamsDataView() = default; |
| |
| DebugRecording_Enable_ParamsDataView( |
| internal::DebugRecording_Enable_Params_Data* data, |
| mojo::Message* message) |
| : data_(data), message_(message) {} |
| |
| bool is_null() const { return !data_; } |
| template <typename UserType> |
| UserType TakeFileProvider() { |
| UserType result; |
| bool ret = |
| mojo::internal::Deserialize<mojo::InterfacePtrDataView<::audio::mojom::DebugRecordingFileProviderInterfaceBase>>( |
| &data_->file_provider, &result, message_); |
| DCHECK(ret); |
| return result; |
| } |
| private: |
| internal::DebugRecording_Enable_Params_Data* data_ = nullptr; |
| mojo::Message* message_ = nullptr; |
| }; |
| |
| |
| |
| inline void DebugRecordingFileProvider_CreateWavFile_ResponseParamsDataView::GetFileDataView( |
| ::mojo_base::mojom::FileDataView* output) { |
| auto pointer = data_->file.Get(); |
| *output = ::mojo_base::mojom::FileDataView(pointer, message_); |
| } |
| |
| |
| |
| |
| inline void DebugRecordingFileProvider_CreateAecdumpFile_ResponseParamsDataView::GetFileDataView( |
| ::mojo_base::mojom::FileDataView* output) { |
| auto pointer = data_->file.Get(); |
| *output = ::mojo_base::mojom::FileDataView(pointer, message_); |
| } |
| |
| |
| |
| |
| |
| } // audio::mojom |
| |
| #if defined(__clang__) |
| #pragma clang diagnostic pop |
| #endif |
| |
| #endif // SERVICES_AUDIO_PUBLIC_MOJOM_DEBUG_RECORDING_MOJOM_PARAMS_DATA_H_ |