Skip to content

Commit

Permalink
Merge 3804859 into 5e882f8
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Dec 26, 2023
2 parents 5e882f8 + 3804859 commit 51f341d
Show file tree
Hide file tree
Showing 10 changed files with 765 additions and 707 deletions.
15 changes: 12 additions & 3 deletions rust/agama-dbus-server/src/network/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::network::model::Connection;
use agama_lib::network::types::DeviceType;
use tokio::sync::oneshot;
use uuid::Uuid;
use zbus::zvariant::OwnedObjectPath;

use super::error::NetworkStateError;

Expand All @@ -15,7 +16,11 @@ pub type ControllerConnection = (Connection, Vec<String>);
#[derive(Debug)]
pub enum Action {
/// Add a new connection with the given name and type.
AddConnection(String, DeviceType),
AddConnection(
String,
DeviceType,
Responder<Result<OwnedObjectPath, NetworkStateError>>,
),
/// Gets a connection
GetConnection(Uuid, Responder<Option<Connection>>),
/// Gets a controller connection
Expand All @@ -25,9 +30,13 @@ pub enum Action {
),
/// Sets a controller's ports. It uses the Uuid of the controller and the IDs or interface names
/// of the ports.
SetPorts(Uuid, Vec<String>, Responder<Result<(), NetworkStateError>>),
SetPorts(
Uuid,
Box<Vec<String>>,
Responder<Result<(), NetworkStateError>>,
),
/// Update a connection (replacing the old one).
UpdateConnection(Connection),
UpdateConnection(Box<Connection>),
/// Remove the connection with the given Uuid.
RemoveConnection(String),
/// Apply the current configuration.
Expand Down

0 comments on commit 51f341d

Please sign in to comment.