pub struct WayleNotificationsProxy<'p>(/* private fields */);Expand description
D-Bus client proxy for Wayle notification extensions.
Connects to a running notification daemon and allows external control of notifications, DND mode, and popup settings.
Implementations§
Source§impl<'p> WayleNotificationsProxy<'p>
impl<'p> WayleNotificationsProxy<'p>
Sourcepub async fn new(conn: &Connection) -> Result<WayleNotificationsProxy<'p>>
pub async fn new(conn: &Connection) -> Result<WayleNotificationsProxy<'p>>
Creates a new proxy with the default service and path.
Sourcepub fn builder(conn: &Connection) -> Builder<'p, Self>
pub fn builder(conn: &Connection) -> Builder<'p, Self>
Returns a customizable builder for this proxy.
Sourcepub fn into_inner(self) -> Proxy<'p>
pub fn into_inner(self) -> Proxy<'p>
Consumes self, returning the underlying zbus::Proxy.
Sourcepub fn inner_mut(&mut self) -> &mut Proxy<'p>
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
The mutable reference to the underlying zbus::Proxy.
Sourcepub async fn dismiss_all(&self) -> Result<()>
pub async fn dismiss_all(&self) -> Result<()>
Dismisses all notifications.
Sourcepub async fn toggle_dnd(&self) -> Result<()>
pub async fn toggle_dnd(&self) -> Result<()>
Toggles Do Not Disturb mode.
Sourcepub async fn set_popup_duration(&self, duration_ms: u32) -> Result<()>
pub async fn set_popup_duration(&self, duration_ms: u32) -> Result<()>
Sets the popup display duration in milliseconds.
Sourcepub async fn list(&self) -> Result<Vec<(u32, String, String, String)>>
pub async fn list(&self) -> Result<Vec<(u32, String, String, String)>>
Lists all notifications.
Returns a list of tuples: (id, app_name, summary, body).
Sourcepub fn cached_dnd(
&self,
) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>
pub fn cached_dnd( &self, ) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>
Do Not Disturb status.
Get the cached value of the Dnd property, or None if the property is not cached.
Sourcepub async fn receive_dnd_changed(
&self,
) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>
pub async fn receive_dnd_changed( &self, ) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>
Do Not Disturb status.
Create a stream for the Dnd property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.
Sourcepub async fn popup_duration(&self) -> Result<u32>
pub async fn popup_duration(&self) -> Result<u32>
Popup display duration in milliseconds.
Sourcepub fn cached_popup_duration(
&self,
) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
pub fn cached_popup_duration( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
Popup display duration in milliseconds.
Get the cached value of the PopupDuration property, or None if the property is not cached.
Sourcepub async fn receive_popup_duration_changed(
&self,
) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
pub async fn receive_popup_duration_changed( &self, ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
Popup display duration in milliseconds.
Create a stream for the PopupDuration property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.
Sourcepub fn cached_count(
&self,
) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
pub fn cached_count( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
Number of notifications.
Get the cached value of the Count property, or None if the property is not cached.
Sourcepub async fn receive_count_changed(
&self,
) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
pub async fn receive_count_changed( &self, ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
Number of notifications.
Create a stream for the Count property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.
Sourcepub async fn popup_count(&self) -> Result<u32>
pub async fn popup_count(&self) -> Result<u32>
Number of active popups.
Sourcepub fn cached_popup_count(
&self,
) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
pub fn cached_popup_count( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
Number of active popups.
Get the cached value of the PopupCount property, or None if the property is not cached.
Sourcepub async fn receive_popup_count_changed(
&self,
) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
pub async fn receive_popup_count_changed( &self, ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
Number of active popups.
Create a stream for the PopupCount property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.
Trait Implementations§
Source§impl<'p> AsMut<Proxy<'p>> for WayleNotificationsProxy<'p>
impl<'p> AsMut<Proxy<'p>> for WayleNotificationsProxy<'p>
Source§impl<'p> AsRef<Proxy<'p>> for WayleNotificationsProxy<'p>
impl<'p> AsRef<Proxy<'p>> for WayleNotificationsProxy<'p>
Source§impl<'p> Clone for WayleNotificationsProxy<'p>
impl<'p> Clone for WayleNotificationsProxy<'p>
Source§fn clone(&self) -> WayleNotificationsProxy<'p>
fn clone(&self) -> WayleNotificationsProxy<'p>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more