Added appletHolderPopOutData and appletHolderPopInteractiveOutData.

This commit is contained in:
yellows8 2018-12-18 20:07:29 -05:00
parent a6e1413712
commit d8683ea188
2 changed files with 27 additions and 0 deletions

View File

@ -245,6 +245,13 @@ LibAppletExitReason appletHolderGetExitReason(AppletHolder *h);
*/
Result appletHolderPushInData(AppletHolder *h, AppletStorage *s);
/**
* @brief Pops a storage from LibraryApplet output.
* @param h AppletHolder object.
* @param s Storage object.
*/
Result appletHolderPopOutData(AppletHolder *h, AppletStorage *s);
/**
* @brief Pushes a storage for LibraryApplet Extra storage input.
* @note This uses \ref appletStorageClose automatically.
@ -261,6 +268,13 @@ Result appletHolderPushExtraStorage(AppletHolder *h, AppletStorage *s);
*/
Result appletHolderPushInteractiveInData(AppletHolder *h, AppletStorage *s);
/**
* @brief Pops a storage from LibraryApplet Interactive output.
* @param h AppletHolder object.
* @param s Storage object.
*/
Result appletHolderPopInteractiveOutData(AppletHolder *h, AppletStorage *s);
/**
* @brief Creates a storage.
* @param s Storage object.

View File

@ -754,6 +754,11 @@ static Result _appletCmdInStorage(Service* srv, AppletStorage* s, u64 cmd_id) {
return rc;
}
static Result _appletCmdNoInOutStorage(Service* srv, AppletStorage* s, u64 cmd_id) {
memset(s, 0, sizeof(AppletStorage));
return _appletGetSession(srv, &s->s, cmd_id);
}
// IWindowController
static Result _appletGetAppletResourceUserId(u64 *out) {
@ -1637,6 +1642,10 @@ Result appletHolderPushInData(AppletHolder *h, AppletStorage *s) {
return _appletCmdInStorage(&h->s, s, 100);
}
Result appletHolderPopOutData(AppletHolder *h, AppletStorage *s) {
return _appletCmdNoInOutStorage(&h->s, s, 101);
}
Result appletHolderPushExtraStorage(AppletHolder *h, AppletStorage *s) {
return _appletCmdInStorage(&h->s, s, 102);
}
@ -1645,6 +1654,10 @@ Result appletHolderPushInteractiveInData(AppletHolder *h, AppletStorage *s) {
return _appletCmdInStorage(&h->s, s, 103);
}
Result appletHolderPopInteractiveOutData(AppletHolder *h, AppletStorage *s) {
return _appletCmdNoInOutStorage(&h->s, s, 104);
}
Result appletCreateStorage(AppletStorage *s, s64 size) {
memset(s, 0, sizeof(AppletStorage));