aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor')
-rw-r--r--vendor/generic/anti_tamper/Android.bp3
-rw-r--r--vendor/generic/broker_ipc/Android.bp3
-rw-r--r--vendor/generic/crash_report/Android.bp3
-rw-r--r--vendor/generic/crypto/Android.bp3
-rw-r--r--vendor/generic/metrics/Android.bp7
-rw-r--r--vendor/generic/metrics/Cargo.toml10
-rw-r--r--vendor/generic/metrics/build.rs33
-rw-r--r--vendor/generic/metrics/protos/event_details.proto105
-rw-r--r--vendor/generic/metrics/src/client.rs14
-rw-r--r--vendor/generic/metrics/src/event_types.rs110
-rw-r--r--vendor/generic/metrics/src/lib.rs10
-rw-r--r--vendor/generic/metrics/src/metrics_requests.rs49
-rw-r--r--vendor/generic/metrics/src/out/event_details.rs1408
-rw-r--r--vendor/generic/metrics/src/out/generated.rs2
-rw-r--r--vendor/generic/metrics/src/out/mod.rs3
-rw-r--r--vendor/generic/metrics/src/periodic_logger.rs2
-rw-r--r--vendor/generic/metrics/src/request_handler.rs6
-rw-r--r--vendor/generic/metrics/src/sys.rs9
-rw-r--r--vendor/generic/metrics/src/sys/windows.rs24
-rw-r--r--vendor/generic/metrics_events/Android.bp20
-rw-r--r--vendor/generic/metrics_events/Cargo.toml8
-rw-r--r--vendor/generic/metrics_events/src/lib.rs18
-rw-r--r--vendor/generic/vm_control/Android.bp3
23 files changed, 75 insertions, 1778 deletions
diff --git a/vendor/generic/anti_tamper/Android.bp b/vendor/generic/anti_tamper/Android.bp
index 9065f3a59..b13eaa112 100644
--- a/vendor/generic/anti_tamper/Android.bp
+++ b/vendor/generic/anti_tamper/Android.bp
@@ -1,5 +1,6 @@
// This file is generated by cargo_embargo.
-// Do not modify this file as most changes will be overridden on upgrade.
+// Do not modify this file after the first "rust_*" or "genrule" module
+// because the changes will be overridden on upgrade.
// Content before the first "rust_*" or "genrule" module is preserved.
package {
diff --git a/vendor/generic/broker_ipc/Android.bp b/vendor/generic/broker_ipc/Android.bp
index 13fce8054..bec0cebbc 100644
--- a/vendor/generic/broker_ipc/Android.bp
+++ b/vendor/generic/broker_ipc/Android.bp
@@ -1,5 +1,6 @@
// This file is generated by cargo_embargo.
-// Do not modify this file as most changes will be overridden on upgrade.
+// Do not modify this file after the first "rust_*" or "genrule" module
+// because the changes will be overridden on upgrade.
// Content before the first "rust_*" or "genrule" module is preserved.
package {
diff --git a/vendor/generic/crash_report/Android.bp b/vendor/generic/crash_report/Android.bp
index 00a636f91..23becbc8d 100644
--- a/vendor/generic/crash_report/Android.bp
+++ b/vendor/generic/crash_report/Android.bp
@@ -1,5 +1,6 @@
// This file is generated by cargo_embargo.
-// Do not modify this file as most changes will be overridden on upgrade.
+// Do not modify this file after the first "rust_*" or "genrule" module
+// because the changes will be overridden on upgrade.
// Content before the first "rust_*" or "genrule" module is preserved.
package {
diff --git a/vendor/generic/crypto/Android.bp b/vendor/generic/crypto/Android.bp
index 05b69120a..15db0799a 100644
--- a/vendor/generic/crypto/Android.bp
+++ b/vendor/generic/crypto/Android.bp
@@ -1,5 +1,6 @@
// This file is generated by cargo_embargo.
-// Do not modify this file as most changes will be overridden on upgrade.
+// Do not modify this file after the first "rust_*" or "genrule" module
+// because the changes will be overridden on upgrade.
// Content before the first "rust_*" or "genrule" module is preserved.
package {
diff --git a/vendor/generic/metrics/Android.bp b/vendor/generic/metrics/Android.bp
index e208771ed..42a670288 100644
--- a/vendor/generic/metrics/Android.bp
+++ b/vendor/generic/metrics/Android.bp
@@ -1,5 +1,6 @@
// This file is generated by cargo_embargo.
-// Do not modify this file as most changes will be overridden on upgrade.
+// Do not modify this file after the first "rust_*" or "genrule" module
+// because the changes will be overridden on upgrade.
// Content before the first "rust_*" or "genrule" module is preserved.
package {
@@ -24,8 +25,6 @@ rust_library {
rustlibs: [
"libanyhow",
"libbase_rust",
- "libcfg_if",
- "libprotobuf",
- "libserde",
+ "libmetrics_events",
],
}
diff --git a/vendor/generic/metrics/Cargo.toml b/vendor/generic/metrics/Cargo.toml
index b7dd68dc9..b5f57f8b5 100644
--- a/vendor/generic/metrics/Cargo.toml
+++ b/vendor/generic/metrics/Cargo.toml
@@ -12,12 +12,4 @@ collect = []
[dependencies]
anyhow = "*"
base = { path = "../../../base" }
-cfg-if = "*"
-protobuf = "3.2"
-serde = { version = "1", features = ["derive"] }
-
-[target.'cfg(windows)'.dependencies]
-win_util = { path = "../../../win_util" }
-
-[build-dependencies]
-proto_build_tools = { path = "../../../proto_build_tools" }
+metrics_events = { path = "../../../metrics_events" }
diff --git a/vendor/generic/metrics/build.rs b/vendor/generic/metrics/build.rs
deleted file mode 100644
index bf1fe6179..000000000
--- a/vendor/generic/metrics/build.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2022 The ChromiumOS Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-use std::env;
-use std::path::PathBuf;
-
-fn main() {
- let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
-
- #[cfg(debug_assertions)]
- println!(
- "cargo:rustc-link-search={}\\..\\..\\..\\libs\\debug\\",
- manifest_dir
- );
- #[cfg(not(debug_assertions))]
- println!(
- "cargo:rustc-link-search={}\\..\\..\\..\\libs\\release\\",
- manifest_dir
- );
-
- build_protos(&PathBuf::from(manifest_dir));
-}
-
-fn build_protos(manifest_dir: &PathBuf) {
- let mut event_details_path = manifest_dir.to_owned();
- event_details_path.extend(["protos", "event_details.proto"]);
-
- let mut out_dir = PathBuf::from(env::var("OUT_DIR").expect("OUT_DIR env does not exist."));
- // ANDROID: b/259142784 - we remove metrics_out subdir b/c cargo2android
- // out_dir.push("metrics_protos");
- proto_build_tools::build_protos(&out_dir, &[event_details_path]);
-}
diff --git a/vendor/generic/metrics/protos/event_details.proto b/vendor/generic/metrics/protos/event_details.proto
deleted file mode 100644
index 60e46f4e9..000000000
--- a/vendor/generic/metrics/protos/event_details.proto
+++ /dev/null
@@ -1,105 +0,0 @@
-// Provides data structures for additional details for metrics events.
-syntax = "proto2";
-
-message RecordDetails {
- reserved 1 to 11, 14 to 18;
- // Additional details about an unexpected exit of a child process within
- // the emulator.
- optional EmulatorChildProcessExitDetails emulator_child_process_exit_details =
- 12;
- // Additional details about wave formats from the Window's host system.
- optional WaveFormatDetails wave_format_details = 13;
- optional EmulatorDllDetails emulator_dll_details = 19;
-}
-
-message WaveFormatDetails {
- // Format requested by WASAPI `GetMixFormat` system call.
- optional WaveFormat requested = 1;
- // Originally the requested wave format that's modified by the emulator. Only
- // populated if the emulator decides the requested wave format should not be
- // used.
- optional WaveFormat modified = 2;
- // Format that is valid and closest matching to the modified format, if the
- // modified was rejected. Should only be populated if modified is also
- // non-null and was rejected by WASAPI `IsFormatSupported` system call.
- optional WaveFormat closest_matched = 3;
-}
-
-// Defines the format of waveformat audio data. This information is used by
-// WASAPI to determine how to process the audio playback data coming from the
-// emulator.
-//
-// The fields in the structure come from WAVEFORMATEXTENSIBLE of win32 api.
-// https://docs.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatextensible
-message WaveFormat {
- // Ex. 65534 (Maps to WAVE_FORMAT_EXTENSIBLE)
- optional int32 format_tag = 1;
- // Number of channels.
- optional int32 channels = 2;
- // Sample rate in Hz. Ex: 48000
- optional int32 samples_per_sec = 3;
- // Required average data-transfer rate for the format tag. Usually this will
- // be samples_per_sec * block_align, since the format tag is usually
- // WAVE_FORMAT_IEEE_FLOAT or it's extensible and SubFormat is
- // KSDATAFORMAT_SUBTYPE_IEEE_FLOAT.
- optional int32 avg_bytes_per_sec = 4;
- // Minimum atomic unit of data based on the format_tag. Usually this will
- // just be bits_per_samples * channels.
- optional int32 block_align = 5;
- // Bits used per sample. Must be a multiple of 8.
- optional int32 bits_per_sample = 6;
- // Size in bytes of extra information appended to WAVEFORMATEX struct.
- optional int32 size_bytes = 7;
-
- // The next fields are part of the WAVEFORMATEXTENSIBLE struct. They will only
- // be non-null if format_tag is WAVE_FORMAT_EXTENSIBLE.
-
- // Bit depth. Can be any value. Ex. bits_per_sample is 24,
- // but samples is 20. Note: This value is a union, so it could mean something
- // slightly different, but most likely won't. Refer to doc for more info.
- optional int32 samples = 8;
- // Bitmask mapping channels in stream to speaker positions.
- // Ex. 3 ( SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT )
- optional int64 channel_mask = 9;
- // Similar to format_tag, but for WAVEFORMATEXTENSIBLE structs.
- optional WaveFormatSubFormat sub_format = 10;
-
- // Subformat GUID mapping:
- // https://github.com/retep998/winapi-rs/blob/2f76bdea3a79817ccfab496fbd1786d5a697387b/src/shared/ksmedia.rs
- enum WaveFormatSubFormat {
- KSDATAFORMAT_SUBTYPE_INVALID = 0;
- KSDATAFORMAT_SUBTYPE_ANALOG = 1;
- KSDATAFORMAT_SUBTYPE_PCM = 2;
- KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = 3;
- KSDATAFORMAT_SUBTYPE_DRM = 4;
- KSDATAFORMAT_SUBTYPE_ALAW = 5;
- KSDATAFORMAT_SUBTYPE_MULAW = 6;
- KSDATAFORMAT_SUBTYPE_ADPCM = 7;
- KSDATAFORMAT_SUBTYPE_MPEG = 8;
- }
-}
-
-enum EmulatorProcessType {
- PROCESS_TYPE_UNKNOWN = 0;
- PROCESS_TYPE_MAIN = 1;
- PROCESS_TYPE_BLOCK = 2;
- PROCESS_TYPE_METRICS = 3;
- PROCESS_TYPE_NET = 4;
- PROCESS_TYPE_SLIRP = 5;
- PROCESS_TYPE_GPU = 6;
- PROCESS_TYPE_SOUND = 7;
- PROCESS_TYPE_BROKER = 8;
- PROCESS_TYPE_SPU = 9;
-}
-
-message EmulatorChildProcessExitDetails {
- // The Windows exit code of the child process
- optional uint32 exit_code = 1;
- // The process identifier, as defined by the ProcessType enum in the
- // emulator code.
- optional EmulatorProcessType process_type = 2;
-}
-
-message EmulatorDllDetails {
- optional string dll_base_name = 1;
-}
diff --git a/vendor/generic/metrics/src/client.rs b/vendor/generic/metrics/src/client.rs
index 380cca580..f7e691ac9 100644
--- a/vendor/generic/metrics/src/client.rs
+++ b/vendor/generic/metrics/src/client.rs
@@ -2,17 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-use base::Tube;
+use base::RawDescriptor;
+use base::SendTube;
+use metrics_events::MetricEventType;
+use metrics_events::RecordDetails;
-use crate::protos::event_details::RecordDetails;
-use crate::MetricEventType;
use crate::MetricsClientDestructor;
/// This interface exists to be used and re-implemented by downstream forks. Updates shouldn't be
/// done without ensuring they won't cause breakages in dependent codebases.
-pub fn initialize(_: Tube) {}
+pub fn initialize(_: SendTube) {}
#[cfg(test)]
-pub fn force_initialize(_: Tube) {}
+pub fn force_initialize(_: SendTube) {}
+
+pub fn push_descriptors(_: &mut Vec<RawDescriptor>) {}
+
pub fn get_destructor() -> MetricsClientDestructor {
MetricsClientDestructor::new(|| {})
}
diff --git a/vendor/generic/metrics/src/event_types.rs b/vendor/generic/metrics/src/event_types.rs
deleted file mode 100644
index 64ee5edd5..000000000
--- a/vendor/generic/metrics/src/event_types.rs
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2022 The ChromiumOS Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-use std::convert::From;
-use std::convert::TryFrom;
-
-use anyhow::Error;
-use serde::Deserialize;
-use serde::Serialize;
-
-// TODO(mikehoyle): Create a way to generate these directly from the
-// proto for a single source-of-truth.
-#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
-pub enum MetricEventType {
- CpuUsage,
- MemoryUsage,
- Fps,
- JankyFps,
- NetworkTxRate,
- NetworkRxRate,
- Interrupts,
- FrameTime,
- EmulatorGraphicsFreeze,
- EmulatorGraphicsUnfreeze,
- EmulatorGfxstreamVkAbortReason,
- ChildProcessExit,
- ReadIo,
- WriteIo,
- AudioFormatRequestOk,
- AudioFormatModifiedOk,
- AudioFormatFailed,
- TscCoresOutOfSync,
- NetworkTxRateSummarized,
- NetworkRxRateSummarized,
- DllLoaded,
- GraphicsHangRenderThread,
- GraphicsHangSyncThread,
- AudioNoopStreamForced,
- AudioPlaybackError,
- Other(i64),
-}
-
-impl From<MetricEventType> for i64 {
- fn from(event_code: MetricEventType) -> Self {
- match event_code {
- MetricEventType::CpuUsage => 10001,
- MetricEventType::MemoryUsage => 10002,
- MetricEventType::Fps => 10003,
- MetricEventType::JankyFps => 10004,
- MetricEventType::NetworkTxRate => 10005,
- MetricEventType::NetworkRxRate => 10006,
- MetricEventType::Interrupts => 10007,
- MetricEventType::FrameTime => 10008,
- MetricEventType::EmulatorGraphicsFreeze => 10009,
- MetricEventType::EmulatorGraphicsUnfreeze => 10010,
- MetricEventType::EmulatorGfxstreamVkAbortReason => 10011,
- MetricEventType::ChildProcessExit => 10012,
- MetricEventType::ReadIo => 10013,
- MetricEventType::WriteIo => 10014,
- MetricEventType::AudioFormatRequestOk => 10015,
- MetricEventType::AudioFormatModifiedOk => 10016,
- MetricEventType::AudioFormatFailed => 10017,
- MetricEventType::TscCoresOutOfSync => 10018,
- MetricEventType::NetworkTxRateSummarized => 10019,
- MetricEventType::NetworkRxRateSummarized => 10020,
- MetricEventType::DllLoaded => 10021,
- MetricEventType::GraphicsHangRenderThread => 10024,
- MetricEventType::GraphicsHangSyncThread => 10026,
- MetricEventType::AudioNoopStreamForced => 10038,
- MetricEventType::AudioPlaybackError => 10039,
- MetricEventType::Other(code) => code,
- }
- }
-}
-
-impl TryFrom<i64> for MetricEventType {
- type Error = Error;
-
- fn try_from(event_code: i64) -> Result<Self, Self::Error> {
- match event_code {
- 10001 => Ok(MetricEventType::CpuUsage),
- 10002 => Ok(MetricEventType::MemoryUsage),
- 10003 => Ok(MetricEventType::Fps),
- 10004 => Ok(MetricEventType::JankyFps),
- 10005 => Ok(MetricEventType::NetworkTxRate),
- 10006 => Ok(MetricEventType::NetworkRxRate),
- 10007 => Ok(MetricEventType::Interrupts),
- 10008 => Ok(MetricEventType::FrameTime),
- 10009 => Ok(MetricEventType::EmulatorGraphicsFreeze),
- 10010 => Ok(MetricEventType::EmulatorGraphicsUnfreeze),
- 10011 => Ok(MetricEventType::EmulatorGfxstreamVkAbortReason),
- 10012 => Ok(MetricEventType::ChildProcessExit),
- 10013 => Ok(MetricEventType::ReadIo),
- 10014 => Ok(MetricEventType::WriteIo),
- 10015 => Ok(MetricEventType::AudioFormatRequestOk),
- 10016 => Ok(MetricEventType::AudioFormatModifiedOk),
- 10017 => Ok(MetricEventType::AudioFormatFailed),
- 10018 => Ok(MetricEventType::TscCoresOutOfSync),
- 10019 => Ok(MetricEventType::NetworkTxRateSummarized),
- 10020 => Ok(MetricEventType::NetworkRxRateSummarized),
- 10021 => Ok(MetricEventType::DllLoaded),
- 10024 => Ok(MetricEventType::GraphicsHangRenderThread),
- 10026 => Ok(MetricEventType::GraphicsHangSyncThread),
- 10038 => Ok(MetricEventType::AudioNoopStreamForced),
- 10039 => Ok(MetricEventType::AudioPlaybackError),
- _ => Ok(MetricEventType::Other(event_code)),
- }
- }
-}
diff --git a/vendor/generic/metrics/src/lib.rs b/vendor/generic/metrics/src/lib.rs
index 45c30d3c0..da5c81217 100644
--- a/vendor/generic/metrics/src/lib.rs
+++ b/vendor/generic/metrics/src/lib.rs
@@ -6,16 +6,9 @@
//! to log metrics.
mod client;
-mod event_types;
-mod metrics_requests;
mod periodic_logger;
mod request_handler;
-mod sys;
-pub mod protos {
- // ANDROID: b/259142784 - we remove metrics_out subdir b/c cargo2android
- include!(concat!(env!("OUT_DIR"), "/generated.rs"));
-}
mod metrics_cleanup;
use std::time::Duration;
@@ -32,12 +25,11 @@ pub use client::log_high_frequency_descriptor_event;
pub use client::log_histogram_metric;
pub use client::log_metric;
pub use client::merge_session_invariants;
+pub use client::push_descriptors;
pub use client::set_auth_token;
pub use client::set_graphics_api;
pub use client::set_package_name;
-pub use event_types::MetricEventType;
pub use metrics_cleanup::MetricsClientDestructor;
-pub use metrics_requests::MetricsRequest;
pub use periodic_logger::PeriodicLogger;
pub use request_handler::MetricsRequestHandler;
diff --git a/vendor/generic/metrics/src/metrics_requests.rs b/vendor/generic/metrics/src/metrics_requests.rs
deleted file mode 100644
index 33b77f22e..000000000
--- a/vendor/generic/metrics/src/metrics_requests.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2022 The ChromiumOS Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-//! Structs used to transport log requests between client processes and the logging controller
-
-use serde::Deserialize;
-use serde::Serialize;
-
-use crate::MetricEventType;
-
-#[derive(Serialize, Deserialize, Debug)]
-pub struct LogMetric {
- pub event_code: MetricEventType,
- pub value: i64,
-}
-
-#[derive(Serialize, Deserialize, Debug)]
-pub struct LogDescriptor {
- pub event_code: MetricEventType,
- pub descriptor: i64,
-}
-
-#[derive(Serialize, Deserialize, Debug)]
-pub struct LogHighFrequencyDescriptorMetric {
- pub event_code: MetricEventType,
- pub descriptor: i64,
- pub step: i64,
-}
-
-#[derive(Serialize, Deserialize, Debug)]
-pub struct EventWithSerializedDetails {
- pub event_code: MetricEventType,
- pub serialized_details: Box<[u8]>,
-}
-
-#[derive(Serialize, Deserialize, Debug)]
-pub enum MetricsRequest {
- LogDescriptor(LogDescriptor),
- LogEvent(MetricEventType),
- LogMetric(LogMetric),
- LogHistogram(LogMetric),
- SetAuthToken(String),
- SetGraphicsApi(String),
- SetPackageName(String),
- MergeSessionInvariants(Vec<u8>),
- LogHighFrequencyDescriptorMetric(LogHighFrequencyDescriptorMetric),
- LogEventWithSerializedDetails(EventWithSerializedDetails),
-}
diff --git a/vendor/generic/metrics/src/out/event_details.rs b/vendor/generic/metrics/src/out/event_details.rs
deleted file mode 100644
index a44b05c90..000000000
--- a/vendor/generic/metrics/src/out/event_details.rs
+++ /dev/null
@@ -1,1408 +0,0 @@
-// This file is generated by rust-protobuf 3.2.0. Do not edit
-// .proto file is parsed by protoc 3.21.12
-// @generated
-
-// https://github.com/rust-lang/rust-clippy/issues/702
-#![allow(unknown_lints)]
-#![allow(clippy::all)]
-
-#![allow(unused_attributes)]
-#![cfg_attr(rustfmt, rustfmt::skip)]
-
-#![allow(box_pointers)]
-#![allow(dead_code)]
-#![allow(missing_docs)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-#![allow(non_upper_case_globals)]
-#![allow(trivial_casts)]
-#![allow(unused_results)]
-#![allow(unused_mut)]
-
-//! Generated file from `event_details.proto`
-
-/// Generated files are compatible only with the same version
-/// of protobuf runtime.
-const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;
-
-#[derive(PartialEq,Clone,Default,Debug)]
-// @@protoc_insertion_point(message:RecordDetails)
-pub struct RecordDetails {
- // message fields
- // @@protoc_insertion_point(field:RecordDetails.emulator_child_process_exit_details)
- pub emulator_child_process_exit_details: ::protobuf::MessageField<EmulatorChildProcessExitDetails>,
- // @@protoc_insertion_point(field:RecordDetails.wave_format_details)
- pub wave_format_details: ::protobuf::MessageField<WaveFormatDetails>,
- // @@protoc_insertion_point(field:RecordDetails.emulator_dll_details)
- pub emulator_dll_details: ::protobuf::MessageField<EmulatorDllDetails>,
- // special fields
- // @@protoc_insertion_point(special_field:RecordDetails.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a RecordDetails {
- fn default() -> &'a RecordDetails {
- <RecordDetails as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RecordDetails {
- pub fn new() -> RecordDetails {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(3);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, EmulatorChildProcessExitDetails>(
- "emulator_child_process_exit_details",
- |m: &RecordDetails| { &m.emulator_child_process_exit_details },
- |m: &mut RecordDetails| { &mut m.emulator_child_process_exit_details },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, WaveFormatDetails>(
- "wave_format_details",
- |m: &RecordDetails| { &m.wave_format_details },
- |m: &mut RecordDetails| { &mut m.wave_format_details },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, EmulatorDllDetails>(
- "emulator_dll_details",
- |m: &RecordDetails| { &m.emulator_dll_details },
- |m: &mut RecordDetails| { &mut m.emulator_dll_details },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<RecordDetails>(
- "RecordDetails",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for RecordDetails {
- const NAME: &'static str = "RecordDetails";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 98 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.emulator_child_process_exit_details)?;
- },
- 106 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.wave_format_details)?;
- },
- 154 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.emulator_dll_details)?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.emulator_child_process_exit_details.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- if let Some(v) = self.wave_format_details.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- if let Some(v) = self.emulator_dll_details.as_ref() {
- let len = v.compute_size();
- my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.emulator_child_process_exit_details.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?;
- }
- if let Some(v) = self.wave_format_details.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(13, v, os)?;
- }
- if let Some(v) = self.emulator_dll_details.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(19, v, os)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> RecordDetails {
- RecordDetails::new()
- }
-
- fn clear(&mut self) {
- self.emulator_child_process_exit_details.clear();
- self.wave_format_details.clear();
- self.emulator_dll_details.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static RecordDetails {
- static instance: RecordDetails = RecordDetails {
- emulator_child_process_exit_details: ::protobuf::MessageField::none(),
- wave_format_details: ::protobuf::MessageField::none(),
- emulator_dll_details: ::protobuf::MessageField::none(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for RecordDetails {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("RecordDetails").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for RecordDetails {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RecordDetails {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-#[derive(PartialEq,Clone,Default,Debug)]
-// @@protoc_insertion_point(message:WaveFormatDetails)
-pub struct WaveFormatDetails {
- // message fields
- // @@protoc_insertion_point(field:WaveFormatDetails.requested)
- pub requested: ::protobuf::MessageField<WaveFormat>,
- // @@protoc_insertion_point(field:WaveFormatDetails.modified)
- pub modified: ::protobuf::MessageField<WaveFormat>,
- // @@protoc_insertion_point(field:WaveFormatDetails.closest_matched)
- pub closest_matched: ::protobuf::MessageField<WaveFormat>,
- // special fields
- // @@protoc_insertion_point(special_field:WaveFormatDetails.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a WaveFormatDetails {
- fn default() -> &'a WaveFormatDetails {
- <WaveFormatDetails as ::protobuf::Message>::default_instance()
- }
-}
-
-impl WaveFormatDetails {
- pub fn new() -> WaveFormatDetails {
- ::std::default::Default::default()
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(3);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, WaveFormat>(
- "requested",
- |m: &WaveFormatDetails| { &m.requested },
- |m: &mut WaveFormatDetails| { &mut m.requested },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, WaveFormat>(
- "modified",
- |m: &WaveFormatDetails| { &m.modified },
- |m: &mut WaveFormatDetails| { &mut m.modified },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, WaveFormat>(
- "closest_matched",
- |m: &WaveFormatDetails| { &m.closest_matched },
- |m: &mut WaveFormatDetails| { &mut m.closest_matched },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WaveFormatDetails>(
- "WaveFormatDetails",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for WaveFormatDetails {
- const NAME: &'static str = "WaveFormatDetails";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.requested)?;
- },
- 18 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.modified)?;
- },
- 26 => {
- ::protobuf::rt::read_singular_message_into_field(is, &mut self.closest_matched)?;
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.requested.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- if let Some(v) = self.modified.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- if let Some(v) = self.closest_matched.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.requested.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
- }
- if let Some(v) = self.modified.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
- }
- if let Some(v) = self.closest_matched.as_ref() {
- ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> WaveFormatDetails {
- WaveFormatDetails::new()
- }
-
- fn clear(&mut self) {
- self.requested.clear();
- self.modified.clear();
- self.closest_matched.clear();
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static WaveFormatDetails {
- static instance: WaveFormatDetails = WaveFormatDetails {
- requested: ::protobuf::MessageField::none(),
- modified: ::protobuf::MessageField::none(),
- closest_matched: ::protobuf::MessageField::none(),
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for WaveFormatDetails {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("WaveFormatDetails").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for WaveFormatDetails {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for WaveFormatDetails {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-#[derive(PartialEq,Clone,Default,Debug)]
-// @@protoc_insertion_point(message:WaveFormat)
-pub struct WaveFormat {
- // message fields
- // @@protoc_insertion_point(field:WaveFormat.format_tag)
- pub format_tag: ::std::option::Option<i32>,
- // @@protoc_insertion_point(field:WaveFormat.channels)
- pub channels: ::std::option::Option<i32>,
- // @@protoc_insertion_point(field:WaveFormat.samples_per_sec)
- pub samples_per_sec: ::std::option::Option<i32>,
- // @@protoc_insertion_point(field:WaveFormat.avg_bytes_per_sec)
- pub avg_bytes_per_sec: ::std::option::Option<i32>,
- // @@protoc_insertion_point(field:WaveFormat.block_align)
- pub block_align: ::std::option::Option<i32>,
- // @@protoc_insertion_point(field:WaveFormat.bits_per_sample)
- pub bits_per_sample: ::std::option::Option<i32>,
- // @@protoc_insertion_point(field:WaveFormat.size_bytes)
- pub size_bytes: ::std::option::Option<i32>,
- // @@protoc_insertion_point(field:WaveFormat.samples)
- pub samples: ::std::option::Option<i32>,
- // @@protoc_insertion_point(field:WaveFormat.channel_mask)
- pub channel_mask: ::std::option::Option<i64>,
- // @@protoc_insertion_point(field:WaveFormat.sub_format)
- pub sub_format: ::std::option::Option<::protobuf::EnumOrUnknown<wave_format::WaveFormatSubFormat>>,
- // special fields
- // @@protoc_insertion_point(special_field:WaveFormat.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a WaveFormat {
- fn default() -> &'a WaveFormat {
- <WaveFormat as ::protobuf::Message>::default_instance()
- }
-}
-
-impl WaveFormat {
- pub fn new() -> WaveFormat {
- ::std::default::Default::default()
- }
-
- // optional int32 format_tag = 1;
-
- pub fn format_tag(&self) -> i32 {
- self.format_tag.unwrap_or(0)
- }
-
- pub fn clear_format_tag(&mut self) {
- self.format_tag = ::std::option::Option::None;
- }
-
- pub fn has_format_tag(&self) -> bool {
- self.format_tag.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_format_tag(&mut self, v: i32) {
- self.format_tag = ::std::option::Option::Some(v);
- }
-
- // optional int32 channels = 2;
-
- pub fn channels(&self) -> i32 {
- self.channels.unwrap_or(0)
- }
-
- pub fn clear_channels(&mut self) {
- self.channels = ::std::option::Option::None;
- }
-
- pub fn has_channels(&self) -> bool {
- self.channels.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_channels(&mut self, v: i32) {
- self.channels = ::std::option::Option::Some(v);
- }
-
- // optional int32 samples_per_sec = 3;
-
- pub fn samples_per_sec(&self) -> i32 {
- self.samples_per_sec.unwrap_or(0)
- }
-
- pub fn clear_samples_per_sec(&mut self) {
- self.samples_per_sec = ::std::option::Option::None;
- }
-
- pub fn has_samples_per_sec(&self) -> bool {
- self.samples_per_sec.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_samples_per_sec(&mut self, v: i32) {
- self.samples_per_sec = ::std::option::Option::Some(v);
- }
-
- // optional int32 avg_bytes_per_sec = 4;
-
- pub fn avg_bytes_per_sec(&self) -> i32 {
- self.avg_bytes_per_sec.unwrap_or(0)
- }
-
- pub fn clear_avg_bytes_per_sec(&mut self) {
- self.avg_bytes_per_sec = ::std::option::Option::None;
- }
-
- pub fn has_avg_bytes_per_sec(&self) -> bool {
- self.avg_bytes_per_sec.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_avg_bytes_per_sec(&mut self, v: i32) {
- self.avg_bytes_per_sec = ::std::option::Option::Some(v);
- }
-
- // optional int32 block_align = 5;
-
- pub fn block_align(&self) -> i32 {
- self.block_align.unwrap_or(0)
- }
-
- pub fn clear_block_align(&mut self) {
- self.block_align = ::std::option::Option::None;
- }
-
- pub fn has_block_align(&self) -> bool {
- self.block_align.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_block_align(&mut self, v: i32) {
- self.block_align = ::std::option::Option::Some(v);
- }
-
- // optional int32 bits_per_sample = 6;
-
- pub fn bits_per_sample(&self) -> i32 {
- self.bits_per_sample.unwrap_or(0)
- }
-
- pub fn clear_bits_per_sample(&mut self) {
- self.bits_per_sample = ::std::option::Option::None;
- }
-
- pub fn has_bits_per_sample(&self) -> bool {
- self.bits_per_sample.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_bits_per_sample(&mut self, v: i32) {
- self.bits_per_sample = ::std::option::Option::Some(v);
- }
-
- // optional int32 size_bytes = 7;
-
- pub fn size_bytes(&self) -> i32 {
- self.size_bytes.unwrap_or(0)
- }
-
- pub fn clear_size_bytes(&mut self) {
- self.size_bytes = ::std::option::Option::None;
- }
-
- pub fn has_size_bytes(&self) -> bool {
- self.size_bytes.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_size_bytes(&mut self, v: i32) {
- self.size_bytes = ::std::option::Option::Some(v);
- }
-
- // optional int32 samples = 8;
-
- pub fn samples(&self) -> i32 {
- self.samples.unwrap_or(0)
- }
-
- pub fn clear_samples(&mut self) {
- self.samples = ::std::option::Option::None;
- }
-
- pub fn has_samples(&self) -> bool {
- self.samples.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_samples(&mut self, v: i32) {
- self.samples = ::std::option::Option::Some(v);
- }
-
- // optional int64 channel_mask = 9;
-
- pub fn channel_mask(&self) -> i64 {
- self.channel_mask.unwrap_or(0)
- }
-
- pub fn clear_channel_mask(&mut self) {
- self.channel_mask = ::std::option::Option::None;
- }
-
- pub fn has_channel_mask(&self) -> bool {
- self.channel_mask.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_channel_mask(&mut self, v: i64) {
- self.channel_mask = ::std::option::Option::Some(v);
- }
-
- // optional .WaveFormat.WaveFormatSubFormat sub_format = 10;
-
- pub fn sub_format(&self) -> wave_format::WaveFormatSubFormat {
- match self.sub_format {
- Some(e) => e.enum_value_or(wave_format::WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_INVALID),
- None => wave_format::WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_INVALID,
- }
- }
-
- pub fn clear_sub_format(&mut self) {
- self.sub_format = ::std::option::Option::None;
- }
-
- pub fn has_sub_format(&self) -> bool {
- self.sub_format.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_sub_format(&mut self, v: wave_format::WaveFormatSubFormat) {
- self.sub_format = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(10);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "format_tag",
- |m: &WaveFormat| { &m.format_tag },
- |m: &mut WaveFormat| { &mut m.format_tag },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "channels",
- |m: &WaveFormat| { &m.channels },
- |m: &mut WaveFormat| { &mut m.channels },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "samples_per_sec",
- |m: &WaveFormat| { &m.samples_per_sec },
- |m: &mut WaveFormat| { &mut m.samples_per_sec },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "avg_bytes_per_sec",
- |m: &WaveFormat| { &m.avg_bytes_per_sec },
- |m: &mut WaveFormat| { &mut m.avg_bytes_per_sec },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "block_align",
- |m: &WaveFormat| { &m.block_align },
- |m: &mut WaveFormat| { &mut m.block_align },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "bits_per_sample",
- |m: &WaveFormat| { &m.bits_per_sample },
- |m: &mut WaveFormat| { &mut m.bits_per_sample },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "size_bytes",
- |m: &WaveFormat| { &m.size_bytes },
- |m: &mut WaveFormat| { &mut m.size_bytes },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "samples",
- |m: &WaveFormat| { &m.samples },
- |m: &mut WaveFormat| { &mut m.samples },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "channel_mask",
- |m: &WaveFormat| { &m.channel_mask },
- |m: &mut WaveFormat| { &mut m.channel_mask },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "sub_format",
- |m: &WaveFormat| { &m.sub_format },
- |m: &mut WaveFormat| { &mut m.sub_format },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WaveFormat>(
- "WaveFormat",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for WaveFormat {
- const NAME: &'static str = "WaveFormat";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 8 => {
- self.format_tag = ::std::option::Option::Some(is.read_int32()?);
- },
- 16 => {
- self.channels = ::std::option::Option::Some(is.read_int32()?);
- },
- 24 => {
- self.samples_per_sec = ::std::option::Option::Some(is.read_int32()?);
- },
- 32 => {
- self.avg_bytes_per_sec = ::std::option::Option::Some(is.read_int32()?);
- },
- 40 => {
- self.block_align = ::std::option::Option::Some(is.read_int32()?);
- },
- 48 => {
- self.bits_per_sample = ::std::option::Option::Some(is.read_int32()?);
- },
- 56 => {
- self.size_bytes = ::std::option::Option::Some(is.read_int32()?);
- },
- 64 => {
- self.samples = ::std::option::Option::Some(is.read_int32()?);
- },
- 72 => {
- self.channel_mask = ::std::option::Option::Some(is.read_int64()?);
- },
- 80 => {
- self.sub_format = ::std::option::Option::Some(is.read_enum_or_unknown()?);
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.format_tag {
- my_size += ::protobuf::rt::int32_size(1, v);
- }
- if let Some(v) = self.channels {
- my_size += ::protobuf::rt::int32_size(2, v);
- }
- if let Some(v) = self.samples_per_sec {
- my_size += ::protobuf::rt::int32_size(3, v);
- }
- if let Some(v) = self.avg_bytes_per_sec {
- my_size += ::protobuf::rt::int32_size(4, v);
- }
- if let Some(v) = self.block_align {
- my_size += ::protobuf::rt::int32_size(5, v);
- }
- if let Some(v) = self.bits_per_sample {
- my_size += ::protobuf::rt::int32_size(6, v);
- }
- if let Some(v) = self.size_bytes {
- my_size += ::protobuf::rt::int32_size(7, v);
- }
- if let Some(v) = self.samples {
- my_size += ::protobuf::rt::int32_size(8, v);
- }
- if let Some(v) = self.channel_mask {
- my_size += ::protobuf::rt::int64_size(9, v);
- }
- if let Some(v) = self.sub_format {
- my_size += ::protobuf::rt::int32_size(10, v.value());
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.format_tag {
- os.write_int32(1, v)?;
- }
- if let Some(v) = self.channels {
- os.write_int32(2, v)?;
- }
- if let Some(v) = self.samples_per_sec {
- os.write_int32(3, v)?;
- }
- if let Some(v) = self.avg_bytes_per_sec {
- os.write_int32(4, v)?;
- }
- if let Some(v) = self.block_align {
- os.write_int32(5, v)?;
- }
- if let Some(v) = self.bits_per_sample {
- os.write_int32(6, v)?;
- }
- if let Some(v) = self.size_bytes {
- os.write_int32(7, v)?;
- }
- if let Some(v) = self.samples {
- os.write_int32(8, v)?;
- }
- if let Some(v) = self.channel_mask {
- os.write_int64(9, v)?;
- }
- if let Some(v) = self.sub_format {
- os.write_enum(10, ::protobuf::EnumOrUnknown::value(&v))?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> WaveFormat {
- WaveFormat::new()
- }
-
- fn clear(&mut self) {
- self.format_tag = ::std::option::Option::None;
- self.channels = ::std::option::Option::None;
- self.samples_per_sec = ::std::option::Option::None;
- self.avg_bytes_per_sec = ::std::option::Option::None;
- self.block_align = ::std::option::Option::None;
- self.bits_per_sample = ::std::option::Option::None;
- self.size_bytes = ::std::option::Option::None;
- self.samples = ::std::option::Option::None;
- self.channel_mask = ::std::option::Option::None;
- self.sub_format = ::std::option::Option::None;
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static WaveFormat {
- static instance: WaveFormat = WaveFormat {
- format_tag: ::std::option::Option::None,
- channels: ::std::option::Option::None,
- samples_per_sec: ::std::option::Option::None,
- avg_bytes_per_sec: ::std::option::Option::None,
- block_align: ::std::option::Option::None,
- bits_per_sample: ::std::option::Option::None,
- size_bytes: ::std::option::Option::None,
- samples: ::std::option::Option::None,
- channel_mask: ::std::option::Option::None,
- sub_format: ::std::option::Option::None,
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for WaveFormat {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("WaveFormat").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for WaveFormat {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for WaveFormat {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-/// Nested message and enums of message `WaveFormat`
-pub mod wave_format {
- #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
- // @@protoc_insertion_point(enum:WaveFormat.WaveFormatSubFormat)
- pub enum WaveFormatSubFormat {
- // @@protoc_insertion_point(enum_value:WaveFormat.WaveFormatSubFormat.KSDATAFORMAT_SUBTYPE_INVALID)
- KSDATAFORMAT_SUBTYPE_INVALID = 0,
- // @@protoc_insertion_point(enum_value:WaveFormat.WaveFormatSubFormat.KSDATAFORMAT_SUBTYPE_ANALOG)
- KSDATAFORMAT_SUBTYPE_ANALOG = 1,
- // @@protoc_insertion_point(enum_value:WaveFormat.WaveFormatSubFormat.KSDATAFORMAT_SUBTYPE_PCM)
- KSDATAFORMAT_SUBTYPE_PCM = 2,
- // @@protoc_insertion_point(enum_value:WaveFormat.WaveFormatSubFormat.KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)
- KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = 3,
- // @@protoc_insertion_point(enum_value:WaveFormat.WaveFormatSubFormat.KSDATAFORMAT_SUBTYPE_DRM)
- KSDATAFORMAT_SUBTYPE_DRM = 4,
- // @@protoc_insertion_point(enum_value:WaveFormat.WaveFormatSubFormat.KSDATAFORMAT_SUBTYPE_ALAW)
- KSDATAFORMAT_SUBTYPE_ALAW = 5,
- // @@protoc_insertion_point(enum_value:WaveFormat.WaveFormatSubFormat.KSDATAFORMAT_SUBTYPE_MULAW)
- KSDATAFORMAT_SUBTYPE_MULAW = 6,
- // @@protoc_insertion_point(enum_value:WaveFormat.WaveFormatSubFormat.KSDATAFORMAT_SUBTYPE_ADPCM)
- KSDATAFORMAT_SUBTYPE_ADPCM = 7,
- // @@protoc_insertion_point(enum_value:WaveFormat.WaveFormatSubFormat.KSDATAFORMAT_SUBTYPE_MPEG)
- KSDATAFORMAT_SUBTYPE_MPEG = 8,
- }
-
- impl ::protobuf::Enum for WaveFormatSubFormat {
- const NAME: &'static str = "WaveFormatSubFormat";
-
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<WaveFormatSubFormat> {
- match value {
- 0 => ::std::option::Option::Some(WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_INVALID),
- 1 => ::std::option::Option::Some(WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_ANALOG),
- 2 => ::std::option::Option::Some(WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_PCM),
- 3 => ::std::option::Option::Some(WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_IEEE_FLOAT),
- 4 => ::std::option::Option::Some(WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_DRM),
- 5 => ::std::option::Option::Some(WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_ALAW),
- 6 => ::std::option::Option::Some(WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_MULAW),
- 7 => ::std::option::Option::Some(WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_ADPCM),
- 8 => ::std::option::Option::Some(WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_MPEG),
- _ => ::std::option::Option::None
- }
- }
-
- const VALUES: &'static [WaveFormatSubFormat] = &[
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_INVALID,
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_ANALOG,
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_PCM,
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_IEEE_FLOAT,
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_DRM,
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_ALAW,
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_MULAW,
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_ADPCM,
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_MPEG,
- ];
- }
-
- impl ::protobuf::EnumFull for WaveFormatSubFormat {
- fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("WaveFormat.WaveFormatSubFormat").unwrap()).clone()
- }
-
- fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
- let index = *self as usize;
- Self::enum_descriptor().value_by_index(index)
- }
- }
-
- impl ::std::default::Default for WaveFormatSubFormat {
- fn default() -> Self {
- WaveFormatSubFormat::KSDATAFORMAT_SUBTYPE_INVALID
- }
- }
-
- impl WaveFormatSubFormat {
- pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
- ::protobuf::reflect::GeneratedEnumDescriptorData::new::<WaveFormatSubFormat>("WaveFormat.WaveFormatSubFormat")
- }
- }
-}
-
-#[derive(PartialEq,Clone,Default,Debug)]
-// @@protoc_insertion_point(message:EmulatorChildProcessExitDetails)
-pub struct EmulatorChildProcessExitDetails {
- // message fields
- // @@protoc_insertion_point(field:EmulatorChildProcessExitDetails.exit_code)
- pub exit_code: ::std::option::Option<u32>,
- // @@protoc_insertion_point(field:EmulatorChildProcessExitDetails.process_type)
- pub process_type: ::std::option::Option<::protobuf::EnumOrUnknown<EmulatorProcessType>>,
- // special fields
- // @@protoc_insertion_point(special_field:EmulatorChildProcessExitDetails.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a EmulatorChildProcessExitDetails {
- fn default() -> &'a EmulatorChildProcessExitDetails {
- <EmulatorChildProcessExitDetails as ::protobuf::Message>::default_instance()
- }
-}
-
-impl EmulatorChildProcessExitDetails {
- pub fn new() -> EmulatorChildProcessExitDetails {
- ::std::default::Default::default()
- }
-
- // optional uint32 exit_code = 1;
-
- pub fn exit_code(&self) -> u32 {
- self.exit_code.unwrap_or(0)
- }
-
- pub fn clear_exit_code(&mut self) {
- self.exit_code = ::std::option::Option::None;
- }
-
- pub fn has_exit_code(&self) -> bool {
- self.exit_code.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_exit_code(&mut self, v: u32) {
- self.exit_code = ::std::option::Option::Some(v);
- }
-
- // optional .EmulatorProcessType process_type = 2;
-
- pub fn process_type(&self) -> EmulatorProcessType {
- match self.process_type {
- Some(e) => e.enum_value_or(EmulatorProcessType::PROCESS_TYPE_UNKNOWN),
- None => EmulatorProcessType::PROCESS_TYPE_UNKNOWN,
- }
- }
-
- pub fn clear_process_type(&mut self) {
- self.process_type = ::std::option::Option::None;
- }
-
- pub fn has_process_type(&self) -> bool {
- self.process_type.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_process_type(&mut self, v: EmulatorProcessType) {
- self.process_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(2);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "exit_code",
- |m: &EmulatorChildProcessExitDetails| { &m.exit_code },
- |m: &mut EmulatorChildProcessExitDetails| { &mut m.exit_code },
- ));
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "process_type",
- |m: &EmulatorChildProcessExitDetails| { &m.process_type },
- |m: &mut EmulatorChildProcessExitDetails| { &mut m.process_type },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EmulatorChildProcessExitDetails>(
- "EmulatorChildProcessExitDetails",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for EmulatorChildProcessExitDetails {
- const NAME: &'static str = "EmulatorChildProcessExitDetails";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 8 => {
- self.exit_code = ::std::option::Option::Some(is.read_uint32()?);
- },
- 16 => {
- self.process_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.exit_code {
- my_size += ::protobuf::rt::uint32_size(1, v);
- }
- if let Some(v) = self.process_type {
- my_size += ::protobuf::rt::int32_size(2, v.value());
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.exit_code {
- os.write_uint32(1, v)?;
- }
- if let Some(v) = self.process_type {
- os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> EmulatorChildProcessExitDetails {
- EmulatorChildProcessExitDetails::new()
- }
-
- fn clear(&mut self) {
- self.exit_code = ::std::option::Option::None;
- self.process_type = ::std::option::Option::None;
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static EmulatorChildProcessExitDetails {
- static instance: EmulatorChildProcessExitDetails = EmulatorChildProcessExitDetails {
- exit_code: ::std::option::Option::None,
- process_type: ::std::option::Option::None,
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for EmulatorChildProcessExitDetails {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("EmulatorChildProcessExitDetails").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for EmulatorChildProcessExitDetails {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for EmulatorChildProcessExitDetails {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-#[derive(PartialEq,Clone,Default,Debug)]
-// @@protoc_insertion_point(message:EmulatorDllDetails)
-pub struct EmulatorDllDetails {
- // message fields
- // @@protoc_insertion_point(field:EmulatorDllDetails.dll_base_name)
- pub dll_base_name: ::std::option::Option<::std::string::String>,
- // special fields
- // @@protoc_insertion_point(special_field:EmulatorDllDetails.special_fields)
- pub special_fields: ::protobuf::SpecialFields,
-}
-
-impl<'a> ::std::default::Default for &'a EmulatorDllDetails {
- fn default() -> &'a EmulatorDllDetails {
- <EmulatorDllDetails as ::protobuf::Message>::default_instance()
- }
-}
-
-impl EmulatorDllDetails {
- pub fn new() -> EmulatorDllDetails {
- ::std::default::Default::default()
- }
-
- // optional string dll_base_name = 1;
-
- pub fn dll_base_name(&self) -> &str {
- match self.dll_base_name.as_ref() {
- Some(v) => v,
- None => "",
- }
- }
-
- pub fn clear_dll_base_name(&mut self) {
- self.dll_base_name = ::std::option::Option::None;
- }
-
- pub fn has_dll_base_name(&self) -> bool {
- self.dll_base_name.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_dll_base_name(&mut self, v: ::std::string::String) {
- self.dll_base_name = ::std::option::Option::Some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_dll_base_name(&mut self) -> &mut ::std::string::String {
- if self.dll_base_name.is_none() {
- self.dll_base_name = ::std::option::Option::Some(::std::string::String::new());
- }
- self.dll_base_name.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_dll_base_name(&mut self) -> ::std::string::String {
- self.dll_base_name.take().unwrap_or_else(|| ::std::string::String::new())
- }
-
- fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
- let mut fields = ::std::vec::Vec::with_capacity(1);
- let mut oneofs = ::std::vec::Vec::with_capacity(0);
- fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
- "dll_base_name",
- |m: &EmulatorDllDetails| { &m.dll_base_name },
- |m: &mut EmulatorDllDetails| { &mut m.dll_base_name },
- ));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EmulatorDllDetails>(
- "EmulatorDllDetails",
- fields,
- oneofs,
- )
- }
-}
-
-impl ::protobuf::Message for EmulatorDllDetails {
- const NAME: &'static str = "EmulatorDllDetails";
-
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
- while let Some(tag) = is.read_raw_tag_or_eof()? {
- match tag {
- 10 => {
- self.dll_base_name = ::std::option::Option::Some(is.read_string()?);
- },
- tag => {
- ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u64 {
- let mut my_size = 0;
- if let Some(v) = self.dll_base_name.as_ref() {
- my_size += ::protobuf::rt::string_size(1, &v);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
- self.special_fields.cached_size().set(my_size as u32);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
- if let Some(v) = self.dll_base_name.as_ref() {
- os.write_string(1, v)?;
- }
- os.write_unknown_fields(self.special_fields.unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn special_fields(&self) -> &::protobuf::SpecialFields {
- &self.special_fields
- }
-
- fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
- &mut self.special_fields
- }
-
- fn new() -> EmulatorDllDetails {
- EmulatorDllDetails::new()
- }
-
- fn clear(&mut self) {
- self.dll_base_name = ::std::option::Option::None;
- self.special_fields.clear();
- }
-
- fn default_instance() -> &'static EmulatorDllDetails {
- static instance: EmulatorDllDetails = EmulatorDllDetails {
- dll_base_name: ::std::option::Option::None,
- special_fields: ::protobuf::SpecialFields::new(),
- };
- &instance
- }
-}
-
-impl ::protobuf::MessageFull for EmulatorDllDetails {
- fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("EmulatorDllDetails").unwrap()).clone()
- }
-}
-
-impl ::std::fmt::Display for EmulatorDllDetails {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for EmulatorDllDetails {
- type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
-}
-
-#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
-// @@protoc_insertion_point(enum:EmulatorProcessType)
-pub enum EmulatorProcessType {
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_UNKNOWN)
- PROCESS_TYPE_UNKNOWN = 0,
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_MAIN)
- PROCESS_TYPE_MAIN = 1,
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_BLOCK)
- PROCESS_TYPE_BLOCK = 2,
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_METRICS)
- PROCESS_TYPE_METRICS = 3,
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_NET)
- PROCESS_TYPE_NET = 4,
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_SLIRP)
- PROCESS_TYPE_SLIRP = 5,
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_GPU)
- PROCESS_TYPE_GPU = 6,
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_SOUND)
- PROCESS_TYPE_SOUND = 7,
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_BROKER)
- PROCESS_TYPE_BROKER = 8,
- // @@protoc_insertion_point(enum_value:EmulatorProcessType.PROCESS_TYPE_SPU)
- PROCESS_TYPE_SPU = 9,
-}
-
-impl ::protobuf::Enum for EmulatorProcessType {
- const NAME: &'static str = "EmulatorProcessType";
-
- fn value(&self) -> i32 {
- *self as i32
- }
-
- fn from_i32(value: i32) -> ::std::option::Option<EmulatorProcessType> {
- match value {
- 0 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_UNKNOWN),
- 1 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_MAIN),
- 2 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_BLOCK),
- 3 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_METRICS),
- 4 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_NET),
- 5 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_SLIRP),
- 6 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_GPU),
- 7 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_SOUND),
- 8 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_BROKER),
- 9 => ::std::option::Option::Some(EmulatorProcessType::PROCESS_TYPE_SPU),
- _ => ::std::option::Option::None
- }
- }
-
- const VALUES: &'static [EmulatorProcessType] = &[
- EmulatorProcessType::PROCESS_TYPE_UNKNOWN,
- EmulatorProcessType::PROCESS_TYPE_MAIN,
- EmulatorProcessType::PROCESS_TYPE_BLOCK,
- EmulatorProcessType::PROCESS_TYPE_METRICS,
- EmulatorProcessType::PROCESS_TYPE_NET,
- EmulatorProcessType::PROCESS_TYPE_SLIRP,
- EmulatorProcessType::PROCESS_TYPE_GPU,
- EmulatorProcessType::PROCESS_TYPE_SOUND,
- EmulatorProcessType::PROCESS_TYPE_BROKER,
- EmulatorProcessType::PROCESS_TYPE_SPU,
- ];
-}
-
-impl ::protobuf::EnumFull for EmulatorProcessType {
- fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
- static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().enum_by_package_relative_name("EmulatorProcessType").unwrap()).clone()
- }
-
- fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
- let index = *self as usize;
- Self::enum_descriptor().value_by_index(index)
- }
-}
-
-impl ::std::default::Default for EmulatorProcessType {
- fn default() -> Self {
- EmulatorProcessType::PROCESS_TYPE_UNKNOWN
- }
-}
-
-impl EmulatorProcessType {
- fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
- ::protobuf::reflect::GeneratedEnumDescriptorData::new::<EmulatorProcessType>("EmulatorProcessType")
- }
-}
-
-static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x13event_details.proto\"\x96\x02\n\rRecordDetails\x12n\n#emulator_chi\
- ld_process_exit_details\x18\x0c\x20\x01(\x0b2\x20.EmulatorChildProcessEx\
- itDetailsR\x1femulatorChildProcessExitDetails\x12B\n\x13wave_format_deta\
- ils\x18\r\x20\x01(\x0b2\x12.WaveFormatDetailsR\x11waveFormatDetails\x12E\
- \n\x14emulator_dll_details\x18\x13\x20\x01(\x0b2\x13.EmulatorDllDetailsR\
- \x12emulatorDllDetailsJ\x04\x08\x01\x10\x0cJ\x04\x08\x0e\x10\x13\"\x9d\
- \x01\n\x11WaveFormatDetails\x12)\n\trequested\x18\x01\x20\x01(\x0b2\x0b.\
- WaveFormatR\trequested\x12'\n\x08modified\x18\x02\x20\x01(\x0b2\x0b.Wave\
- FormatR\x08modified\x124\n\x0fclosest_matched\x18\x03\x20\x01(\x0b2\x0b.\
- WaveFormatR\x0eclosestMatched\"\xb9\x05\n\nWaveFormat\x12\x1d\n\nformat_\
- tag\x18\x01\x20\x01(\x05R\tformatTag\x12\x1a\n\x08channels\x18\x02\x20\
- \x01(\x05R\x08channels\x12&\n\x0fsamples_per_sec\x18\x03\x20\x01(\x05R\r\
- samplesPerSec\x12)\n\x11avg_bytes_per_sec\x18\x04\x20\x01(\x05R\x0eavgBy\
- tesPerSec\x12\x1f\n\x0bblock_align\x18\x05\x20\x01(\x05R\nblockAlign\x12\
- &\n\x0fbits_per_sample\x18\x06\x20\x01(\x05R\rbitsPerSample\x12\x1d\n\ns\
- ize_bytes\x18\x07\x20\x01(\x05R\tsizeBytes\x12\x18\n\x07samples\x18\x08\
- \x20\x01(\x05R\x07samples\x12!\n\x0cchannel_mask\x18\t\x20\x01(\x03R\x0b\
- channelMask\x12>\n\nsub_format\x18\n\x20\x01(\x0e2\x1f.WaveFormat.WaveFo\
- rmatSubFormatR\tsubFormat\"\xb7\x02\n\x13WaveFormatSubFormat\x12\x20\n\
- \x1cKSDATAFORMAT_SUBTYPE_INVALID\x10\0\x12\x1f\n\x1bKSDATAFORMAT_SUBTYPE\
- _ANALOG\x10\x01\x12\x1c\n\x18KSDATAFORMAT_SUBTYPE_PCM\x10\x02\x12#\n\x1f\
- KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\x10\x03\x12\x1c\n\x18KSDATAFORMAT_SUBTYP\
- E_DRM\x10\x04\x12\x1d\n\x19KSDATAFORMAT_SUBTYPE_ALAW\x10\x05\x12\x1e\n\
- \x1aKSDATAFORMAT_SUBTYPE_MULAW\x10\x06\x12\x1e\n\x1aKSDATAFORMAT_SUBTYPE\
- _ADPCM\x10\x07\x12\x1d\n\x19KSDATAFORMAT_SUBTYPE_MPEG\x10\x08\"w\n\x1fEm\
- ulatorChildProcessExitDetails\x12\x1b\n\texit_code\x18\x01\x20\x01(\rR\
- \x08exitCode\x127\n\x0cprocess_type\x18\x02\x20\x01(\x0e2\x14.EmulatorPr\
- ocessTypeR\x0bprocessType\"8\n\x12EmulatorDllDetails\x12\"\n\rdll_base_n\
- ame\x18\x01\x20\x01(\tR\x0bdllBaseName*\x83\x02\n\x13EmulatorProcessType\
- \x12\x18\n\x14PROCESS_TYPE_UNKNOWN\x10\0\x12\x15\n\x11PROCESS_TYPE_MAIN\
- \x10\x01\x12\x16\n\x12PROCESS_TYPE_BLOCK\x10\x02\x12\x18\n\x14PROCESS_TY\
- PE_METRICS\x10\x03\x12\x14\n\x10PROCESS_TYPE_NET\x10\x04\x12\x16\n\x12PR\
- OCESS_TYPE_SLIRP\x10\x05\x12\x14\n\x10PROCESS_TYPE_GPU\x10\x06\x12\x16\n\
- \x12PROCESS_TYPE_SOUND\x10\x07\x12\x17\n\x13PROCESS_TYPE_BROKER\x10\x08\
- \x12\x14\n\x10PROCESS_TYPE_SPU\x10\t\
-";
-
-/// `FileDescriptorProto` object which was a source for this generated file
-fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
- static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
- file_descriptor_proto_lazy.get(|| {
- ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
- })
-}
-
-/// `FileDescriptor` object which allows dynamic access to files
-pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
- static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
- static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
- file_descriptor.get(|| {
- let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
- let mut deps = ::std::vec::Vec::with_capacity(0);
- let mut messages = ::std::vec::Vec::with_capacity(5);
- messages.push(RecordDetails::generated_message_descriptor_data());
- messages.push(WaveFormatDetails::generated_message_descriptor_data());
- messages.push(WaveFormat::generated_message_descriptor_data());
- messages.push(EmulatorChildProcessExitDetails::generated_message_descriptor_data());
- messages.push(EmulatorDllDetails::generated_message_descriptor_data());
- let mut enums = ::std::vec::Vec::with_capacity(2);
- enums.push(EmulatorProcessType::generated_enum_descriptor_data());
- enums.push(wave_format::WaveFormatSubFormat::generated_enum_descriptor_data());
- ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
- file_descriptor_proto(),
- deps,
- messages,
- enums,
- )
- });
- ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
- })
-}
diff --git a/vendor/generic/metrics/src/out/generated.rs b/vendor/generic/metrics/src/out/generated.rs
deleted file mode 100644
index c7dc617d2..000000000
--- a/vendor/generic/metrics/src/out/generated.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-#[path = "./event_details.rs"]
-pub mod event_details;
diff --git a/vendor/generic/metrics/src/out/mod.rs b/vendor/generic/metrics/src/out/mod.rs
deleted file mode 100644
index 2db7abd20..000000000
--- a/vendor/generic/metrics/src/out/mod.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-// @generated
-
-pub mod event_details;
diff --git a/vendor/generic/metrics/src/periodic_logger.rs b/vendor/generic/metrics/src/periodic_logger.rs
index 409307856..b6469f648 100644
--- a/vendor/generic/metrics/src/periodic_logger.rs
+++ b/vendor/generic/metrics/src/periodic_logger.rs
@@ -5,7 +5,7 @@
use std::result::Result;
use std::time::Duration;
-use crate::MetricEventType;
+use metrics_events::MetricEventType;
/// A logging struct meant for use in tracking and periodically
/// logging a single metric. The metric is aggregated over the
diff --git a/vendor/generic/metrics/src/request_handler.rs b/vendor/generic/metrics/src/request_handler.rs
index 7ed300d22..7520c700a 100644
--- a/vendor/generic/metrics/src/request_handler.rs
+++ b/vendor/generic/metrics/src/request_handler.rs
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-use crate::metrics_requests::MetricsRequest;
+use base::RecvTube;
#[derive(Default)]
pub struct MetricsRequestHandler;
@@ -10,6 +10,8 @@ impl MetricsRequestHandler {
pub fn new() -> Self {
MetricsRequestHandler
}
- pub fn handle_request(&self, _req: MetricsRequest) {}
+ pub fn handle_tube_readable(&self, _tube: &RecvTube) {
+ unreachable!();
+ }
pub fn shutdown(&self) {}
}
diff --git a/vendor/generic/metrics/src/sys.rs b/vendor/generic/metrics/src/sys.rs
deleted file mode 100644
index 10b70883f..000000000
--- a/vendor/generic/metrics/src/sys.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2024 The ChromiumOS Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-cfg_if::cfg_if! {
- if #[cfg(windows)] {
- pub mod windows;
- }
-}
diff --git a/vendor/generic/metrics/src/sys/windows.rs b/vendor/generic/metrics/src/sys/windows.rs
deleted file mode 100644
index 0aedb5c51..000000000
--- a/vendor/generic/metrics/src/sys/windows.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2022 The ChromiumOS Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-use win_util::ProcessType;
-
-use crate::protos::event_details::EmulatorProcessType;
-
-impl From<ProcessType> for EmulatorProcessType {
- fn from(process_type: ProcessType) -> Self {
- match process_type {
- ProcessType::Block => EmulatorProcessType::PROCESS_TYPE_BLOCK,
- ProcessType::Main => EmulatorProcessType::PROCESS_TYPE_MAIN,
- ProcessType::Metrics => EmulatorProcessType::PROCESS_TYPE_METRICS,
- ProcessType::Net => EmulatorProcessType::PROCESS_TYPE_NET,
- ProcessType::Slirp => EmulatorProcessType::PROCESS_TYPE_SLIRP,
- ProcessType::Gpu => EmulatorProcessType::PROCESS_TYPE_GPU,
- ProcessType::Snd => EmulatorProcessType::PROCESS_TYPE_SOUND,
- ProcessType::Broker => EmulatorProcessType::PROCESS_TYPE_BROKER,
- ProcessType::Spu => EmulatorProcessType::PROCESS_TYPE_SPU,
- ProcessType::UnknownType => panic!("Unknown process type found"),
- }
- }
-}
diff --git a/vendor/generic/metrics_events/Android.bp b/vendor/generic/metrics_events/Android.bp
new file mode 100644
index 000000000..90ea97aca
--- /dev/null
+++ b/vendor/generic/metrics_events/Android.bp
@@ -0,0 +1,20 @@
+// This file is generated by cargo_embargo.
+// Do not modify this file after the first "rust_*" or "genrule" module
+// because the changes will be overridden on upgrade.
+// Content before the first "rust_*" or "genrule" module is preserved.
+
+package {
+ default_applicable_licenses: ["external_crosvm_license"],
+}
+
+rust_library {
+ name: "libmetrics_events_generic",
+ defaults: ["crosvm_inner_defaults"],
+ host_supported: true,
+ crate_name: "metrics_events_generic",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.1.0",
+ srcs: ["src/lib.rs"],
+ edition: "2021",
+ rustlibs: ["libserde"],
+}
diff --git a/vendor/generic/metrics_events/Cargo.toml b/vendor/generic/metrics_events/Cargo.toml
new file mode 100644
index 000000000..19d3a5ba5
--- /dev/null
+++ b/vendor/generic/metrics_events/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "metrics_events_generic"
+version = "0.1.0"
+authors = ["The ChromiumOS Authors"]
+edition = "2021"
+
+[dependencies]
+serde = { version = "1", features = ["derive"] }
diff --git a/vendor/generic/metrics_events/src/lib.rs b/vendor/generic/metrics_events/src/lib.rs
new file mode 100644
index 000000000..85a7075e5
--- /dev/null
+++ b/vendor/generic/metrics_events/src/lib.rs
@@ -0,0 +1,18 @@
+// Copyright 2024 The ChromiumOS Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+use serde::Deserialize;
+use serde::Serialize;
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub enum MetricEventType {
+ // No events should ever be added to this enum - all events defined in
+ // upstream CrosVM should be added to the metrics_event package. Downstream
+ // projects can replace the generic metrics_event package if they need
+ // downstream only events.
+}
+
+pub struct RecordDetails {
+ // Similar to above, this is for downstream projects.
+}
diff --git a/vendor/generic/vm_control/Android.bp b/vendor/generic/vm_control/Android.bp
index 56b56b96b..1371389cd 100644
--- a/vendor/generic/vm_control/Android.bp
+++ b/vendor/generic/vm_control/Android.bp
@@ -1,5 +1,6 @@
// This file is generated by cargo_embargo.
-// Do not modify this file as most changes will be overridden on upgrade.
+// Do not modify this file after the first "rust_*" or "genrule" module
+// because the changes will be overridden on upgrade.
// Content before the first "rust_*" or "genrule" module is preserved.
package {