fix descriptions

don't let user supply aruid
don't use temp values for _capscCmdInU8NoOut
This commit is contained in:
HookedBehemoth 2020-02-19 18:55:21 +01:00
parent b9c5bb89ae
commit 171d9b8a3d
4 changed files with 31 additions and 27 deletions

View File

@ -337,9 +337,9 @@ Result capsaGetAlbumCacheEx(CapsAlbumStorage storage, CapsAlbumFileContents cont
* @note Only available on [2.0.0+].
* @param[out] entry \ref CapsAlbumEntry
* @param[in] application_entry \ref CapsApplicationAlbumEntry
* @param[in] appletResourceUserId Application Resouce User Id
* @param[in] appletResourceUserId AppletResourceUserId
*/
Result capsaGetAlbumEntryFromApplicationAlbumEntryAruid(CapsAlbumEntry *entry, const CapsApplicationAlbumEntry *application_entry, u64 appletResourceUserId);
Result capsaGetAlbumEntryFromApplicationAlbumEntryAruid(CapsAlbumEntry *entry, const CapsApplicationAlbumEntry *application_entry);
/**
* @brief Opens an AlbumMovieStream.

View File

@ -34,38 +34,43 @@ Result capscNotifyAlbumStorageIsUnAvailable(CapsAlbumStorage storage);
/**
* @brief Register an applet for later usage.
* @note Called at application launch.
* @note Called at application launch by the system.
* @note Will generate a random AES-256 key for this application for use on Shim-Version 0.
* @param[in] appletResourceUserId Session unique applet identifier.
* @param[in] application_id Title unique identifier.
* @note Only available on [2.0.0+].
* @param[in] appletResourceUserId AppletResourceUserId.
* @param[in] application_id ApplicationId.
*/
Result capscRegisterAppletResourceUserId(u64 appletResourceUserId, u64 application_id);
/**
* @brief Unregister an applet.
* @note Called at application exit.
* @param[in] appletResourceUserId Session unique applet identifier.
* @param[in] application_id Title unique identifier.
* @note Called at application exit by the system.
* @note Only available on [2.0.0+].
* @param[in] appletResourceUserId AppletResourceUserId.
* @param[in] application_id ApplicationId.
*/
Result capscUnregisterAppletResourceUserId(u64 appletResourceUserId, u64 application_id);
/**
* @brief Get an Application ID that corresponse to an Application Resource User ID.
* @brief Get an ApplicationId that corresponse to an AppletResourceUserId.
* @note Returns value set by \ref capscRegisterAppletResourceUserId.
* @param[out] application_id Title unique identifier.
* @param[in] appletResourceUserId Session unique applet identifier.
* @note Only available on [2.0.0+].
* @param[out] application_id ApplicationId.
* @param[in] appletResourceUserId AppletResourceUserId.
*/
Result capscGetApplicationIdFromAruid(u64 *application_id, u64 aruid);
/**
* @brief Checks whether an Application ID is registered.
* @param[in] application_id Title unique identifier.
* @brief Checks whether an ApplicationId is registered.
* @note Only available on [2.0.0+].
* @param[in] application_id ApplicationId.
*/
Result capscCheckApplicationIdRegistered(u64 application_id);
/**
* @brief Generate an Album File ID based of parameters and current time.
* @param[in] application_id Title unique identifier.
* @brief Generate an AlbumFileId based of parameters and current time.
* @param[in] application_id ApplicationId.
* @note Only available on [2.0.0+].
* @param[in] contents \ref CapsAlbumFileContents
* @param[out] file_id \ref CapsAlbumFileId
*/
@ -74,9 +79,10 @@ Result capscGenerateCurrentAlbumFileId(u64 application_id, CapsAlbumFileContents
/**
* @brief Generate an ApplicationAlbumEntry based of parameters.
* @note Output will be different between Shim Version 0 and 1.
* @note Only available on [2.0.0+].
* @param[out] appEntry \ref CapsApplicationAlbumEntry
* @param[in] entry \ref CapsAlbumEntry
* @param[in] application_id Title unique identifier.
* @param[in] application_id ApplicationId.
*/
Result capscGenerateApplicationAlbumEntry(CapsApplicationAlbumEntry *appEntry, const CapsAlbumEntry *entry, u64 application_id);
@ -104,7 +110,7 @@ Result capscSaveAlbumScreenShotFileEx(const CapsAlbumFileId *file_id, u64 versio
/**
* @brief Sets thumbnail data for the last taken screenshot.
* @note 96×54x4 Image will get saved.
* @note 96×54 Image will get saved.
* @param[in] file_id \ref CapsAlbumFileId
* @param[in] image RGBA8 image buffer.
* @param[in] image_size size of the RGBA8 image buffer.
@ -114,7 +120,7 @@ Result capscSetOverlayScreenShotThumbnailData(const CapsAlbumFileId *file_id, co
/**
* @brief Sets thumbnail data for the last recorded movie.
* @note Only availabe on [4.0.0+].
* @note 96×54x4 Image will get saved.
* @note 96×54 Image will get saved.
* @param[in] file_id \ref CapsAlbumFileId
* @param[in] image RGBA8 image buffer.
* @param[in] image_size size of the RGBA8 image buffer.
@ -123,7 +129,7 @@ Result capscSetOverlayMovieThumbnailData(const CapsAlbumFileId *file_id, const v
/**
* @brief Opens an AlbumMovieReadStream.
* @note This opens IAlbumControlSession if not previously opened, it's closed during \ref capsaExit.
* @note This opens IAlbumControlSession if not previously opened, it's closed during \ref capscExit.
* @note Up to 4 streams can be open at the same time. Multiple streams can be open at the same time for the same \ref CapsAlbumFileId.
* @note Only available on [4.0.0+].
* @param[out] stream Stream handle.

View File

@ -350,13 +350,13 @@ Result capsaGetAlbumCacheEx(CapsAlbumStorage storage, CapsAlbumFileContents cont
return serviceDispatchInOut(&g_capsaSrv, 8013, in, *cache);
}
Result capsaGetAlbumEntryFromApplicationAlbumEntryAruid(CapsAlbumEntry *entry, const CapsApplicationAlbumEntry *application_entry, u64 appletResourceUserId) {
Result capsaGetAlbumEntryFromApplicationAlbumEntryAruid(CapsAlbumEntry *entry, const CapsApplicationAlbumEntry *application_entry) {
if (hosversionBefore(2,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
const struct {
CapsApplicationAlbumEntry application_entry;
u64 aruid;
} in = { *application_entry, appletResourceUserId };
} in = { *application_entry, appletGetAppletResourceUserId() };
return serviceDispatchInOut(&g_capsaSrv, 8021, in, *entry, .in_send_pid = true);
}

View File

@ -47,13 +47,11 @@ static Result _capscCmdInU8NoOut(Service *srv, u32 cmd_id, u64 inval) {
}
Result capscNotifyAlbumStorageIsAvailable(CapsAlbumStorage storage) {
u8 inval = storage;
return _capscCmdInU8NoOut(&g_capscSrv, 2001, inval);
return _capscCmdInU8NoOut(&g_capscSrv, 2001, storage);
}
Result capscNotifyAlbumStorageIsUnAvailable(CapsAlbumStorage storage) {
u8 inval = storage;
return _capscCmdInU8NoOut(&g_capscSrv, 2002, inval);
return _capscCmdInU8NoOut(&g_capscSrv, 2002, storage);
}
Result capscRegisterAppletResourceUserId(u64 appletResourceUserId, u64 application_id) {