use super::DeviceClient;
use std::io::Error;
use std::sync::Arc;
use zbus::Connection;
pub struct PppClient {
device: DeviceClient,
}
impl PppClient {
pub async fn new(connection: Arc<Connection>, service_path: String) -> Result<Self, Error> {
let device = DeviceClient::new(connection, service_path).await?;
Ok(Self { device })
}
pub fn service_path(&self) -> &str {
self.device.service_path()
}
pub async fn interface(&self) -> Result<String, Error> {
self.device.interface().await
}
pub async fn disconnect(&self) -> Result<(), Error> {
self.device.disconnect().await
}
}