libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Fields
ipc_server_object_t Struct Reference

Represents the server side of an IPC object. More...

#include <ipcserver.h>

Collaboration diagram for ipc_server_object_t:
Collaboration graph
[legend]

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_towning_domain
 The domain that owns this object, if applicable.
 
struct ipc_server_session_towning_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...
 

Detailed Description

Represents the server side of an IPC object.

Field Documentation

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.

Parameters
objThe object that the incoming message is being sent to
msgThe incoming message, to be used with ipc_unflatten_request.
request_idThe 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.


The documentation for this struct was generated from the following file: