fix typos, move struct

This commit is contained in:
HookedBehemoth 2019-12-21 00:53:58 +01:00
parent dd0e139792
commit 56fe877f14
3 changed files with 11 additions and 11 deletions

View File

@ -22,6 +22,11 @@ typedef enum {
AlbumReportOption_Enable = 1, ///< Display the screenshot-taken Overlay notification. AlbumReportOption_Enable = 1, ///< Display the screenshot-taken Overlay notification.
} AlbumReportOption; } AlbumReportOption;
typedef enum {
AlbumObjectLocation_BuiltInUser = 0, ///< BuiltInUser
AlbumObjectLocation_SdCard = 1, ///< SdCard
} AlbumObjectLocation;
/// ContentType /// ContentType
typedef enum { typedef enum {
CapsContentType_Screenshot = 0, ///< Album screenshots. CapsContentType_Screenshot = 0, ///< Album screenshots.

View File

@ -1,5 +1,5 @@
/** /**
* @file capsu.h * @file capsa.h
* @brief Album Accessor (caps:a) service IPC wrapper. * @brief Album Accessor (caps:a) service IPC wrapper.
* @author Behemoth * @author Behemoth
* @copyright libnx Authors * @copyright libnx Authors
@ -9,19 +9,14 @@
#include "../sf/service.h" #include "../sf/service.h"
#include "../services/caps.h" #include "../services/caps.h"
typedef enum {
AlbumObjectLocation_BuiltInUser = 0,
AlbumObjectLocation_SdCard = 1,
} AlbumObjectLocation;
/// Initialize caps:a. /// Initialize caps:a.
Result capsaInitialize(void); Result capsaInitialize(void);
/// Exit caps:a. /// Exit caps:a.
void capsaExit(void); void capsaExit(void);
/// Gets the Service for caps:u. /// Gets the Service for caps:a.
Service* capsuGetServiceSession(void); Service* capsaGetServiceSession(void);
Result capsaGetAlbumFileCount(AlbumObjectLocation location, u64* count); Result capsaGetAlbumFileCount(AlbumObjectLocation location, u64* count);
Result capsaGetAlbumFileList(AlbumObjectLocation location, u64* count, CapsApplicationAlbumEntry* buffer, u64 size); Result capsaGetAlbumFileList(AlbumObjectLocation location, u64* count, CapsApplicationAlbumEntry* buffer, u64 size);
@ -31,4 +26,4 @@ Result capsaStorageCopyAlbumFile(u8 unk[0x20]);
Result capsaIsAlbumMounted(AlbumObjectLocation location, bool* is_mounted); Result capsaIsAlbumMounted(AlbumObjectLocation location, bool* is_mounted);
Result capsaGetAlbumUsage(AlbumObjectLocation location, u8 unk_out[0x30]); Result capsaGetAlbumUsage(AlbumObjectLocation location, u8 unk_out[0x30]);
Result capsaGetAlbumFileSize(CapsAlbumEntryId entry_id, u64* size); Result capsaGetAlbumFileSize(CapsAlbumEntryId entry_id, u64* size);
Result capsLoadAlbumFileThumbnail(CapsAlbumEntryId entry_id, u8 unk[8], void* jpeg_buffer, u64 jpeg_buffer_size); Result capsaLoadAlbumFileThumbnail(CapsAlbumEntryId entry_id, u8 unk[8], void* jpeg_buffer, u64 jpeg_buffer_size);

View File

@ -18,7 +18,7 @@ void _capsaCleanup(void) {
serviceClose(&g_capsaSrv); serviceClose(&g_capsaSrv);
} }
Service* capsuGetServiceSession(void) { Service* capsaGetServiceSession(void) {
return &g_capsaSrv; return &g_capsaSrv;
} }
@ -60,7 +60,7 @@ Result capsaGetAlbumFileSize(CapsAlbumEntryId entry_id, u64* size) {
return serviceDispatchInOut(&g_capsaSrv, 7, entry_id, *size); return serviceDispatchInOut(&g_capsaSrv, 7, entry_id, *size);
} }
Result capsLoadAlbumFileThumbnail(CapsAlbumEntryId entry_id, u8 unk[8], void* jpeg_buffer, u64 jpeg_buffer_size) { Result capsaLoadAlbumFileThumbnail(CapsAlbumEntryId entry_id, u8 unk[8], void* jpeg_buffer, u64 jpeg_buffer_size) {
return serviceDispatchInOut(&g_capsaSrv, 8, entry_id, *unk, return serviceDispatchInOut(&g_capsaSrv, 8, entry_id, *unk,
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out }, .buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
.buffers = { { jpeg_buffer, jpeg_buffer_size } }, .buffers = { { jpeg_buffer, jpeg_buffer_size } },