Result srvSubscribe(u32 notificationId)
Subscribes to a notification.
Result srvRegisterPort(const char *name, Handle clientHandle)
Registers a port.
Result srvPublishAndGetSubscriber(u32 *processIdCountOut, u32 *processIdsOut, u32 notificationId)
Publishes a notification to subscribers and retrieves a list of all processes that were notified.
Result srvGetServiceHandleDirect(Handle *out, const char *name)
Retrieves a service handle.
void srvExit(void)
Exits the service API.
Result srvEnableNotification(Handle *semaphoreOut)
Enables service notificatios, returning a notification semaphore.
Result srvUnregisterService(const char *name)
Unregisters the current process as a service.
Result srvIsServiceRegistered(bool *registeredOut, const char *name)
Checks whether a service is registered.
Result srvGetServiceHandle(Handle *out, const char *name)
Retrieves a service handle, retrieving from the environment handle list if possible.
Result srvUnregisterPort(const char *name)
Unregisters a port.
Result srvIsPortRegistered(bool *registeredOut, const char *name)
Checks whether a port is registered.
Result srvPublishToSubscriber(u32 notificationId, u32 flags)
Publishes a notification to subscribers.
void srvSetBlockingPolicy(bool nonBlocking)
Makes srvGetServiceHandle non-blocking for the current thread (or blocking, the default),...
Handle * srvGetSessionHandle(void)
Gets the current service API session handle.
Result srvInit(void)
Initializes the service API.
Result srvWaitForPortRegistered(const char *name)
Waits for a port to be registered.
Result srvUnsubscribe(u32 notificationId)
Unsubscribes from a notification.
Result srvRegisterService(Handle *out, const char *name, int maxSessions)
Registers the current process as a service.
Result srvGetPort(Handle *out, const char *name)
Retrieves a port handle.
Result srvRegisterClient(void)
Registers the current process as a client to the service API.
Result srvReceiveNotification(u32 *notificationIdOut)
Receives a notification.
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42
uint32_t u32
32-bit unsigned integer
Definition: types.h:23