mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 02:22:15 +02:00
fix descriptions
don't let user supply aruid don't use temp values for _capscCmdInU8NoOut
This commit is contained in:
parent
b9c5bb89ae
commit
171d9b8a3d
@ -333,13 +333,13 @@ Result capsaGetAlbumCache(CapsAlbumStorage storage, CapsAlbumCache *cache);
|
||||
Result capsaGetAlbumCacheEx(CapsAlbumStorage storage, CapsAlbumFileContents contents, CapsAlbumCache *cache);
|
||||
|
||||
/**
|
||||
* @brief Load an \ref CapsAlbumEntry from a \ref CapsApplicationAlbumEntry and an Applet Resource User Id.
|
||||
* @brief Load an \ref CapsAlbumEntry from a \ref CapsApplicationAlbumEntry and an AppletResourceUserId.
|
||||
* @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.
|
||||
|
@ -34,49 +34,55 @@ 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
|
||||
*/
|
||||
Result capscGenerateCurrentAlbumFileId(u64 application_id, CapsAlbumFileContents contents, CapsAlbumFileId *file_id);
|
||||
|
||||
/**
|
||||
* @brief Generate an Application Album Entry based of parameters.
|
||||
* @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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user