libnx  v4.2.0
capsa.h
Go to the documentation of this file.
1 /**
2  * @file capsa.h
3  * @brief Album Accessor (caps:a) service IPC wrapper.
4  * @author Behemoth
5  * @copyright libnx Authors
6  */
7 #pragma once
8 #include "../types.h"
9 #include "../sf/service.h"
10 #include "../services/caps.h"
11 
12 /// Initialize caps:a.
14 
15 /// Exit caps:a.
16 void capsaExit(void);
17 
18 /// Gets the Service for caps:a.
20 
21 /// Gets the Service for IAlbumAccessorSession, only initialized after \ref capsaOpenAlbumMovieStream was used (unaffected by using \ref capsaCloseAlbumMovieStream).
23 
24 /**
25  * @brief Gets the amount of files at a AlbumStorage.
26  * @param[in] storage \ref CapsAlbumStorage
27  * @param[out] count Amount of files.
28  */
30 
31 /**
32  * @brief Gets a listing of \ref CapsAlbumEntry, where the AlbumFile's storage matches the input one.
33  * @param[in] storage \ref CapsAlbumStorage
34  * @param[out] out Total output entries.
35  * @param[out] entries Output array of \ref CapsAlbumEntry.
36  * @param[in] count Reserved entry count.
37  */
38 Result capsaGetAlbumFileList(CapsAlbumStorage storage, u64 *out, CapsAlbumEntry *entries, u64 count);
39 
40 /**
41  * @brief Loads a file into the specified buffer.
42  * @param[in] file_id \ref CapsAlbumFileId
43  * @param[out] out_size Size of the AlbumFile.
44  * @param[out] filebuf File output buffer.
45  * @param[in] filebuf_size Size of the filebuf.
46  */
47 Result capsaLoadAlbumFile(const CapsAlbumFileId *file_id, u64 *out_size, void* filebuf, u64 filebuf_size);
48 
49 /**
50  * @brief Deletes an AlbumFile corresponding to the specified \ref CapsAlbumFileId.
51  * @param[in] file_id \ref CapsAlbumFileId
52  */
54 
55 /**
56  * @brief Copies an AlbumFile to the specified \ref CapsAlbumStorage.
57  * @param[in] file_id \ref CapsAlbumFileId
58  * @param[in] dst_storage \ref CapsAlbumStorage
59  */
61 
62 /**
63  * @brief Gets the mount status of the specified \ref CapsAlbumStorage.
64  * @param[in] storage \ref CapsAlbumStorage
65  * @param[out] is_mounted Boolean over whether the storage is mounted or not.
66  */
67 Result capsaIsAlbumMounted(CapsAlbumStorage storage, bool *is_mounted);
68 
69 /**
70  * @brief Returns the AlbumUsage for a specified \ref CapsAlbumStorage.
71  * @param[in] storage \ref CapsAlbumStorage
72  * @param[out] out \ref CapsAlbumUsage2
73  */
75 
76 /**
77  * @brief Gets the size for the specified AlbumFile.
78  * @param[in] file_id \ref CapsAlbumFileId
79  * @param[out] size Size of the file.
80  */
81 Result capsaGetAlbumFileSize(const CapsAlbumFileId *file_id, u64 *size);
82 
83 /**
84  * @brief Load the Thumbnail for the specified AlbumFile.
85  * @note Will always be 320x180.
86  * @param[in] file_id \ref CapsAlbumFileId
87  * @param[out] out_size Size of the Thumbnail.
88  * @param[out] image JPEG image output buffer.
89  * @param[in] image_size Image buffer size.
90  */
91 Result capsaLoadAlbumFileThumbnail(const CapsAlbumFileId *file_id, u64 *out_size, void* image, u64 image_size);
92 
93 /**
94  * @brief Load the ScreenShotImage for the specified AlbumFile.
95  * @note Only available on [2.0.0+].
96  * @param[out] width Output image width. Optional, can be NULL.
97  * @param[out] height Output image height. Optional, can be NULL.
98  * @param[in] file_id \ref CapsAlbumFileId
99  * @param[out] image RGBA8 image output buffer.
100  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 1280x720.
101  * @param[out] workbuf Work buffer, cleared to 0 by the cmd before it returns.
102  * @param[in] workbuf_size Work buffer size, must be at least the size of the JPEG within the AlbumFile.
103  */
104 Result capsaLoadAlbumScreenShotImage(u64 *width, u64 *height, const CapsAlbumFileId *file_id, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
105 
106 /**
107  * @brief Load the ScreenShotThumbnailImage for the specified AlbumFile.
108  * @note Only available on [2.0.0+].
109  * @param[out] width Output image width. Optional, can be NULL.
110  * @param[out] height Output image height. Optional, can be NULL.
111  * @param[in] file_id \ref CapsAlbumFileId
112  * @param[out] image RGBA8 image output buffer.
113  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 320x180.
114  * @param[out] workbuf Work buffer, cleared to 0 by the cmd before it returns.
115  * @param[in] workbuf_size Work buffer size, must be at least the size of the JPEG within the AlbumFile.
116  */
117 Result capsaLoadAlbumScreenShotThumbnailImage(u64 *width, u64 *height, const CapsAlbumFileId *file_id, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
118 
119 /**
120  * @brief Load an \ref CapsAlbumEntry from a \ref CapsApplicationAlbumEntry and an ApplicationId.
121  * @note Only available on [2.0.0+].
122  * @param[out] entry \ref CapsAlbumEntry
123  * @param[in] application_entry \ref CapsApplicationAlbumEntry
124  * @param[in] application_id ApplicationId
125  */
126 Result capsaGetAlbumEntryFromApplicationAlbumEntry(CapsAlbumEntry *entry, const CapsApplicationAlbumEntry *application_entry, u64 application_id);
127 
128 /**
129  * @brief Load the ScreenShotImage for the specified AlbumFile.
130  * @note Only available on [3.0.0+].
131  * @param[out] width Output image width. Optional, can be NULL.
132  * @param[out] height Output image height. Optional, can be NULL.
133  * @param[in] file_id \ref CapsAlbumFileId
134  * @param[in] opts \ref CapsScreenShotDecodeOption
135  * @param[out] image RGBA8 image output buffer.
136  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 1280x720.
137  * @param[out] workbuf Work buffer, cleared to 0 by the cmd before it returns.
138  * @param[in] workbuf_size Work buffer size, must be at least the size of the JPEG within the AlbumFile.
139  */
140 Result capsaLoadAlbumScreenShotImageEx(u64 *width, u64 *height, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
141 
142 /**
143  * @brief Load the ScreenShotThumbnailImage for the specified AlbumFile.
144  * @note Only available on [3.0.0+].
145  * @param[out] width Output image width. Optional, can be NULL.
146  * @param[out] height Output image height. Optional, can be NULL.
147  * @param[in] file_id \ref CapsAlbumFileId
148  * @param[in] opts \ref CapsScreenShotDecodeOption
149  * @param[out] image RGBA8 image output buffer.
150  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 320x180.
151  * @param[out] workbuf Work buffer, cleared to 0 by the cmd before it returns.
152  * @param[in] workbuf_size Work buffer size, must be at least the size of the JPEG within the AlbumFile.
153  */
154 Result capsaLoadAlbumScreenShotThumbnailImageEx(u64 *width, u64 *height, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
155 
156 /**
157  * @brief Load the ScreenShotImage for the specified AlbumFile.
158  * @note Only available on [3.0.0+].
159  * @param[out] width Output image width. Optional, can be NULL.
160  * @param[out] height Output image height. Optional, can be NULL.
161  * @param[out] attr \ref CapsScreenShotAttribute
162  * @param[in] file_id \ref CapsAlbumFileId
163  * @param[in] opts \ref CapsScreenShotDecodeOption
164  * @param[out] image RGBA8 image output buffer.
165  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 1280x720.
166  * @param[out] workbuf Work buffer, cleared to 0 by the cmd before it returns.
167  * @param[in] workbuf_size Work buffer size, must be at least the size of the JPEG within the AlbumFile.
168  */
169 Result capsaLoadAlbumScreenShotImageEx0(u64 *width, u64 *height, CapsScreenShotAttribute *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
170 
171 /**
172  * @brief Returns the AlbumUsage for a specified \ref CapsAlbumStorage.
173  * @note Only available on [4.0.0+].
174  * @param[in] storage \ref CapsAlbumStorage
175  * @param[out] out \ref CapsAlbumUsage3
176  */
178 
179 /**
180  * @brief Returns the result for a AlbumStorage mount.
181  * @note Only available on [4.0.0+].
182  * @param[in] storage \ref CapsAlbumStorage
183  */
185 
186 /**
187  * @brief Returns the AlbumUsage for a specified \ref CapsAlbumStorage.
188  * @note Only available on [4.0.0+].
189  * @param[in] storage \ref CapsAlbumStorage
190  * @param[in] flags \ref CapsAlbumFileContentsFlag
191  * @param[out] out \ref CapsAlbumUsage16
192  */
194 
195 /**
196  * @brief Returns the start and end of the Applet Id range.
197  * @note Only available on [6.0.0+].
198  * @param[out] success Returns bool over whether the call was handled or not.
199  * @param[out] min Mimimum applet id. Always 0x0100000000001000
200  * @param[out] max Maximum applet id. Always 0x0100000000001FFF
201  */
202 Result capsaGetMinMaxAppletId(bool* success, u64* min, u64* max);
203 
204 /**
205  * @brief Gets the amount of files of the specified type at a AlbumStorage.
206  * @note Only available on [5.0.0+].
207  * @param[in] storage \ref CapsAlbumStorage
208  * @param[in] flags \ref CapsAlbumFileContentsFlag
209  * @param[out] count Amount of files.
210  */
211 Result capsaGetAlbumFileCountEx0(CapsAlbumStorage storage, u8 flags, u64 *count);
212 
213 /**
214  * @brief Gets a listing of \ref CapsAlbumEntry, where the AlbumFile's storage and type matches the input one.
215  * @note Only available on [5.0.0+].
216  * @param[in] storage \ref CapsAlbumStorage
217  * @param[in] flags \ref CapsAlbumFileContentsFlag
218  * @param[out] out Total output entries.
219  * @param[out] entries Output array of \ref CapsAlbumEntry.
220  * @param[in] count Reserved entry count.
221  */
222 Result capsaGetAlbumFileListEx0(CapsAlbumStorage storage, u8 flags, u64 *out, CapsAlbumEntry *entries, u64 count);
223 
224 /**
225  * @brief Returns the image from the last shown ScreenShot Overlay.
226  * @param[out] file_id \ref CapsAlbumFileId
227  * @param[out] out_size Size of the thumbnail image. Always 0x5100.
228  * @param[out] image RGBA8 image output buffer.
229  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 96×54.
230  */
231 Result capsaGetLastOverlayScreenShotThumbnail(CapsAlbumFileId *file_id, u64 *out_size, void* image, u64 image_size);
232 
233 /**
234  * @brief Returns the image from the last shown Movie Overlay.
235  * @note Only available on [4.0.0+].
236  * @param[out] file_id \ref CapsAlbumFileId
237  * @param[out] out_size Size of the thumbnail image. Always 0x5100.
238  * @param[out] image RGBA8 image output buffer.
239  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 96×54.
240  */
241 Result capsaGetLastOverlayMovieThumbnail(CapsAlbumFileId *file_id, u64 *out_size, void* image, u64 image_size);
242 
243 /**
244  * @brief Gets the currently set autosaving storage.
245  * @note Wrapper around setsysGetPrimaryAlbumStorage but defaults to NAND if SD isn't available.
246  * @param[out] storage \ref CapsAlbumStorage
247  */
249 
250 /**
251  * @brief Gets required size to copy all files from one Storage to another.
252  * @param[in] dst_storage \ref CapsAlbumStorage
253  * @param[in] src_storage \ref CapsAlbumStorage
254  * @param[out] out Required storage space size.
255  */
257 
258 /**
259  * @brief Load the ScreenShotThumbnailImage for the specified AlbumFile.
260  * @note Only available on [3.0.0+].
261  * @param[out] width Output image width. Optional, can be NULL.
262  * @param[out] height Output image height. Optional, can be NULL.
263  * @param[out] attr \ref CapsScreenShotAttribute
264  * @param[in] file_id \ref CapsAlbumFileId
265  * @param[in] opts \ref CapsScreenShotDecodeOption
266  * @param[out] image RGBA8 image output buffer.
267  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 320x180.
268  * @param[out] workbuf Work buffer, cleared to 0 by the cmd before it returns.
269  * @param[in] workbuf_size Work buffer size, must be at least the size of the JPEG within the AlbumFile.
270  */
271 Result capsLoadAlbumScreenShotThumbnailImageEx0(u64 *width, u64 *height, CapsScreenShotAttribute *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
272 
273 /**
274  * @brief Load the ScreenShotImage for the specified AlbumFile.
275  * @note Only available on [4.0.0+].
276  * @param[in] file_id \ref CapsAlbumFileId
277  * @param[in] opts \ref CapsScreenShotDecodeOption
278  * @param[out] out \ref CapsLoadAlbumScreenShotImageOutput
279  * @param[out] image RGBA8 image output buffer.
280  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 1280x720.
281  * @param[out] workbuf Work buffer, cleared to 0 by the cmd before it returns.
282  * @param[in] workbuf_size Work buffer size, must be at least the size of the JPEG within the AlbumFile.
283  */
284 Result capsaLoadAlbumScreenShotImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutput *out, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
285 
286 /**
287  * @brief Load the ScreenShotThumbnailImage for the specified AlbumFile.
288  * @note Only available on [4.0.0+].
289  * @param[in] file_id \ref CapsAlbumFileId
290  * @param[in] opts \ref CapsScreenShotDecodeOption
291  * @param[out] out \ref CapsLoadAlbumScreenShotImageOutput
292  * @param[out] image RGBA8 image output buffer.
293  * @param[in] image_size Image buffer size, should be at least large enough for RGBA8 320x180.
294  * @param[out] workbuf Work buffer, cleared to 0 by the cmd before it returns.
295  * @param[in] workbuf_size Work buffer size, must be at least the size of the JPEG within the AlbumFile.
296  */
297 Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutput *out, void* image, u64 image_size, void* workbuf, u64 workbuf_size);
298 
299 /**
300  * @brief Unmounts the specified AlbumStorage.
301  * @param[in] storage \ref CapsAlbumStorage
302  */
304 
305 /**
306  * @brief Resets mount status for the specified AlbumStorage.
307  * @note Mounts the Storage if available.
308  * @param[in] storage \ref CapsAlbumStorage
309  */
311 
312 /**
313  * @brief Refreshs Album Cache for the specified AlbumStorage.
314  * @param[in] storage \ref CapsAlbumStorage
315  */
317 
318 /**
319  * @brief Gets the AlbumCache of the specified AlbumStorage.
320  * @note Stubbed on [4.0.0+].
321  * @note use \ref capsaGetAlbumCacheEx instead.
322  * @param[in] storage \ref CapsAlbumStorage
323  * @param[out] cache \ref CapsAlbumCache
324  */
326 
327 /**
328  * @brief Gets the AlbumCache for the specified type of the specified AlbumStorage.
329  * @param[in] storage \ref CapsAlbumStorage
330  * @param[in] contents \ref CapsAlbumFileContents
331  * @param[out] cache \ref CapsAlbumCache
332  */
334 
335 /**
336  * @brief Load an \ref CapsAlbumEntry from a \ref CapsApplicationAlbumEntry and an AppletResourceUserId.
337  * @note Only available on [2.0.0+].
338  * @param[out] entry \ref CapsAlbumEntry
339  * @param[in] application_entry \ref CapsApplicationAlbumEntry
340  */
342 
343 /**
344  * @brief Opens an AlbumMovieStream.
345  * @note This opens IAlbumAccessorSession if not previously opened, it's closed during \ref capsaExit.
346  * @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.
347  * @note Only available on [4.0.0+].
348  * @param[out] stream Stream handle.
349  * @param[in] entry \ref CapsAlbumFileId
350  */
351 Result capsaOpenAlbumMovieStream(u64 *stream, const CapsAlbumFileId *file_id);
352 
353 /**
354  * @brief Closes an AlbumMovieStream.
355  * @note Only available on [4.0.0+].
356  * @param[in] stream Stream handle.
357  */
359 
360 /**
361  * @brief Gets the data size of an AlbumMovieStream.
362  * @note Only available on [4.0.0+].
363  * @param[in] stream Stream handle.
364  * @param[out] size Size of the actual MP4, without the JPEG at the end.
365  */
367 
368 /**
369  * @brief Reads data from an AlbumMovieStream.
370  * @note offset(+size) must not be negative. offset and size must be aligned to 0x40000-bytes.
371  * @note When offset(+size) goes beyond the size from \ref capsaGetAlbumMovieStreamSize, the regions of the buffer which goes beyond that are cleared to 0, and actual_size is still set to the input size.
372  * @note Only available on [4.0.0+].
373  * @param[in] stream Stream handle.
374  * @param[in] offset Offset.
375  * @param[out] Output data buffer.
376  * @param[in] size Data buffer size.
377  * @param[out] actual_size Actual read size.
378  */
379 Result capsaReadMovieDataFromAlbumMovieReadStream(u64 stream, s64 offset, void* buffer, size_t size, u64 *actual_size);
380 
381 /**
382  * @brief Gets the BrokenReason for an AlbumMovieStream.
383  * @note Official sw doesn't use this.
384  * @note Only available on [4.0.0+].
385  * @param[in] stream Stream handle.
386  */
388 
389 /**
390  * @brief Gets the data size of an Image taken from an AlbumMovieStream.
391  * @note Only available on [4.0.0+].
392  * @param[in] stream Stream handle.
393  * @param[out] size Expected size of an Image.
394  */
396 
397 /**
398  * @brief Reads data of an Image taken from an AlbumMovieStream.
399  * @note Only available on [4.0.0+].
400  * @param[in] stream Stream handle.
401  * @param[in] offset Offset.
402  * @param[out] Output data buffer.
403  * @param[in] size Data buffer size.
404  * @param[out] actual_size Actual read size.
405  */
406 Result capsaReadImageDataFromAlbumMovieReadStream(u64 stream, s64 offset, void* buffer, size_t size, u64 *actual_size);
407 
408 /**
409  * @brief Gets the file attribute of an AlbumMovieStream.
410  * @note Only available on [4.0.0+].
411  * @param[in] stream Stream handle.
412  * @param[out] attr \ref CapsScreenShotAttribute
413  */
s64
int64_t s64
64-bit signed integer.
Definition: types.h:28
capsaGetAlbumFileListEx0
Result capsaGetAlbumFileListEx0(CapsAlbumStorage storage, u8 flags, u64 *out, CapsAlbumEntry *entries, u64 count)
Gets a listing of CapsAlbumEntry, where the AlbumFile's storage and type matches the input one.
capsaGetServiceSession_Accessor
Service * capsaGetServiceSession_Accessor(void)
Gets the Service for IAlbumAccessorSession, only initialized after capsaOpenAlbumMovieStream was used...
capsaGetAlbumFileCountEx0
Result capsaGetAlbumFileCountEx0(CapsAlbumStorage storage, u8 flags, u64 *count)
Gets the amount of files of the specified type at a AlbumStorage.
capsaGetAlbumCache
Result capsaGetAlbumCache(CapsAlbumStorage storage, CapsAlbumCache *cache)
Gets the AlbumCache of the specified AlbumStorage.
capsaGetAlbumFileCount
Result capsaGetAlbumFileCount(CapsAlbumStorage storage, u64 *count)
Gets the amount of files at a AlbumStorage.
capsaLoadAlbumScreenShotImageEx1
Result capsaLoadAlbumScreenShotImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutput *out, void *image, u64 image_size, void *workbuf, u64 workbuf_size)
Load the ScreenShotImage for the specified AlbumFile.
CapsAlbumFileContents
CapsAlbumFileContents
AlbumFileContents.
Definition: caps.h:140
capsaGetAlbumUsage3
Result capsaGetAlbumUsage3(CapsAlbumStorage storage, CapsAlbumUsage3 *out)
Returns the AlbumUsage for a specified CapsAlbumStorage.
u8
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
capsaLoadAlbumScreenShotThumbnailImageEx
Result capsaLoadAlbumScreenShotThumbnailImageEx(u64 *width, u64 *height, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void *image, u64 image_size, void *workbuf, u64 workbuf_size)
Load the ScreenShotThumbnailImage for the specified AlbumFile.
CapsScreenShotDecodeOption
ScreenShotDecodeOption.
Definition: caps.h:74
capsaLoadAlbumFileThumbnail
Result capsaLoadAlbumFileThumbnail(const CapsAlbumFileId *file_id, u64 *out_size, void *image, u64 image_size)
Load the Thumbnail for the specified AlbumFile.
capsaGetLastOverlayScreenShotThumbnail
Result capsaGetLastOverlayScreenShotThumbnail(CapsAlbumFileId *file_id, u64 *out_size, void *image, u64 image_size)
Returns the image from the last shown ScreenShot Overlay.
CapsAlbumUsage2
Definition: caps.h:160
CapsLoadAlbumScreenShotImageOutput
LoadAlbumScreenShotImageOutput.
Definition: caps.h:189
capsaGetAutoSavingStorage
Result capsaGetAutoSavingStorage(CapsAlbumStorage *storage)
Gets the currently set autosaving storage.
CapsAlbumUsage16
Definition: caps.h:168
capsaRefreshAlbumCache
Result capsaRefreshAlbumCache(CapsAlbumStorage storage)
Refreshs Album Cache for the specified AlbumStorage.
capsaGetAlbumMountResult
Result capsaGetAlbumMountResult(CapsAlbumStorage storage)
Returns the result for a AlbumStorage mount.
CapsAlbumStorage
CapsAlbumStorage
Definition: caps.h:25
CapsAlbumFileId
AlbumEntryId.
Definition: caps.h:91
capsaExit
void capsaExit(void)
Exit caps:a.
CapsScreenShotAttribute
ScreenShotAttribute.
Definition: caps.h:38
capsaReadMovieDataFromAlbumMovieReadStream
Result capsaReadMovieDataFromAlbumMovieReadStream(u64 stream, s64 offset, void *buffer, size_t size, u64 *actual_size)
Reads data from an AlbumMovieStream.
capsaGetAlbumUsage16
Result capsaGetAlbumUsage16(CapsAlbumStorage storage, u8 flags, CapsAlbumUsage16 *out)
Returns the AlbumUsage for a specified CapsAlbumStorage.
CapsAlbumEntry
AlbumEntry.
Definition: caps.h:100
capsaGetAlbumFileSize
Result capsaGetAlbumFileSize(const CapsAlbumFileId *file_id, u64 *size)
Gets the size for the specified AlbumFile.
capsaLoadAlbumScreenShotThumbnailImageEx1
Result capsaLoadAlbumScreenShotThumbnailImageEx1(const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, CapsLoadAlbumScreenShotImageOutput *out, void *image, u64 image_size, void *workbuf, u64 workbuf_size)
Load the ScreenShotThumbnailImage for the specified AlbumFile.
capsLoadAlbumScreenShotThumbnailImageEx0
Result capsLoadAlbumScreenShotThumbnailImageEx0(u64 *width, u64 *height, CapsScreenShotAttribute *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void *image, u64 image_size, void *workbuf, u64 workbuf_size)
Load the ScreenShotThumbnailImage for the specified AlbumFile.
capsaGetAlbumFileList
Result capsaGetAlbumFileList(CapsAlbumStorage storage, u64 *out, CapsAlbumEntry *entries, u64 count)
Gets a listing of CapsAlbumEntry, where the AlbumFile's storage matches the input one.
capsaDeleteAlbumFile
Result capsaDeleteAlbumFile(const CapsAlbumFileId *file_id)
Deletes an AlbumFile corresponding to the specified CapsAlbumFileId.
capsaGetAlbumMovieReadStreamBrokenReason
Result capsaGetAlbumMovieReadStreamBrokenReason(u64 stream)
Gets the BrokenReason for an AlbumMovieStream.
u64
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
capsaCloseAlbumMovieStream
Result capsaCloseAlbumMovieStream(u64 stream)
Closes an AlbumMovieStream.
Result
u32 Result
Function error code result type.
Definition: types.h:44
capsaIsAlbumMounted
Result capsaIsAlbumMounted(CapsAlbumStorage storage, bool *is_mounted)
Gets the mount status of the specified CapsAlbumStorage.
capsaGetAlbumMovieReadStreamImageDataSize
Result capsaGetAlbumMovieReadStreamImageDataSize(u64 stream, u64 *size)
Gets the data size of an Image taken from an AlbumMovieStream.
capsaReadImageDataFromAlbumMovieReadStream
Result capsaReadImageDataFromAlbumMovieReadStream(u64 stream, s64 offset, void *buffer, size_t size, u64 *actual_size)
Reads data of an Image taken from an AlbumMovieStream.
capsaGetMinMaxAppletId
Result capsaGetMinMaxAppletId(bool *success, u64 *min, u64 *max)
Returns the start and end of the Applet Id range.
capsaLoadAlbumScreenShotImageEx0
Result capsaLoadAlbumScreenShotImageEx0(u64 *width, u64 *height, CapsScreenShotAttribute *attr, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void *image, u64 image_size, void *workbuf, u64 workbuf_size)
Load the ScreenShotImage for the specified AlbumFile.
capsaLoadAlbumScreenShotThumbnailImage
Result capsaLoadAlbumScreenShotThumbnailImage(u64 *width, u64 *height, const CapsAlbumFileId *file_id, void *image, u64 image_size, void *workbuf, u64 workbuf_size)
Load the ScreenShotThumbnailImage for the specified AlbumFile.
CapsApplicationAlbumEntry
ApplicationAlbumEntry.
Definition: caps.h:106
capsaResetAlbumMountStatus
Result capsaResetAlbumMountStatus(CapsAlbumStorage storage)
Resets mount status for the specified AlbumStorage.
capsaLoadAlbumScreenShotImageEx
Result capsaLoadAlbumScreenShotImageEx(u64 *width, u64 *height, const CapsAlbumFileId *file_id, const CapsScreenShotDecodeOption *opts, void *image, u64 image_size, void *workbuf, u64 workbuf_size)
Load the ScreenShotImage for the specified AlbumFile.
capsaLoadAlbumFile
Result capsaLoadAlbumFile(const CapsAlbumFileId *file_id, u64 *out_size, void *filebuf, u64 filebuf_size)
Loads a file into the specified buffer.
CapsAlbumUsage3
Definition: caps.h:164
capsaStorageCopyAlbumFile
Result capsaStorageCopyAlbumFile(const CapsAlbumFileId *file_id, CapsAlbumStorage dst_storage)
Copies an AlbumFile to the specified CapsAlbumStorage.
capsaInitialize
Result capsaInitialize(void)
Initialize caps:a.
capsaGetLastOverlayMovieThumbnail
Result capsaGetLastOverlayMovieThumbnail(CapsAlbumFileId *file_id, u64 *out_size, void *image, u64 image_size)
Returns the image from the last shown Movie Overlay.
capsaReadFileAttributeFromAlbumMovieReadStream
Result capsaReadFileAttributeFromAlbumMovieReadStream(u64 stream, CapsScreenShotAttribute *attr)
Gets the file attribute of an AlbumMovieStream.
capsaGetAlbumEntryFromApplicationAlbumEntryAruid
Result capsaGetAlbumEntryFromApplicationAlbumEntryAruid(CapsAlbumEntry *entry, const CapsApplicationAlbumEntry *application_entry)
Load an CapsAlbumEntry from a CapsApplicationAlbumEntry and an AppletResourceUserId.
Service
Service object structure.
Definition: service.h:13
capsaGetServiceSession
Service * capsaGetServiceSession(void)
Gets the Service for caps:a.
capsaGetAlbumMovieStreamSize
Result capsaGetAlbumMovieStreamSize(u64 stream, u64 *size)
Gets the data size of an AlbumMovieStream.
capsaGetAlbumUsage
Result capsaGetAlbumUsage(CapsAlbumStorage storage, CapsAlbumUsage2 *out)
Returns the AlbumUsage for a specified CapsAlbumStorage.
capsaGetRequiredStorageSpaceSizeToCopyAll
Result capsaGetRequiredStorageSpaceSizeToCopyAll(CapsAlbumStorage dst_storage, CapsAlbumStorage src_storage, u64 *out)
Gets required size to copy all files from one Storage to another.
capsaForceAlbumUnmounted
Result capsaForceAlbumUnmounted(CapsAlbumStorage storage)
Unmounts the specified AlbumStorage.
capsaOpenAlbumMovieStream
Result capsaOpenAlbumMovieStream(u64 *stream, const CapsAlbumFileId *file_id)
Opens an AlbumMovieStream.
capsaGetAlbumEntryFromApplicationAlbumEntry
Result capsaGetAlbumEntryFromApplicationAlbumEntry(CapsAlbumEntry *entry, const CapsApplicationAlbumEntry *application_entry, u64 application_id)
Load an CapsAlbumEntry from a CapsApplicationAlbumEntry and an ApplicationId.
capsaGetAlbumCacheEx
Result capsaGetAlbumCacheEx(CapsAlbumStorage storage, CapsAlbumFileContents contents, CapsAlbumCache *cache)
Gets the AlbumCache for the specified type of the specified AlbumStorage.
capsaLoadAlbumScreenShotImage
Result capsaLoadAlbumScreenShotImage(u64 *width, u64 *height, const CapsAlbumFileId *file_id, void *image, u64 image_size, void *workbuf, u64 workbuf_size)
Load the ScreenShotImage for the specified AlbumFile.
CapsAlbumCache
AlbumCache.
Definition: caps.h:203