diff options
Diffstat (limited to 'system/gd/rust/linux/stack/src/uuid.rs')
-rw-r--r-- | system/gd/rust/linux/stack/src/uuid.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/system/gd/rust/linux/stack/src/uuid.rs b/system/gd/rust/linux/stack/src/uuid.rs index c1e2edfb59..010b804a62 100644 --- a/system/gd/rust/linux/stack/src/uuid.rs +++ b/system/gd/rust/linux/stack/src/uuid.rs @@ -36,7 +36,7 @@ pub const COORDINATED_SET: &str = "00001846-0000-1000-8000-00805F9B34FB"; pub const BASE_UUID: &str = "00000000-0000-1000-8000-00805F9B34FB"; /// List of profiles that with known uuids. -#[derive(Clone, Debug, Hash, PartialEq, PartialOrd, Eq)] +#[derive(Clone, Debug, Hash, PartialEq, PartialOrd, Eq, FromPrimitive, ToPrimitive, Copy)] #[repr(u32)] pub enum Profile { A2dpSink, @@ -144,6 +144,10 @@ impl UuidHelper { self.profiles.get(uuid) } + pub fn get_enabled_profiles(&self) -> HashSet<Profile> { + self.enabled_profiles.clone() + } + /// Converts a UUID byte array into a formatted string. pub fn to_string(uuid: &Uuid128Bit) -> String { return String::from(format!("{:02x}{:02x}{:02x}{:02x}-{:02x}{:02x}-{:02x}{:02x}-{:02x}{:02x}-{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}", |