libnx
v4.7.0
|
LibraryApplet wrapper. More...
Go to the source code of this file.
Data Structures | |
struct | LibAppletArgs |
CommonArguments. More... | |
Functions | |
void | libappletArgsCreate (LibAppletArgs *a, u32 version) |
Creates a LibAppletArgs struct. More... | |
void | libappletArgsSetPlayStartupSound (LibAppletArgs *a, bool flag) |
Sets the PlayStartupSound field in LibAppletArgs. More... | |
Result | libappletCreateWriteStorage (AppletStorage *s, const void *buffer, size_t size) |
Creates an AppletStorage with the specified size and writes the buffer contents to that storage at offset 0. More... | |
Result | libappletReadStorage (AppletStorage *s, void *buffer, size_t size, size_t *transfer_size) |
Reads data from offset 0 from the specified storage into the buffer. More... | |
Result | libappletArgsPush (LibAppletArgs *a, AppletHolder *h) |
Sets the tick field in LibAppletArgs, then creates a storage with it which is pushed to the AppletHolder via appletHolderPushInData. More... | |
Result | libappletArgsPop (LibAppletArgs *a) |
Uses appletPopInData and reads it to the specified LibAppletArgs. More... | |
Result | libappletPushInData (AppletHolder *h, const void *buffer, size_t size) |
Creates a storage using the input buffer which is pushed to the AppletHolder via appletHolderPushInData. More... | |
Result | libappletPopOutData (AppletHolder *h, void *buffer, size_t size, size_t *transfer_size) |
Pops a storage via appletHolderPopOutData, uses libappletReadStorage, then closes the storage. More... | |
void | libappletSetJumpFlag (bool flag) |
Sets whether libappletStart uses appletHolderJump. More... | |
Result | libappletStart (AppletHolder *h) |
If the flag from libappletSetJumpFlag is set, this just uses appletHolderJump. More... | |
Result | libappletLaunch (AppletId id, LibAppletArgs *commonargs, const void *arg, size_t arg_size, void *reply, size_t reply_size, size_t *out_reply_size) |
Creates a LibraryApplet with the specified input storage data, uses libappletStart, and reads the output storage reply data via libappletPopOutData. More... | |
Result | libappletRequestHomeMenu (void) |
Wrapper for appletPushToGeneralChannel, see appletPushToGeneralChannel regarding the requirements for using this. More... | |
Result | libappletRequestJumpToSystemUpdate (void) |
Wrapper for appletPushToGeneralChannel, see appletPushToGeneralChannel regarding the requirements for using this. More... | |
Result | libappletRequestToLaunchApplication (u64 application_id, AccountUid uid, const void *buffer, size_t size, u32 sender) |
Wrapper for appletPushToGeneralChannel, see appletPushToGeneralChannel regarding the requirements for using this. More... | |
Result | libappletRequestJumpToStory (AccountUid uid, u64 application_id) |
Wrapper for appletPushToGeneralChannel, see appletPushToGeneralChannel regarding the requirements for using this. More... | |
LibraryApplet wrapper.
void libappletArgsCreate | ( | LibAppletArgs * | a, |
u32 | version | ||
) |
Creates a LibAppletArgs struct.
a | LibAppletArgs struct. |
version | LaVersion for LibAppletArgs. |
Result libappletArgsPop | ( | LibAppletArgs * | a | ) |
Uses appletPopInData and reads it to the specified LibAppletArgs.
The LibAppletArgs is validated, an error is thrown when invalid.
[out] | a | LibAppletArgs struct. |
Result libappletArgsPush | ( | LibAppletArgs * | a, |
AppletHolder * | h | ||
) |
Sets the tick field in LibAppletArgs, then creates a storage with it which is pushed to the AppletHolder via appletHolderPushInData.
a | LibAppletArgs struct. |
h | AppletHolder object. |
void libappletArgsSetPlayStartupSound | ( | LibAppletArgs * | a, |
bool | flag | ||
) |
Sets the PlayStartupSound field in LibAppletArgs.
a | LibAppletArgs struct. |
flag | Value for LibAppletArgs PlayStartupSound. |
Result libappletCreateWriteStorage | ( | AppletStorage * | s, |
const void * | buffer, | ||
size_t | size | ||
) |
Creates an AppletStorage with the specified size and writes the buffer contents to that storage at offset 0.
[out] | s | Storage object. |
buffer | Input buffer. | |
size | Size to write. |
Result libappletLaunch | ( | AppletId | id, |
LibAppletArgs * | commonargs, | ||
const void * | arg, | ||
size_t | arg_size, | ||
void * | reply, | ||
size_t | reply_size, | ||
size_t * | out_reply_size | ||
) |
Creates a LibraryApplet with the specified input storage data, uses libappletStart, and reads the output storage reply data via libappletPopOutData.
id | AppletId |
commonargs | LibAppletArgs struct. |
arg | Input storage data buffer. Optional, can be NULL. |
arg_size | Size of the arg buffer. |
reply | Output storage data buffer. Optional, can be NULL. |
reply_size | Size to read for the reply buffer. |
out_reply_size | Actual read reply data size, see libappletPopOutData. |
Result libappletPopOutData | ( | AppletHolder * | h, |
void * | buffer, | ||
size_t | size, | ||
size_t * | transfer_size | ||
) |
Pops a storage via appletHolderPopOutData, uses libappletReadStorage, then closes the storage.
h | AppletHolder object. |
buffer | Output buffer. |
size | Size to read. |
transfer_size | Optional output size field for the actual size used for the read, can be NULL. |
Result libappletPushInData | ( | AppletHolder * | h, |
const void * | buffer, | ||
size_t | size | ||
) |
Creates a storage using the input buffer which is pushed to the AppletHolder via appletHolderPushInData.
h | AppletHolder object. |
buffer | Input data buffer. |
size | Input data size. |
Result libappletReadStorage | ( | AppletStorage * | s, |
void * | buffer, | ||
size_t | size, | ||
size_t * | transfer_size | ||
) |
Reads data from offset 0 from the specified storage into the buffer.
If the storage-size is smaller than the size param, the storage-size is used instead.
s | Storage object. |
buffer | Output buffer. |
size | Size to read. |
transfer_size | Optional output size field for the actual size used for the read, can be NULL. |
Result libappletRequestHomeMenu | ( | void | ) |
Wrapper for appletPushToGeneralChannel, see appletPushToGeneralChannel regarding the requirements for using this.
Returns to the main Home Menu, equivalent to pressing the HOME button.
Result libappletRequestJumpToStory | ( | AccountUid | uid, |
u64 | application_id | ||
) |
Wrapper for appletPushToGeneralChannel, see appletPushToGeneralChannel regarding the requirements for using this.
[in] | uid | AccountUid |
[in] | application_id | Optional ApplicationId, can be 0. |
Result libappletRequestJumpToSystemUpdate | ( | void | ) |
Wrapper for appletPushToGeneralChannel, see appletPushToGeneralChannel regarding the requirements for using this.
Equivalent to entering "System Update" under System Settings. When leaving this, it returns to the main Home Menu.
Result libappletRequestToLaunchApplication | ( | u64 | application_id, |
AccountUid | uid, | ||
const void * | buffer, | ||
size_t | size, | ||
u32 | sender | ||
) |
Wrapper for appletPushToGeneralChannel, see appletPushToGeneralChannel regarding the requirements for using this.
[in] | application_id | ApplicationId |
[in] | uid | AccountUid |
[in] | buffer | Input buffer. |
[in] | size | Input buffer size. |
[in] | sender | LaunchApplicationRequestSender |
void libappletSetJumpFlag | ( | bool | flag | ) |
Sets whether libappletStart uses appletHolderJump.
flag | Flag. Value true should not be used unless running as AppletType_LibraryApplet. |
Result libappletStart | ( | AppletHolder * | h | ) |
If the flag from libappletSetJumpFlag is set, this just uses appletHolderJump.
Otherwise, starts the applet and waits for it to finish, then checks the LibAppletExitReason.
h | AppletHolder object. |