1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
use crate::result::*;
use crate::ipc::sf::{self, sm};
use crate::ipc::client;
use crate::service;
pub use crate::ipc::sf::pm::*;
pub struct InformationInterface {
session: sf::Session
}
impl sf::IObject for InformationInterface {
ipc_sf_object_impl_default_command_metadata!();
}
impl IInformationInterface for InformationInterface {
fn get_program_id(&mut self, process_id: u64) -> Result<u64> {
ipc_client_send_request_command!([self.session.object_info; 0] (process_id) => (program_id: u64))
}
}
impl client::IClientObject for InformationInterface {
fn new(session: sf::Session) -> Self {
Self { session }
}
fn get_session(&mut self) -> &mut sf::Session {
&mut self.session
}
}
impl service::IService for InformationInterface {
fn get_name() -> sm::ServiceName {
sm::ServiceName::new("pm:info")
}
fn as_domain() -> bool {
false
}
fn post_initialize(&mut self) -> Result<()> {
Ok(())
}
}
pub struct DebugMonitorInterface {
session: sf::Session
}
impl sf::IObject for DebugMonitorInterface {
ipc_sf_object_impl_default_command_metadata!();
}
impl IDebugMonitorInterface for DebugMonitorInterface {
fn get_application_process_id_deprecated(&mut self) -> Result<u64> {
ipc_client_send_request_command!([self.session.object_info; 5] () => (process_id: u64))
}
fn get_application_process_id(&mut self) -> Result<u64> {
ipc_client_send_request_command!([self.session.object_info; 4] () => (process_id: u64))
}
}
impl client::IClientObject for DebugMonitorInterface {
fn new(session: sf::Session) -> Self {
Self { session }
}
fn get_session(&mut self) -> &mut sf::Session {
&mut self.session
}
}
impl service::IService for DebugMonitorInterface {
fn get_name() -> sm::ServiceName {
sm::ServiceName::new("pm:dmnt")
}
fn as_domain() -> bool {
false
}
fn post_initialize(&mut self) -> Result<()> {
Ok(())
}
}