[][src]Trait sunrise_libuser::ldr::ILoaderInterface

pub trait ILoaderInterface {
    fn create_title(
        &mut self,
        manager: WorkQueue<'static>,
        title_name: &[u8],
        args: &[u8],
        env: &[u8]
    ) -> Result<u64, Error>;
fn launch_title(
        &mut self,
        manager: WorkQueue<'static>,
        pid: u64
    ) -> Result<(), Error>;
fn wait(
        &mut self,
        manager: WorkQueue<'static>,
        pid: u64
    ) -> Result<u32, Error>;
fn get_name(
        &mut self,
        manager: WorkQueue<'static>,
        pid: u64,
        title_name: &mut [u8]
    ) -> Result<u64, Error>;
fn kill(
        &mut self,
        manager: WorkQueue<'static>,
        pid: u64
    ) -> Result<(), Error>;
fn get_state(
        &mut self,
        manager: WorkQueue<'static>,
        pid: u64
    ) -> Result<u8, Error>;
fn get_process_state_changed_event(
        &mut self,
        manager: WorkQueue<'static>
    ) -> Result<HandleRef<'static>, Error>; fn dispatch<'a>(
        &'a mut self,
        manager: WorkQueue<'static>,
        cmdid: u32,
        buf: &'a mut [u8]
    ) -> FutureObj<Result<(), Error>> { ... } }

A mishmash of Nintendo's loader and pm in a single disgusting service.

Responsible for creating, loading, starting and waiting on processes.

Required methods

fn create_title(
    &mut self,
    manager: WorkQueue<'static>,
    title_name: &[u8],
    args: &[u8],
    env: &[u8]
) -> Result<u64, Error>

Create and load the process title_name with the given args and env. Returns the process' pid. The process will not be started yet, use launch_title to start it.

The args given is a cmdline string that will be passed verbatim to the subprocess. The environment should be a \0-delimited array of environment variables.

fn launch_title(
    &mut self,
    manager: WorkQueue<'static>,
    pid: u64
) -> Result<(), Error>

Starts a process created with create_title.

fn wait(&mut self, manager: WorkQueue<'static>, pid: u64) -> Result<u32, Error>

Wait for the process with the given pid, returning the exit status.

fn get_name(
    &mut self,
    manager: WorkQueue<'static>,
    pid: u64,
    title_name: &mut [u8]
) -> Result<u64, Error>

Get process name.

fn kill(&mut self, manager: WorkQueue<'static>, pid: u64) -> Result<(), Error>

Wait for the process with the given pid, returning the exit status.

fn get_state(
    &mut self,
    manager: WorkQueue<'static>,
    pid: u64
) -> Result<u8, Error>

Gets the state of the provided pid

fn get_process_state_changed_event(
    &mut self,
    manager: WorkQueue<'static>
) -> Result<HandleRef<'static>, Error>

Get an event that gets signaled whenever a process changes state.

Loading content...

Provided methods

fn dispatch<'a>(
    &'a mut self,
    manager: WorkQueue<'static>,
    cmdid: u32,
    buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>

Handle an incoming IPC request.

Loading content...

Implementors

Loading content...