@@ -5,6 +5,7 @@ use dbus::{
55use pulse:: context:: introspect:: {
66 CardInfo , CardProfileInfo , SinkInfo , SinkInputInfo , SourceInfo , SourceOutputInfo ,
77} ;
8+ use zbus:: zvariant:: { DeserializeDict , SerializeDict , Type } ;
89
910use crate :: network:: connection:: Enum ;
1011
@@ -113,7 +114,8 @@ impl Enum for DeviceState {
113114 }
114115}
115116
116- #[ derive( Debug , Clone , Default ) ]
117+ #[ derive( Debug , Clone , Default , DeserializeDict , SerializeDict , Type ) ]
118+ #[ zvariant( signature = "dict" ) ]
117119pub struct Source {
118120 pub index : u32 ,
119121 pub name : String ,
@@ -227,7 +229,8 @@ impl TAudioObject for Source {
227229 }
228230}
229231
230- #[ derive( Debug , Clone , Default ) ]
232+ #[ derive( Debug , Clone , Default , DeserializeDict , SerializeDict , Type ) ]
233+ #[ zvariant( signature = "dict" ) ]
231234pub struct Sink {
232235 pub index : u32 ,
233236 pub name : String ,
@@ -341,7 +344,8 @@ impl TAudioObject for Sink {
341344 }
342345}
343346
344- #[ derive( Debug , Clone , Default ) ]
347+ #[ derive( Debug , Clone , Default , DeserializeDict , SerializeDict , Type ) ]
348+ #[ zvariant( signature = "dict" ) ]
345349pub struct InputStream {
346350 pub index : u32 ,
347351 pub name : String ,
@@ -459,7 +463,8 @@ impl TAudioStreamObject for InputStream {
459463 }
460464}
461465
462- #[ derive( Debug , Clone , Default ) ]
466+ #[ derive( Debug , Clone , Default , DeserializeDict , SerializeDict , Type ) ]
467+ #[ zvariant( signature = "dict" ) ]
463468pub struct OutputStream {
464469 pub index : u32 ,
465470 pub name : String ,
@@ -577,7 +582,8 @@ impl TAudioStreamObject for OutputStream {
577582 }
578583}
579584
580- #[ derive( Debug , Clone , Default ) ]
585+ #[ derive( Debug , Clone , Default , DeserializeDict , SerializeDict , Type ) ]
586+ #[ zvariant( signature = "dict" ) ]
581587pub struct Card {
582588 pub index : u32 ,
583589 pub name : String ,
@@ -642,7 +648,8 @@ impl From<&CardInfo<'_>> for Card {
642648 }
643649}
644650
645- #[ derive( Debug , Clone , Default ) ]
651+ #[ derive( Debug , Clone , Default , DeserializeDict , SerializeDict , Type ) ]
652+ #[ zvariant( signature = "dict" ) ]
646653pub struct CardProfile {
647654 pub name : String ,
648655 pub description : String ,
0 commit comments