pub struct AppServiceClient { /* private fields */ }Expand description
Client for CoreDevice appservice feature calls.
Implementations§
Source§impl AppServiceClient
impl AppServiceClient
Sourcepub fn new(client: XpcClient, device_identifier: impl Into<String>) -> Self
pub fn new(client: XpcClient, device_identifier: impl Into<String>) -> Self
Create an appservice client from an initialized XPC client and device identifier.
Sourcepub async fn list_processes(
&mut self,
) -> Result<Vec<RunningAppProcess>, AppServiceError>
pub async fn list_processes( &mut self, ) -> Result<Vec<RunningAppProcess>, AppServiceError>
List running processes visible to CoreDevice.
Sourcepub async fn list_apps(
&mut self,
options: ListAppsOptions,
) -> Result<Vec<CoreDeviceAppInfo>, AppServiceError>
pub async fn list_apps( &mut self, options: ListAppsOptions, ) -> Result<Vec<CoreDeviceAppInfo>, AppServiceError>
List installed apps using the supplied CoreDevice filters.
Sourcepub async fn list_roots(&mut self) -> Result<XpcValue, AppServiceError>
pub async fn list_roots(&mut self) -> Result<XpcValue, AppServiceError>
Return appservice root descriptors as the raw CoreDevice output value.
Sourcepub async fn kill_process(&mut self, pid: u64) -> Result<(), AppServiceError>
pub async fn kill_process(&mut self, pid: u64) -> Result<(), AppServiceError>
Send SIGKILL to a process.
Sourcepub async fn send_signal(
&mut self,
pid: u64,
signal: i64,
) -> Result<(), AppServiceError>
pub async fn send_signal( &mut self, pid: u64, signal: i64, ) -> Result<(), AppServiceError>
Send an arbitrary signal to a process identifier.
Sourcepub async fn launch_application(
&mut self,
bundle_id: &str,
) -> Result<Option<u64>, AppServiceError>
pub async fn launch_application( &mut self, bundle_id: &str, ) -> Result<Option<u64>, AppServiceError>
Launch an app using default CoreDevice options.
Sourcepub async fn launch_application_with_options(
&mut self,
bundle_id: &str,
options: &LaunchApplicationOptions,
) -> Result<Option<u64>, AppServiceError>
pub async fn launch_application_with_options( &mut self, bundle_id: &str, options: &LaunchApplicationOptions, ) -> Result<Option<u64>, AppServiceError>
Launch an app using explicit CoreDevice launch options.
Sourcepub async fn spawn_executable(
&mut self,
executable: &str,
arguments: &[String],
) -> Result<Option<u64>, AppServiceError>
pub async fn spawn_executable( &mut self, executable: &str, arguments: &[String], ) -> Result<Option<u64>, AppServiceError>
Spawn an executable path with command-line arguments.
Sourcepub async fn fetch_app_icons(
&mut self,
bundle_id: &str,
width: f64,
height: f64,
scale: f64,
allow_placeholder: bool,
) -> Result<Vec<AppIcon>, AppServiceError>
pub async fn fetch_app_icons( &mut self, bundle_id: &str, width: f64, height: f64, scale: f64, allow_placeholder: bool, ) -> Result<Vec<AppIcon>, AppServiceError>
Fetch one or more rendered app icons for a bundle.
Sourcepub async fn monitor_process_termination(
&mut self,
pid: u64,
) -> Result<ProcessTermination, AppServiceError>
pub async fn monitor_process_termination( &mut self, pid: u64, ) -> Result<ProcessTermination, AppServiceError>
Wait for CoreDevice to report a process termination event.
Auto Trait Implementations§
impl Freeze for AppServiceClient
impl !RefUnwindSafe for AppServiceClient
impl Send for AppServiceClient
impl !Sync for AppServiceClient
impl Unpin for AppServiceClient
impl UnsafeUnpin for AppServiceClient
impl !UnwindSafe for AppServiceClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more