Update to zbus 5.x

This commit is contained in:
Ian Douglas Scott 2024-11-05 11:56:50 -08:00 committed by Ashley Wulber
parent b61e0bc94d
commit 417f43a0f5
14 changed files with 756 additions and 514 deletions

View file

@ -6,9 +6,10 @@ use cosmic::{
iced::futures::{self, SinkExt},
iced_futures::{stream, Subscription},
};
use futures_util::StreamExt;
use tokio::sync::mpsc::{channel, Receiver, Sender};
use tracing::{error, warn};
use zbus::{export::futures_util::StreamExt, Connection};
use zbus::Connection;
#[derive(Debug)]
pub enum State {

View file

@ -26,7 +26,7 @@ use zbus::proxy;
default_service = "org.freedesktop.Notifications",
default_path = "/org/freedesktop/Notifications"
)]
trait Notifications {
pub trait Notifications {
/// CloseNotification method
fn close_notification(&self, id: u32) -> zbus::Result<()>;

View file

@ -9,6 +9,7 @@ use cosmic::{
iced_futures::Subscription,
};
use cosmic_notifications_util::Notification;
use futures_util::{SinkExt, StreamExt};
use std::{
collections::HashMap,
future::pending,
@ -17,11 +18,7 @@ use std::{
};
use tokio::sync::mpsc;
use tracing::{error, trace};
use zbus::{
connection::Builder,
export::futures_util::{SinkExt, StreamExt},
proxy,
};
use zbus::{connection::Builder, proxy};
#[derive(Debug)]
pub enum State {
@ -130,7 +127,7 @@ pub fn notifications(proxy: NotificationsAppletProxy<'static>) -> Subscription<O
interface = "com.system76.NotificationsApplet",
default_path = "/com/system76/NotificationsApplet"
)]
trait NotificationsApplet {
pub trait NotificationsApplet {
#[zbus(signal)]
fn notify(
&self,