Pass plain AccountUid inputs by value instead of by non-const pointer

This commit is contained in:
fincs 2019-10-21 16:57:01 +02:00
parent 13fbde91b0
commit 47b0403333
No known key found for this signature in database
GPG Key ID: 62C7609ADA219C60
16 changed files with 64 additions and 64 deletions

View File

@ -36,7 +36,7 @@ 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] userID \ref AccountUid
*/ */
Result friendsLaShowFriendList(AccountUid *userID); Result friendsLaShowFriendList(AccountUid userID);
/** /**
* @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.
@ -45,7 +45,7 @@ Result friendsLaShowFriendList(AccountUid *userID);
* @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 userID, 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.
@ -54,41 +54,41 @@ Result friendsLaShowUserDetailInfo(AccountUid *userID, u64 networkServiceAccount
* @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 userID, 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] userID \ref AccountUid
*/ */
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid *userID); Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid userID);
/** /**
* @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] userID \ref AccountUid
*/ */
Result friendsLaStartFacedFriendRequest(AccountUid *userID); Result friendsLaStartFacedFriendRequest(AccountUid userID);
/** /**
* @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] userID \ref AccountUid
*/ */
Result friendsLaShowReceivedFriendRequestList(AccountUid *userID); Result friendsLaShowReceivedFriendRequestList(AccountUid userID);
/** /**
* @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] userID \ref AccountUid
*/ */
Result friendsLaShowBlockedUserList(AccountUid *userID); Result friendsLaShowBlockedUserList(AccountUid userID);
/** /**
* @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] userID \ref AccountUid
*/ */
Result friendsLaShowMyProfile(AccountUid *userID); Result friendsLaShowMyProfile(AccountUid userID);
/** /**
* @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] userID \ref AccountUid
*/ */
Result friendsLaShowMyProfileForHomeMenu(AccountUid *userID); Result friendsLaShowMyProfileForHomeMenu(AccountUid userID);

View File

@ -347,7 +347,7 @@ Result webConfigSetWhitelist(WebCommonConfig* config, const char* whitelist);
* @param config WebCommonConfig object. * @param config WebCommonConfig object.
* @param uid \ref AccountUid * @param uid \ref AccountUid
*/ */
Result webConfigSetUid(WebCommonConfig* config, AccountUid *uid); Result webConfigSetUid(WebCommonConfig* config, AccountUid uid);
/** /**
* @brief Sets the Share CapsAlbumEntry. * @brief Sets the Share CapsAlbumEntry.

View File

@ -31,7 +31,7 @@ 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 titleID, AccountUid userID);
/// Mounts the specified system save data. /// Mounts the specified system save data.
Result fsdevMountSystemSaveData(const char *name, u64 saveID); Result fsdevMountSystemSaveData(const char *name, u64 saveID);

View File

@ -74,7 +74,7 @@ Result accountListAllUsers(AccountUid* userIDs, s32 max_userIDs, s32 *actual_tot
Result accountGetLastOpenedUser(AccountUid *userID); Result accountGetLastOpenedUser(AccountUid *userID);
/// Get an AccountProfile for the specified userID. /// Get an AccountProfile for the specified userID.
Result accountGetProfile(AccountProfile* out, const AccountUid *userID); Result accountGetProfile(AccountProfile* out, AccountUid userID);
/// Close the AccountProfile. /// Close the AccountProfile.
void accountProfileClose(AccountProfile* profile); void accountProfileClose(AccountProfile* profile);

View File

@ -1430,7 +1430,7 @@ Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats,
* @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 *titleIDs, s32 count, s32 *total_out);
/** /**
* @brief Launches Application title {current_titleID}+programIndex. This will enter an infinite-sleep-loop on success. * @brief Launches Application title {current_titleID}+programIndex. This will enter an infinite-sleep-loop on success.
@ -2216,7 +2216,7 @@ Result appletInvalidateTransitionLayer(void);
* @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, AccountUid *userIDs, size_t total_userIDs, bool flag, const void* buffer, size_t size); Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, const AccountUid *userIDs, size_t total_userIDs, bool flag, const void* buffer, size_t size);
/** /**
* @brief Gets the \ref AppletResourceUsageInfo. * @brief Gets the \ref AppletResourceUsageInfo.

View File

@ -48,7 +48,7 @@ Result capsuGetAlbumFileListDeprecated1(CapsApplicationAlbumFileEntry *entries,
* @param[in] userID \ref AccountUid * @param[in] userID \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 userID, s32 *total_entries);
/** /**
* @brief Gets a listing of \ref CapsApplicationAlbumEntry. * @brief Gets a listing of \ref CapsApplicationAlbumEntry.
@ -73,7 +73,7 @@ Result capsuGetAlbumFileList3(CapsApplicationAlbumEntry *entries, s32 count, Cap
* @param[in] userID \ref AccountUid * @param[in] userID \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 userID, s32 *total_entries);
/** /**
* @brief Deletes the specified AlbumFile. * @brief Deletes the specified AlbumFile.

View File

@ -319,14 +319,14 @@ Result fsGetGlobalAccessLogMode(u32* out_mode);
// todo: Rest of commands here // todo: Rest of commands here
// 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 userID, 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);
/// FsFileSystem can be mounted with fs_dev for use with stdio, see fs_dev.h. /// FsFileSystem can be mounted with fs_dev for use with stdio, see fs_dev.h.
/// Wrapper(s) for fsOpenSaveDataFileSystem. /// Wrapper(s) for fsOpenSaveDataFileSystem.
/// See FsSave for titleID and userID. /// See FsSave for titleID and userID.
Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid *userID); Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid userID);
/// 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.

View File

@ -186,7 +186,7 @@ Result pdmqryQueryPlayStatisticsByApplicationId(u64 titleID, PdmPlayStatistics *
* @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 titleID, AccountUid uid, PdmPlayStatistics *stats);
/** /**
* @brief Gets \ref PdmLastPlayTime for the specified titles. * @brief Gets \ref PdmLastPlayTime for the specified titles.
@ -232,7 +232,7 @@ Result pdmqryQueryAccountEvent(s32 entry_index, PdmAccountEvent *events, s32 cou
* @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 pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid *uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out); Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out);
/** /**
* @brief Gets range fields which can then be used with \ref pdmqryQueryAccountPlayEvent. * @brief Gets range fields which can then be used with \ref pdmqryQueryAccountPlayEvent.
@ -241,7 +241,7 @@ Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid *uid, PdmAccountP
* @param[out] start_entry_index Start entry index. * @param[out] start_entry_index Start entry index.
* @param[out] end_entry_index End entry index. * @param[out] end_entry_index End entry index.
*/ */
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 titles played by the specified user.
@ -251,7 +251,7 @@ Result pdmqryGetAvailableAccountPlayEventRange(AccountUid *uid, s32 *total_entri
* @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 *titleIDs, 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.

View File

@ -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 userID, bool playStartupSound) {
FriendsLaArg arg = {.type = type, .userID = *userID}; FriendsLaArg arg = {.type = type, .userID = userID};
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 userID, 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, .userID = userID, .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 userID) {
return _friendsLaShowSimple(FriendsLaArgType_ShowFriendList, userID, false); return _friendsLaShowSimple(FriendsLaArgType_ShowFriendList, userID, false);
} }
Result friendsLaShowUserDetailInfo(AccountUid *userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) { Result friendsLaShowUserDetailInfo(AccountUid userID, 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, userID, networkServiceAccountId, first_inAppScreenName, second_inAppScreenName, false);
} }
Result friendsLaStartSendingFriendRequest(AccountUid *userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) { Result friendsLaStartSendingFriendRequest(AccountUid userID, 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, userID, networkServiceAccountId, first_inAppScreenName, second_inAppScreenName, false);
} }
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid *userID) { Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid userID) {
return _friendsLaShowSimple(FriendsLaArgType_ShowMethodsOfSendingFriendRequest, userID, false); return _friendsLaShowSimple(FriendsLaArgType_ShowMethodsOfSendingFriendRequest, userID, false);
} }
Result friendsLaStartFacedFriendRequest(AccountUid *userID) { Result friendsLaStartFacedFriendRequest(AccountUid userID) {
return _friendsLaShowSimple(FriendsLaArgType_StartFacedFriendRequest, userID, false); return _friendsLaShowSimple(FriendsLaArgType_StartFacedFriendRequest, userID, false);
} }
Result friendsLaShowReceivedFriendRequestList(AccountUid *userID) { Result friendsLaShowReceivedFriendRequestList(AccountUid userID) {
return _friendsLaShowSimple(FriendsLaArgType_ShowReceivedFriendRequestList, userID, false); return _friendsLaShowSimple(FriendsLaArgType_ShowReceivedFriendRequestList, userID, false);
} }
Result friendsLaShowBlockedUserList(AccountUid *userID) { Result friendsLaShowBlockedUserList(AccountUid userID) {
return _friendsLaShowSimple(FriendsLaArgType_ShowBlockedUserList, userID, false); return _friendsLaShowSimple(FriendsLaArgType_ShowBlockedUserList, userID, false);
} }
Result friendsLaShowMyProfile(AccountUid *userID) { Result friendsLaShowMyProfile(AccountUid userID) {
return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, userID, false); return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, userID, false);
} }
Result friendsLaShowMyProfileForHomeMenu(AccountUid *userID) { Result friendsLaShowMyProfileForHomeMenu(AccountUid userID) {
return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, userID, true); return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, userID, true);
} }

View File

@ -355,7 +355,7 @@ Result webShareCreate(WebCommonConfig* config, WebShareStartPage page) {
_webArgInitialize(config, AppletId_loginShare, WebShimKind_Share); _webArgInitialize(config, AppletId_loginShare, WebShimKind_Share);
rc = webConfigSetLeftStickMode(config, WebLeftStickMode_Cursor); rc = webConfigSetLeftStickMode(config, WebLeftStickMode_Cursor);
if (R_SUCCEEDED(rc)) rc = webConfigSetUid(config, &uid); if (R_SUCCEEDED(rc)) rc = webConfigSetUid(config, uid);
if (R_SUCCEEDED(rc)) rc = webConfigSetDisplayUrlKind(config, true); if (R_SUCCEEDED(rc)) rc = webConfigSetDisplayUrlKind(config, true);
if (R_SUCCEEDED(rc)) rc = _webConfigSetU8(config, WebArgType_Unknown14, 1); if (R_SUCCEEDED(rc)) rc = _webConfigSetU8(config, WebArgType_Unknown14, 1);
@ -377,7 +377,7 @@ Result webLobbyCreate(WebCommonConfig* config) {
rc = webConfigSetLeftStickMode(config, WebLeftStickMode_Cursor); rc = webConfigSetLeftStickMode(config, WebLeftStickMode_Cursor);
if (R_SUCCEEDED(rc) && config->version >= 0x30000) rc = webConfigSetPointer(config, false); // Added to user-process init with [3.0.0+]. if (R_SUCCEEDED(rc) && config->version >= 0x30000) rc = webConfigSetPointer(config, false); // Added to user-process init with [3.0.0+].
if (R_SUCCEEDED(rc)) rc = webConfigSetUid(config, &uid); if (R_SUCCEEDED(rc)) rc = webConfigSetUid(config, uid);
if (R_SUCCEEDED(rc)) rc = _webConfigSetU8(config, WebArgType_Unknown14, 1); if (R_SUCCEEDED(rc)) rc = _webConfigSetU8(config, WebArgType_Unknown14, 1);
if (R_SUCCEEDED(rc)) rc = _webConfigSetU8(config, WebArgType_Unknown15, 1); if (R_SUCCEEDED(rc)) rc = _webConfigSetU8(config, WebArgType_Unknown15, 1);
@ -404,10 +404,10 @@ Result webConfigSetWhitelist(WebCommonConfig* config, const char* whitelist) {
return _webConfigSetString(config, WebArgType_Whitelist, whitelist, 0x1000); return _webConfigSetString(config, WebArgType_Whitelist, whitelist, 0x1000);
} }
Result webConfigSetUid(WebCommonConfig* config, AccountUid *uid) { Result webConfigSetUid(WebCommonConfig* config, AccountUid uid) {
WebShimKind shim = _webGetShimKind(config); WebShimKind shim = _webGetShimKind(config);
if (shim != WebShimKind_Share && shim != WebShimKind_Web && shim != WebShimKind_Lobby) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized); if (shim != WebShimKind_Share && shim != WebShimKind_Web && shim != WebShimKind_Lobby) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
return _webTLVSet(config, WebArgType_Uid, uid, sizeof(*uid)); return _webTLVSet(config, WebArgType_Uid, &uid, sizeof(uid));
} }
static Result _webConfigSetAlbumEntryTLV(WebCommonConfig* config, WebArgType type, const CapsAlbumEntry *entry) { static Result _webConfigSetAlbumEntryTLV(WebCommonConfig* config, WebArgType type, const CapsAlbumEntry *entry) {

View File

@ -443,7 +443,7 @@ Result fsdevMountSdmc(void)
return rc; return rc;
} }
Result fsdevMountSaveData(const char *name, u64 titleID, AccountUid *userID) Result fsdevMountSaveData(const char *name, u64 titleID, AccountUid userID)
{ {
FsFileSystem fs; FsFileSystem fs;
Result rc = fsOpen_SaveData(&fs, titleID, userID); Result rc = fsOpen_SaveData(&fs, titleID, userID);

View File

@ -115,8 +115,8 @@ Result accountGetLastOpenedUser(AccountUid *userID) {
return serviceDispatchOut(&g_accSrv, 4, *userID); return serviceDispatchOut(&g_accSrv, 4, *userID);
} }
Result accountGetProfile(AccountProfile* out, const AccountUid *userID) { Result accountGetProfile(AccountProfile* out, AccountUid userID) {
return serviceDispatchIn(&g_accSrv, 5, *userID, return serviceDispatchIn(&g_accSrv, 5, userID,
.out_num_objects = 1, .out_num_objects = 1,
.out_objects = &out->s, .out_objects = &out->s,
); );

View File

@ -2168,14 +2168,14 @@ Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats,
); );
} }
Result appletQueryApplicationPlayStatisticsByUid(AccountUid *uid, PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out) { Result appletQueryApplicationPlayStatisticsByUid(AccountUid uid, PdmApplicationPlayStatistics *stats, const u64 *titleIDs, 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))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
serviceAssumeDomain(&g_appletIFunctions); serviceAssumeDomain(&g_appletIFunctions);
return serviceDispatchInOut(&g_appletIFunctions, 111, *uid, *total_out, return serviceDispatchInOut(&g_appletIFunctions, 111, uid, *total_out,
.buffer_attrs = { .buffer_attrs = {
SfBufferAttr_HipcMapAlias | SfBufferAttr_Out, SfBufferAttr_HipcMapAlias | SfBufferAttr_Out,
SfBufferAttr_HipcMapAlias | SfBufferAttr_In, SfBufferAttr_HipcMapAlias | SfBufferAttr_In,
@ -2651,7 +2651,7 @@ IPC_MAKE_CMD_IMPL(Result appletOpenMainApplication(AppletApplication *a),
IPC_MAKE_CMD_IMPL(Result appletPerformSystemButtonPressing(AppletSystemButtonType type), &g_appletIDebugFunctions, 10, _appletCmdInU32, type) IPC_MAKE_CMD_IMPL(Result appletPerformSystemButtonPressing(AppletSystemButtonType type), &g_appletIDebugFunctions, 10, _appletCmdInU32, 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, AccountUid *userIDs, size_t total_userIDs, bool flag, const void* buffer, size_t size) { Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, const AccountUid *userIDs, size_t total_userIDs, 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);

View File

@ -173,7 +173,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 userID, s32 *total_entries) {
u64 AppletResourceUserId = 0; u64 AppletResourceUserId = 0;
appletGetAppletResourceUserId(&AppletResourceUserId); appletGetAppletResourceUserId(&AppletResourceUserId);
@ -183,7 +183,7 @@ static Result _capsuGetAlbumFileListAaeUidAruid(u32 cmd_id, void* entries, size_
CapsAlbumFileDateTime end_datetime; CapsAlbumFileDateTime end_datetime;
AccountUid userID; AccountUid userID;
u64 AppletResourceUserId; u64 AppletResourceUserId;
} in = { type, *start_datetime, *end_datetime, *userID, AppletResourceUserId }; } in = { type, *start_datetime, *end_datetime, userID, 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,
@ -264,7 +264,7 @@ 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 userID, 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);
@ -284,7 +284,7 @@ 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 userID, 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);

View File

@ -434,9 +434,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 userID, u64 ownerId, u64 size, u64 journalSize, u32 flags) {
FsSave save = { FsSave save = {
.userID = *userID, .userID = userID,
.saveID = saveID, .saveID = saveID,
}; };
FsSaveCreate create = { FsSaveCreate create = {
@ -452,16 +452,16 @@ Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 s
} }
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) {
return fsCreate_SystemSaveDataWithOwner(saveDataSpaceId, saveID, 0, 0, size, journalSize, flags); return fsCreate_SystemSaveDataWithOwner(saveDataSpaceId, saveID, (AccountUid){}, 0, size, journalSize, flags);
} }
// Wrapper(s) for fsOpenSaveDataFileSystem. // Wrapper(s) for fsOpenSaveDataFileSystem.
Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid *userID) { Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid userID) {
FsSave save; FsSave save;
memset(&save, 0, sizeof(save)); memset(&save, 0, sizeof(save));
save.titleID = titleID; save.titleID = titleID;
save.userID = *userID; save.userID = userID;
save.saveDataType = FsSaveDataType_SaveData; save.saveDataType = FsSaveDataType_SaveData;
return fsOpenSaveDataFileSystem(out, FsSaveDataSpaceId_NandUser, &save); return fsOpenSaveDataFileSystem(out, FsSaveDataSpaceId_NandUser, &save);

View File

@ -50,11 +50,11 @@ Result pdmqryQueryPlayStatisticsByApplicationId(u64 titleID, PdmPlayStatistics *
return serviceDispatchInOut(&g_pdmqrySrv, 4, titleID, *stats); return serviceDispatchInOut(&g_pdmqrySrv, 4, titleID, *stats);
} }
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 titleID, AccountUid *uid, PdmPlayStatistics *stats) { Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 titleID, AccountUid uid, PdmPlayStatistics *stats) {
const struct { const struct {
u64 titleID; u64 titleID;
AccountUid uid; AccountUid uid;
} in = { titleID, *uid }; } in = { titleID, uid };
return serviceDispatchInOut(&g_pdmqrySrv, 5, in, *stats); return serviceDispatchInOut(&g_pdmqrySrv, 5, in, *stats);
} }
@ -96,14 +96,14 @@ Result pdmqryQueryAccountEvent(s32 entry_index, PdmAccountEvent *events, s32 cou
return _pdmqryQueryEvent(entry_index, events, sizeof(PdmAccountEvent), count, total_out, 10); return _pdmqryQueryEvent(entry_index, events, sizeof(PdmAccountEvent), count, total_out, 10);
} }
Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid *uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out) { Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out) {
if (hosversionBefore(4,0,0)) if (hosversionBefore(4,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
const struct { const struct {
s32 entry_index; s32 entry_index;
AccountUid uid; AccountUid uid;
} in = { entry_index, *uid }; } in = { entry_index, uid };
return serviceDispatchInOut(&g_pdmqrySrv, 11, in, *total_out, return serviceDispatchInOut(&g_pdmqrySrv, 11, in, *total_out,
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out }, .buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
@ -111,7 +111,7 @@ Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid *uid, PdmAccountP
); );
} }
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) {
if (hosversionBefore(4,0,0)) if (hosversionBefore(4,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
@ -121,7 +121,7 @@ Result pdmqryGetAvailableAccountPlayEventRange(AccountUid *uid, s32 *total_entri
s32 end_entry_index; s32 end_entry_index;
} out; } out;
Result rc = serviceDispatchInOut(&g_pdmqrySrv, 12, *uid, out); Result rc = serviceDispatchInOut(&g_pdmqrySrv, 12, uid, out);
if (R_SUCCEEDED(rc)) { if (R_SUCCEEDED(rc)) {
if (total_entries) *total_entries = out.total_entries; if (total_entries) *total_entries = out.total_entries;
if (start_entry_index) *start_entry_index = out.start_entry_index; if (start_entry_index) *start_entry_index = out.start_entry_index;
@ -130,11 +130,11 @@ Result pdmqryGetAvailableAccountPlayEventRange(AccountUid *uid, s32 *total_entri
return rc; return rc;
} }
Result pdmqryQueryRecentlyPlayedApplication(AccountUid *uid, u64 *titleIDs, s32 count, s32 *total_out) { Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, u64 *titleIDs, 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 = { { titleIDs, count*sizeof(u64) } },
); );