libtransistor
A userland library for the Nintendo Switch
|
Represents the server side of an IPC object. More...
#include <ipcserver.h>
Data Fields | |
void * | userdata |
Pointer to user data. | |
bool | is_domain_object |
Whether or not this object is part of a domain. | |
uint32_t | domain_id |
This object's ID within its owning domain, if applicable. | |
struct ipc_server_domain_t * | owning_domain |
The domain that owns this object, if applicable. | |
struct ipc_server_session_t * | owning_session |
The session that owns this object. | |
void(* | dispatch )(struct ipc_server_object_t *obj, ipc_message_t *msg, uint32_t request_id) |
IPC message handler function. More... | |
void(* | close )(struct ipc_server_object_t *obj) |
Release any resources associated with this object. More... | |
Represents the server side of an IPC object.
void(* ipc_server_object_t::close)(struct ipc_server_object_t *obj) |
Release any resources associated with this object.
This function should also free the object itself, if it was dynamically allocated.
void(* ipc_server_object_t::dispatch)(struct ipc_server_object_t *obj, ipc_message_t *msg, uint32_t request_id) |
IPC message handler function.
obj | The object that the incoming message is being sent to |
msg | The incoming message, to be used with ipc_unflatten_request. |
request_id | The request ID from the incoming message |
Upon entering this function, the object's owning session will be placed in the IPC_SESSION_STATE_PROCESSING state. To finish processing, either ipc_server_object_reply or ipc_server_object_close must be called. These may be called after returning from the dispatch function, to allow for asynchronous handling of messages.