mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-13 18:02:00 -04:00
Tweak the Subprocess api a bit.
From feedback from Andres changed SubProcess to just Job for possible further changes to have the manager do things itself without launching subprocesses. Changed names objectpath to jobpath, exit_code to result, etc. Removed Kill and added a force parameter to Cancel instead. Also ran cargo fmt which tweaked indentation in a couple places. Alos removed ExitCode, users can just call Wait again if needed.
This commit is contained in:
parent
6e51d1556b
commit
f6298efbc9
4 changed files with 46 additions and 85 deletions
|
@ -123,12 +123,12 @@ trait Manager {
|
|||
|
||||
#[proxy(
|
||||
default_service = "com.steampowered.SteamOSManager1",
|
||||
interface = "com.steampowered.SteamOSManager1.SubProcess",
|
||||
interface = "com.steampowered.SteamOSManager1.Job",
|
||||
assume_defaults = true
|
||||
)]
|
||||
trait SubProcess {
|
||||
trait Job {
|
||||
/// Cancel method
|
||||
fn cancel(&self) -> zbus::Result<()>;
|
||||
fn cancel(&self, force: bool) -> zbus::Result<()>;
|
||||
|
||||
/// ExitCode method
|
||||
fn exit_code(&self) -> zbus::Result<i32>;
|
||||
|
@ -136,9 +136,6 @@ trait SubProcess {
|
|||
/// WaitForExitCode method
|
||||
fn wait_for_exit_code(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// Kill method
|
||||
fn kill(&self) -> zbus::Result<()>;
|
||||
|
||||
/// Pause method
|
||||
fn pause(&self) -> zbus::Result<()>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue