libctru  v1.6.0
srvpm.h
Go to the documentation of this file.
1 /**
2  * @file srvpm.h
3  * @brief srv:pm service.
4  */
5 #pragma once
6 
7 /// Initializes srv:pm and the service API.
8 Result srvPmInit(void);
9 
10 /// Exits srv:pm and the service API.
11 void srvPmExit(void);
12 
13 /**
14  * @brief Gets the current srv:pm session handle.
15  * @return The current srv:pm session handle.
16  */
18 
19 /**
20  * @brief Publishes a notification to a process.
21  * @param notificationId ID of the notification.
22  * @param process Process to publish to.
23  */
24 Result SRVPM_PublishToProcess(u32 notificationId, Handle process);
25 
26 /**
27  * @brief Publishes a notification to all processes.
28  * @param notificationId ID of the notification.
29  */
30 Result SRVPM_PublishToAll(u32 notificationId);
31 
32 /**
33  * @brief Registers a process with SRV.
34  * @param pid ID of the process.
35  * @param count Number of services within the service access control data.
36  * @param serviceAccessControlList Service Access Control list.
37  */
38 Result SRVPM_RegisterProcess(u32 pid, u32 count, const char (*serviceAccessControlList)[8]);
39 
40 /**
41  * @brief Unregisters a process with SRV.
42  * @param pid ID of the process.
43  */
45 
s32 Result
Function result.
Definition: types.h:42
void srvPmExit(void)
Exits srv:pm and the service API.
u32 Handle
Resource handle.
Definition: types.h:41
uint32_t u32
32-bit unsigned integer
Definition: types.h:23
Result SRVPM_PublishToAll(u32 notificationId)
Publishes a notification to all processes.
Result SRVPM_RegisterProcess(u32 pid, u32 count, const char(*serviceAccessControlList)[8])
Registers a process with SRV.
Result SRVPM_PublishToProcess(u32 notificationId, Handle process)
Publishes a notification to a process.
Result SRVPM_UnregisterProcess(u32 pid)
Unregisters a process with SRV.
Result srvPmInit(void)
Initializes srv:pm and the service API.
Handle * srvPmGetSessionHandle(void)
Gets the current srv:pm session handle.