mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Use official naming instead of 'title(ID)'. Use 'uid(s)' instead of 'userID(s)'. Updated various struct field names. Improved docs + minor other improvements.
This commit is contained in:
parent
4f72bc5342
commit
4ab50e3752
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
/// Arg type values pushed for the applet input storage, stored as an u8.
|
/// Arg type values pushed for the applet input storage, stored as an u8.
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AlbumLaArg_ShowAlbumFiles = 0, ///< ShowAlbumFiles. Only displays AlbumFiles associated with the title which launched the Album applet, with the filter button disabled.
|
AlbumLaArg_ShowAlbumFiles = 0, ///< ShowAlbumFiles. Only displays AlbumFiles associated with the application which launched the Album applet, with the filter button disabled.
|
||||||
AlbumLaArg_ShowAllAlbumFiles = 1, ///< ShowAllAlbumFiles. Displays all AlbumFiles, with filtering allowed.
|
AlbumLaArg_ShowAllAlbumFiles = 1, ///< ShowAllAlbumFiles. Displays all AlbumFiles, with filtering allowed.
|
||||||
AlbumLaArg_ShowAllAlbumFilesForHomeMenu = 2, ///< ShowAllAlbumFilesForHomeMenu. Similar to ::AlbumLaArg_ShowAllAlbumFiles.
|
AlbumLaArg_ShowAllAlbumFilesForHomeMenu = 2, ///< ShowAllAlbumFilesForHomeMenu. Similar to ::AlbumLaArg_ShowAllAlbumFiles.
|
||||||
} AlbumLaArg;
|
} AlbumLaArg;
|
||||||
|
@ -22,11 +22,11 @@ typedef enum {
|
|||||||
} FriendsLaArgType;
|
} FriendsLaArgType;
|
||||||
|
|
||||||
/// Arg struct pushed for the applet input storage.
|
/// Arg struct pushed for the applet input storage.
|
||||||
/// The fields following the userID are only set for ::FriendsLaArgType_ShowUserDetailInfo/::FriendsLaArgType_StartSendingFriendRequest, for everything else these are cleared.
|
/// The fields following the uid are only set for ::FriendsLaArgType_ShowUserDetailInfo/::FriendsLaArgType_StartSendingFriendRequest, for everything else these are cleared.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u32 type; ///< \ref FriendsLaArgType
|
u32 type; ///< \ref FriendsLaArgType
|
||||||
u32 pad; ///< Padding.
|
u32 pad; ///< Padding.
|
||||||
AccountUid userID; ///< \ref AccountUid
|
AccountUid uid; ///< \ref AccountUid
|
||||||
u64 networkServiceAccountId; ///< NetworkServiceAccountId for the other account.
|
u64 networkServiceAccountId; ///< NetworkServiceAccountId for the other account.
|
||||||
FriendsInAppScreenName first_inAppScreenName; ///< First InAppScreenName.
|
FriendsInAppScreenName first_inAppScreenName; ///< First InAppScreenName.
|
||||||
FriendsInAppScreenName second_inAppScreenName; ///< Second InAppScreenName.
|
FriendsInAppScreenName second_inAppScreenName; ///< Second InAppScreenName.
|
||||||
@ -34,61 +34,61 @@ typedef struct {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the applet with ::FriendsLaArgType_ShowFriendList, the specified input, and playStartupSound=false.
|
* @brief Launches the applet with ::FriendsLaArgType_ShowFriendList, the specified input, and playStartupSound=false.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
*/
|
*/
|
||||||
Result friendsLaShowFriendList(AccountUid userID);
|
Result friendsLaShowFriendList(AccountUid uid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the applet with ::FriendsLaArgType_ShowUserDetailInfo, the specified input, and playStartupSound=false.
|
* @brief Launches the applet with ::FriendsLaArgType_ShowUserDetailInfo, the specified input, and playStartupSound=false.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
* @param[in] networkServiceAccountId NetworkServiceAccountId for the user to show UserDetailInfo for.
|
* @param[in] networkServiceAccountId NetworkServiceAccountId for the user to show UserDetailInfo for.
|
||||||
* @param[in] first_inAppScreenName First \ref FriendsInAppScreenName.
|
* @param[in] first_inAppScreenName First \ref FriendsInAppScreenName.
|
||||||
* @param[in] second_inAppScreenName Second \ref FriendsInAppScreenName.
|
* @param[in] second_inAppScreenName Second \ref FriendsInAppScreenName.
|
||||||
*/
|
*/
|
||||||
Result friendsLaShowUserDetailInfo(AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName);
|
Result friendsLaShowUserDetailInfo(AccountUid uid, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the applet with ::FriendsLaArgType_StartSendingFriendRequest, the specified input, and playStartupSound=false. On success, this will load the output Result from the output storage.
|
* @brief Launches the applet with ::FriendsLaArgType_StartSendingFriendRequest, the specified input, and playStartupSound=false. On success, this will load the output Result from the output storage.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
* @param[in] networkServiceAccountId NetworkServiceAccountId to send the friend request to.
|
* @param[in] networkServiceAccountId NetworkServiceAccountId to send the friend request to.
|
||||||
* @param[in] first_inAppScreenName First \ref FriendsInAppScreenName.
|
* @param[in] first_inAppScreenName First \ref FriendsInAppScreenName.
|
||||||
* @param[in] second_inAppScreenName Second \ref FriendsInAppScreenName.
|
* @param[in] second_inAppScreenName Second \ref FriendsInAppScreenName.
|
||||||
*/
|
*/
|
||||||
Result friendsLaStartSendingFriendRequest(AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName);
|
Result friendsLaStartSendingFriendRequest(AccountUid uid, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the applet with ::FriendsLaArgType_ShowMethodsOfSendingFriendRequest, the specified input, and playStartupSound=false.
|
* @brief Launches the applet with ::FriendsLaArgType_ShowMethodsOfSendingFriendRequest, the specified input, and playStartupSound=false.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
*/
|
*/
|
||||||
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid userID);
|
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid uid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the applet with ::FriendsLaArgType_StartFacedFriendRequest, the specified input, and playStartupSound=false.
|
* @brief Launches the applet with ::FriendsLaArgType_StartFacedFriendRequest, the specified input, and playStartupSound=false.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
*/
|
*/
|
||||||
Result friendsLaStartFacedFriendRequest(AccountUid userID);
|
Result friendsLaStartFacedFriendRequest(AccountUid uid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the applet with ::FriendsLaArgType_ShowReceivedFriendRequestList, the specified input, and playStartupSound=false.
|
* @brief Launches the applet with ::FriendsLaArgType_ShowReceivedFriendRequestList, the specified input, and playStartupSound=false.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
*/
|
*/
|
||||||
Result friendsLaShowReceivedFriendRequestList(AccountUid userID);
|
Result friendsLaShowReceivedFriendRequestList(AccountUid uid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the applet with ::FriendsLaArgType_ShowBlockedUserList, the specified input, and playStartupSound=false.
|
* @brief Launches the applet with ::FriendsLaArgType_ShowBlockedUserList, the specified input, and playStartupSound=false.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
*/
|
*/
|
||||||
Result friendsLaShowBlockedUserList(AccountUid userID);
|
Result friendsLaShowBlockedUserList(AccountUid uid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the applet with ::FriendsLaArgType_ShowMyProfile, the specified input, and playStartupSound=false.
|
* @brief Launches the applet with ::FriendsLaArgType_ShowMyProfile, the specified input, and playStartupSound=false.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
*/
|
*/
|
||||||
Result friendsLaShowMyProfile(AccountUid userID);
|
Result friendsLaShowMyProfile(AccountUid uid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Same as \ref friendsLaShowMyProfile except with playStartupSound=true.
|
* @brief Same as \ref friendsLaShowMyProfile except with playStartupSound=true.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
*/
|
*/
|
||||||
Result friendsLaShowMyProfileForHomeMenu(AccountUid userID);
|
Result friendsLaShowMyProfileForHomeMenu(AccountUid uid);
|
||||||
|
|
||||||
|
@ -118,10 +118,10 @@ typedef enum {
|
|||||||
WebArgType_Url = 0x1, ///< [1.0.0+] String, size 0xC00. Initial URL.
|
WebArgType_Url = 0x1, ///< [1.0.0+] String, size 0xC00. Initial URL.
|
||||||
WebArgType_CallbackUrl = 0x3, ///< [1.0.0+] String, size 0x400.
|
WebArgType_CallbackUrl = 0x3, ///< [1.0.0+] String, size 0x400.
|
||||||
WebArgType_CallbackableUrl = 0x4, ///< [1.0.0+] String, size 0x400.
|
WebArgType_CallbackableUrl = 0x4, ///< [1.0.0+] String, size 0x400.
|
||||||
WebArgType_ApplicationId = 0x5, ///< [1.0.0+] Offline-applet, u64 titleID
|
WebArgType_ApplicationId = 0x5, ///< [1.0.0+] Offline-applet, u64 ApplicationId
|
||||||
WebArgType_DocumentPath = 0x6, ///< [1.0.0+] Offline-applet, string with size 0xC00.
|
WebArgType_DocumentPath = 0x6, ///< [1.0.0+] Offline-applet, string with size 0xC00.
|
||||||
WebArgType_DocumentKind = 0x7, ///< [1.0.0+] Offline-applet, u32 enum \WebDocumentKind.
|
WebArgType_DocumentKind = 0x7, ///< [1.0.0+] Offline-applet, u32 enum \WebDocumentKind.
|
||||||
WebArgType_SystemDataId = 0x8, ///< [1.0.0+] Offline-applet, u64 titleID
|
WebArgType_SystemDataId = 0x8, ///< [1.0.0+] Offline-applet, u64 SystemDataId
|
||||||
WebArgType_ShareStartPage = 0x9, ///< [1.0.0+] u32 enum \WebShareStartPage
|
WebArgType_ShareStartPage = 0x9, ///< [1.0.0+] u32 enum \WebShareStartPage
|
||||||
WebArgType_Whitelist = 0xA, ///< [1.0.0+] String, size 0x1000.
|
WebArgType_Whitelist = 0xA, ///< [1.0.0+] String, size 0x1000.
|
||||||
WebArgType_NewsFlag = 0xB, ///< [1.0.0+] u8 bool
|
WebArgType_NewsFlag = 0xB, ///< [1.0.0+] u8 bool
|
||||||
@ -197,7 +197,7 @@ typedef enum {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
WebDocumentKind_OfflineHtmlPage = 0x1, ///< Use the HtmlDocument NCA content from the application.
|
WebDocumentKind_OfflineHtmlPage = 0x1, ///< Use the HtmlDocument NCA content from the application.
|
||||||
WebDocumentKind_ApplicationLegalInformation = 0x2, ///< Use the LegalInformation NCA content from the application.
|
WebDocumentKind_ApplicationLegalInformation = 0x2, ///< Use the LegalInformation NCA content from the application.
|
||||||
WebDocumentKind_SystemDataPage = 0x3, ///< Use the Data NCA content from the specified title, see also: https://switchbrew.org/wiki/Title_list#System_Data_Archives
|
WebDocumentKind_SystemDataPage = 0x3, ///< Use the Data NCA content from the specified SystemData, see also: https://switchbrew.org/wiki/Title_list#System_Data_Archives
|
||||||
} WebDocumentKind;
|
} WebDocumentKind;
|
||||||
|
|
||||||
/// This controls the initial page for ShareApplet, used by \ref webShareCreate.
|
/// This controls the initial page for ShareApplet, used by \ref webShareCreate.
|
||||||
@ -253,7 +253,7 @@ void webWifiCreate(WebWifiConfig* config, const char* conntest_url, const char*
|
|||||||
Result webWifiShow(WebWifiConfig* config, WebWifiReturnValue *out);
|
Result webWifiShow(WebWifiConfig* config, WebWifiReturnValue *out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates the config for WebApplet. This applet uses an URL whitelist loaded from the user-process host title, which is only loaded when running under an Application.
|
* @brief Creates the config for WebApplet. This applet uses an URL whitelist loaded from the user-process host Application, which is only loaded when running under an Application.
|
||||||
* @note Sets ::WebArgType_UnknownD, and ::WebArgType_Unknown12 on pre-3.0.0, to value 1.
|
* @note Sets ::WebArgType_UnknownD, and ::WebArgType_Unknown12 on pre-3.0.0, to value 1.
|
||||||
* @param config WebCommonConfig object.
|
* @param config WebCommonConfig object.
|
||||||
* @param url Initial URL navigated to by the applet.
|
* @param url Initial URL navigated to by the applet.
|
||||||
@ -270,7 +270,7 @@ Result webPageCreate(WebCommonConfig* config, const char* url);
|
|||||||
Result webNewsCreate(WebCommonConfig* config, const char* url);
|
Result webNewsCreate(WebCommonConfig* config, const char* url);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates the config for WebApplet. This is based on \ref webPageCreate, for YouTubeVideo. Hence other functions referencing \ref webPageCreate also apply to this. This uses a whitelist which essentially only allows youtube embed/ URLs (without mounting content from the host title).
|
* @brief Creates the config for WebApplet. This is based on \ref webPageCreate, for YouTubeVideo. Hence other functions referencing \ref webPageCreate also apply to this. This uses a whitelist which essentially only allows youtube embed/ URLs (without mounting content from the host Application).
|
||||||
* @note This is only available on [5.0.0+].
|
* @note This is only available on [5.0.0+].
|
||||||
* @note Sets ::WebArgType_UnknownD to value 1, and sets ::WebArgType_YouTubeVideoFlag to true. Also uses \ref webConfigSetBootAsMediaPlayer with flag=true.
|
* @note Sets ::WebArgType_UnknownD to value 1, and sets ::WebArgType_YouTubeVideoFlag to true. Also uses \ref webConfigSetBootAsMediaPlayer with flag=true.
|
||||||
* @param config WebCommonConfig object.
|
* @param config WebCommonConfig object.
|
||||||
@ -279,7 +279,7 @@ Result webNewsCreate(WebCommonConfig* config, const char* url);
|
|||||||
Result webYouTubeVideoCreate(WebCommonConfig* config, const char* url);
|
Result webYouTubeVideoCreate(WebCommonConfig* config, const char* url);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates the config for Offline-applet. This applet uses local content loaded from titles.
|
* @brief Creates the config for Offline-applet. This applet uses data loaded from content.
|
||||||
* @note Uses \ref webConfigSetLeftStickMode with ::WebLeftStickMode_Cursor and sets ::WebArgType_BootAsMediaPlayerInverted to false. Uses \ref webConfigSetPointer with flag = docKind == ::WebDocumentKind_OfflineHtmlPage.
|
* @note Uses \ref webConfigSetLeftStickMode with ::WebLeftStickMode_Cursor and sets ::WebArgType_BootAsMediaPlayerInverted to false. Uses \ref webConfigSetPointer with flag = docKind == ::WebDocumentKind_OfflineHtmlPage.
|
||||||
* @note For docKind ::WebDocumentKind_ApplicationLegalInformation / ::WebDocumentKind_SystemDataPage, uses \ref webConfigSetFooter with flag=true and \ref webConfigSetBackgroundKind with ::WebBackgroundKind_Default.
|
* @note For docKind ::WebDocumentKind_ApplicationLegalInformation / ::WebDocumentKind_SystemDataPage, uses \ref webConfigSetFooter with flag=true and \ref webConfigSetBackgroundKind with ::WebBackgroundKind_Default.
|
||||||
* @note For docKind ::WebDocumentKind_SystemDataPage, uses \ref webConfigSetBootDisplayKind with ::WebBootDisplayKind_White.
|
* @note For docKind ::WebDocumentKind_SystemDataPage, uses \ref webConfigSetBootDisplayKind with ::WebBootDisplayKind_White.
|
||||||
@ -290,16 +290,16 @@ Result webYouTubeVideoCreate(WebCommonConfig* config, const char* url);
|
|||||||
* @note Lastly, sets the TLVs as needed for the input params.
|
* @note Lastly, sets the TLVs as needed for the input params.
|
||||||
* @param config WebCommonConfig object.
|
* @param config WebCommonConfig object.
|
||||||
* @param docKind \ref WebDocumentKind
|
* @param docKind \ref WebDocumentKind
|
||||||
* @param titleID Title to load the content from. With docKind = ::WebDocumentKind_OfflineHtmlPage, titleID=0 should be used to specify the user-process titleID (non-zero is ignored with this docKind).
|
* @param id Id to load the content from. With docKind = ::WebDocumentKind_OfflineHtmlPage, id=0 should be used to specify the user-process application (non-zero is ignored with this docKind).
|
||||||
* @param docPath Initial document path in RomFS, without the leading '/'. For ::WebDocumentKind_OfflineHtmlPage, this is relative to "html-document/" in RomFS. For the other docKind values, this is relative to "/" in RomFS. This path must contain ".htdocs/".
|
* @param docPath Initial document path in RomFS, without the leading '/'. For ::WebDocumentKind_OfflineHtmlPage, this is relative to "html-document/" in RomFS. For the other docKind values, this is relative to "/" in RomFS. This path must contain ".htdocs/".
|
||||||
*/
|
*/
|
||||||
Result webOfflineCreate(WebCommonConfig* config, WebDocumentKind docKind, u64 titleID, const char* docPath);
|
Result webOfflineCreate(WebCommonConfig* config, WebDocumentKind docKind, u64 id, const char* docPath);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates the config for ShareApplet. This applet is for social media posting/settings.
|
* @brief Creates the config for ShareApplet. This applet is for social media posting/settings.
|
||||||
* @note If a non-zero userID isn't set with \ref webConfigSetUserID prior to using \ref webConfigShow, the applet will launch the profile-selector applet to select an account.
|
* @note If a non-zero uid isn't set with \ref webConfigSetUid prior to using \ref webConfigShow, the applet will launch the profile-selector applet to select an account.
|
||||||
* @note An error will be displayed if neither \ref webConfigSetAlbumEntry, nor \ref webConfigSetApplicationAlbumEntry, nor \ref webConfigAddAlbumEntryAndMediaData are used prior to using \ref webConfigShow, with ::WebShareStartPage_Default.
|
* @note An error will be displayed if neither \ref webConfigSetAlbumEntry, nor \ref webConfigSetApplicationAlbumEntry, nor \ref webConfigAddAlbumEntryAndMediaData are used prior to using \ref webConfigShow, with ::WebShareStartPage_Default.
|
||||||
* @note Uses \ref webConfigSetLeftStickMode with ::WebLeftStickMode_Cursor, \ref webConfigSetUserID with userID=0, \ref webConfigSetDisplayUrlKind with kind=true, and sets ::WebArgType_Unknown14/::WebArgType_Unknown15 to value 1. Uses \ref webConfigSetBootDisplayKind with ::WebBootDisplayKind_Unknown3.
|
* @note Uses \ref webConfigSetLeftStickMode with ::WebLeftStickMode_Cursor, \ref webConfigSetUid with uid=0, \ref webConfigSetDisplayUrlKind with kind=true, and sets ::WebArgType_Unknown14/::WebArgType_Unknown15 to value 1. Uses \ref webConfigSetBootDisplayKind with ::WebBootDisplayKind_Unknown3.
|
||||||
* @param config WebCommonConfig object.
|
* @param config WebCommonConfig object.
|
||||||
* @param page \ref WebShareStartPage
|
* @param page \ref WebShareStartPage
|
||||||
*/
|
*/
|
||||||
@ -308,8 +308,8 @@ Result webShareCreate(WebCommonConfig* config, WebShareStartPage page);
|
|||||||
/**
|
/**
|
||||||
* @brief Creates the config for LobbyApplet. This applet is for "Nintendo Switch Online Lounge".
|
* @brief Creates the config for LobbyApplet. This applet is for "Nintendo Switch Online Lounge".
|
||||||
* @note Only available on [2.0.0+].
|
* @note Only available on [2.0.0+].
|
||||||
* @note If a non-zero userID isn't set with \ref webConfigSetUserID prior to using \ref webConfigShow, the applet will launch the profile-selector applet to select an account.
|
* @note If a non-zero uid isn't set with \ref webConfigSetUid prior to using \ref webConfigShow, the applet will launch the profile-selector applet to select an account.
|
||||||
* @note Uses \ref webConfigSetLeftStickMode with ::WebLeftStickMode_Cursor, \ref webConfigSetPointer with flag=false on [3.0.0+], \ref webConfigSetUserID with userID=0, and sets ::WebArgType_Unknown14/::WebArgType_Unknown15 to value 1. Uses \ref webConfigSetBootDisplayKind with ::WebBootDisplayKind_Unknown4, \ref webConfigSetBackgroundKind with ::WebBackgroundKind_Unknown2, and sets ::WebArgType_BootAsMediaPlayerInverted to false.
|
* @note Uses \ref webConfigSetLeftStickMode with ::WebLeftStickMode_Cursor, \ref webConfigSetPointer with flag=false on [3.0.0+], \ref webConfigSetUid with uid=0, and sets ::WebArgType_Unknown14/::WebArgType_Unknown15 to value 1. Uses \ref webConfigSetBootDisplayKind with ::WebBootDisplayKind_Unknown4, \ref webConfigSetBackgroundKind with ::WebBackgroundKind_Unknown2, and sets ::WebArgType_BootAsMediaPlayerInverted to false.
|
||||||
* @param config WebCommonConfig object.
|
* @param config WebCommonConfig object.
|
||||||
*/
|
*/
|
||||||
Result webLobbyCreate(WebCommonConfig* config);
|
Result webLobbyCreate(WebCommonConfig* config);
|
||||||
@ -341,9 +341,9 @@ Result webConfigSetCallbackableUrl(WebCommonConfig* config, const char* url);
|
|||||||
Result webConfigSetWhitelist(WebCommonConfig* config, const char* whitelist);
|
Result webConfigSetWhitelist(WebCommonConfig* config, const char* whitelist);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets the account UserID. Controls which user-specific savedata to mount.
|
* @brief Sets the account uid. Controls which user-specific savedata to mount.
|
||||||
* @note Only available with config created by \ref webPageCreate, \ref webLobbyCreate, or with Share-applet.
|
* @note Only available with config created by \ref webPageCreate, \ref webLobbyCreate, or with Share-applet.
|
||||||
* @note Used automatically by \ref webShareCreate and \ref webLobbyCreate with userID=0.
|
* @note Used automatically by \ref webShareCreate and \ref webLobbyCreate with uid=0.
|
||||||
* @param config WebCommonConfig object.
|
* @param config WebCommonConfig object.
|
||||||
* @param uid \ref AccountUid
|
* @param uid \ref AccountUid
|
||||||
*/
|
*/
|
||||||
|
@ -31,10 +31,10 @@ NX_CONSTEXPR FsDirectoryEntry* fsdevDirGetEntries(fsdev_dir_t *dir)
|
|||||||
Result fsdevMountSdmc(void);
|
Result fsdevMountSdmc(void);
|
||||||
|
|
||||||
/// Mounts the specified save data.
|
/// Mounts the specified save data.
|
||||||
Result fsdevMountSaveData(const char *name, u64 titleID, AccountUid userID);
|
Result fsdevMountSaveData(const char *name, u64 program_id, AccountUid uid);
|
||||||
|
|
||||||
/// Mounts the specified system save data.
|
/// Mounts the specified system save data.
|
||||||
Result fsdevMountSystemSaveData(const char *name, FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid userID);
|
Result fsdevMountSystemSaveData(const char *name, FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid uid);
|
||||||
|
|
||||||
/// Mounts the input fs with the specified device name. fsdev will handle closing the fs when required, including when fsdevMountDevice() fails.
|
/// Mounts the input fs with the specified device name. fsdev will handle closing the fs when required, including when fsdevMountDevice() fails.
|
||||||
/// Returns -1 when any errors occur.
|
/// Returns -1 when any errors occur.
|
||||||
|
@ -76,7 +76,7 @@ Result romfsMountFromFile(FsFile file, u64 offset, const char *name);
|
|||||||
Result romfsMountFromStorage(FsStorage storage, u64 offset, const char *name);
|
Result romfsMountFromStorage(FsStorage storage, u64 offset, const char *name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Mounts RomFS using the current process host title RomFS.
|
* @brief Mounts RomFS using the current process host program RomFS.
|
||||||
* @param name Device mount name.
|
* @param name Device mount name.
|
||||||
*/
|
*/
|
||||||
Result romfsMountFromCurrentProcess(const char *name);
|
Result romfsMountFromCurrentProcess(const char *name);
|
||||||
@ -90,8 +90,8 @@ Result romfsMountFromCurrentProcess(const char *name);
|
|||||||
Result romfsMountFromFsdev(const char *path, u64 offset, const char *name);
|
Result romfsMountFromFsdev(const char *path, u64 offset, const char *name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Mounts RomFS from a system data archive.
|
* @brief Mounts RomFS from SystemData.
|
||||||
* @param dataId Title ID of system data archive to mount.
|
* @param dataId SystemDataId to mount.
|
||||||
* @param storageId Storage ID to mount from.
|
* @param storageId Storage ID to mount from.
|
||||||
* @param name Device mount name.
|
* @param name Device mount name.
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +39,7 @@ typedef struct {
|
|||||||
|
|
||||||
/// ProfileBase
|
/// ProfileBase
|
||||||
typedef struct {
|
typedef struct {
|
||||||
AccountUid userID; ///< \ref AccountUid
|
AccountUid uid; ///< \ref AccountUid
|
||||||
u64 lastEditTimestamp; ///< POSIX UTC timestamp, for the last account edit.
|
u64 lastEditTimestamp; ///< POSIX UTC timestamp, for the last account edit.
|
||||||
char nickname[0x20]; ///< UTF-8 Nickname.
|
char nickname[0x20]; ///< UTF-8 Nickname.
|
||||||
} AccountProfileBase;
|
} AccountProfileBase;
|
||||||
@ -63,18 +63,18 @@ Service* accountGetServiceSession(void);
|
|||||||
Result accountGetUserCount(s32* user_count);
|
Result accountGetUserCount(s32* user_count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get a list of all user IDs. The returned list will never be larger than ACC_USER_LIST_SIZE.
|
* @brief Get a list of all userIds. The returned list will never be larger than ACC_USER_LIST_SIZE.
|
||||||
* @param userIDs Pointer to array of user IDs.
|
* @param uids Pointer to array of userIds.
|
||||||
* @param max_userIDs Maximum number of user IDs to return.
|
* @param max_uids Maximum number of userIds to return.
|
||||||
* @param actual_total The actual total number of user IDs found.
|
* @param actual_total The actual total number of userIds found.
|
||||||
*/
|
*/
|
||||||
Result accountListAllUsers(AccountUid* userIDs, s32 max_userIDs, s32 *actual_total);
|
Result accountListAllUsers(AccountUid* uids, s32 max_uids, s32 *actual_total);
|
||||||
|
|
||||||
/// Get the userID for the last opened user.
|
/// Get the userId for the last opened user.
|
||||||
Result accountGetLastOpenedUser(AccountUid *userID);
|
Result accountGetLastOpenedUser(AccountUid *uid);
|
||||||
|
|
||||||
/// Get an AccountProfile for the specified userID.
|
/// Get an AccountProfile for the specified userId.
|
||||||
Result accountGetProfile(AccountProfile* out, AccountUid userID);
|
Result accountGetProfile(AccountProfile* out, AccountUid uid);
|
||||||
|
|
||||||
/// Close the AccountProfile.
|
/// Close the AccountProfile.
|
||||||
void accountProfileClose(AccountProfile* profile);
|
void accountProfileClose(AccountProfile* profile);
|
||||||
@ -88,9 +88,9 @@ Result accountProfileGetImageSize(AccountProfile* profile, u32* image_size);
|
|||||||
/// Load the JPEG profile icon, valid for both Miis and character icons. The output image_size is the same as the one from \ref accountProfileGetImageSize.
|
/// Load the JPEG profile icon, valid for both Miis and character icons. The output image_size is the same as the one from \ref accountProfileGetImageSize.
|
||||||
Result accountProfileLoadImage(AccountProfile* profile, void* buf, size_t len, u32* image_size);
|
Result accountProfileLoadImage(AccountProfile* profile, void* buf, size_t len, u32* image_size);
|
||||||
|
|
||||||
/// Gets the userID which was selected by the profile-selector applet (if any), prior to launching the currently running Application title.
|
/// Gets the userId which was selected by the profile-selector applet (if any), prior to launching the currently running Application.
|
||||||
/// This gets the cached PreselectedUser loaded during accountInitialize, when PreselectedUser is available.
|
/// This gets the cached PreselectedUser loaded during accountInitialize, when PreselectedUser is available.
|
||||||
Result accountGetPreselectedUser(AccountUid *userID);
|
Result accountGetPreselectedUser(AccountUid *uid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checks whether the specified \ref AccountUid is valid/set (non-zero).
|
* @brief Checks whether the specified \ref AccountUid is valid/set (non-zero).
|
||||||
|
@ -103,7 +103,7 @@ typedef enum {
|
|||||||
AppletId_web = 0x13, ///< 010000000000100A "LibAppletWeb" WebApplet applet
|
AppletId_web = 0x13, ///< 010000000000100A "LibAppletWeb" WebApplet applet
|
||||||
AppletId_shop = 0x14, ///< 010000000000100B "LibAppletShop" ShopN applet
|
AppletId_shop = 0x14, ///< 010000000000100B "LibAppletShop" ShopN applet
|
||||||
AppletId_photoViewer = 0x15, ///< 010000000000100D "photoViewer"
|
AppletId_photoViewer = 0x15, ///< 010000000000100D "photoViewer"
|
||||||
AppletId_set = 0x16, ///< 010000000000100E "set" (This title is currently not present on retail devices.)
|
AppletId_set = 0x16, ///< 010000000000100E "set" (This applet is currently not present on retail devices.)
|
||||||
AppletId_offlineWeb = 0x17, ///< 010000000000100F "LibAppletOff" Offline web-applet
|
AppletId_offlineWeb = 0x17, ///< 010000000000100F "LibAppletOff" Offline web-applet
|
||||||
AppletId_loginShare = 0x18, ///< 0100000000001010 "LibAppletLns" Whitelisted web-applet
|
AppletId_loginShare = 0x18, ///< 0100000000001010 "LibAppletLns" Whitelisted web-applet
|
||||||
AppletId_wifiWebAuth = 0x19, ///< 0100000000001011 "LibAppletAuth" WifiWebAuth applet
|
AppletId_wifiWebAuth = 0x19, ///< 0100000000001011 "LibAppletAuth" WifiWebAuth applet
|
||||||
@ -193,7 +193,7 @@ typedef enum {
|
|||||||
/// ProgramSpecifyKind for the ExecuteProgram cmd. Controls the type of the u64 passed to the ExecuteProgram cmd.
|
/// ProgramSpecifyKind for the ExecuteProgram cmd. Controls the type of the u64 passed to the ExecuteProgram cmd.
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AppletProgramSpecifyKind_ExecuteProgram = 0, ///< u8 ProgramIndex.
|
AppletProgramSpecifyKind_ExecuteProgram = 0, ///< u8 ProgramIndex.
|
||||||
AppletProgramSpecifyKind_JumpToSubApplicationProgramForDevelopment = 1, ///< u64 titleID. Only available when DebugMode is enabled.
|
AppletProgramSpecifyKind_JumpToSubApplicationProgramForDevelopment = 1, ///< u64 application_id. Only available when DebugMode is enabled.
|
||||||
AppletProgramSpecifyKind_RestartProgram = 2, ///< u64 = value 0.
|
AppletProgramSpecifyKind_RestartProgram = 2, ///< u64 = value 0.
|
||||||
} AppletProgramSpecifyKind;
|
} AppletProgramSpecifyKind;
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ typedef struct {
|
|||||||
Event PopInteractiveOutDataEvent; ///< Output from GetPopInteractiveOutDataEvent, autoclear=false.
|
Event PopInteractiveOutDataEvent; ///< Output from GetPopInteractiveOutDataEvent, autoclear=false.
|
||||||
LibAppletMode mode; ///< See ref \ref LibAppletMode.
|
LibAppletMode mode; ///< See ref \ref LibAppletMode.
|
||||||
u64 layer_handle; ///< Output from GetIndirectLayerConsumerHandle on [2.0.0+].
|
u64 layer_handle; ///< Output from GetIndirectLayerConsumerHandle on [2.0.0+].
|
||||||
bool creating_self; ///< When set, indicates that the LibraryApplet title is creating itself.
|
bool creating_self; ///< When set, indicates that the LibraryApplet is creating itself.
|
||||||
LibAppletExitReason exitreason; ///< Set by \ref appletHolderJoin using the output from cmd GetResult, see \ref LibAppletExitReason.
|
LibAppletExitReason exitreason; ///< Set by \ref appletHolderJoin using the output from cmd GetResult, see \ref LibAppletExitReason.
|
||||||
} AppletHolder;
|
} AppletHolder;
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
AppletId appletId; ///< \ref AppletId
|
AppletId appletId; ///< \ref AppletId
|
||||||
u32 pad; ///< Padding.
|
u32 pad; ///< Padding.
|
||||||
u64 titleID; ///< titleID, only set with appletId == ::AppletId_application.
|
u64 application_id; ///< ApplicationId, only set with appletId == ::AppletId_application.
|
||||||
} AppletIdentityInfo;
|
} AppletIdentityInfo;
|
||||||
|
|
||||||
/// Attributes for launching applications for Quest.
|
/// Attributes for launching applications for Quest.
|
||||||
@ -289,10 +289,10 @@ typedef struct {
|
|||||||
|
|
||||||
/// ApplicationLaunchProperty
|
/// ApplicationLaunchProperty
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 titleID; ///< Application titleID.
|
u64 application_id; ///< ApplicationId.
|
||||||
u32 version; ///< Application title-version.
|
u32 version; ///< Application version.
|
||||||
u8 app_storageId; ///< FsStorageId for the Application base title.
|
u8 app_storageId; ///< FsStorageId for the Application.
|
||||||
u8 update_storageId; ///< FsStorageId for the Application update title.
|
u8 update_storageId; ///< FsStorageId for the Application update.
|
||||||
u8 unk_xa; ///< Unknown.
|
u8 unk_xa; ///< Unknown.
|
||||||
u8 pad; ///< Padding.
|
u8 pad; ///< Padding.
|
||||||
} AppletApplicationLaunchProperty;
|
} AppletApplicationLaunchProperty;
|
||||||
@ -514,12 +514,12 @@ Result appletGetHdcpAuthenticationStateChangeEvent(Event *out_event);
|
|||||||
Result appletSetTvPowerStateMatchingMode(AppletTvPowerStateMatchingMode mode);
|
Result appletSetTvPowerStateMatchingMode(AppletTvPowerStateMatchingMode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the application titleID for the specified ContentActionName string.
|
* @brief Gets the ApplicationId for the specified ContentActionName string.
|
||||||
* @note Only available when the current applet is an AppletType_SystemApplication on [5.1.0+].
|
* @note Only available when the current applet is an AppletType_SystemApplication on [5.1.0+].
|
||||||
* @param[out] titleID Application titleID.
|
* @param[out] application_id ApplicationId.
|
||||||
* @param[in] name ContentActionName string.
|
* @param[in] name ContentActionName string.
|
||||||
*/
|
*/
|
||||||
Result appletGetApplicationIdByContentActionName(u64 *titleID, const char *name);
|
Result appletGetApplicationIdByContentActionName(u64 *application_id, const char *name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets the \ref ApmCpuBoostMode.
|
* @brief Sets the \ref ApmCpuBoostMode.
|
||||||
@ -1007,7 +1007,7 @@ Result appletLockAccessorUnlock(AppletLockAccessor *a);
|
|||||||
Result appletCreateLibraryApplet(AppletHolder *h, AppletId id, LibAppletMode mode);
|
Result appletCreateLibraryApplet(AppletHolder *h, AppletId id, LibAppletMode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a LibraryApplet. This is for when a LibraryApplet title creates itself.
|
* @brief Creates a LibraryApplet. This is for when a LibraryApplet creates itself.
|
||||||
* @note Identical to \ref appletCreateLibraryApplet except this sets the creating_self flag to true.
|
* @note Identical to \ref appletCreateLibraryApplet except this sets the creating_self flag to true.
|
||||||
* @param h AppletHolder object.
|
* @param h AppletHolder object.
|
||||||
* @param id See \ref AppletId.
|
* @param id See \ref AppletId.
|
||||||
@ -1260,23 +1260,23 @@ Result appletPopLaunchParameter(AppletStorage *s, AppletLaunchParameterKind kind
|
|||||||
/**
|
/**
|
||||||
* @brief Requests to launch the specified application.
|
* @brief Requests to launch the specified application.
|
||||||
* @note Only available with AppletType_*Application, or AppletType_LibraryApplet on [5.0.0+].
|
* @note Only available with AppletType_*Application, or AppletType_LibraryApplet on [5.0.0+].
|
||||||
* @param[in] titleID Application titleID. Value 0 can be used to relaunch the current application.
|
* @param[in] application_id ApplicationId. Value 0 can be used to relaunch the current application.
|
||||||
* @param[in] s Optional AppletStorage object, can be NULL. This is automatically closed. When NULL on pre-4.0.0 (or with AppletType_LibraryApplet), this will internally create a tmp storage with size 0 for use with the cmd. This is the storage available to the launched application via \ref appletPopLaunchParameter with ::AppletLaunchParameterKind_UserChannel.
|
* @param[in] s Optional AppletStorage object, can be NULL. This is automatically closed. When NULL on pre-4.0.0 (or with AppletType_LibraryApplet), this will internally create a tmp storage with size 0 for use with the cmd. This is the storage available to the launched application via \ref appletPopLaunchParameter with ::AppletLaunchParameterKind_UserChannel.
|
||||||
*/
|
*/
|
||||||
Result appletRequestLaunchApplication(u64 titleID, AppletStorage* s);
|
Result appletRequestLaunchApplication(u64 application_id, AppletStorage* s);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Requests to launch the specified application, for kiosk systems.
|
* @brief Requests to launch the specified application, for kiosk systems.
|
||||||
* @note Only available with AppletType_*Application on [3.0.0+].
|
* @note Only available with AppletType_*Application on [3.0.0+].
|
||||||
* @note Identical to \ref appletRequestLaunchApplication, except this allows the user to specify the attribute fields instead of the defaults being used.
|
* @note Identical to \ref appletRequestLaunchApplication, except this allows the user to specify the attribute fields instead of the defaults being used.
|
||||||
* @param[in] titleID Application titleID
|
* @param[in] application_id ApplicationId
|
||||||
* @param[in] s Optional AppletStorage object, can be NULL. This is automatically closed. When NULL on pre-4.0.0, this will internally create a tmp storage with size 0 for use with the cmd. This is the storage available to the launched application via \ref appletPopLaunchParameter with ::AppletLaunchParameterKind_UserChannel.
|
* @param[in] s Optional AppletStorage object, can be NULL. This is automatically closed. When NULL on pre-4.0.0, this will internally create a tmp storage with size 0 for use with the cmd. This is the storage available to the launched application via \ref appletPopLaunchParameter with ::AppletLaunchParameterKind_UserChannel.
|
||||||
* @param[in] attr Kiosk application attributes.
|
* @param[in] attr Kiosk application attributes.
|
||||||
*/
|
*/
|
||||||
Result appletRequestLaunchApplicationForQuest(u64 titleID, AppletStorage* s, const AppletApplicationAttributeForQuest *attr);
|
Result appletRequestLaunchApplicationForQuest(u64 application_id, AppletStorage* s, const AppletApplicationAttributeForQuest *attr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the DesiredLanguage for the current host title control.nacp.
|
* @brief Gets the DesiredLanguage for the current host application control.nacp.
|
||||||
* @note Only available with AppletType_*Application.
|
* @note Only available with AppletType_*Application.
|
||||||
* @param[out] LanguageCode Output LanguageCode, see set.h.
|
* @param[out] LanguageCode Output LanguageCode, see set.h.
|
||||||
*/
|
*/
|
||||||
@ -1286,7 +1286,7 @@ Result appletGetDesiredLanguage(u64 *LanguageCode);
|
|||||||
Result appletSetTerminateResult(Result res);
|
Result appletSetTerminateResult(Result res);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the DisplayVersion for the current host title control.nacp.
|
* @brief Gets the DisplayVersion for the current host application control.nacp.
|
||||||
* @note Only available with AppletType_*Application.
|
* @note Only available with AppletType_*Application.
|
||||||
* @param[out] displayVersion Output DisplayVersion string, must be at least 0x10-bytes. This is always NUL-terminated.
|
* @param[out] displayVersion Output DisplayVersion string, must be at least 0x10-bytes. This is always NUL-terminated.
|
||||||
*/
|
*/
|
||||||
@ -1333,7 +1333,7 @@ Result appletEndBlockingHomeButton(void);
|
|||||||
void appletNotifyRunning(bool *out);
|
void appletNotifyRunning(bool *out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the PseudoDeviceId. This is derived from the output of a ns command, and from data in the host title control.nacp.
|
* @brief Gets the PseudoDeviceId. This is derived from the output of a ns command, and from data in the host application control.nacp.
|
||||||
* @note Only available with AppletType_*Application on [2.0.0+].
|
* @note Only available with AppletType_*Application on [2.0.0+].
|
||||||
* @param[out] out Output PseudoDeviceId.
|
* @param[out] out Output PseudoDeviceId.
|
||||||
*/
|
*/
|
||||||
@ -1355,7 +1355,7 @@ Result appletSetGamePlayRecordingState(bool state);
|
|||||||
/// Initializes video recording. This allocates a 0x6000000-byte buffer for the TransferMemory, cleanup is handled automatically during app exit in \ref appletExit.
|
/// Initializes video recording. This allocates a 0x6000000-byte buffer for the TransferMemory, cleanup is handled automatically during app exit in \ref appletExit.
|
||||||
/// Only available with AppletType_Application on [3.0.0+], hence errors from this can be ignored.
|
/// Only available with AppletType_Application on [3.0.0+], hence errors from this can be ignored.
|
||||||
/// Video recording is only fully available system-side with [4.0.0+].
|
/// Video recording is only fully available system-side with [4.0.0+].
|
||||||
/// Only usable when running under a title which supports video recording. Using this is only needed when the host title control.nacp has VideoCaptureMode set to Enabled, with Automatic appletInitializeGamePlayRecording is not needed.
|
/// Only usable when running under an application which supports video recording. Using this is only needed when the host application control.nacp has VideoCaptureMode set to Enabled, with Automatic appletInitializeGamePlayRecording is not needed.
|
||||||
Result appletInitializeGamePlayRecording(void);
|
Result appletInitializeGamePlayRecording(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1413,44 +1413,44 @@ Result appletSetApplicationCopyrightVisibility(bool visible);
|
|||||||
/**
|
/**
|
||||||
* @brief Gets ApplicationPlayStatistics.
|
* @brief Gets ApplicationPlayStatistics.
|
||||||
* @note Only available with AppletType_*Application on [5.0.0+].
|
* @note Only available with AppletType_*Application on [5.0.0+].
|
||||||
* @note The input titleIDs must be allowed via control.nacp with the current host title. The minimum allowed titleID is the titleID for the current-process.
|
* @note The input ApplicationIds must be allowed via control.nacp with the current host application. The minimum allowed ApplicationId is the ApplicationId for the current application.
|
||||||
* @param stats Output \ref PdmApplicationPlayStatistics array.
|
* @param stats Output \ref PdmApplicationPlayStatistics array.
|
||||||
* @param titleIDs Input titleIDs array.
|
* @param application_ids Input ApplicationIds array.
|
||||||
* @param count Total entries in the input/output arrays.
|
* @param count Total entries in the input/output arrays.
|
||||||
* @param total_out Total output entries.
|
* @param total_out Total output entries.
|
||||||
*/
|
*/
|
||||||
Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out);
|
Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats, const u64 *application_ids, s32 count, s32 *total_out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Same as \ref appletQueryApplicationPlayStatistics except this gets playstats specific to the input userID.
|
* @brief Same as \ref appletQueryApplicationPlayStatistics except this gets playstats specific to the input userId.
|
||||||
* @note Only available with AppletType_*Application on [6.0.0+].
|
* @note Only available with AppletType_*Application on [6.0.0+].
|
||||||
* @param[in] uid \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
* @param[out] stats Output \ref PdmApplicationPlayStatistics array.
|
* @param[out] stats Output \ref PdmApplicationPlayStatistics array.
|
||||||
* @param[in] titleIDs Input titleIDs array.
|
* @param[in] application_ids Input ApplicationIds array.
|
||||||
* @param[in] count Total entries in the input/output arrays.
|
* @param[in] count Total entries in the input/output arrays.
|
||||||
* @param[out] total_out Total output entries.
|
* @param[out] total_out Total output entries.
|
||||||
*/
|
*/
|
||||||
Result appletQueryApplicationPlayStatisticsByUid(AccountUid uid, PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out);
|
Result appletQueryApplicationPlayStatisticsByUid(AccountUid uid, PdmApplicationPlayStatistics *stats, const u64 *application_ids, s32 count, s32 *total_out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches Application title {current_titleID}+programIndex. This will enter an infinite-sleep-loop on success.
|
* @brief Launches Application {current_ApplicationId}+programIndex. This will enter an infinite-sleep-loop on success.
|
||||||
* @note Only available with AppletType_*Application on [5.0.0+].
|
* @note Only available with AppletType_*Application on [5.0.0+].
|
||||||
* @note Creates the storage if needed. Uses cmd ClearUserChannel. Uses cmd UnpopToUserChannel when the storage was created. Lastly cmd ExecuteProgramCmd is used.
|
* @note Creates the storage if needed. Uses cmd ClearUserChannel. Uses cmd UnpopToUserChannel when the storage was created. Lastly cmd ExecuteProgramCmd is used.
|
||||||
* @param[in] programIndex ProgramIndex, must be 0x0-0xFF. 0 is the same as the current titleID. ProgramIndex values where the title is not installed should not be used.
|
* @param[in] programIndex ProgramIndex, must be 0x0-0xFF. 0 is the same as the current application. ProgramIndex values where the application is not installed should not be used.
|
||||||
* @param[in] buffer Optional buffer containing the storage data which will be used for ::AppletLaunchParameterKind_UserChannel with the launched Application, can be NULL.
|
* @param[in] buffer Optional buffer containing the storage data which will be used for ::AppletLaunchParameterKind_UserChannel with the launched Application, can be NULL.
|
||||||
* @param[in] size Size of the above buffer, 0 to not use the storage. Must be <=0x1000.
|
* @param[in] size Size of the above buffer, 0 to not use the storage. Must be <=0x1000.
|
||||||
*/
|
*/
|
||||||
Result appletExecuteProgram(s32 programIndex, const void* buffer, size_t size);
|
Result appletExecuteProgram(s32 programIndex, const void* buffer, size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches the specified Application titleID.
|
* @brief Launches the specified ApplicationId.
|
||||||
* @note Only available with AppletType_*Application on [5.0.0+], with DebugMode enabled.
|
* @note Only available with AppletType_*Application on [5.0.0+], with DebugMode enabled.
|
||||||
* @note Creates the storage if needed. Uses cmd ClearUserChannel. Uses cmd UnpopToUserChannel when the storage was created. Lastly cmd ExecuteProgramCmd is used.
|
* @note Creates the storage if needed. Uses cmd ClearUserChannel. Uses cmd UnpopToUserChannel when the storage was created. Lastly cmd ExecuteProgramCmd is used.
|
||||||
* @param[in] titleID Application titleID.
|
* @param[in] application_id ApplicationId.
|
||||||
* @param[in] buffer Optional buffer containing the storage data which will be used for ::AppletLaunchParameterKind_UserChannel with the launched Application, can be NULL.
|
* @param[in] buffer Optional buffer containing the storage data which will be used for ::AppletLaunchParameterKind_UserChannel with the launched Application, can be NULL.
|
||||||
* @param[in] size Size of the above buffer, 0 to not use the storage. Must be <=0x1000.
|
* @param[in] size Size of the above buffer, 0 to not use the storage. Must be <=0x1000.
|
||||||
*/
|
*/
|
||||||
Result appletJumpToSubApplicationProgramForDevelopment(u64 titleID, const void* buffer, size_t size);
|
Result appletJumpToSubApplicationProgramForDevelopment(u64 application_id, const void* buffer, size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Relaunches the current Application.
|
* @brief Relaunches the current Application.
|
||||||
@ -1462,9 +1462,9 @@ Result appletJumpToSubApplicationProgramForDevelopment(u64 titleID, const void*
|
|||||||
Result appletRestartProgram(const void* buffer, size_t size);
|
Result appletRestartProgram(const void* buffer, size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the ProgramIndex of the Application which launched this title.
|
* @brief Gets the ProgramIndex of the program which launched this program.
|
||||||
* @note Only available with AppletType_*Application on [5.0.0+].
|
* @note Only available with AppletType_*Application on [5.0.0+].
|
||||||
* @param[out] programIndex ProgramIndex, -1 when there was no previous title.
|
* @param[out] programIndex ProgramIndex, -1 when there was no previous program.
|
||||||
*/
|
*/
|
||||||
Result appletGetPreviousProgramIndex(s32 *programIndex);
|
Result appletGetPreviousProgramIndex(s32 *programIndex);
|
||||||
|
|
||||||
@ -1541,17 +1541,17 @@ Result appletGetHomeButtonWriterLockAccessor(AppletLockAccessor *a);
|
|||||||
/**
|
/**
|
||||||
* @brief PopRequestLaunchApplicationForDebug
|
* @brief PopRequestLaunchApplicationForDebug
|
||||||
* @note Only available with AppletType_SystemApplet on [6.0.0+].
|
* @note Only available with AppletType_SystemApplet on [6.0.0+].
|
||||||
* @param[out] userIDs Output array of \ref AccountUid.
|
* @param[out] uids Output array of \ref AccountUid.
|
||||||
* @param[in] count Size of the userID array in entries, must be at least the size stored in state.
|
* @param[in] count Size of the uids array in entries, must be at least the size stored in state.
|
||||||
* @param[out] titleID Output Application titleID.
|
* @param[out] application_id Output ApplicationId.
|
||||||
* @param[out] total_out Total output userID entries.
|
* @param[out] total_out Total output userID entries.
|
||||||
*/
|
*/
|
||||||
Result appletPopRequestLaunchApplicationForDebug(AccountUid *userIDs, s32 count, u64 *titleID, s32 *total_out);
|
Result appletPopRequestLaunchApplicationForDebug(AccountUid *uids, s32 count, u64 *application_id, s32 *total_out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Launches DevMenu and the dev Overlay-applet. This will enter an infinite-sleep-loop on success.
|
* @brief Launches DevMenu and the dev Overlay-applet. This will enter an infinite-sleep-loop on success.
|
||||||
* @note Only available with AppletType_SystemApplet on [8.0.0+].
|
* @note Only available with AppletType_SystemApplet on [8.0.0+].
|
||||||
* @note This verifies that DebugMode is enabled, then uses a ns cmd. That cmd then loads the system-settings for these two titleIDs (which normally only exist on devunits), and verifies that these titles are installed + launches them.
|
* @note This verifies that DebugMode is enabled, then uses a ns cmd. That cmd then loads the system-settings for these two ProgramIds (which normally only exist on devunits), and verifies that these programs are installed + launches them.
|
||||||
*/
|
*/
|
||||||
Result appletLaunchDevMenu(void);
|
Result appletLaunchDevMenu(void);
|
||||||
|
|
||||||
@ -1635,9 +1635,9 @@ Result appletGetHdcpAuthenticationFailedEvent(Event *out_event);
|
|||||||
* @brief Creates an Application.
|
* @brief Creates an Application.
|
||||||
* @note Only available with AppletType_SystemApplet.
|
* @note Only available with AppletType_SystemApplet.
|
||||||
* @param[out] a \ref AppletApplication
|
* @param[out] a \ref AppletApplication
|
||||||
* @param[in] titleID Application titleID.
|
* @param[in] application_id ApplicationId.
|
||||||
*/
|
*/
|
||||||
Result appletCreateApplication(AppletApplication *a, u64 titleID);
|
Result appletCreateApplication(AppletApplication *a, u64 application_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Pops a \ref AppletApplication for a requested Application launch.
|
* @brief Pops a \ref AppletApplication for a requested Application launch.
|
||||||
@ -1650,9 +1650,9 @@ Result appletPopLaunchRequestedApplication(AppletApplication *a);
|
|||||||
* @brief Creates a SystemApplication.
|
* @brief Creates a SystemApplication.
|
||||||
* @note Only available with AppletType_SystemApplet.
|
* @note Only available with AppletType_SystemApplet.
|
||||||
* @param[out] a \ref AppletApplication
|
* @param[out] a \ref AppletApplication
|
||||||
* @param[in] titleID SystemApplication titleID.
|
* @param[in] system_application_id SystemApplicationId.
|
||||||
*/
|
*/
|
||||||
Result appletCreateSystemApplication(AppletApplication *a, u64 titleID);
|
Result appletCreateSystemApplication(AppletApplication *a, u64 system_application_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief PopFloatingApplicationForDevelopment.
|
* @brief PopFloatingApplicationForDevelopment.
|
||||||
@ -1740,11 +1740,11 @@ Result appletApplicationAreAnyLibraryAppletsLeft(AppletApplication *a, bool *out
|
|||||||
Result appletApplicationRequestExitLibraryAppletOrTerminate(AppletApplication *a, u64 timeout);
|
Result appletApplicationRequestExitLibraryAppletOrTerminate(AppletApplication *a, u64 timeout);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the titleID for the Application.
|
* @brief Gets the ApplicationId for the Application.
|
||||||
* @param a \ref AppletApplication
|
* @param a \ref AppletApplication
|
||||||
* @param[out] titleID Output Application titleID.
|
* @param[out] application_id Output ApplicationId.
|
||||||
*/
|
*/
|
||||||
Result appletApplicationGetApplicationId(AppletApplication *a, u64 *titleID);
|
Result appletApplicationGetApplicationId(AppletApplication *a, u64 *application_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Pushes a LaunchParameter AppletStorage to the Application.
|
* @brief Pushes a LaunchParameter AppletStorage to the Application.
|
||||||
@ -1783,11 +1783,11 @@ Result appletApplicationGetApplicationLaunchRequestInfo(AppletApplication *a, Ap
|
|||||||
* @brief SetUsers for the Application.
|
* @brief SetUsers for the Application.
|
||||||
* @note Only available on [6.0.0+].
|
* @note Only available on [6.0.0+].
|
||||||
* @param a \ref AppletApplication
|
* @param a \ref AppletApplication
|
||||||
* @param[in] userIDs Input array of \ref AccountUid.
|
* @param[in] uids Input array of \ref AccountUid.
|
||||||
* @param[in] count Size of the userID array in entries, must be <=ACC_USER_LIST_SIZE.
|
* @param[in] count Size of the uids array in entries, must be <=ACC_USER_LIST_SIZE.
|
||||||
* @param[in] flag When this flag is true, this just clears the users_available state flag to 0 and returns.
|
* @param[in] flag When this flag is true, this just clears the users_available state flag to 0 and returns.
|
||||||
*/
|
*/
|
||||||
Result appletApplicationSetUsers(AppletApplication *a, const AccountUid *userIDs, s32 count, bool flag);
|
Result appletApplicationSetUsers(AppletApplication *a, const AccountUid *uids, s32 count, bool flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CheckRightsEnvironmentAvailable.
|
* @brief CheckRightsEnvironmentAvailable.
|
||||||
@ -1806,15 +1806,15 @@ Result appletApplicationCheckRightsEnvironmentAvailable(AppletApplication *a, bo
|
|||||||
Result appletApplicationGetNsRightsEnvironmentHandle(AppletApplication *a, u64 *handle);
|
Result appletApplicationGetNsRightsEnvironmentHandle(AppletApplication *a, u64 *handle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets an array of userIDs for the Application DesirableUids.
|
* @brief Gets an array of userIds for the Application DesirableUids.
|
||||||
* @note Only available on [6.0.0+].
|
* @note Only available on [6.0.0+].
|
||||||
* @note qlaunch only uses 1 userID with this.
|
* @note qlaunch only uses 1 userId with this.
|
||||||
* @param a \ref AppletApplication
|
* @param a \ref AppletApplication
|
||||||
* @param[out] userIDs Output array of \ref AccountUid.
|
* @param[out] uids Output array of \ref AccountUid.
|
||||||
* @param[in] count Size of the userID array in entries, must be at least the size stored in state.
|
* @param[in] count Size of the uids array in entries, must be at least the size stored in state.
|
||||||
* @param[out] total_out Total output entries.
|
* @param[out] total_out Total output entries.
|
||||||
*/
|
*/
|
||||||
Result appletApplicationGetDesirableUids(AppletApplication *a, AccountUid *userIDs, s32 count, s32 *total_out);
|
Result appletApplicationGetDesirableUids(AppletApplication *a, AccountUid *uids, s32 count, s32 *total_out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ReportApplicationExitTimeout.
|
* @brief ReportApplicationExitTimeout.
|
||||||
@ -1832,13 +1832,13 @@ Result appletApplicationReportApplicationExitTimeout(AppletApplication *a);
|
|||||||
Result appletApplicationSetApplicationAttribute(AppletApplication *a, const AppletApplicationAttribute *attr);
|
Result appletApplicationSetApplicationAttribute(AppletApplication *a, const AppletApplicationAttribute *attr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets whether the savedata specified by the input titleID is accessible.
|
* @brief Gets whether the savedata specified by the input ApplicationId is accessible.
|
||||||
* @note Only available on [8.0.0+].
|
* @note Only available on [8.0.0+].
|
||||||
* @param a \ref AppletApplication
|
* @param a \ref AppletApplication
|
||||||
* @param[in] titleID titleID for the savedata.
|
* @param[in] application_id ApplicationId for the savedata.
|
||||||
* @param[out] out Output flag.
|
* @param[out] out Output flag.
|
||||||
*/
|
*/
|
||||||
Result appletApplicationHasSaveDataAccessPermission(AppletApplication *a, u64 titleID, bool *out);
|
Result appletApplicationHasSaveDataAccessPermission(AppletApplication *a, u64 application_id, bool *out);
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
@ -2002,11 +2002,11 @@ Result appletGetIndirectLayerProducerHandle(u64 *out);
|
|||||||
Result appletGetMainAppletApplicationDesiredLanguage(u64 *LanguageCode);
|
Result appletGetMainAppletApplicationDesiredLanguage(u64 *LanguageCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the titleID for the currently running Application.
|
* @brief Gets the ApplicationId for the currently running Application.
|
||||||
* @note Only available with AppletType_LibraryApplet on [8.0.0+].
|
* @note Only available with AppletType_LibraryApplet on [8.0.0+].
|
||||||
* @param[out] titleID Output titleID, 0 when no Application is running.
|
* @param[out] application_id Output ApplicationId, 0 when no Application is running.
|
||||||
*/
|
*/
|
||||||
Result appletGetCurrentApplicationId(u64 *titleID);
|
Result appletGetCurrentApplicationId(u64 *application_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Exits the current applet. Same as \ref appletHolderRequestExit except this is for the current applet.
|
* @brief Exits the current applet. Same as \ref appletHolderRequestExit except this is for the current applet.
|
||||||
@ -2036,14 +2036,14 @@ Result appletReserveResourceForMovieOperation(void);
|
|||||||
Result appletUnreserveResourceForMovieOperation(void);
|
Result appletUnreserveResourceForMovieOperation(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets an array of userIDs for the MainApplet AvailableUsers.
|
* @brief Gets an array of userIds for the MainApplet AvailableUsers.
|
||||||
* @note Only available with AppletType_LibraryApplet on [6.0.0+].
|
* @note Only available with AppletType_LibraryApplet on [6.0.0+].
|
||||||
* @param[out] userIDs Output array of \ref AccountUid.
|
* @param[out] uids Output array of \ref AccountUid.
|
||||||
* @param[in] count Size of the userID array in entries, must be at least ACC_USER_LIST_SIZE.
|
* @param[in] count Size of the uids array in entries, must be at least ACC_USER_LIST_SIZE.
|
||||||
* @param[out] flag When true, this indicates that no users are available.
|
* @param[out] flag When true, this indicates that no users are available.
|
||||||
* @param[out] total_out Total output entries. This is -1 when flag is true.
|
* @param[out] total_out Total output entries. This is -1 when flag is true.
|
||||||
*/
|
*/
|
||||||
Result appletGetMainAppletAvailableUsers(AccountUid *userIDs, s32 count, bool *flag, s32 *total_out);
|
Result appletGetMainAppletAvailableUsers(AccountUid *uids, s32 count, bool *flag, s32 *total_out);
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
@ -2065,11 +2065,11 @@ Result appletBeginToWatchShortHomeButtonMessage(void);
|
|||||||
Result appletEndToWatchShortHomeButtonMessage(void);
|
Result appletEndToWatchShortHomeButtonMessage(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the application titleID for displaying the logo screen during application launch.
|
* @brief Gets the ApplicationId for displaying the logo screen during application launch.
|
||||||
* @note Only available with AppletType_OverlayApplet.
|
* @note Only available with AppletType_OverlayApplet.
|
||||||
* @param[out] titleID Output application titleID, 0 when no application is running.
|
* @param[out] application_id Output ApplicationId, 0 when no application is running.
|
||||||
*/
|
*/
|
||||||
Result appletGetApplicationIdForLogo(u64 *titleID);
|
Result appletGetApplicationIdForLogo(u64 *application_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets the GpuTimeSliceBoost.
|
* @brief Sets the GpuTimeSliceBoost.
|
||||||
@ -2209,14 +2209,14 @@ Result appletInvalidateTransitionLayer(void);
|
|||||||
/**
|
/**
|
||||||
* @brief Requests to launch the specified Application, with the specified users.
|
* @brief Requests to launch the specified Application, with the specified users.
|
||||||
* @note Only available on [6.0.0+].
|
* @note Only available on [6.0.0+].
|
||||||
* @param[in] titleID Application titleID.
|
* @param[in] application_id ApplicationId.
|
||||||
* @param[in] userIDs Input array of \ref AccountUid.
|
* @param[in] uids Input array of \ref AccountUid.
|
||||||
* @param[in] total_userIDs Total input userIDs, must be <=ACC_USER_LIST_SIZE.
|
* @param[in] total_uids Total input uids, must be <=ACC_USER_LIST_SIZE.
|
||||||
* @param[in] flag Whether to use the specified buffer to create a storage which will be pushed for ::AppletLaunchParameterKind_UserChannel.
|
* @param[in] flag Whether to use the specified buffer to create a storage which will be pushed for ::AppletLaunchParameterKind_UserChannel.
|
||||||
* @param[in] buffer Buffer containing the above storage data.
|
* @param[in] buffer Buffer containing the above storage data.
|
||||||
* @param[in] size Size of the storage buffer.
|
* @param[in] size Size of the storage buffer.
|
||||||
*/
|
*/
|
||||||
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, const AccountUid *userIDs, s32 total_userIDs, bool flag, const void* buffer, size_t size);
|
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 application_id, const AccountUid *uids, s32 total_uids, bool flag, const void* buffer, size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the \ref AppletResourceUsageInfo.
|
* @brief Gets the \ref AppletResourceUsageInfo.
|
||||||
|
@ -27,7 +27,7 @@ typedef enum {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
CapsContentType_Screenshot = 0, ///< Album screenshots.
|
CapsContentType_Screenshot = 0, ///< Album screenshots.
|
||||||
CapsContentType_Movie = 1, ///< Album videos.
|
CapsContentType_Movie = 1, ///< Album videos.
|
||||||
CapsContentType_ExtraMovie = 3, ///< Videos recorded by the current Application host title via \ref grcCreateMovieMaker.
|
CapsContentType_ExtraMovie = 3, ///< Videos recorded by the current host Application via \ref grcCreateMovieMaker.
|
||||||
} CapsContentType;
|
} CapsContentType;
|
||||||
|
|
||||||
/// ScreenShotAttribute
|
/// ScreenShotAttribute
|
||||||
@ -77,7 +77,7 @@ typedef struct {
|
|||||||
|
|
||||||
/// AlbumEntryId
|
/// AlbumEntryId
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 titleID; ///< titleID.
|
u64 program_id; ///< ProgramId.
|
||||||
CapsAlbumFileDateTime datetime; ///< \ref CapsAlbumFileDateTime
|
CapsAlbumFileDateTime datetime; ///< \ref CapsAlbumFileDateTime
|
||||||
u8 unk_x10; ///< Unknown.
|
u8 unk_x10; ///< Unknown.
|
||||||
u8 unk_x11; ///< Unknown.
|
u8 unk_x11; ///< Unknown.
|
||||||
@ -123,7 +123,7 @@ typedef struct {
|
|||||||
|
|
||||||
/// UserIdList
|
/// UserIdList
|
||||||
typedef struct {
|
typedef struct {
|
||||||
AccountUid userIDs[ACC_USER_LIST_SIZE]; ///< \ref AccountUid
|
AccountUid uids[ACC_USER_LIST_SIZE]; ///< \ref AccountUid
|
||||||
u8 count; ///< Total userIDs.
|
u8 count; ///< Total userIDs.
|
||||||
u8 pad[7]; ///< Padding.
|
u8 pad[7]; ///< Padding.
|
||||||
} CapsUserIdList;
|
} CapsUserIdList;
|
||||||
|
@ -52,11 +52,11 @@ Result capssuSaveScreenShotWithUserData(const void* buffer, size_t size, AlbumRe
|
|||||||
* @param[in] size Size of the buffer.
|
* @param[in] size Size of the buffer.
|
||||||
* @param[in] reportoption \ref AlbumReportOption
|
* @param[in] reportoption \ref AlbumReportOption
|
||||||
* @param[in] orientation \ref AlbumImageOrientation
|
* @param[in] orientation \ref AlbumImageOrientation
|
||||||
* @param[in] userIDs Input array of \ref AccountUid. If NULL, the \ref CapsUserIdList will be empty.
|
* @param[in] uids Input array of \ref AccountUid. If NULL, the \ref CapsUserIdList will be empty.
|
||||||
* @param[in] userID_count Size of the userID array in entries, must be within bounds for CapsUserIdList::userIDs. If 0, the \ref CapsUserIdList will be empty.
|
* @param[in] uid_count Size of the uids array in entries, must be within bounds for CapsUserIdList::uids. If 0, the \ref CapsUserIdList will be empty.
|
||||||
* @param[out] out \ref CapsApplicationAlbumEntry. Optional, can be NULL.
|
* @param[out] out \ref CapsApplicationAlbumEntry. Optional, can be NULL.
|
||||||
*/
|
*/
|
||||||
Result capssuSaveScreenShotWithUserIds(const void* buffer, size_t size, AlbumReportOption reportoption, AlbumImageOrientation orientation, const AccountUid* userIDs, size_t userID_count, CapsApplicationAlbumEntry *out);
|
Result capssuSaveScreenShotWithUserIds(const void* buffer, size_t size, AlbumReportOption reportoption, AlbumImageOrientation orientation, const AccountUid* uids, size_t uid_count, CapsApplicationAlbumEntry *out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Saves an Album screenshot using the specified gfx data in the buffer, with the specified \ref CapsScreenShotAttribute.
|
* @brief Saves an Album screenshot using the specified gfx data in the buffer, with the specified \ref CapsScreenShotAttribute.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file capsu.h
|
* @file capsu.h
|
||||||
* @brief Application Album (caps:u) service IPC wrapper.
|
* @brief Application Album (caps:u) service IPC wrapper.
|
||||||
* This is only usable with AlbumFiles associated with the current Application host title.
|
* This is only usable with AlbumFiles associated with the current host Application.
|
||||||
* @author yellows8
|
* @author yellows8
|
||||||
* @copyright libnx Authors
|
* @copyright libnx Authors
|
||||||
*/
|
*/
|
||||||
@ -45,10 +45,10 @@ Result capsuGetAlbumFileListDeprecated1(CapsApplicationAlbumFileEntry *entries,
|
|||||||
* @param[in] type \ref CapsContentType
|
* @param[in] type \ref CapsContentType
|
||||||
* @param[in] start_datetime Start \ref CapsAlbumFileDateTime, when NULL the default is used.
|
* @param[in] start_datetime Start \ref CapsAlbumFileDateTime, when NULL the default is used.
|
||||||
* @param[in] end_datetime End \ref CapsAlbumFileDateTime, when NULL the default is used.
|
* @param[in] end_datetime End \ref CapsAlbumFileDateTime, when NULL the default is used.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
* @param[out] total_entries Total output entries.
|
* @param[out] total_entries Total output entries.
|
||||||
*/
|
*/
|
||||||
Result capsuGetAlbumFileListDeprecated2(CapsApplicationAlbumFileEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries);
|
Result capsuGetAlbumFileListDeprecated2(CapsApplicationAlbumFileEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid uid, s32 *total_entries);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets a listing of \ref CapsApplicationAlbumEntry.
|
* @brief Gets a listing of \ref CapsApplicationAlbumEntry.
|
||||||
@ -70,10 +70,10 @@ Result capsuGetAlbumFileList3(CapsApplicationAlbumEntry *entries, s32 count, Cap
|
|||||||
* @param[in] type \ref CapsContentType
|
* @param[in] type \ref CapsContentType
|
||||||
* @param[in] start_datetime Start \ref CapsAlbumFileDateTime, when NULL the default is used.
|
* @param[in] start_datetime Start \ref CapsAlbumFileDateTime, when NULL the default is used.
|
||||||
* @param[in] end_datetime End \ref CapsAlbumFileDateTime, when NULL the default is used.
|
* @param[in] end_datetime End \ref CapsAlbumFileDateTime, when NULL the default is used.
|
||||||
* @param[in] userID \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
* @param[out] total_entries Total output entries.
|
* @param[out] total_entries Total output entries.
|
||||||
*/
|
*/
|
||||||
Result capsuGetAlbumFileList4(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries);
|
Result capsuGetAlbumFileList4(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid uid, s32 *total_entries);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Deletes the specified AlbumFile.
|
* @brief Deletes the specified AlbumFile.
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#define FS_MAX_PATH 0x301
|
#define FS_MAX_PATH 0x301
|
||||||
|
|
||||||
/// For use with FsSave.
|
/// For use with FsSave.
|
||||||
#define FS_SAVEDATA_CURRENT_TITLEID 0
|
#define FS_SAVEDATA_CURRENT_PROGRAMID 0
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 c[0x10];
|
u8 c[0x10];
|
||||||
@ -64,8 +64,8 @@ typedef struct
|
|||||||
/// Save Struct
|
/// Save Struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
u64 titleID; ///< titleID of the savedata to access when accessing other titles' savedata via SaveData, otherwise FS_SAVEDATA_CURRENT_TITLEID.
|
u64 program_id; ///< ProgramId of the savedata to access when accessing other programs' savedata via SaveData, otherwise FS_SAVEDATA_CURRENT_TITLEID.
|
||||||
AccountUid userID; ///< \ref AccountUid for the user-specific savedata to access, otherwise 0 for common savedata.
|
AccountUid uid; ///< \ref AccountUid for the user-specific savedata to access, otherwise 0 for common savedata.
|
||||||
u64 saveID; ///< saveID, 0 for SaveData.
|
u64 saveID; ///< saveID, 0 for SaveData.
|
||||||
u8 saveDataType; ///< See \ref FsSaveDataType.
|
u8 saveDataType; ///< See \ref FsSaveDataType.
|
||||||
u8 rank; ///< Save data 'rank' or 'precedence'. 0 if this save data is considered the primary save data. 1 if it's considered the secondary save data.
|
u8 rank; ///< Save data 'rank' or 'precedence'. 0 if this save data is considered the primary save data. 1 if it's considered the secondary save data.
|
||||||
@ -79,7 +79,7 @@ typedef struct
|
|||||||
/// SaveDataExtraData Struct
|
/// SaveDataExtraData Struct
|
||||||
typedef struct {
|
typedef struct {
|
||||||
FsSave save; ///< Save struct.
|
FsSave save; ///< Save struct.
|
||||||
u64 ownerId; ///< Title id of the owner of this save data. 0 for SystemSaveData.
|
u64 ownerId; ///< Id of the owner of this save data. 0 for SystemSaveData.
|
||||||
u64 timestamp; ///< POSIX timestamp.
|
u64 timestamp; ///< POSIX timestamp.
|
||||||
u32 flags; ///< Save data flags. See \ref FsSaveDataFlags.
|
u32 flags; ///< Save data flags. See \ref FsSaveDataFlags.
|
||||||
u32 unk_x54; ///< Normally 0. Possibly unused?
|
u32 unk_x54; ///< Normally 0. Possibly unused?
|
||||||
@ -94,7 +94,7 @@ typedef struct {
|
|||||||
s64 size; ///< Size of the save data.
|
s64 size; ///< Size of the save data.
|
||||||
s64 journalSize; ///< Journal size of the save data.
|
s64 journalSize; ///< Journal size of the save data.
|
||||||
u64 blockSize; ///< Block size of the save data.
|
u64 blockSize; ///< Block size of the save data.
|
||||||
u64 ownerId; ///< Title id of the owner of this save data. 0 for SystemSaveData.
|
u64 ownerId; ///< ProgramId of the owner of this save data. 0 for SystemSaveData.
|
||||||
u32 flags; ///< Save data flags. See \ref FsSaveDataFlags.
|
u32 flags; ///< Save data flags. See \ref FsSaveDataFlags.
|
||||||
u8 saveDataSpaceId; ///< See \ref FsSaveDataSpaceId.
|
u8 saveDataSpaceId; ///< See \ref FsSaveDataSpaceId.
|
||||||
u8 unk; ///< 0 for SystemSaveData.
|
u8 unk; ///< 0 for SystemSaveData.
|
||||||
@ -107,9 +107,9 @@ typedef struct
|
|||||||
u8 saveDataSpaceId; ///< See \ref FsSaveDataSpaceId.
|
u8 saveDataSpaceId; ///< See \ref FsSaveDataSpaceId.
|
||||||
u8 saveDataType; ///< See \ref FsSaveDataType.
|
u8 saveDataType; ///< See \ref FsSaveDataType.
|
||||||
u8 pad[6]; ///< Padding.
|
u8 pad[6]; ///< Padding.
|
||||||
AccountUid userID; ///< FsSave::userID
|
AccountUid uid; ///< FsSave::userID
|
||||||
u64 saveID; ///< See saveID for \ref FsSave.
|
u64 saveID; ///< See saveID for \ref FsSave.
|
||||||
u64 titleID; ///< titleID for FsSaveDataType_SaveData.
|
u64 application_id; ///< ApplicationId for FsSaveDataType_SaveData.
|
||||||
u64 size; ///< Raw saveimage size.
|
u64 size; ///< Raw saveimage size.
|
||||||
u16 index; ///< Save data index.
|
u16 index; ///< Save data index.
|
||||||
u8 rank; ///< Save data 'rank' or 'precedence'. 0 if this save data is considered the primary save data. 1 if it's considered the secondary save data.
|
u8 rank; ///< Save data 'rank' or 'precedence'. 0 if this save data is considered the primary save data. 1 if it's considered the secondary save data.
|
||||||
@ -296,9 +296,9 @@ Service* fsGetServiceSession(void);
|
|||||||
void fsSetPriority(FsPriority prio);
|
void fsSetPriority(FsPriority prio);
|
||||||
|
|
||||||
/// Mount requested filesystem type from content file
|
/// Mount requested filesystem type from content file
|
||||||
Result fsOpenFileSystem(FsFileSystem* out, FsFileSystemType fsType, const char* contentPath); ///< same as calling fsOpenFileSystemWithId with 0 as titleId
|
Result fsOpenFileSystem(FsFileSystem* out, FsFileSystemType fsType, const char* contentPath); ///< same as calling fsOpenFileSystemWithId with 0 as id
|
||||||
Result fsOpenFileSystemWithPatch(FsFileSystem* out, u64 titleId, FsFileSystemType fsType); ///< [2.0.0+], like OpenFileSystemWithId but without content path.
|
Result fsOpenFileSystemWithPatch(FsFileSystem* out, u64 id, FsFileSystemType fsType); ///< [2.0.0+], like OpenFileSystemWithId but without content path.
|
||||||
Result fsOpenFileSystemWithId(FsFileSystem* out, u64 titleId, FsFileSystemType fsType, const char* contentPath); ///< works on all firmwares, titleId is ignored on [1.0.0]
|
Result fsOpenFileSystemWithId(FsFileSystem* out, u64 id, FsFileSystemType fsType, const char* contentPath); ///< works on all firmwares, id is ignored on [1.0.0]
|
||||||
|
|
||||||
Result fsOpenBisFileSystem(FsFileSystem* out, FsBisStorageId partitionId, const char* string);
|
Result fsOpenBisFileSystem(FsFileSystem* out, FsBisStorageId partitionId, const char* string);
|
||||||
Result fsOpenBisStorage(FsStorage* out, FsBisStorageId partitionId);
|
Result fsOpenBisStorage(FsStorage* out, FsBisStorageId partitionId);
|
||||||
@ -345,16 +345,16 @@ Result fsSetGlobalAccessLogMode(u32 mode);
|
|||||||
Result fsGetGlobalAccessLogMode(u32* out_mode);
|
Result fsGetGlobalAccessLogMode(u32* out_mode);
|
||||||
|
|
||||||
// Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId.
|
// Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId.
|
||||||
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid userID, u64 ownerId, u64 size, u64 journalSize, u32 flags);
|
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid uid, u64 ownerId, u64 size, u64 journalSize, u32 flags);
|
||||||
Result fsCreate_SystemSaveData(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, u64 size, u64 journalSize, u32 flags);
|
Result fsCreate_SystemSaveData(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, u64 size, u64 journalSize, u32 flags);
|
||||||
|
|
||||||
/// Wrapper(s) for fsOpenSaveDataFileSystem.
|
/// Wrapper(s) for fsOpenSaveDataFileSystem.
|
||||||
/// See FsSave for titleID and userID.
|
/// See FsSave for program_id and uid.
|
||||||
Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid userID);
|
Result fsOpen_SaveData(FsFileSystem* out, u64 program_id, AccountUid uid);
|
||||||
|
|
||||||
/// Wrapper for fsOpenSaveDataFileSystemBySystemSaveDataId.
|
/// Wrapper for fsOpenSaveDataFileSystemBySystemSaveDataId.
|
||||||
/// WARNING: You can brick when writing to SystemSaveData, if the data is corrupted etc.
|
/// WARNING: You can brick when writing to SystemSaveData, if the data is corrupted etc.
|
||||||
Result fsOpen_SystemSaveData(FsFileSystem* out, FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid userID);
|
Result fsOpen_SystemSaveData(FsFileSystem* out, FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid uid);
|
||||||
|
|
||||||
// IFileSystem
|
// IFileSystem
|
||||||
Result fsFsCreateFile(FsFileSystem* fs, const char* path, u64 size, u32 option);
|
Result fsFsCreateFile(FsFileSystem* fs, const char* path, u64 size, u32 option);
|
||||||
|
@ -182,8 +182,8 @@ Service* grcdGetServiceSession(void);
|
|||||||
Result grcdBegin(void);
|
Result grcdBegin(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Retrieves stream data from the continuous recorder in use (from the video recording of the currently running game title).
|
* @brief Retrieves stream data from the continuous recorder in use (from the video recording of the currently running application).
|
||||||
* @note This will block until data is available. This will hang if there is no game title running which has video capture enabled.
|
* @note This will block until data is available. This will hang if there is no application running which has video capture enabled.
|
||||||
* @param[in] stream \ref GrcStream
|
* @param[in] stream \ref GrcStream
|
||||||
* @param[out] buffer Output buffer.
|
* @param[out] buffer Output buffer.
|
||||||
* @param[in] size Max size of the output buffer.
|
* @param[in] size Max size of the output buffer.
|
||||||
|
@ -15,7 +15,7 @@ typedef struct {
|
|||||||
u8 default_cpu_id;
|
u8 default_cpu_id;
|
||||||
u16 application_type;
|
u16 application_type;
|
||||||
u32 main_thread_stack_size;
|
u32 main_thread_stack_size;
|
||||||
u64 title_id;
|
u64 program_id;
|
||||||
u32 acid_sac_size;
|
u32 acid_sac_size;
|
||||||
u32 aci0_sac_size;
|
u32 aci0_sac_size;
|
||||||
u32 acid_fac_size;
|
u32 acid_fac_size;
|
||||||
|
@ -71,7 +71,7 @@ typedef struct {
|
|||||||
/// ContentMetaKey
|
/// ContentMetaKey
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 id; ///< Id.
|
u64 id; ///< Id.
|
||||||
u32 version; ///< Title version.
|
u32 version; ///< Version.
|
||||||
u8 type; ///< \ref NcmContentMetaType
|
u8 type; ///< \ref NcmContentMetaType
|
||||||
u8 install_type; ///< \ref NcmContentInstallType
|
u8 install_type; ///< \ref NcmContentInstallType
|
||||||
u8 padding[2]; ///< Padding.
|
u8 padding[2]; ///< Padding.
|
||||||
@ -80,7 +80,7 @@ typedef struct {
|
|||||||
/// ApplicationContentMetaKey
|
/// ApplicationContentMetaKey
|
||||||
typedef struct {
|
typedef struct {
|
||||||
NcmContentMetaKey key; ///< \ref NcmContentMetaKey
|
NcmContentMetaKey key; ///< \ref NcmContentMetaKey
|
||||||
u64 application_id; ///< Title id of an application.
|
u64 application_id; ///< ApplicationId.
|
||||||
} NcmApplicationContentMetaKey;
|
} NcmApplicationContentMetaKey;
|
||||||
|
|
||||||
/// ContentInfo
|
/// ContentInfo
|
||||||
@ -105,14 +105,14 @@ typedef struct {
|
|||||||
|
|
||||||
/// ApplicationMetaExtendedHeader
|
/// ApplicationMetaExtendedHeader
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 patch_id; ///< Title id of this application's patch.
|
u64 patch_id; ///< PatchId of this application's patch.
|
||||||
u32 required_system_version; ///< Firmware version required by this application.
|
u32 required_system_version; ///< Firmware version required by this application.
|
||||||
u32 required_application_version; ///< [9.0.0+] Owner application version required by this application. Previously padding.
|
u32 required_application_version; ///< [9.0.0+] Owner application version required by this application. Previously padding.
|
||||||
} NcmApplicationMetaExtendedHeader;
|
} NcmApplicationMetaExtendedHeader;
|
||||||
|
|
||||||
/// PatchMetaExtendedHeader
|
/// PatchMetaExtendedHeader
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 application_id; ///< Title id of this patch's corresponding application.
|
u64 application_id; ///< ApplicationId of this patch's corresponding application.
|
||||||
u32 required_system_version; ///< Firmware version required by this patch.
|
u32 required_system_version; ///< Firmware version required by this patch.
|
||||||
u32 extended_data_size; ///< Size of the extended data following the NcmContentInfos.
|
u32 extended_data_size; ///< Size of the extended data following the NcmContentInfos.
|
||||||
u8 reserved[0x8]; ///< Unused.
|
u8 reserved[0x8]; ///< Unused.
|
||||||
@ -120,7 +120,7 @@ typedef struct {
|
|||||||
|
|
||||||
/// AddOnContentMetaExtendedHeader
|
/// AddOnContentMetaExtendedHeader
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 application_id; ///< Title id of this add-on-content's corresponding application.
|
u64 application_id; ///< ApplicationId of this add-on-content's corresponding application.
|
||||||
u32 required_application_version; ///< Version of the application required by this add-on-content.
|
u32 required_application_version; ///< Version of the application required by this add-on-content.
|
||||||
u32 padding; ///< Padding.
|
u32 padding; ///< Padding.
|
||||||
} NcmAddOnContentMetaExtendedHeader;
|
} NcmAddOnContentMetaExtendedHeader;
|
||||||
@ -199,8 +199,8 @@ Result ncmContentMetaDatabaseGet(NcmContentMetaDatabase* db, const NcmContentMet
|
|||||||
Result ncmContentMetaDatabaseRemove(NcmContentMetaDatabase* db, const NcmContentMetaKey *key);
|
Result ncmContentMetaDatabaseRemove(NcmContentMetaDatabase* db, const NcmContentMetaKey *key);
|
||||||
Result ncmContentMetaDatabaseGetContentIdByType(NcmContentMetaDatabase* db, NcmContentId* out_content_id, const NcmContentMetaKey* key, NcmContentType type);
|
Result ncmContentMetaDatabaseGetContentIdByType(NcmContentMetaDatabase* db, NcmContentId* out_content_id, const NcmContentMetaKey* key, NcmContentType type);
|
||||||
Result ncmContentMetaDatabaseListContentInfo(NcmContentMetaDatabase* db, s32* out_entries_written, NcmContentInfo* out_info, s32 count, const NcmContentMetaKey* key, s32 start_index);
|
Result ncmContentMetaDatabaseListContentInfo(NcmContentMetaDatabase* db, s32* out_entries_written, NcmContentInfo* out_info, s32 count, const NcmContentMetaKey* key, s32 start_index);
|
||||||
Result ncmContentMetaDatabaseList(NcmContentMetaDatabase* db, s32* out_entries_total, s32* out_entries_written, NcmContentMetaKey* out_keys, s32 count, NcmContentMetaType meta_type, u64 application_title_id, u64 title_id_min, u64 title_id_max, NcmContentInstallType install_type);
|
Result ncmContentMetaDatabaseList(NcmContentMetaDatabase* db, s32* out_entries_total, s32* out_entries_written, NcmContentMetaKey* out_keys, s32 count, NcmContentMetaType meta_type, u64 id, u64 id_min, u64 id_max, NcmContentInstallType install_type);
|
||||||
Result ncmContentMetaDatabaseGetLatestContentMetaKey(NcmContentMetaDatabase* db, NcmContentMetaKey* out_key, u64 title_id);
|
Result ncmContentMetaDatabaseGetLatestContentMetaKey(NcmContentMetaDatabase* db, NcmContentMetaKey* out_key, u64 id);
|
||||||
Result ncmContentMetaDatabaseListApplication(NcmContentMetaDatabase* db, s32* out_entries_total, s32* out_entries_written, NcmApplicationContentMetaKey* out_keys, s32 count, NcmContentMetaType meta_type);
|
Result ncmContentMetaDatabaseListApplication(NcmContentMetaDatabase* db, s32* out_entries_total, s32* out_entries_written, NcmApplicationContentMetaKey* out_keys, s32 count, NcmContentMetaType meta_type);
|
||||||
Result ncmContentMetaDatabaseHas(NcmContentMetaDatabase* db, bool* out, const NcmContentMetaKey* key);
|
Result ncmContentMetaDatabaseHas(NcmContentMetaDatabase* db, bool* out, const NcmContentMetaKey* key);
|
||||||
Result ncmContentMetaDatabaseHasAll(NcmContentMetaDatabase* db, bool* out, const NcmContentMetaKey* keys, s32 count);
|
Result ncmContentMetaDatabaseHasAll(NcmContentMetaDatabase* db, bool* out, const NcmContentMetaKey* keys, s32 count);
|
||||||
|
@ -58,28 +58,28 @@ typedef struct {
|
|||||||
|
|
||||||
/// NsApplicationContentMetaStatus
|
/// NsApplicationContentMetaStatus
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 title_type; ///< \ref NcmContentMetaType
|
u8 meta_type; ///< \ref NcmContentMetaType
|
||||||
u8 storageID; ///< \ref FsStorageId
|
u8 storageID; ///< \ref FsStorageId
|
||||||
u8 unk_x02; ///< Unknown.
|
u8 unk_x02; ///< Unknown.
|
||||||
u8 padding; ///< Padding.
|
u8 padding; ///< Padding.
|
||||||
u32 title_version; ///< Title version.
|
u32 version; ///< Application version.
|
||||||
u64 titleID; ///< titleID.
|
u64 application_id; ///< ApplicationId.
|
||||||
} NsApplicationContentMetaStatus;
|
} NsApplicationContentMetaStatus;
|
||||||
|
|
||||||
/// ApplicationRecord
|
/// ApplicationRecord
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 titleID; ///< titleID.
|
u64 application_id; ///< ApplicationId.
|
||||||
u8 type; ///< Type.
|
u8 type; ///< Type.
|
||||||
u8 unk_x09; ///< Unknown.
|
u8 unk_x09; ///< Unknown.
|
||||||
u8 unk_x0A[6]; ///< Unknown.
|
u8 unk_x0a[6]; ///< Unknown.
|
||||||
u8 unk_x10; ///< Unknown.
|
u8 unk_x10; ///< Unknown.
|
||||||
u8 unk_x11[7]; ///< Unknown.
|
u8 unk_x11[7]; ///< Unknown.
|
||||||
} NsApplicationRecord;
|
} NsApplicationRecord;
|
||||||
|
|
||||||
/// LaunchProperties
|
/// LaunchProperties
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 titleID; ///< titleID.
|
u64 program_id; ///< program_id.
|
||||||
u32 version; ///< Title version.
|
u32 version; ///< Program version.
|
||||||
u8 storageID; ///< \ref FsStorageId
|
u8 storageID; ///< \ref FsStorageId
|
||||||
u8 index; ///< Index.
|
u8 index; ///< Index.
|
||||||
u8 is_application; ///< Whether this is an Application.
|
u8 is_application; ///< Whether this is an Application.
|
||||||
@ -107,8 +107,8 @@ typedef struct {
|
|||||||
u32 system_delivery_protocol_version; ///< Must be <= to and match a system-setting.
|
u32 system_delivery_protocol_version; ///< Must be <= to and match a system-setting.
|
||||||
u32 application_delivery_protocol_version; ///< Loaded from a system-setting. Unused by \ref nssuRequestSendSystemUpdate / \ref nssuControlRequestReceiveSystemUpdate, besides HMAC validation.
|
u32 application_delivery_protocol_version; ///< Loaded from a system-setting. Unused by \ref nssuRequestSendSystemUpdate / \ref nssuControlRequestReceiveSystemUpdate, besides HMAC validation.
|
||||||
u32 includes_exfat; ///< Whether ExFat is included. Unused by \ref nssuRequestSendSystemUpdate / \ref nssuControlRequestReceiveSystemUpdate, besides HMAC validation.
|
u32 includes_exfat; ///< Whether ExFat is included. Unused by \ref nssuRequestSendSystemUpdate / \ref nssuControlRequestReceiveSystemUpdate, besides HMAC validation.
|
||||||
u32 systemupdate_meta_version; ///< SystemUpdate meta version.
|
u32 system_update_meta_version; ///< SystemUpdate meta version.
|
||||||
u64 systemupdate_meta_titleid; ///< SystemUpdate meta titleID.
|
u64 system_update_meta_id; ///< SystemUpdate meta Id.
|
||||||
u8 unk_x18; ///< Copied into state by \ref nssuRequestSendSystemUpdate.
|
u8 unk_x18; ///< Copied into state by \ref nssuRequestSendSystemUpdate.
|
||||||
u8 unk_x19; ///< Unused by \ref nssuRequestSendSystemUpdate / \ref nssuControlRequestReceiveSystemUpdate, besides HMAC validation.
|
u8 unk_x19; ///< Unused by \ref nssuRequestSendSystemUpdate / \ref nssuControlRequestReceiveSystemUpdate, besides HMAC validation.
|
||||||
u8 unk_x1a[0xc6]; ///< Unused by \ref nssuRequestSendSystemUpdate / \ref nssuControlRequestReceiveSystemUpdate, besides HMAC validation.
|
u8 unk_x1a[0xc6]; ///< Unused by \ref nssuRequestSendSystemUpdate / \ref nssuControlRequestReceiveSystemUpdate, besides HMAC validation.
|
||||||
@ -144,23 +144,23 @@ Result nsListApplicationRecord(NsApplicationRecord* records, s32 count, s32 entr
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets an listing of \ref NsApplicationContentMetaStatus.
|
* @brief Gets an listing of \ref NsApplicationContentMetaStatus.
|
||||||
* @param[in] titleID titleID.
|
* @param[in] application_id ApplicationId.
|
||||||
* @param[in] index Starting entry index.
|
* @param[in] index Starting entry index.
|
||||||
* @param[out] list Output array of \ref NsApplicationContentMetaStatus.
|
* @param[out] list Output array of \ref NsApplicationContentMetaStatus.
|
||||||
* @param[in] count Size of the list array in entries.
|
* @param[in] count Size of the list array in entries.
|
||||||
* @param[out] out_entrycount Total output entries.
|
* @param[out] out_entrycount Total output entries.
|
||||||
*/
|
*/
|
||||||
Result nsListApplicationContentMetaStatus(u64 titleID, s32 index, NsApplicationContentMetaStatus* list, s32 count, s32* out_entrycount);
|
Result nsListApplicationContentMetaStatus(u64 application_id, s32 index, NsApplicationContentMetaStatus* list, s32 count, s32* out_entrycount);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the \ref NsApplicationControlData for the specified title.
|
* @brief Gets the \ref NsApplicationControlData for the specified application.
|
||||||
* @param[in] flag Flag, official sw uses value 1.
|
* @param[in] source Source, official sw uses ::NsApplicationControlSource_Storage.
|
||||||
* @param[in] titleID titleID.
|
* @param[in] application_id ApplicationId.
|
||||||
* @param[out] buffer \ref NsApplicationControlData
|
* @param[out] buffer \ref NsApplicationControlData
|
||||||
* @param[in] size Size of the buffer.
|
* @param[in] size Size of the buffer.
|
||||||
* @param[out] actual_size Actual output size.
|
* @param[out] actual_size Actual output size.
|
||||||
*/
|
*/
|
||||||
Result nsGetApplicationControlData(NsApplicationControlSource source, u64 titleID, NsApplicationControlData* buffer, size_t size, u64* actual_size);
|
Result nsGetApplicationControlData(NsApplicationControlSource source, u64 application_id, NsApplicationControlData* buffer, size_t size, u64* actual_size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the total storage capacity (used + free) from content manager services.
|
* @brief Returns the total storage capacity (used + free) from content manager services.
|
||||||
@ -177,7 +177,7 @@ Result nsGetTotalSpaceSize(FsStorageId storage_id, u64 *size);
|
|||||||
Result nsGetFreeSpaceSize(FsStorageId storage_id, u64 *size);
|
Result nsGetFreeSpaceSize(FsStorageId storage_id, u64 *size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Generates a \ref NsSystemDeliveryInfo using the currently installed SystemUpdate meta title.
|
* @brief Generates a \ref NsSystemDeliveryInfo using the currently installed SystemUpdate meta.
|
||||||
* @note Only available on [4.0.0+].
|
* @note Only available on [4.0.0+].
|
||||||
* @param[out] info \ref NsSystemDeliveryInfo
|
* @param[out] info \ref NsSystemDeliveryInfo
|
||||||
*/
|
*/
|
||||||
@ -221,8 +221,8 @@ Result nsdevGetShellEvent(Event* out_event); ///< Autoclear for nsdevShellEvent
|
|||||||
Result nsdevGetShellEventInfo(NsShellEventInfo* out);
|
Result nsdevGetShellEventInfo(NsShellEventInfo* out);
|
||||||
Result nsdevTerminateApplication(void);
|
Result nsdevTerminateApplication(void);
|
||||||
Result nsdevPrepareLaunchProgramFromHost(NsLaunchProperties* out, const char* path, size_t path_len);
|
Result nsdevPrepareLaunchProgramFromHost(NsLaunchProperties* out, const char* path, size_t path_len);
|
||||||
Result nsdevLaunchApplicationForDevelop(u64* out_pid, u64 app_title_id, u32 flags);
|
Result nsdevLaunchApplicationForDevelop(u64* out_pid, u64 application_id, u32 flags);
|
||||||
Result nsdevLaunchApplicationWithStorageIdForDevelop(u64* out_pid, u64 app_title_id, u32 flags, u8 app_storage_id, u8 patch_storage_id);
|
Result nsdevLaunchApplicationWithStorageIdForDevelop(u64* out_pid, u64 application_id, u32 flags, u8 app_storage_id, u8 patch_storage_id);
|
||||||
Result nsdevIsSystemMemoryResourceLimitBoosted(bool* out); ///< [6.0.0-8.1.0]
|
Result nsdevIsSystemMemoryResourceLimitBoosted(bool* out); ///< [6.0.0-8.1.0]
|
||||||
Result nsdevGetRunningApplicationProcessIdForDevelop(u64* out_pid); ///< [6.0.0+]
|
Result nsdevGetRunningApplicationProcessIdForDevelop(u64* out_pid); ///< [6.0.0+]
|
||||||
Result nsdevSetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop(bool can_be_active); ///< [6.0.0+]
|
Result nsdevSetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop(bool can_be_active); ///< [6.0.0+]
|
||||||
@ -404,7 +404,7 @@ Result nssuControlApplyCardUpdate(NsSystemUpdateControl *c);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the filesize for the specified DownloadedEulaData.
|
* @brief Gets the filesize for the specified DownloadedEulaData.
|
||||||
* @note This mounts the Eula title, then uses the file "<mountname>:/<input path>".
|
* @note This mounts the Eula SystemData, then uses the file "<mountname>:/<input path>".
|
||||||
* @param c \ref NsSystemUpdateControl
|
* @param c \ref NsSystemUpdateControl
|
||||||
* @param[in] path EulaData path.
|
* @param[in] path EulaData path.
|
||||||
* @param[out] filesize Output filesize.
|
* @param[out] filesize Output filesize.
|
||||||
|
@ -37,11 +37,11 @@ typedef enum {
|
|||||||
PdmPlayLogPolicy_None = 2, ///< The pdm:ntfy commands which handle ::PdmPlayEventType_Applet logging will immediately return 0 when the input param matches this value.
|
PdmPlayLogPolicy_None = 2, ///< The pdm:ntfy commands which handle ::PdmPlayEventType_Applet logging will immediately return 0 when the input param matches this value.
|
||||||
} PdmPlayLogPolicy;
|
} PdmPlayLogPolicy;
|
||||||
|
|
||||||
/// ApplicationEvent.
|
/// AppletEvent.
|
||||||
/// Timestamp format, converted from PosixTime: total minutes since epoch UTC 1999/12/31 00:00:00.
|
/// Timestamp format, converted from PosixTime: total minutes since epoch UTC 1999/12/31 00:00:00.
|
||||||
/// See \ref pdmPlayTimestampToPosix.
|
/// See \ref pdmPlayTimestampToPosix.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 titleID; ///< Application titleID.
|
u64 program_id; ///< ProgramId.
|
||||||
u32 entry_index; ///< Entry index.
|
u32 entry_index; ///< Entry index.
|
||||||
u32 timestampUser; ///< See PdmPlayEvent::timestampUser, with the above timestamp format.
|
u32 timestampUser; ///< See PdmPlayEvent::timestampUser, with the above timestamp format.
|
||||||
u32 timestampNetwork; ///< See PdmPlayEvent::timestampNetwork, with the above timestamp format.
|
u32 timestampNetwork; ///< See PdmPlayEvent::timestampNetwork, with the above timestamp format.
|
||||||
@ -51,27 +51,27 @@ typedef struct {
|
|||||||
|
|
||||||
/// PlayStatistics
|
/// PlayStatistics
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 titleID; ///< Application titleID.
|
u64 application_id; ///< ApplicationId.
|
||||||
|
|
||||||
u32 first_entry_index; ///< Entry index for the first time the title was played.
|
u32 first_entry_index; ///< Entry index for the first time the application was played.
|
||||||
u32 first_timestampUser; ///< See PdmAppletEvent::timestampUser. This is for the first time the title was played.
|
u32 first_timestampUser; ///< See PdmAppletEvent::timestampUser. This is for the first time the application was played.
|
||||||
u32 first_timestampNetwork; ///< See PdmAppletEvent::timestampNetwork. This is for the first time the title was played.
|
u32 first_timestampNetwork; ///< See PdmAppletEvent::timestampNetwork. This is for the first time the application was played.
|
||||||
|
|
||||||
u32 last_entry_index; ///< Entry index for the last time the title was played.
|
u32 last_entry_index; ///< Entry index for the last time the application was played.
|
||||||
u32 last_timestampUser; ///< See PdmAppletEvent::timestampUser. This is for the last time the title was played.
|
u32 last_timestampUser; ///< See PdmAppletEvent::timestampUser. This is for the last time the application was played.
|
||||||
u32 last_timestampNetwork; ///< See PdmAppletEvent::timestampNetwork. This is for the last time the title was played.
|
u32 last_timestampNetwork; ///< See PdmAppletEvent::timestampNetwork. This is for the last time the application was played.
|
||||||
|
|
||||||
u32 playtimeMinutes; ///< Total play-time in minutes.
|
u32 playtimeMinutes; ///< Total play-time in minutes.
|
||||||
u32 totalLaunches; ///< Total times the application title was launched.
|
u32 totalLaunches; ///< Total times the application was launched.
|
||||||
} PdmPlayStatistics;
|
} PdmPlayStatistics;
|
||||||
|
|
||||||
/// LastPlayTime.
|
/// LastPlayTime.
|
||||||
/// This contains data from the last time the title was played.
|
/// This contains data from the last time the application was played.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 titleID; ///< Application titleID.
|
u64 application_id; ///< ApplicationId.
|
||||||
u32 timestampUser; ///< See PdmAppletEvent::timestampUser.
|
u32 timestampUser; ///< See PdmAppletEvent::timestampUser.
|
||||||
u32 timestampNetwork; ///< See PdmAppletEvent::timestampNetwork.
|
u32 timestampNetwork; ///< See PdmAppletEvent::timestampNetwork.
|
||||||
u32 lastPlayedMinutes; ///< Total minutes since the title was last played.
|
u32 lastPlayedMinutes; ///< Total minutes since the application was last played.
|
||||||
u8 flag; ///< Flag indicating whether the above field is set.
|
u8 flag; ///< Flag indicating whether the above field is set.
|
||||||
u8 pad[3]; ///< Padding.
|
u8 pad[3]; ///< Padding.
|
||||||
} PdmLastPlayTime;
|
} PdmLastPlayTime;
|
||||||
@ -81,11 +81,11 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
u32 titleID[2]; ///< titleID.
|
u32 program_id[2]; ///< ProgramId.
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
u32 version; ///< Title version.
|
u32 version; ///< Application version.
|
||||||
} application; ///< For AppletId == ::AppletId_application.
|
} application; ///< For AppletId == ::AppletId_application.
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@ -105,9 +105,9 @@ typedef struct {
|
|||||||
} applet;
|
} applet;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
u32 userID[4]; ///< userID.
|
u32 uid[4]; ///< userId.
|
||||||
u32 titleID[2]; ///< Application titleID, see below.
|
u32 application_id[2]; ///< ApplicationId, see below.
|
||||||
u8 type; ///< 0-1 to be listed by \ref pdmqryQueryAccountEvent, or 2 to include the above titleID.
|
u8 type; ///< 0-1 to be listed by \ref pdmqryQueryAccountEvent, or 2 to include the above ApplicationId.
|
||||||
} account;
|
} account;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@ -121,7 +121,7 @@ typedef struct {
|
|||||||
} operationModeChange;
|
} operationModeChange;
|
||||||
|
|
||||||
u8 data[0x1c];
|
u8 data[0x1c];
|
||||||
} eventData; ///< titleID/userID stored within here have the u32 low/high swapped in each u64.
|
} eventData; ///< ProgramId/ApplicationId/userId stored within here have the u32 low/high swapped in each u64.
|
||||||
|
|
||||||
u8 playEventType; ///< \ref PdmPlayEventType. Controls which struct in the above eventData is used. ::PdmPlayEventType_Initialize doesn't use eventData.
|
u8 playEventType; ///< \ref PdmPlayEventType. Controls which struct in the above eventData is used. ::PdmPlayEventType_Initialize doesn't use eventData.
|
||||||
u8 pad[3]; ///< Padding.
|
u8 pad[3]; ///< Padding.
|
||||||
@ -147,7 +147,7 @@ typedef struct {
|
|||||||
/// This is the raw entry struct directly read from FS, without any entry filtering. This is separate from \ref PdmPlayEvent.
|
/// This is the raw entry struct directly read from FS, without any entry filtering. This is separate from \ref PdmPlayEvent.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 unk_x0[4]; ///< Unknown.
|
u8 unk_x0[4]; ///< Unknown.
|
||||||
u32 titleID[2]; ///< titleID, with the u32 low/high words swapped.
|
u32 application_id[2]; ///< ApplicationId, with the u32 low/high words swapped.
|
||||||
u8 unk_xc[0xc]; ///< Unknown.
|
u8 unk_xc[0xc]; ///< Unknown.
|
||||||
u64 timestamp0; ///< POSIX timestamp.
|
u64 timestamp0; ///< POSIX timestamp.
|
||||||
u64 timestamp1; ///< POSIX timestamp.
|
u64 timestamp1; ///< POSIX timestamp.
|
||||||
@ -155,9 +155,9 @@ typedef struct {
|
|||||||
|
|
||||||
/// ApplicationPlayStatistics
|
/// ApplicationPlayStatistics
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 titleID; ///< Application titleID.
|
u64 application_id; ///< ApplicationId.
|
||||||
u64 totalPlayTime; ///< Total play-time in nanoseconds.
|
u64 totalPlayTime; ///< Total play-time in nanoseconds.
|
||||||
u64 totalLaunches; ///< Total times the application title was launched.
|
u64 totalLaunches; ///< Total times the application was launched.
|
||||||
} PdmApplicationPlayStatistics;
|
} PdmApplicationPlayStatistics;
|
||||||
|
|
||||||
Result pdmqryInitialize(void);
|
Result pdmqryInitialize(void);
|
||||||
@ -174,28 +174,28 @@ Service* pdmqryGetServiceSession(void);
|
|||||||
Result pdmqryQueryAppletEvent(s32 entry_index, PdmAppletEvent *events, s32 count, s32 *total_out);
|
Result pdmqryQueryAppletEvent(s32 entry_index, PdmAppletEvent *events, s32 count, s32 *total_out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets \ref PdmPlayStatistics for the specified titleID.
|
* @brief Gets \ref PdmPlayStatistics for the specified ApplicationId.
|
||||||
* @param[in] titleID Application titleID.
|
* @param[in] application_id ApplicationId
|
||||||
* @param[out] stats \ref PdmPlayStatistics
|
* @param[out] stats \ref PdmPlayStatistics
|
||||||
*/
|
*/
|
||||||
Result pdmqryQueryPlayStatisticsByApplicationId(u64 titleID, PdmPlayStatistics *stats);
|
Result pdmqryQueryPlayStatisticsByApplicationId(u64 application_id, PdmPlayStatistics *stats);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets \ref PdmPlayStatistics for the specified titleID and account userID.
|
* @brief Gets \ref PdmPlayStatistics for the specified ApplicationId and account userId.
|
||||||
* @param[in] titleID Application titleID.
|
* @param[in] application_id ApplicationId
|
||||||
* @param[in] uid \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
* @param[out] stats \ref PdmPlayStatistics
|
* @param[out] stats \ref PdmPlayStatistics
|
||||||
*/
|
*/
|
||||||
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 titleID, AccountUid uid, PdmPlayStatistics *stats);
|
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 application_id, AccountUid uid, PdmPlayStatistics *stats);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets \ref PdmLastPlayTime for the specified titles.
|
* @brief Gets \ref PdmLastPlayTime for the specified applications.
|
||||||
* @param[out] playtimes Output \ref PdmLastPlayTime array.
|
* @param[out] playtimes Output \ref PdmLastPlayTime array.
|
||||||
* @param[in] titleIDs Input titleIDs array.
|
* @param[in] application_ids Input ApplicationIds array.
|
||||||
* @param[in] count Total entries in the input/output arrays.
|
* @param[in] count Total entries in the input/output arrays.
|
||||||
* @param[out] total_out Total output entries.
|
* @param[out] total_out Total output entries.
|
||||||
*/
|
*/
|
||||||
Result pdmqryQueryLastPlayTime(PdmLastPlayTime *playtimes, const u64 *titleIDs, s32 count, s32 *total_out);
|
Result pdmqryQueryLastPlayTime(PdmLastPlayTime *playtimes, const u64 *application_ids, s32 count, s32 *total_out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets a list of \ref PdmPlayEvent.
|
* @brief Gets a list of \ref PdmPlayEvent.
|
||||||
@ -244,14 +244,14 @@ Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid uid, PdmAccountPl
|
|||||||
Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index);
|
Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets a list of titles played by the specified user.
|
* @brief Gets a list of applications played by the specified user.
|
||||||
* @note Only available with [6.0.0+].
|
* @note Only available with [6.0.0+].
|
||||||
* @param[in] uid \ref AccountUid
|
* @param[in] uid \ref AccountUid
|
||||||
* @param[out] titleIDs Output titleID array.
|
* @param[out] application_ids Output ApplicationIds array.
|
||||||
* @param[in] count Max entries in the output array.
|
* @param[in] count Max entries in the output array.
|
||||||
* @param[out] total_out Total output entries.
|
* @param[out] total_out Total output entries.
|
||||||
*/
|
*/
|
||||||
Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, u64 *titleIDs, s32 count, s32 *total_out);
|
Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, u64 *application_ids, s32 count, s32 *total_out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets an Event which is signaled when logging a new \ref PdmPlayEvent which would be available via \ref pdmqryQueryAccountEvent, where PdmPlayEvent::eventData::account::type is 0.
|
* @brief Gets an Event which is signaled when logging a new \ref PdmPlayEvent which would be available via \ref pdmqryQueryAccountEvent, where PdmPlayEvent::eventData::account::type is 0.
|
||||||
|
@ -90,17 +90,17 @@ Result pmbmSetMaintenanceBoot(void);
|
|||||||
|
|
||||||
Result pmdmntGetJitDebugProcessIdList(u32* out_count, u64* out_pids, size_t max_pids);
|
Result pmdmntGetJitDebugProcessIdList(u32* out_count, u64* out_pids, size_t max_pids);
|
||||||
Result pmdmntStartProcess(u64 pid);
|
Result pmdmntStartProcess(u64 pid);
|
||||||
Result pmdmntGetProcessId(u64* pid_out, u64 title_id);
|
Result pmdmntGetProcessId(u64* pid_out, u64 program_id);
|
||||||
Result pmdmntHookToCreateProcess(Event* out, u64 title_id);
|
Result pmdmntHookToCreateProcess(Event* out, u64 program_id);
|
||||||
Result pmdmntGetApplicationProcessId(u64* pid_out);
|
Result pmdmntGetApplicationProcessId(u64* pid_out);
|
||||||
Result pmdmntHookToCreateApplicationProcess(Event* out);
|
Result pmdmntHookToCreateApplicationProcess(Event* out);
|
||||||
Result pmdmntClearHook(u32 which);
|
Result pmdmntClearHook(u32 which);
|
||||||
|
|
||||||
Result pminfoGetProgramId(u64* title_id_out, u64 pid);
|
Result pminfoGetProgramId(u64* program_id_out, u64 pid);
|
||||||
|
|
||||||
Result pmshellLaunchProgram(u32 launch_flags, const NcmProgramLocation *location, u64 *pid);
|
Result pmshellLaunchProgram(u32 launch_flags, const NcmProgramLocation *location, u64 *pid);
|
||||||
Result pmshellTerminateProcess(u64 processID);
|
Result pmshellTerminateProcess(u64 processID);
|
||||||
Result pmshellTerminateProgram(u64 titleID);
|
Result pmshellTerminateProgram(u64 program_id);
|
||||||
Result pmshellGetProcessEventHandle(Event* out); // Autoclear for pmshellProcessEvent is always true.
|
Result pmshellGetProcessEventHandle(Event* out); // Autoclear for pmshellProcessEvent is always true.
|
||||||
Result pmshellGetProcessEventInfo(PmProcessEventInfo* out);
|
Result pmshellGetProcessEventInfo(PmProcessEventInfo* out);
|
||||||
Result pmshellCleanupProcess(u64 pid);
|
Result pmshellCleanupProcess(u64 pid);
|
||||||
|
@ -26,51 +26,51 @@ static Result _friendsLaShow(const FriendsLaArg *arg, bool playStartupSound) {
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _friendsLaShowSimple(FriendsLaArgType type, AccountUid userID, bool playStartupSound) {
|
static Result _friendsLaShowSimple(FriendsLaArgType type, AccountUid uid, bool playStartupSound) {
|
||||||
FriendsLaArg arg = {.type = type, .userID = userID};
|
FriendsLaArg arg = {.type = type, .uid = uid};
|
||||||
|
|
||||||
return _friendsLaShow(&arg, playStartupSound);
|
return _friendsLaShow(&arg, playStartupSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _friendsLaShowAll(FriendsLaArgType type, AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName, bool playStartupSound) {
|
static Result _friendsLaShowAll(FriendsLaArgType type, AccountUid uid, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName, bool playStartupSound) {
|
||||||
FriendsLaArg arg = {.type = type, .userID = userID, .networkServiceAccountId = networkServiceAccountId, .first_inAppScreenName = *first_inAppScreenName, .second_inAppScreenName = *second_inAppScreenName};
|
FriendsLaArg arg = {.type = type, .uid = uid, .networkServiceAccountId = networkServiceAccountId, .first_inAppScreenName = *first_inAppScreenName, .second_inAppScreenName = *second_inAppScreenName};
|
||||||
|
|
||||||
return _friendsLaShow(&arg, playStartupSound);
|
return _friendsLaShow(&arg, playStartupSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result friendsLaShowFriendList(AccountUid userID) {
|
Result friendsLaShowFriendList(AccountUid uid) {
|
||||||
return _friendsLaShowSimple(FriendsLaArgType_ShowFriendList, userID, false);
|
return _friendsLaShowSimple(FriendsLaArgType_ShowFriendList, uid, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result friendsLaShowUserDetailInfo(AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) {
|
Result friendsLaShowUserDetailInfo(AccountUid uid, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) {
|
||||||
return _friendsLaShowAll(FriendsLaArgType_ShowUserDetailInfo, userID, networkServiceAccountId, first_inAppScreenName, second_inAppScreenName, false);
|
return _friendsLaShowAll(FriendsLaArgType_ShowUserDetailInfo, uid, networkServiceAccountId, first_inAppScreenName, second_inAppScreenName, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result friendsLaStartSendingFriendRequest(AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) {
|
Result friendsLaStartSendingFriendRequest(AccountUid uid, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) {
|
||||||
return _friendsLaShowAll(FriendsLaArgType_StartSendingFriendRequest, userID, networkServiceAccountId, first_inAppScreenName, second_inAppScreenName, false);
|
return _friendsLaShowAll(FriendsLaArgType_StartSendingFriendRequest, uid, networkServiceAccountId, first_inAppScreenName, second_inAppScreenName, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid userID) {
|
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid uid) {
|
||||||
return _friendsLaShowSimple(FriendsLaArgType_ShowMethodsOfSendingFriendRequest, userID, false);
|
return _friendsLaShowSimple(FriendsLaArgType_ShowMethodsOfSendingFriendRequest, uid, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result friendsLaStartFacedFriendRequest(AccountUid userID) {
|
Result friendsLaStartFacedFriendRequest(AccountUid uid) {
|
||||||
return _friendsLaShowSimple(FriendsLaArgType_StartFacedFriendRequest, userID, false);
|
return _friendsLaShowSimple(FriendsLaArgType_StartFacedFriendRequest, uid, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result friendsLaShowReceivedFriendRequestList(AccountUid userID) {
|
Result friendsLaShowReceivedFriendRequestList(AccountUid uid) {
|
||||||
return _friendsLaShowSimple(FriendsLaArgType_ShowReceivedFriendRequestList, userID, false);
|
return _friendsLaShowSimple(FriendsLaArgType_ShowReceivedFriendRequestList, uid, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result friendsLaShowBlockedUserList(AccountUid userID) {
|
Result friendsLaShowBlockedUserList(AccountUid uid) {
|
||||||
return _friendsLaShowSimple(FriendsLaArgType_ShowBlockedUserList, userID, false);
|
return _friendsLaShowSimple(FriendsLaArgType_ShowBlockedUserList, uid, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result friendsLaShowMyProfile(AccountUid userID) {
|
Result friendsLaShowMyProfile(AccountUid uid) {
|
||||||
return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, userID, false);
|
return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, uid, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result friendsLaShowMyProfileForHomeMenu(AccountUid userID) {
|
Result friendsLaShowMyProfileForHomeMenu(AccountUid uid) {
|
||||||
return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, userID, true);
|
return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, uid, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ Result webYouTubeVideoCreate(WebCommonConfig* config, const char* url) {
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result webOfflineCreate(WebCommonConfig* config, WebDocumentKind docKind, u64 titleID, const char* docPath) {
|
Result webOfflineCreate(WebCommonConfig* config, WebDocumentKind docKind, u64 id, const char* docPath) {
|
||||||
Result rc=0;
|
Result rc=0;
|
||||||
|
|
||||||
if (docKind < WebDocumentKind_OfflineHtmlPage || docKind > WebDocumentKind_SystemDataPage)
|
if (docKind < WebDocumentKind_OfflineHtmlPage || docKind > WebDocumentKind_SystemDataPage)
|
||||||
@ -341,7 +341,7 @@ Result webOfflineCreate(WebCommonConfig* config, WebDocumentKind docKind, u64 ti
|
|||||||
|
|
||||||
if (R_SUCCEEDED(rc)) rc = _webConfigSetU32(config, WebArgType_DocumentKind, docKind);
|
if (R_SUCCEEDED(rc)) rc = _webConfigSetU32(config, WebArgType_DocumentKind, docKind);
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc)) rc = _webConfigSetU64(config, docKind != WebDocumentKind_SystemDataPage ? WebArgType_ApplicationId : WebArgType_SystemDataId, titleID);
|
if (R_SUCCEEDED(rc)) rc = _webConfigSetU64(config, docKind != WebDocumentKind_SystemDataPage ? WebArgType_ApplicationId : WebArgType_SystemDataId, id);
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc)) rc = _webConfigSetString(config, WebArgType_DocumentPath, docPath, 0xC00);
|
if (R_SUCCEEDED(rc)) rc = _webConfigSetString(config, WebArgType_DocumentPath, docPath, 0xC00);
|
||||||
|
|
||||||
|
@ -443,10 +443,10 @@ Result fsdevMountSdmc(void)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result fsdevMountSaveData(const char *name, u64 titleID, AccountUid userID)
|
Result fsdevMountSaveData(const char *name, u64 program_id, AccountUid uid)
|
||||||
{
|
{
|
||||||
FsFileSystem fs;
|
FsFileSystem fs;
|
||||||
Result rc = fsOpen_SaveData(&fs, titleID, userID);
|
Result rc = fsOpen_SaveData(&fs, program_id, uid);
|
||||||
if(R_SUCCEEDED(rc))
|
if(R_SUCCEEDED(rc))
|
||||||
{
|
{
|
||||||
int ret = fsdevMountDevice(name, fs);
|
int ret = fsdevMountDevice(name, fs);
|
||||||
@ -456,10 +456,10 @@ Result fsdevMountSaveData(const char *name, u64 titleID, AccountUid userID)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result fsdevMountSystemSaveData(const char *name, FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid userID)
|
Result fsdevMountSystemSaveData(const char *name, FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid uid)
|
||||||
{
|
{
|
||||||
FsFileSystem fs;
|
FsFileSystem fs;
|
||||||
Result rc = fsOpen_SystemSaveData(&fs, saveDataSpaceId, saveID, userID);
|
Result rc = fsOpen_SystemSaveData(&fs, saveDataSpaceId, saveID, uid);
|
||||||
if(R_SUCCEEDED(rc))
|
if(R_SUCCEEDED(rc))
|
||||||
{
|
{
|
||||||
int ret = fsdevMountDevice(name, fs);
|
int ret = fsdevMountDevice(name, fs);
|
||||||
|
@ -13,7 +13,7 @@ static bool g_accPreselectedUserInitialized;
|
|||||||
|
|
||||||
static Result _accountInitializeApplicationInfo(void);
|
static Result _accountInitializeApplicationInfo(void);
|
||||||
|
|
||||||
static Result _accountGetPreselectedUser(AccountUid *userID);
|
static Result _accountGetPreselectedUser(AccountUid *uid);
|
||||||
|
|
||||||
NX_GENERATE_SERVICE_GUARD(account);
|
NX_GENERATE_SERVICE_GUARD(account);
|
||||||
|
|
||||||
@ -80,43 +80,43 @@ Result accountGetUserCount(s32* user_count) {
|
|||||||
return _accountCmdNoInOutU32(&g_accSrv, (u32*)user_count, 0);
|
return _accountCmdNoInOutU32(&g_accSrv, (u32*)user_count, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _accountListAllUsers(AccountUid* userIDs) {
|
static Result _accountListAllUsers(AccountUid* uids) {
|
||||||
return serviceDispatch(&g_accSrv, 2,
|
return serviceDispatch(&g_accSrv, 2,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcPointer | SfBufferAttr_Out },
|
.buffer_attrs = { SfBufferAttr_HipcPointer | SfBufferAttr_Out },
|
||||||
.buffers = { { userIDs, sizeof(AccountUid)*ACC_USER_LIST_SIZE } },
|
.buffers = { { uids, sizeof(AccountUid)*ACC_USER_LIST_SIZE } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result accountListAllUsers(AccountUid* userIDs, s32 max_userIDs, s32 *actual_total) {
|
Result accountListAllUsers(AccountUid* uids, s32 max_uids, s32 *actual_total) {
|
||||||
Result rc=0;
|
Result rc=0;
|
||||||
AccountUid temp_userIDs[ACC_USER_LIST_SIZE];
|
AccountUid temp_uids[ACC_USER_LIST_SIZE];
|
||||||
memset(temp_userIDs, 0, sizeof(temp_userIDs));
|
memset(temp_uids, 0, sizeof(temp_uids));
|
||||||
|
|
||||||
rc = _accountListAllUsers(temp_userIDs);
|
rc = _accountListAllUsers(temp_uids);
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc)) {
|
if (R_SUCCEEDED(rc)) {
|
||||||
s32 total_userIDs;
|
s32 total_uids;
|
||||||
for (total_userIDs=0; total_userIDs<ACC_USER_LIST_SIZE; total_userIDs++) {
|
for (total_uids=0; total_uids<ACC_USER_LIST_SIZE; total_uids++) {
|
||||||
if (!accountUidIsValid(&temp_userIDs[total_userIDs])) break;
|
if (!accountUidIsValid(&temp_uids[total_uids])) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (max_userIDs > total_userIDs) {
|
if (max_uids > total_uids) {
|
||||||
max_userIDs = total_userIDs;
|
max_uids = total_uids;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(userIDs, temp_userIDs, sizeof(AccountUid)*max_userIDs);
|
memcpy(uids, temp_uids, sizeof(AccountUid)*max_uids);
|
||||||
*actual_total = max_userIDs;
|
*actual_total = max_uids;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result accountGetLastOpenedUser(AccountUid *userID) {
|
Result accountGetLastOpenedUser(AccountUid *uid) {
|
||||||
return serviceDispatchOut(&g_accSrv, 4, *userID);
|
return serviceDispatchOut(&g_accSrv, 4, *uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result accountGetProfile(AccountProfile* out, AccountUid userID) {
|
Result accountGetProfile(AccountProfile* out, AccountUid uid) {
|
||||||
return serviceDispatchIn(&g_accSrv, 5, userID,
|
return serviceDispatchIn(&g_accSrv, 5, uid,
|
||||||
.out_num_objects = 1,
|
.out_num_objects = 1,
|
||||||
.out_objects = &out->s,
|
.out_objects = &out->s,
|
||||||
);
|
);
|
||||||
@ -170,7 +170,7 @@ Result accountProfileLoadImage(AccountProfile* profile, void* buf, size_t len, u
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _accountGetPreselectedUser(AccountUid *userID) {
|
static Result _accountGetPreselectedUser(AccountUid *uid) {
|
||||||
Result rc=0;
|
Result rc=0;
|
||||||
AppletStorage storage;
|
AppletStorage storage;
|
||||||
s64 tmpsize=0;
|
s64 tmpsize=0;
|
||||||
@ -179,7 +179,7 @@ static Result _accountGetPreselectedUser(AccountUid *userID) {
|
|||||||
u32 magicnum;//These two fields must match fixed values.
|
u32 magicnum;//These two fields must match fixed values.
|
||||||
u8 unk_x4;
|
u8 unk_x4;
|
||||||
u8 pad[3];
|
u8 pad[3];
|
||||||
AccountUid userID;
|
AccountUid uid;
|
||||||
u8 unk_x18[0x70];//unused
|
u8 unk_x18[0x70];//unused
|
||||||
} storagedata;
|
} storagedata;
|
||||||
|
|
||||||
@ -199,16 +199,16 @@ static Result _accountGetPreselectedUser(AccountUid *userID) {
|
|||||||
if (R_SUCCEEDED(rc) && (storagedata.magicnum!=0xc79497ca || storagedata.unk_x4!=1))
|
if (R_SUCCEEDED(rc) && (storagedata.magicnum!=0xc79497ca || storagedata.unk_x4!=1))
|
||||||
rc = MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
rc = MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc) && userID) *userID = storagedata.userID;
|
if (R_SUCCEEDED(rc) && uid) *uid = storagedata.uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result accountGetPreselectedUser(AccountUid *userID) {
|
Result accountGetPreselectedUser(AccountUid *uid) {
|
||||||
if (!g_accPreselectedUserInitialized) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
if (!g_accPreselectedUserInitialized) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
|
|
||||||
*userID = g_accPreselectedUserID;
|
*uid = g_accPreselectedUserID;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -948,12 +948,12 @@ IPC_MAKE_CMD_IMPL_HOSVER(Result appletGetHdcpAuthenticationState(s32 *state),
|
|||||||
IPC_MAKE_CMD_IMPL_HOSVER(Result appletGetHdcpAuthenticationStateChangeEvent(Event *out_event), &g_appletICommonStateGetter, 63, _appletCmdGetEvent, (4,0,0), out_event, true)
|
IPC_MAKE_CMD_IMPL_HOSVER(Result appletGetHdcpAuthenticationStateChangeEvent(Event *out_event), &g_appletICommonStateGetter, 63, _appletCmdGetEvent, (4,0,0), out_event, true)
|
||||||
IPC_MAKE_CMD_IMPL_HOSVER(Result appletSetTvPowerStateMatchingMode(AppletTvPowerStateMatchingMode mode), &g_appletICommonStateGetter, 64, _appletCmdInU32NoOut, (5,0,0), mode)
|
IPC_MAKE_CMD_IMPL_HOSVER(Result appletSetTvPowerStateMatchingMode(AppletTvPowerStateMatchingMode mode), &g_appletICommonStateGetter, 64, _appletCmdInU32NoOut, (5,0,0), mode)
|
||||||
|
|
||||||
Result appletGetApplicationIdByContentActionName(u64 *titleID, const char *name) {
|
Result appletGetApplicationIdByContentActionName(u64 *application_id, const char *name) {
|
||||||
if (hosversionBefore(5,1,0))
|
if (hosversionBefore(5,1,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
serviceAssumeDomain(&g_appletICommonStateGetter);
|
serviceAssumeDomain(&g_appletICommonStateGetter);
|
||||||
return serviceDispatchOut(&g_appletICommonStateGetter, 65, *titleID,
|
return serviceDispatchOut(&g_appletICommonStateGetter, 65, *application_id,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
.buffers = { { name, strlen(name)+1 } },
|
.buffers = { { name, strlen(name)+1 } },
|
||||||
);
|
);
|
||||||
@ -1808,19 +1808,19 @@ Result appletPopLaunchParameter(AppletStorage *s, AppletLaunchParameterKind kind
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _appletCreateApplicationAndPushAndRequestToStart(Service* srv, u64 titleID, AppletStorage* s, u32 cmd_id) {
|
static Result _appletCreateApplicationAndPushAndRequestToStart(Service* srv, u64 application_id, AppletStorage* s, u32 cmd_id) {
|
||||||
serviceAssumeDomain(srv);
|
serviceAssumeDomain(srv);
|
||||||
return serviceDispatchIn(srv, cmd_id, titleID,
|
return serviceDispatchIn(srv, cmd_id, application_id,
|
||||||
.in_num_objects = 1,
|
.in_num_objects = 1,
|
||||||
.in_objects = { &s->s },
|
.in_objects = { &s->s },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _appletCreateApplicationAndPushAndRequestToStartForQuest(u64 titleID, AppletStorage* s, const AppletApplicationAttributeForQuest *attr) { // [2.0.0+]
|
static Result _appletCreateApplicationAndPushAndRequestToStartForQuest(u64 application_id, AppletStorage* s, const AppletApplicationAttributeForQuest *attr) { // [2.0.0+]
|
||||||
const struct {
|
const struct {
|
||||||
u32 val0, val1;
|
u32 val0, val1;
|
||||||
u64 titleID;
|
u64 application_id;
|
||||||
} in = { attr->unk_x0, attr->unk_x4, titleID };
|
} in = { attr->unk_x0, attr->unk_x4, application_id };
|
||||||
|
|
||||||
serviceAssumeDomain(&g_appletIFunctions);
|
serviceAssumeDomain(&g_appletIFunctions);
|
||||||
return serviceDispatchIn(&g_appletIFunctions, 11, in,
|
return serviceDispatchIn(&g_appletIFunctions, 11, in,
|
||||||
@ -1829,23 +1829,23 @@ static Result _appletCreateApplicationAndPushAndRequestToStartForQuest(u64 title
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _appletCreateApplicationAndRequestToStart(u64 titleID) { // [4.0.0+]
|
static Result _appletCreateApplicationAndRequestToStart(u64 application_id) { // [4.0.0+]
|
||||||
return _appletCmdInU64NoOut(&g_appletIFunctions, titleID, 12);
|
return _appletCmdInU64NoOut(&g_appletIFunctions, application_id, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _appletCreateApplicationAndRequestToStartForQuest(u64 titleID, const AppletApplicationAttributeForQuest *attr) { // [4.0.0+]
|
static Result _appletCreateApplicationAndRequestToStartForQuest(u64 application_id, const AppletApplicationAttributeForQuest *attr) { // [4.0.0+]
|
||||||
const struct {
|
const struct {
|
||||||
u32 val0, val1;
|
u32 val0, val1;
|
||||||
u64 titleID;
|
u64 application_id;
|
||||||
} in = { attr->unk_x0, attr->unk_x4, titleID };
|
} in = { attr->unk_x0, attr->unk_x4, application_id };
|
||||||
|
|
||||||
serviceAssumeDomain(&g_appletIFunctions);
|
serviceAssumeDomain(&g_appletIFunctions);
|
||||||
return serviceDispatchIn(&g_appletIFunctions, 13, in);
|
return serviceDispatchIn(&g_appletIFunctions, 13, in);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _appletCreateApplicationWithAttributeAndPushAndRequestToStartForQuest(u64 titleID, AppletStorage* s, const AppletApplicationAttribute *attr) { // [7.0.0+]
|
static Result _appletCreateApplicationWithAttributeAndPushAndRequestToStartForQuest(u64 application_id, AppletStorage* s, const AppletApplicationAttribute *attr) { // [7.0.0+]
|
||||||
serviceAssumeDomain(&g_appletIFunctions);
|
serviceAssumeDomain(&g_appletIFunctions);
|
||||||
return serviceDispatchIn(&g_appletIFunctions, 14, titleID,
|
return serviceDispatchIn(&g_appletIFunctions, 14, application_id,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
.buffers = { { attr, sizeof(*attr) } },
|
.buffers = { { attr, sizeof(*attr) } },
|
||||||
.in_num_objects = 1,
|
.in_num_objects = 1,
|
||||||
@ -1853,15 +1853,15 @@ static Result _appletCreateApplicationWithAttributeAndPushAndRequestToStartForQu
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _appletCreateApplicationWithAttributeAndRequestToStartForQuest(u64 titleID, const AppletApplicationAttribute *attr) { // [7.0.0+]
|
static Result _appletCreateApplicationWithAttributeAndRequestToStartForQuest(u64 application_id, const AppletApplicationAttribute *attr) { // [7.0.0+]
|
||||||
serviceAssumeDomain(&g_appletIFunctions);
|
serviceAssumeDomain(&g_appletIFunctions);
|
||||||
return serviceDispatchIn(&g_appletIFunctions, 15, titleID,
|
return serviceDispatchIn(&g_appletIFunctions, 15, application_id,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
.buffers = { { attr, sizeof(*attr) } },
|
.buffers = { { attr, sizeof(*attr) } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result appletRequestLaunchApplication(u64 titleID, AppletStorage* s) {
|
Result appletRequestLaunchApplication(u64 application_id, AppletStorage* s) {
|
||||||
AppletStorage tmpstorage={0};
|
AppletStorage tmpstorage={0};
|
||||||
Result rc=0;
|
Result rc=0;
|
||||||
bool is_libraryapplet = hosversionAtLeast(5,0,0) && __nx_applet_type == AppletType_LibraryApplet;
|
bool is_libraryapplet = hosversionAtLeast(5,0,0) && __nx_applet_type == AppletType_LibraryApplet;
|
||||||
@ -1878,14 +1878,14 @@ Result appletRequestLaunchApplication(u64 titleID, AppletStorage* s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_libraryapplet) {
|
if (is_libraryapplet) {
|
||||||
rc = _appletCreateApplicationAndPushAndRequestToStart(&g_appletILibraryAppletSelfAccessor, titleID, s, 90);
|
rc = _appletCreateApplicationAndPushAndRequestToStart(&g_appletILibraryAppletSelfAccessor, application_id, s, 90);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (hosversionAtLeast(4,0,0) && s==NULL) {
|
if (hosversionAtLeast(4,0,0) && s==NULL) {
|
||||||
rc = _appletCreateApplicationAndRequestToStart(titleID);
|
rc = _appletCreateApplicationAndRequestToStart(application_id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rc = _appletCreateApplicationAndPushAndRequestToStart(&g_appletIFunctions, titleID, s, 10);
|
rc = _appletCreateApplicationAndPushAndRequestToStart(&g_appletIFunctions, application_id, s, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1894,7 +1894,7 @@ Result appletRequestLaunchApplication(u64 titleID, AppletStorage* s) {
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result appletRequestLaunchApplicationForQuest(u64 titleID, AppletStorage* s, const AppletApplicationAttributeForQuest *attr) {
|
Result appletRequestLaunchApplicationForQuest(u64 application_id, AppletStorage* s, const AppletApplicationAttributeForQuest *attr) {
|
||||||
AppletStorage tmpstorage={0};
|
AppletStorage tmpstorage={0};
|
||||||
AppletApplicationAttribute appattr={0};
|
AppletApplicationAttribute appattr={0};
|
||||||
Result rc=0;
|
Result rc=0;
|
||||||
@ -1918,17 +1918,17 @@ Result appletRequestLaunchApplicationForQuest(u64 titleID, AppletStorage* s, con
|
|||||||
|
|
||||||
if (hosversionAtLeast(4,0,0) && s==NULL) {
|
if (hosversionAtLeast(4,0,0) && s==NULL) {
|
||||||
if (hosversionAtLeast(7,0,0))
|
if (hosversionAtLeast(7,0,0))
|
||||||
rc = _appletCreateApplicationWithAttributeAndRequestToStartForQuest(titleID, &appattr);
|
rc = _appletCreateApplicationWithAttributeAndRequestToStartForQuest(application_id, &appattr);
|
||||||
else
|
else
|
||||||
rc = _appletCreateApplicationAndRequestToStartForQuest(titleID, attr);
|
rc = _appletCreateApplicationAndRequestToStartForQuest(application_id, attr);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (hosversionBefore(3,0,0)) rc = MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
if (hosversionBefore(3,0,0)) rc = MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
if (R_SUCCEEDED(rc)) {
|
if (R_SUCCEEDED(rc)) {
|
||||||
if (hosversionAtLeast(7,0,0))
|
if (hosversionAtLeast(7,0,0))
|
||||||
rc = _appletCreateApplicationWithAttributeAndPushAndRequestToStartForQuest(titleID, s, &appattr);
|
rc = _appletCreateApplicationWithAttributeAndPushAndRequestToStartForQuest(application_id, s, &appattr);
|
||||||
else
|
else
|
||||||
rc = _appletCreateApplicationAndPushAndRequestToStartForQuest(titleID, s, attr);
|
rc = _appletCreateApplicationAndPushAndRequestToStartForQuest(application_id, s, attr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2155,7 +2155,7 @@ Result appletSetApplicationCopyrightVisibility(bool visible) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Official sw has these under 'pdm'.
|
//Official sw has these under 'pdm'.
|
||||||
Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out) {
|
Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats, const u64 *application_ids, s32 count, s32 *total_out) {
|
||||||
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
if (hosversionBefore(5,0,0))
|
if (hosversionBefore(5,0,0))
|
||||||
@ -2169,12 +2169,12 @@ Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats,
|
|||||||
},
|
},
|
||||||
.buffers = {
|
.buffers = {
|
||||||
{ stats, count*sizeof(PdmApplicationPlayStatistics) },
|
{ stats, count*sizeof(PdmApplicationPlayStatistics) },
|
||||||
{ titleIDs, count*sizeof(u64) },
|
{ application_ids, count*sizeof(u64) },
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result appletQueryApplicationPlayStatisticsByUid(AccountUid uid, PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out) {
|
Result appletQueryApplicationPlayStatisticsByUid(AccountUid uid, PdmApplicationPlayStatistics *stats, const u64 *application_ids, s32 count, s32 *total_out) {
|
||||||
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
if (hosversionBefore(6,0,0))
|
if (hosversionBefore(6,0,0))
|
||||||
@ -2188,7 +2188,7 @@ Result appletQueryApplicationPlayStatisticsByUid(AccountUid uid, PdmApplicationP
|
|||||||
},
|
},
|
||||||
.buffers = {
|
.buffers = {
|
||||||
{ stats, count*sizeof(PdmApplicationPlayStatistics) },
|
{ stats, count*sizeof(PdmApplicationPlayStatistics) },
|
||||||
{ titleIDs, count*sizeof(u64) },
|
{ application_ids, count*sizeof(u64) },
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -2241,8 +2241,8 @@ Result appletExecuteProgram(s32 programIndex, const void* buffer, size_t size) {
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result appletJumpToSubApplicationProgramForDevelopment(u64 titleID, const void* buffer, size_t size) {
|
Result appletJumpToSubApplicationProgramForDevelopment(u64 application_id, const void* buffer, size_t size) {
|
||||||
return _appletExecuteProgram(AppletProgramSpecifyKind_JumpToSubApplicationProgramForDevelopment, titleID, buffer, size);
|
return _appletExecuteProgram(AppletProgramSpecifyKind_JumpToSubApplicationProgramForDevelopment, application_id, buffer, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result appletRestartProgram(const void* buffer, size_t size) {
|
Result appletRestartProgram(const void* buffer, size_t size) {
|
||||||
@ -2263,23 +2263,23 @@ IPC_MAKE_CMD_IMPL_INITEXPR(Result appletPopFromGeneralChannel(AppletStorage *s),
|
|||||||
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletGetPopFromGeneralChannelEvent(Event *out_event), &g_appletIFunctions, 21, _appletCmdGetEvent, __nx_applet_type != AppletType_SystemApplet, out_event, false)
|
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletGetPopFromGeneralChannelEvent(Event *out_event), &g_appletIFunctions, 21, _appletCmdGetEvent, __nx_applet_type != AppletType_SystemApplet, out_event, false)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletGetHomeButtonWriterLockAccessor(AppletLockAccessor *a), &g_appletIFunctions, 30, _appletGetHomeButtonRwLockAccessor, __nx_applet_type != AppletType_SystemApplet, a)
|
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletGetHomeButtonWriterLockAccessor(AppletLockAccessor *a), &g_appletIFunctions, 30, _appletGetHomeButtonRwLockAccessor, __nx_applet_type != AppletType_SystemApplet, a)
|
||||||
|
|
||||||
Result appletPopRequestLaunchApplicationForDebug(AccountUid *userIDs, s32 count, u64 *titleID, s32 *total_out) {
|
Result appletPopRequestLaunchApplicationForDebug(AccountUid *uids, s32 count, u64 *application_id, s32 *total_out) {
|
||||||
if (__nx_applet_type != AppletType_SystemApplet)
|
if (__nx_applet_type != AppletType_SystemApplet)
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
if (hosversionBefore(6,0,0))
|
if (hosversionBefore(6,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
u64 titleID;
|
u64 application_id;
|
||||||
s32 total_out;
|
s32 total_out;
|
||||||
} out;
|
} out;
|
||||||
|
|
||||||
serviceAssumeDomain(&g_appletIFunctions);
|
serviceAssumeDomain(&g_appletIFunctions);
|
||||||
Result rc = serviceDispatchOut(&g_appletIFunctions, 100, out,
|
Result rc = serviceDispatchOut(&g_appletIFunctions, 100, out,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
.buffers = { { userIDs, count*sizeof(AccountUid) } },
|
.buffers = { { uids, count*sizeof(AccountUid) } },
|
||||||
);
|
);
|
||||||
if (R_SUCCEEDED(rc) && titleID) *titleID = out.titleID;
|
if (R_SUCCEEDED(rc) && application_id) *application_id = out.application_id;
|
||||||
if (R_SUCCEEDED(rc) && total_out) *total_out = out.total_out;
|
if (R_SUCCEEDED(rc) && total_out) *total_out = out.total_out;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -2340,9 +2340,9 @@ static Result _appletApplicationCreateIn64(Service* srv, AppletApplication *a, u
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletCreateApplication(AppletApplication *a, u64 titleID), &g_appletIApplicationCreator, 0, _appletApplicationCreateIn64, __nx_applet_type != AppletType_SystemApplet, a, titleID)
|
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletCreateApplication(AppletApplication *a, u64 application_id), &g_appletIApplicationCreator, 0, _appletApplicationCreateIn64, __nx_applet_type != AppletType_SystemApplet, a, application_id)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletPopLaunchRequestedApplication(AppletApplication *a), &g_appletIApplicationCreator, 1, _appletApplicationCreate, __nx_applet_type != AppletType_SystemApplet, a)
|
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletPopLaunchRequestedApplication(AppletApplication *a), &g_appletIApplicationCreator, 1, _appletApplicationCreate, __nx_applet_type != AppletType_SystemApplet, a)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletCreateSystemApplication(AppletApplication *a, u64 titleID), &g_appletIApplicationCreator, 10, _appletApplicationCreateIn64, __nx_applet_type != AppletType_SystemApplet, a, titleID)
|
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletCreateSystemApplication(AppletApplication *a, u64 system_application_id), &g_appletIApplicationCreator, 10, _appletApplicationCreateIn64, __nx_applet_type != AppletType_SystemApplet, a, system_application_id)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletPopFloatingApplicationForDevelopment(AppletApplication *a), &g_appletIApplicationCreator, 100, _appletApplicationCreate, __nx_applet_type != AppletType_SystemApplet, a)
|
IPC_MAKE_CMD_IMPL_INITEXPR(Result appletPopFloatingApplicationForDevelopment(AppletApplication *a), &g_appletIApplicationCreator, 100, _appletApplicationCreate, __nx_applet_type != AppletType_SystemApplet, a)
|
||||||
|
|
||||||
// IApplicationAccessor
|
// IApplicationAccessor
|
||||||
@ -2414,7 +2414,7 @@ Result appletApplicationRequestExitLibraryAppletOrTerminate(AppletApplication *a
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationGetApplicationId(AppletApplication *a, u64 *titleID), &a->s, 120, _appletCmdNoInOutU64, (6,0,0), titleID)
|
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationGetApplicationId(AppletApplication *a, u64 *application_id), &a->s, 120, _appletCmdNoInOutU64, (6,0,0), application_id)
|
||||||
|
|
||||||
Result appletApplicationPushLaunchParameter(AppletApplication *a, AppletLaunchParameterKind kind, AppletStorage* s) {
|
Result appletApplicationPushLaunchParameter(AppletApplication *a, AppletLaunchParameterKind kind, AppletStorage* s) {
|
||||||
if (!serviceIsActive(&a->s))
|
if (!serviceIsActive(&a->s))
|
||||||
@ -2445,7 +2445,7 @@ Result appletApplicationGetApplicationLaunchRequestInfo(AppletApplication *a, Ap
|
|||||||
return serviceDispatchOut(&a->s, 124, *out);
|
return serviceDispatchOut(&a->s, 124, *out);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result appletApplicationSetUsers(AppletApplication *a, const AccountUid *userIDs, s32 count, bool flag) {
|
Result appletApplicationSetUsers(AppletApplication *a, const AccountUid *uids, s32 count, bool flag) {
|
||||||
if (!serviceIsActive(&a->s))
|
if (!serviceIsActive(&a->s))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
if (hosversionBefore(6,0,0))
|
if (hosversionBefore(6,0,0))
|
||||||
@ -2455,14 +2455,14 @@ Result appletApplicationSetUsers(AppletApplication *a, const AccountUid *userIDs
|
|||||||
serviceAssumeDomain(&a->s);
|
serviceAssumeDomain(&a->s);
|
||||||
return serviceDispatchIn(&a->s, 130, tmp,
|
return serviceDispatchIn(&a->s, 130, tmp,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
.buffers = { { userIDs, count*sizeof(AccountUid) } },
|
.buffers = { { uids, count*sizeof(AccountUid) } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationCheckRightsEnvironmentAvailable(AppletApplication *a, bool *out), &a->s, 131, _appletCmdNoInOutBool, (6,0,0), out)
|
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationCheckRightsEnvironmentAvailable(AppletApplication *a, bool *out), &a->s, 131, _appletCmdNoInOutBool, (6,0,0), out)
|
||||||
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationGetNsRightsEnvironmentHandle(AppletApplication *a, u64 *handle), &a->s, 132, _appletCmdNoInOutU64, (6,0,0), handle)
|
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationGetNsRightsEnvironmentHandle(AppletApplication *a, u64 *handle), &a->s, 132, _appletCmdNoInOutU64, (6,0,0), handle)
|
||||||
|
|
||||||
Result appletApplicationGetDesirableUids(AppletApplication *a, AccountUid *userIDs, s32 count, s32 *total_out) {
|
Result appletApplicationGetDesirableUids(AppletApplication *a, AccountUid *uids, s32 count, s32 *total_out) {
|
||||||
if (!serviceIsActive(&a->s))
|
if (!serviceIsActive(&a->s))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
if (hosversionBefore(6,0,0))
|
if (hosversionBefore(6,0,0))
|
||||||
@ -2471,14 +2471,14 @@ Result appletApplicationGetDesirableUids(AppletApplication *a, AccountUid *userI
|
|||||||
serviceAssumeDomain(&a->s);
|
serviceAssumeDomain(&a->s);
|
||||||
return serviceDispatchOut(&a->s, 140, *total_out,
|
return serviceDispatchOut(&a->s, 140, *total_out,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
.buffers = { { userIDs, count*sizeof(AccountUid) } },
|
.buffers = { { uids, count*sizeof(AccountUid) } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationReportApplicationExitTimeout(AppletApplication *a), &a->s, 150, _appletCmdNoIO, (6,0,0))
|
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationReportApplicationExitTimeout(AppletApplication *a), &a->s, 150, _appletCmdNoIO, (6,0,0))
|
||||||
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationSetApplicationAttribute(AppletApplication *a, const AppletApplicationAttribute *attr), &a->s, 160, _appletCmdSendBufNoOut, (8,0,0), attr, sizeof(*attr))
|
IPC_MAKE_CMD_IMPL_HOSVER(Result appletApplicationSetApplicationAttribute(AppletApplication *a, const AppletApplicationAttribute *attr), &a->s, 160, _appletCmdSendBufNoOut, (8,0,0), attr, sizeof(*attr))
|
||||||
|
|
||||||
Result appletApplicationHasSaveDataAccessPermission(AppletApplication *a, u64 titleID, bool *out) {
|
Result appletApplicationHasSaveDataAccessPermission(AppletApplication *a, u64 application_id, bool *out) {
|
||||||
if (!serviceIsActive(&a->s))
|
if (!serviceIsActive(&a->s))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
if (hosversionBefore(8,0,0))
|
if (hosversionBefore(8,0,0))
|
||||||
@ -2486,7 +2486,7 @@ Result appletApplicationHasSaveDataAccessPermission(AppletApplication *a, u64 ti
|
|||||||
|
|
||||||
u8 tmpout=0;
|
u8 tmpout=0;
|
||||||
serviceAssumeDomain(&a->s);
|
serviceAssumeDomain(&a->s);
|
||||||
Result rc = serviceDispatchInOut(&a->s, 170, titleID, tmpout);
|
Result rc = serviceDispatchInOut(&a->s, 170, application_id, tmpout);
|
||||||
if (R_SUCCEEDED(rc) && out) *out = tmpout & 1;
|
if (R_SUCCEEDED(rc) && out) *out = tmpout & 1;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -2541,13 +2541,13 @@ IPC_MAKE_CMD_IMPL_INITEXPR( Result appletUnpopInData(AppletStorage *s),
|
|||||||
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletUnpopExtraStorage(AppletStorage *s), &g_appletILibraryAppletSelfAccessor, 31, _appletCmdInStorage, __nx_applet_type != AppletType_LibraryApplet, s)
|
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletUnpopExtraStorage(AppletStorage *s), &g_appletILibraryAppletSelfAccessor, 31, _appletCmdInStorage, __nx_applet_type != AppletType_LibraryApplet, s)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletGetIndirectLayerProducerHandle(u64 *out), &g_appletILibraryAppletSelfAccessor, 40, _appletCmdNoInOutU64, __nx_applet_type != AppletType_LibraryApplet, (2,0,0), out)
|
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletGetIndirectLayerProducerHandle(u64 *out), &g_appletILibraryAppletSelfAccessor, 40, _appletCmdNoInOutU64, __nx_applet_type != AppletType_LibraryApplet, (2,0,0), out)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletGetMainAppletApplicationDesiredLanguage(u64 *LanguageCode), &g_appletILibraryAppletSelfAccessor, 60, _appletCmdNoInOutU64, __nx_applet_type != AppletType_LibraryApplet, (4,0,0), LanguageCode)
|
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletGetMainAppletApplicationDesiredLanguage(u64 *LanguageCode), &g_appletILibraryAppletSelfAccessor, 60, _appletCmdNoInOutU64, __nx_applet_type != AppletType_LibraryApplet, (4,0,0), LanguageCode)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletGetCurrentApplicationId(u64 *titleID), &g_appletILibraryAppletSelfAccessor, 70, _appletCmdNoInOutU64, __nx_applet_type != AppletType_LibraryApplet, (8,0,0), titleID)
|
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletGetCurrentApplicationId(u64 *application_id), &g_appletILibraryAppletSelfAccessor, 70, _appletCmdNoInOutU64, __nx_applet_type != AppletType_LibraryApplet, (8,0,0), application_id)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletRequestExitToSelf(void), &g_appletILibraryAppletSelfAccessor, 80, _appletCmdNoIO, __nx_applet_type != AppletType_LibraryApplet, (6,0,0))
|
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletRequestExitToSelf(void), &g_appletILibraryAppletSelfAccessor, 80, _appletCmdNoIO, __nx_applet_type != AppletType_LibraryApplet, (6,0,0))
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletCreateGameMovieTrimmer(Service* srv_out, TransferMemory *tmem), &g_appletILibraryAppletSelfAccessor, 100, _appletCmdInTmemOutSession, __nx_applet_type != AppletType_LibraryApplet, (4,0,0), srv_out, tmem)
|
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletCreateGameMovieTrimmer(Service* srv_out, TransferMemory *tmem), &g_appletILibraryAppletSelfAccessor, 100, _appletCmdInTmemOutSession, __nx_applet_type != AppletType_LibraryApplet, (4,0,0), srv_out, tmem)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletReserveResourceForMovieOperation(void), &g_appletILibraryAppletSelfAccessor, 101, _appletCmdNoIO, __nx_applet_type != AppletType_LibraryApplet, (5,0,0))
|
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletReserveResourceForMovieOperation(void), &g_appletILibraryAppletSelfAccessor, 101, _appletCmdNoIO, __nx_applet_type != AppletType_LibraryApplet, (5,0,0))
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletUnreserveResourceForMovieOperation(void), &g_appletILibraryAppletSelfAccessor, 102, _appletCmdNoIO, __nx_applet_type != AppletType_LibraryApplet, (5,0,0))
|
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletUnreserveResourceForMovieOperation(void), &g_appletILibraryAppletSelfAccessor, 102, _appletCmdNoIO, __nx_applet_type != AppletType_LibraryApplet, (5,0,0))
|
||||||
|
|
||||||
Result appletGetMainAppletAvailableUsers(AccountUid *userIDs, s32 count, bool *flag, s32 *total_out) {
|
Result appletGetMainAppletAvailableUsers(AccountUid *uids, s32 count, bool *flag, s32 *total_out) {
|
||||||
if (__nx_applet_type != AppletType_LibraryApplet)
|
if (__nx_applet_type != AppletType_LibraryApplet)
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
if (hosversionBefore(6,0,0))
|
if (hosversionBefore(6,0,0))
|
||||||
@ -2561,7 +2561,7 @@ Result appletGetMainAppletAvailableUsers(AccountUid *userIDs, s32 count, bool *f
|
|||||||
serviceAssumeDomain(&g_appletILibraryAppletSelfAccessor);
|
serviceAssumeDomain(&g_appletILibraryAppletSelfAccessor);
|
||||||
Result rc = serviceDispatchOut(&g_appletILibraryAppletSelfAccessor, 110, out,
|
Result rc = serviceDispatchOut(&g_appletILibraryAppletSelfAccessor, 110, out,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
.buffers = { { userIDs, count*sizeof(AccountUid) } },
|
.buffers = { { uids, count*sizeof(AccountUid) } },
|
||||||
);
|
);
|
||||||
if (R_SUCCEEDED(rc) && flag) *flag = out.flag & 1;
|
if (R_SUCCEEDED(rc) && flag) *flag = out.flag & 1;
|
||||||
if (R_SUCCEEDED(rc) && total_out) *total_out = out.total_out;
|
if (R_SUCCEEDED(rc) && total_out) *total_out = out.total_out;
|
||||||
@ -2572,7 +2572,7 @@ Result appletGetMainAppletAvailableUsers(AccountUid *userIDs, s32 count, bool *f
|
|||||||
|
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletBeginToWatchShortHomeButtonMessage(void), &g_appletIFunctions, 0, _appletCmdNoIO, __nx_applet_type != AppletType_OverlayApplet)
|
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletBeginToWatchShortHomeButtonMessage(void), &g_appletIFunctions, 0, _appletCmdNoIO, __nx_applet_type != AppletType_OverlayApplet)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletEndToWatchShortHomeButtonMessage(void), &g_appletIFunctions, 1, _appletCmdNoIO, __nx_applet_type != AppletType_OverlayApplet)
|
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletEndToWatchShortHomeButtonMessage(void), &g_appletIFunctions, 1, _appletCmdNoIO, __nx_applet_type != AppletType_OverlayApplet)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletGetApplicationIdForLogo(u64 *titleID), &g_appletIFunctions, 2, _appletCmdNoInOutU64, __nx_applet_type != AppletType_OverlayApplet, titleID)
|
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletGetApplicationIdForLogo(u64 *application_id), &g_appletIFunctions, 2, _appletCmdNoInOutU64, __nx_applet_type != AppletType_OverlayApplet, application_id)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletSetGpuTimeSliceBoost(u64 val), &g_appletIFunctions, 3, _appletCmdInU64NoOut, __nx_applet_type != AppletType_OverlayApplet, val)
|
IPC_MAKE_CMD_IMPL_INITEXPR( Result appletSetGpuTimeSliceBoost(u64 val), &g_appletIFunctions, 3, _appletCmdInU64NoOut, __nx_applet_type != AppletType_OverlayApplet, val)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletSetAutoSleepTimeAndDimmingTimeEnabled(bool flag), &g_appletIFunctions, 4, _appletCmdInBoolNoOut, __nx_applet_type != AppletType_OverlayApplet, (2,0,0), flag)
|
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletSetAutoSleepTimeAndDimmingTimeEnabled(bool flag), &g_appletIFunctions, 4, _appletCmdInBoolNoOut, __nx_applet_type != AppletType_OverlayApplet, (2,0,0), flag)
|
||||||
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletTerminateApplicationAndSetReason(Result reason), &g_appletIFunctions, 5, _appletCmdInU32NoOut, __nx_applet_type != AppletType_OverlayApplet, (2,0,0), reason)
|
IPC_MAKE_CMD_IMPL_INITEXPR_HOSVER(Result appletTerminateApplicationAndSetReason(Result reason), &g_appletIFunctions, 5, _appletCmdInU32NoOut, __nx_applet_type != AppletType_OverlayApplet, (2,0,0), reason)
|
||||||
@ -2659,14 +2659,14 @@ IPC_MAKE_CMD_IMPL(Result appletOpenMainApplication(AppletApplication *a),
|
|||||||
IPC_MAKE_CMD_IMPL(Result appletPerformSystemButtonPressing(AppletSystemButtonType type), &g_appletIDebugFunctions, 10, _appletCmdInU32NoOut, type)
|
IPC_MAKE_CMD_IMPL(Result appletPerformSystemButtonPressing(AppletSystemButtonType type), &g_appletIDebugFunctions, 10, _appletCmdInU32NoOut, type)
|
||||||
IPC_MAKE_CMD_IMPL(Result appletInvalidateTransitionLayer(void), &g_appletIDebugFunctions, 20, _appletCmdNoIO)
|
IPC_MAKE_CMD_IMPL(Result appletInvalidateTransitionLayer(void), &g_appletIDebugFunctions, 20, _appletCmdNoIO)
|
||||||
|
|
||||||
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, const AccountUid *userIDs, s32 total_userIDs, bool flag, const void* buffer, size_t size) {
|
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 application_id, const AccountUid *uids, s32 total_uids, bool flag, const void* buffer, size_t size) {
|
||||||
if (hosversionBefore(6,0,0))
|
if (hosversionBefore(6,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
const struct {
|
const struct {
|
||||||
u8 flag;
|
u8 flag;
|
||||||
u64 titleID;
|
u64 application_id;
|
||||||
} in = { flag!=0, titleID };
|
} in = { flag!=0, application_id };
|
||||||
|
|
||||||
serviceAssumeDomain(&g_appletIDebugFunctions);
|
serviceAssumeDomain(&g_appletIDebugFunctions);
|
||||||
return serviceDispatchIn(&g_appletIDebugFunctions, 30, in,
|
return serviceDispatchIn(&g_appletIDebugFunctions, 30, in,
|
||||||
@ -2675,7 +2675,7 @@ Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, co
|
|||||||
SfBufferAttr_HipcMapAlias | SfBufferAttr_In,
|
SfBufferAttr_HipcMapAlias | SfBufferAttr_In,
|
||||||
},
|
},
|
||||||
.buffers = {
|
.buffers = {
|
||||||
{ userIDs, total_userIDs*sizeof(AccountUid) },
|
{ uids, total_uids*sizeof(AccountUid) },
|
||||||
{ buffer, size },
|
{ buffer, size },
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -121,11 +121,11 @@ Result capssuSaveScreenShotWithUserData(const void* buffer, size_t size, AlbumRe
|
|||||||
return capssuSaveScreenShotEx1(buffer, size, &attr, reportoption, &appdata, out);
|
return capssuSaveScreenShotEx1(buffer, size, &attr, reportoption, &appdata, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result capssuSaveScreenShotWithUserIds(const void* buffer, size_t size, AlbumReportOption reportoption, AlbumImageOrientation orientation, const AccountUid* userIDs, size_t userID_count, CapsApplicationAlbumEntry *out) {
|
Result capssuSaveScreenShotWithUserIds(const void* buffer, size_t size, AlbumReportOption reportoption, AlbumImageOrientation orientation, const AccountUid* uids, size_t uid_count, CapsApplicationAlbumEntry *out) {
|
||||||
CapsScreenShotAttribute attr;
|
CapsScreenShotAttribute attr;
|
||||||
CapsUserIdList list;
|
CapsUserIdList list;
|
||||||
|
|
||||||
if (userID_count > ACC_USER_LIST_SIZE)
|
if (uid_count > ACC_USER_LIST_SIZE)
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
return MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
||||||
|
|
||||||
memset(&attr, 0, sizeof(attr));
|
memset(&attr, 0, sizeof(attr));
|
||||||
@ -133,8 +133,8 @@ Result capssuSaveScreenShotWithUserIds(const void* buffer, size_t size, AlbumRep
|
|||||||
attr.unk_xc = 1;
|
attr.unk_xc = 1;
|
||||||
|
|
||||||
memset(&list, 0, sizeof(list));
|
memset(&list, 0, sizeof(list));
|
||||||
if (userIDs && userID_count) memcpy(list.userIDs, userIDs, userID_count*sizeof(AccountUid));
|
if (uids && uid_count) memcpy(list.uids, uids, uid_count*sizeof(AccountUid));
|
||||||
list.count = userID_count;
|
list.count = uid_count;
|
||||||
|
|
||||||
return capssuSaveScreenShotEx2(buffer, size, &attr, reportoption, &list, out);
|
return capssuSaveScreenShotEx2(buffer, size, &attr, reportoption, &list, out);
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ static Result _capsuGetAlbumFileListAaeAruid(u32 cmd_id, void* entries, size_t e
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _capsuGetAlbumFileListAaeUidAruid(u32 cmd_id, void* entries, size_t entrysize, s32 count, u8 type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries) {
|
static Result _capsuGetAlbumFileListAaeUidAruid(u32 cmd_id, void* entries, size_t entrysize, s32 count, u8 type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid uid, s32 *total_entries) {
|
||||||
u64 AppletResourceUserId = 0;
|
u64 AppletResourceUserId = 0;
|
||||||
appletGetAppletResourceUserId(&AppletResourceUserId);
|
appletGetAppletResourceUserId(&AppletResourceUserId);
|
||||||
|
|
||||||
@ -188,9 +188,9 @@ static Result _capsuGetAlbumFileListAaeUidAruid(u32 cmd_id, void* entries, size_
|
|||||||
CapsAlbumFileDateTime start_datetime;
|
CapsAlbumFileDateTime start_datetime;
|
||||||
CapsAlbumFileDateTime end_datetime;
|
CapsAlbumFileDateTime end_datetime;
|
||||||
u8 pad2[6];
|
u8 pad2[6];
|
||||||
AccountUid userID;
|
AccountUid uid;
|
||||||
u64 AppletResourceUserId;
|
u64 AppletResourceUserId;
|
||||||
} in = { type, 0, *start_datetime, *end_datetime, {0}, userID, AppletResourceUserId };
|
} in = { type, 0, *start_datetime, *end_datetime, {0}, uid, AppletResourceUserId };
|
||||||
|
|
||||||
u64 total_out=0;
|
u64 total_out=0;
|
||||||
Result rc = serviceDispatchInOut(&g_capsuSrv, cmd_id, in, total_out,
|
Result rc = serviceDispatchInOut(&g_capsuSrv, cmd_id, in, total_out,
|
||||||
@ -271,14 +271,14 @@ Result capsuGetAlbumFileListDeprecated1(CapsApplicationAlbumFileEntry *entries,
|
|||||||
return _capsuGetAlbumFileListAaeAruid(140, entries, sizeof(CapsApplicationAlbumFileEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, total_entries);
|
return _capsuGetAlbumFileListAaeAruid(140, entries, sizeof(CapsApplicationAlbumFileEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, total_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result capsuGetAlbumFileListDeprecated2(CapsApplicationAlbumFileEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries) {
|
Result capsuGetAlbumFileListDeprecated2(CapsApplicationAlbumFileEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid uid, s32 *total_entries) {
|
||||||
if (hosversionBefore(6,0,0))
|
if (hosversionBefore(6,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
CapsAlbumFileDateTime default_start = capsGetDefaultStartDateTime();
|
CapsAlbumFileDateTime default_start = capsGetDefaultStartDateTime();
|
||||||
CapsAlbumFileDateTime default_end = capsGetDefaultEndDateTime();
|
CapsAlbumFileDateTime default_end = capsGetDefaultEndDateTime();
|
||||||
|
|
||||||
return _capsuGetAlbumFileListAaeUidAruid(141, entries, sizeof(CapsApplicationAlbumFileEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, userID, total_entries);
|
return _capsuGetAlbumFileListAaeUidAruid(141, entries, sizeof(CapsApplicationAlbumFileEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, uid, total_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result capsuGetAlbumFileList3(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, s32 *total_entries) {
|
Result capsuGetAlbumFileList3(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, s32 *total_entries) {
|
||||||
@ -291,14 +291,14 @@ Result capsuGetAlbumFileList3(CapsApplicationAlbumEntry *entries, s32 count, Cap
|
|||||||
return _capsuGetAlbumFileListAaeAruid(142, entries, sizeof(CapsApplicationAlbumEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, total_entries);
|
return _capsuGetAlbumFileListAaeAruid(142, entries, sizeof(CapsApplicationAlbumEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, total_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result capsuGetAlbumFileList4(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries) {
|
Result capsuGetAlbumFileList4(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid uid, s32 *total_entries) {
|
||||||
if (hosversionBefore(7,0,0))
|
if (hosversionBefore(7,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
CapsAlbumFileDateTime default_start = capsGetDefaultStartDateTime();
|
CapsAlbumFileDateTime default_start = capsGetDefaultStartDateTime();
|
||||||
CapsAlbumFileDateTime default_end = capsGetDefaultEndDateTime();
|
CapsAlbumFileDateTime default_end = capsGetDefaultEndDateTime();
|
||||||
|
|
||||||
return _capsuGetAlbumFileListAaeUidAruid(143, entries, sizeof(CapsApplicationAlbumEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, userID, total_entries);
|
return _capsuGetAlbumFileListAaeUidAruid(143, entries, sizeof(CapsApplicationAlbumEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, uid, total_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result capsuDeleteAlbumFile(CapsContentType type, const CapsApplicationAlbumFileEntry *entry) {
|
Result capsuDeleteAlbumFile(CapsContentType type, const CapsApplicationAlbumFileEntry *entry) {
|
||||||
|
@ -147,14 +147,14 @@ static Result _fsOpenFileSystem(FsFileSystem* out, FsFileSystemType fsType, cons
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result fsOpenFileSystemWithPatch(FsFileSystem* out, u64 titleId, FsFileSystemType fsType) {
|
Result fsOpenFileSystemWithPatch(FsFileSystem* out, u64 id, FsFileSystemType fsType) {
|
||||||
if (hosversionBefore(2,0,0))
|
if (hosversionBefore(2,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
const struct {
|
const struct {
|
||||||
u32 fsType;
|
u32 fsType;
|
||||||
u64 titleId;
|
u64 id;
|
||||||
} in = { fsType, titleId };
|
} in = { fsType, id };
|
||||||
|
|
||||||
return _fsObjectDispatchIn(&g_fsSrv, 7, in,
|
return _fsObjectDispatchIn(&g_fsSrv, 7, in,
|
||||||
.out_num_objects = 1,
|
.out_num_objects = 1,
|
||||||
@ -162,11 +162,11 @@ Result fsOpenFileSystemWithPatch(FsFileSystem* out, u64 titleId, FsFileSystemTyp
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _fsOpenFileSystemWithId(FsFileSystem* out, u64 titleId, FsFileSystemType fsType, const char* contentPath) {
|
static Result _fsOpenFileSystemWithId(FsFileSystem* out, u64 id, FsFileSystemType fsType, const char* contentPath) {
|
||||||
const struct {
|
const struct {
|
||||||
u32 fsType;
|
u32 fsType;
|
||||||
u64 titleId;
|
u64 id;
|
||||||
} in = { fsType, titleId };
|
} in = { fsType, id };
|
||||||
|
|
||||||
return _fsObjectDispatchIn(&g_fsSrv, 8, in,
|
return _fsObjectDispatchIn(&g_fsSrv, 8, in,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcPointer | SfBufferAttr_In },
|
.buffer_attrs = { SfBufferAttr_HipcPointer | SfBufferAttr_In },
|
||||||
@ -176,12 +176,12 @@ static Result _fsOpenFileSystemWithId(FsFileSystem* out, u64 titleId, FsFileSyst
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result fsOpenFileSystemWithId(FsFileSystem* out, u64 titleId, FsFileSystemType fsType, const char* contentPath) {
|
Result fsOpenFileSystemWithId(FsFileSystem* out, u64 id, FsFileSystemType fsType, const char* contentPath) {
|
||||||
char sendStr[FS_MAX_PATH] = {0};
|
char sendStr[FS_MAX_PATH] = {0};
|
||||||
strncpy(sendStr, contentPath, sizeof(sendStr)-1);
|
strncpy(sendStr, contentPath, sizeof(sendStr)-1);
|
||||||
|
|
||||||
if (hosversionAtLeast(2,0,0))
|
if (hosversionAtLeast(2,0,0))
|
||||||
return _fsOpenFileSystemWithId(out, titleId, fsType, sendStr);
|
return _fsOpenFileSystemWithId(out, id, fsType, sendStr);
|
||||||
else
|
else
|
||||||
return _fsOpenFileSystem(out, fsType, sendStr);
|
return _fsOpenFileSystem(out, fsType, sendStr);
|
||||||
}
|
}
|
||||||
@ -447,9 +447,9 @@ Result fsGetGlobalAccessLogMode(u32* out_mode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId.
|
// Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId.
|
||||||
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid userID, u64 ownerId, u64 size, u64 journalSize, u32 flags) {
|
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid uid, u64 ownerId, u64 size, u64 journalSize, u32 flags) {
|
||||||
FsSave save = {
|
FsSave save = {
|
||||||
.userID = userID,
|
.uid = uid,
|
||||||
.saveID = saveID,
|
.saveID = saveID,
|
||||||
};
|
};
|
||||||
FsSaveCreate create = {
|
FsSaveCreate create = {
|
||||||
@ -469,22 +469,22 @@ Result fsCreate_SystemSaveData(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, u6
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapper(s) for fsOpenSaveDataFileSystem.
|
// Wrapper(s) for fsOpenSaveDataFileSystem.
|
||||||
Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid userID) {
|
Result fsOpen_SaveData(FsFileSystem* out, u64 program_id, AccountUid uid) {
|
||||||
FsSave save;
|
FsSave save;
|
||||||
|
|
||||||
memset(&save, 0, sizeof(save));
|
memset(&save, 0, sizeof(save));
|
||||||
save.titleID = titleID;
|
save.program_id = program_id;
|
||||||
save.userID = userID;
|
save.uid = uid;
|
||||||
save.saveDataType = FsSaveDataType_SaveData;
|
save.saveDataType = FsSaveDataType_SaveData;
|
||||||
|
|
||||||
return fsOpenSaveDataFileSystem(out, FsSaveDataSpaceId_NandUser, &save);
|
return fsOpenSaveDataFileSystem(out, FsSaveDataSpaceId_NandUser, &save);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result fsOpen_SystemSaveData(FsFileSystem* out, FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid userID) {
|
Result fsOpen_SystemSaveData(FsFileSystem* out, FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid uid) {
|
||||||
FsSave save;
|
FsSave save;
|
||||||
|
|
||||||
memset(&save, 0, sizeof(save));
|
memset(&save, 0, sizeof(save));
|
||||||
save.userID = userID;
|
save.uid = uid;
|
||||||
save.saveID = saveID;
|
save.saveID = saveID;
|
||||||
save.saveDataType = FsSaveDataType_SystemSaveData;
|
save.saveDataType = FsSaveDataType_SystemSaveData;
|
||||||
|
|
||||||
|
@ -377,15 +377,15 @@ Result ncmContentMetaDatabaseListContentInfo(NcmContentMetaDatabase* db, s32* ou
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ncmContentMetaDatabaseList(NcmContentMetaDatabase* db, s32* out_entries_total, s32* out_entries_written, NcmContentMetaKey* out_keys, s32 count, NcmContentMetaType meta_type, u64 application_title_id, u64 title_id_min, u64 title_id_max, NcmContentInstallType install_type) {
|
Result ncmContentMetaDatabaseList(NcmContentMetaDatabase* db, s32* out_entries_total, s32* out_entries_written, NcmContentMetaKey* out_keys, s32 count, NcmContentMetaType meta_type, u64 id, u64 id_min, u64 id_max, NcmContentInstallType install_type) {
|
||||||
const struct {
|
const struct {
|
||||||
u8 meta_type;
|
u8 meta_type;
|
||||||
u8 install_type;
|
u8 install_type;
|
||||||
u8 padding[6];
|
u8 padding[6];
|
||||||
u64 application_title_id;
|
u64 id;
|
||||||
u64 title_id_min;
|
u64 id_min;
|
||||||
u64 title_id_max;
|
u64 id_max;
|
||||||
} in = { meta_type, install_type, {0}, application_title_id, title_id_min, title_id_max };
|
} in = { meta_type, install_type, {0}, id, id_min, id_max };
|
||||||
struct {
|
struct {
|
||||||
s32 out_entries_total;
|
s32 out_entries_total;
|
||||||
s32 out_entries_written;
|
s32 out_entries_written;
|
||||||
@ -401,8 +401,8 @@ Result ncmContentMetaDatabaseList(NcmContentMetaDatabase* db, s32* out_entries_t
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ncmContentMetaDatabaseGetLatestContentMetaKey(NcmContentMetaDatabase* db, NcmContentMetaKey* out_key, u64 title_id) {
|
Result ncmContentMetaDatabaseGetLatestContentMetaKey(NcmContentMetaDatabase* db, NcmContentMetaKey* out_key, u64 id) {
|
||||||
return serviceDispatchInOut(&db->s, 6, title_id, *out_key);
|
return serviceDispatchInOut(&db->s, 6, id, *out_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ncmContentMetaDatabaseListApplication(NcmContentMetaDatabase* db, s32* out_entries_total, s32* out_entries_written, NcmApplicationContentMetaKey* out_keys, s32 count, NcmContentMetaType meta_type) {
|
Result ncmContentMetaDatabaseListApplication(NcmContentMetaDatabase* db, s32* out_entries_total, s32* out_entries_written, NcmApplicationContentMetaKey* out_keys, s32 count, NcmContentMetaType meta_type) {
|
||||||
|
@ -180,11 +180,11 @@ Result nsListApplicationRecord(NsApplicationRecord* records, s32 count, s32 entr
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result nsListApplicationContentMetaStatus(u64 titleID, s32 index, NsApplicationContentMetaStatus* list, s32 count, s32* out_entrycount) {
|
Result nsListApplicationContentMetaStatus(u64 application_id, s32 index, NsApplicationContentMetaStatus* list, s32 count, s32* out_entrycount) {
|
||||||
const struct {
|
const struct {
|
||||||
s32 index;
|
s32 index;
|
||||||
u64 titleID;
|
u64 application_id;
|
||||||
} in = { index, titleID };
|
} in = { index, application_id };
|
||||||
|
|
||||||
return serviceDispatchInOut(&g_nsAppManSrv, 601, in, *out_entrycount,
|
return serviceDispatchInOut(&g_nsAppManSrv, 601, in, *out_entrycount,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
@ -192,11 +192,11 @@ Result nsListApplicationContentMetaStatus(u64 titleID, s32 index, NsApplicationC
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result nsGetApplicationControlData(NsApplicationControlSource source, u64 titleID, NsApplicationControlData* buffer, size_t size, u64* actual_size) {
|
Result nsGetApplicationControlData(NsApplicationControlSource source, u64 application_id, NsApplicationControlData* buffer, size_t size, u64* actual_size) {
|
||||||
const struct {
|
const struct {
|
||||||
u8 source;
|
u8 source;
|
||||||
u64 titleID;
|
u64 application_id;
|
||||||
} in = { source, titleID };
|
} in = { source, application_id };
|
||||||
|
|
||||||
u32 tmp=0;
|
u32 tmp=0;
|
||||||
|
|
||||||
@ -327,22 +327,22 @@ Result nsdevPrepareLaunchProgramFromHost(NsLaunchProperties* out, const char* pa
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result nsdevLaunchApplicationForDevelop(u64* out_pid, u64 app_title_id, u32 flags) {
|
Result nsdevLaunchApplicationForDevelop(u64* out_pid, u64 application_id, u32 flags) {
|
||||||
const struct {
|
const struct {
|
||||||
u32 flags;
|
u32 flags;
|
||||||
u64 app_title_id;
|
u64 application_id;
|
||||||
} in = { .flags = flags, .app_title_id = app_title_id};
|
} in = { .flags = flags, .application_id = application_id};
|
||||||
|
|
||||||
return serviceDispatchInOut(&g_nsdevSrv, 8, in, *out_pid);
|
return serviceDispatchInOut(&g_nsdevSrv, 8, in, *out_pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result nsdevLaunchApplicationWithStorageIdForDevelop(u64* out_pid, u64 app_title_id, u32 flags, u8 app_storage_id, u8 patch_storage_id) {
|
Result nsdevLaunchApplicationWithStorageIdForDevelop(u64* out_pid, u64 application_id, u32 flags, u8 app_storage_id, u8 patch_storage_id) {
|
||||||
const struct {
|
const struct {
|
||||||
u8 app_storage_id;
|
u8 app_storage_id;
|
||||||
u8 patch_storage_id;
|
u8 patch_storage_id;
|
||||||
u32 flags;
|
u32 flags;
|
||||||
u64 app_title_id;
|
u64 application_id;
|
||||||
} in = { .app_storage_id = app_storage_id, .patch_storage_id = patch_storage_id, .flags = flags, .app_title_id = app_title_id};
|
} in = { .app_storage_id = app_storage_id, .patch_storage_id = patch_storage_id, .flags = flags, .application_id = application_id};
|
||||||
|
|
||||||
return serviceDispatchInOut(&g_nsdevSrv, 9, in, *out_pid);
|
return serviceDispatchInOut(&g_nsdevSrv, 9, in, *out_pid);
|
||||||
}
|
}
|
||||||
|
@ -46,20 +46,20 @@ Result pdmqryQueryAppletEvent(s32 entry_index, PdmAppletEvent *events, s32 count
|
|||||||
return _pdmqryQueryEvent(entry_index, events, sizeof(PdmAppletEvent), count, total_out, 0);
|
return _pdmqryQueryEvent(entry_index, events, sizeof(PdmAppletEvent), count, total_out, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result pdmqryQueryPlayStatisticsByApplicationId(u64 titleID, PdmPlayStatistics *stats) {
|
Result pdmqryQueryPlayStatisticsByApplicationId(u64 application_id, PdmPlayStatistics *stats) {
|
||||||
return serviceDispatchInOut(&g_pdmqrySrv, 4, titleID, *stats);
|
return serviceDispatchInOut(&g_pdmqrySrv, 4, application_id, *stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 titleID, AccountUid uid, PdmPlayStatistics *stats) {
|
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 application_id, AccountUid uid, PdmPlayStatistics *stats) {
|
||||||
const struct {
|
const struct {
|
||||||
u64 titleID;
|
u64 application_id;
|
||||||
AccountUid uid;
|
AccountUid uid;
|
||||||
} in = { titleID, uid };
|
} in = { application_id, uid };
|
||||||
|
|
||||||
return serviceDispatchInOut(&g_pdmqrySrv, 5, in, *stats);
|
return serviceDispatchInOut(&g_pdmqrySrv, 5, in, *stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result pdmqryQueryLastPlayTime(PdmLastPlayTime *playtimes, const u64 *titleIDs, s32 count, s32 *total_out) {
|
Result pdmqryQueryLastPlayTime(PdmLastPlayTime *playtimes, const u64 *application_ids, s32 count, s32 *total_out) {
|
||||||
return serviceDispatchOut(&g_pdmqrySrv, 7, *total_out,
|
return serviceDispatchOut(&g_pdmqrySrv, 7, *total_out,
|
||||||
.buffer_attrs = {
|
.buffer_attrs = {
|
||||||
SfBufferAttr_HipcMapAlias | SfBufferAttr_Out,
|
SfBufferAttr_HipcMapAlias | SfBufferAttr_Out,
|
||||||
@ -67,7 +67,7 @@ Result pdmqryQueryLastPlayTime(PdmLastPlayTime *playtimes, const u64 *titleIDs,
|
|||||||
},
|
},
|
||||||
.buffers = {
|
.buffers = {
|
||||||
{ playtimes, count*sizeof(PdmLastPlayTime) },
|
{ playtimes, count*sizeof(PdmLastPlayTime) },
|
||||||
{ titleIDs, count*sizeof(u64) },
|
{ application_ids, count*sizeof(u64) },
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -131,13 +131,13 @@ Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entrie
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, u64 *titleIDs, s32 count, s32 *total_out) {
|
Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, u64 *application_ids, s32 count, s32 *total_out) {
|
||||||
if (hosversionBefore(6,0,0))
|
if (hosversionBefore(6,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
return serviceDispatchInOut(&g_pdmqrySrv, 14, uid, *total_out,
|
return serviceDispatchInOut(&g_pdmqrySrv, 14, uid, *total_out,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
.buffers = { { titleIDs, count*sizeof(u64) } },
|
.buffers = { { application_ids, count*sizeof(u64) } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,15 +57,15 @@ Result pmdmntStartProcess(u64 pid) {
|
|||||||
return serviceDispatchIn(&g_pmdmntSrv, cmd_id, pid);
|
return serviceDispatchIn(&g_pmdmntSrv, cmd_id, pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result pmdmntGetProcessId(u64* pid_out, u64 title_id) {
|
Result pmdmntGetProcessId(u64* pid_out, u64 program_id) {
|
||||||
const u64 cmd_id = hosversionAtLeast(5,0,0) ? 2 : 3;
|
const u64 cmd_id = hosversionAtLeast(5,0,0) ? 2 : 3;
|
||||||
return serviceDispatchInOut(&g_pmdmntSrv, cmd_id, title_id, *pid_out);
|
return serviceDispatchInOut(&g_pmdmntSrv, cmd_id, program_id, *pid_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result pmdmntHookToCreateProcess(Event* out_event, u64 title_id) {
|
Result pmdmntHookToCreateProcess(Event* out_event, u64 program_id) {
|
||||||
const u64 cmd_id = hosversionAtLeast(5,0,0) ? 3 : 4;
|
const u64 cmd_id = hosversionAtLeast(5,0,0) ? 3 : 4;
|
||||||
Handle event = INVALID_HANDLE;
|
Handle event = INVALID_HANDLE;
|
||||||
Result rc = serviceDispatchIn(&g_pmdmntSrv, cmd_id, title_id,
|
Result rc = serviceDispatchIn(&g_pmdmntSrv, cmd_id, program_id,
|
||||||
.out_handle_attrs = { SfOutHandleAttr_HipcCopy },
|
.out_handle_attrs = { SfOutHandleAttr_HipcCopy },
|
||||||
.out_handles = &event,
|
.out_handles = &event,
|
||||||
);
|
);
|
||||||
@ -98,8 +98,8 @@ Result pmdmntClearHook(u32 which) {
|
|||||||
|
|
||||||
// pminfo
|
// pminfo
|
||||||
|
|
||||||
Result pminfoGetProgramId(u64* title_id_out, u64 pid) {
|
Result pminfoGetProgramId(u64* program_id_out, u64 pid) {
|
||||||
return serviceDispatchInOut(&g_pminfoSrv, 0, pid, *title_id_out);
|
return serviceDispatchInOut(&g_pminfoSrv, 0, pid, *program_id_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
// pmshell
|
// pmshell
|
||||||
@ -117,8 +117,8 @@ Result pmshellTerminateProcess(u64 processID) {
|
|||||||
return serviceDispatchIn(&g_pmshellSrv, 1, processID);
|
return serviceDispatchIn(&g_pmshellSrv, 1, processID);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result pmshellTerminateProgram(u64 titleID) {
|
Result pmshellTerminateProgram(u64 program_id) {
|
||||||
return serviceDispatchIn(&g_pmshellSrv, 2, titleID);
|
return serviceDispatchIn(&g_pmshellSrv, 2, program_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result pmshellGetProcessEventHandle(Event* out_event) {
|
Result pmshellGetProcessEventHandle(Event* out_event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user