libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
sm.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include<libtransistor/types.h>
13 #include<libtransistor/ipc.h>
14 
19 
26 result_t sm_get_service(ipc_object_t *session, const char *name);
27 
35 result_t sm_get_service_ex(ipc_object_t *session, const char *name, bool require_override);
36 
44 result_t sm_register_service(port_h *port, const char *name, uint32_t max_sessions);
45 
51 result_t sm_unregister_service(const char *name);
52 
56 void sm_finalize();
57 
66 void sm_force_finalize();
67 
68 #ifdef __cplusplus
69 }
70 #endif
Various system types.
result_t sm_get_service(ipc_object_t *session, const char *name)
Get a service by name.
uint32_t result_t
Function result.
Definition: types.h:51
result_t sm_get_service_ex(ipc_object_t *session, const char *name, bool require_override)
Get a service by name, optinally requiring that it has been overriden by the loader.
void sm_finalize()
Finalize Service Manager.
Represents either an object within an IPC domain or a standalone object.
Definition: ipc.h:32
result_t sm_register_service(port_h *port, const char *name, uint32_t max_sessions)
Register a service by name.
handle_t port_h
Port handle.
Definition: types.h:43
result_t sm_init()
Initialize Service Manager.
Interprocess Communication data structures and functions.
void sm_force_finalize()
Force Service Manager finalization.
result_t sm_unregister_service(const char *name)
Unregister a service.