|
libnx
|
Service manager (sm) IPC wrapper. More...
Go to the source code of this file.
Data Structures | |
| struct | Service |
| Service object structure. More... | |
Enumerations | |
| enum | ServiceType { ServiceType_Uninitialized, ServiceType_Normal, ServiceType_Domain, ServiceType_DomainSubservice, ServiceType_Override } |
| Service type. More... | |
Functions | |
| static bool | serviceIsOverride (Service *s) |
| Returns whether a service is overriden in the homebrew environment. More... | |
| static bool | serviceIsActive (Service *s) |
| Returns whether a service has been initialized. More... | |
| static bool | serviceIsDomain (Service *s) |
| Returns whether a service is a domain. More... | |
| static bool | serviceIsDomainSubservice (Service *s) |
| Returns whether a service is a domain subservice. More... | |
| static u32 | serviceGetObjectId (Service *s) |
| For a domain/domain subservice, return the associated object ID. More... | |
| static Result | serviceCloseObjectById (Service *s, u32 object_id) |
| Closes a domain object by ID. More... | |
| static Result | serviceIpcDispatch (Service *s) |
| Dispatches an IPC request to a service. More... | |
| static void | serviceCreate (Service *s, Handle h) |
| Creates a service object from an IPC session handle. More... | |
| static void | serviceCreateDomainSubservice (Service *s, Service *parent, u32 object_id) |
| Creates a domain subservice object from a parent service. More... | |
| static Result | serviceConvertToDomain (Service *s) |
| Converts a regular service to a domain. More... | |
| static void | serviceClose (Service *s) |
| Closes a service. More... | |
| Result | smInitialize (void) |
| Initializes SM. More... | |
| void | smExit (void) |
| Uninitializes SM. More... | |
| Result | smGetService (Service *service_out, const char *name) |
| Requests a service from SM. More... | |
| Result | smGetServiceOriginal (Handle *handle_out, u64 name) |
| Requests a service from SM, as an IPC session handle directly. More... | |
| Handle | smGetServiceOverride (u64 name) |
| Retrieves an overriden service in the homebrew environment. More... | |
| Result | smRegisterService (Handle *handle_out, const char *name, bool is_light, int max_sessions) |
| Creates and registers a new service within SM. More... | |
| Result | smUnregisterService (const char *name) |
| Unregisters a previously registered service in SM. More... | |
| bool | smHasInitialized (void) |
| Check whether SM is initialized. More... | |
| u64 | smEncodeName (const char *name) |
| Encodes a service name as a 64-bit integer. More... | |
| void | smAddOverrideHandle (u64 name, Handle handle) |
| Overrides a service with a custom IPC service handle. More... | |
Service manager (sm) IPC wrapper.
| enum ServiceType |
|
inlinestatic |
Closes a service.
| [in] | s | Service object. |
Closes a domain object by ID.
| [in] | s | Service object, necessarily a domain or domain subservice. |
| object_id | ID of the object to close. |
Creates a service object from an IPC session handle.
| [out] | s | Service object. |
| [in] | h | IPC session handle. |
|
inlinestatic |
Creates a domain subservice object from a parent service.
| [out] | s | Service object. |
| [in] | parent | Parent service, necessarily a domain or domain subservice. |
| [in] | object_id | Object ID for this subservice. |
For a domain/domain subservice, return the associated object ID.
| [in] | s | Service object, necessarily a domain or domain subservice. |
|
inlinestatic |
Returns whether a service has been initialized.
| [in] | s | Service object. |
|
inlinestatic |
|
inlinestatic |
Returns whether a service is a domain subservice.
| [in] | s | Service object. |
|
inlinestatic |
Returns whether a service is overriden in the homebrew environment.
| [in] | s | Service object. |
Overrides a service with a custom IPC service handle.
| [in] | name | Name of the service (as 64-bit integer). |
| [in] | handle | IPC session handle. |
| u64 smEncodeName | ( | const char * | name | ) |
Encodes a service name as a 64-bit integer.
| [in] | name | Name of the service. |
| void smExit | ( | void | ) |
Uninitializes SM.
Requests a service from SM.
| [out] | service_out | Service structure which will be filled in. |
| [in] | name | Name of the service to request. |
Requests a service from SM, as an IPC session handle directly.
| [out] | handle_out | Variable containing IPC session handle. |
| [in] | name | Name of the service to request. |
Retrieves an overriden service in the homebrew environment.
| [in] | name | Name of the service to request (as 64-bit integer). |
| bool smHasInitialized | ( | void | ) |
Check whether SM is initialized.
| Result smInitialize | ( | void | ) |
Initializes SM.
| Result smRegisterService | ( | Handle * | handle_out, |
| const char * | name, | ||
| bool | is_light, | ||
| int | max_sessions | ||
| ) |
Creates and registers a new service within SM.
| [out] | handle_out | Variable containing IPC port handle. |
| [in] | name | Name of the service. |
| [in] | is_light | "Is light" |
| [in] | max_sessions | Maximum number of concurrent sessions that the service will accept. |
| Result smUnregisterService | ( | const char * | name | ) |
Unregisters a previously registered service in SM.
| [in] | name | Name of the service. |
1.8.11