libctru v2.5.0
Loading...
Searching...
No Matches
fsreg.h
1/**
2 * @file fsReg.h
3 * @brief Filesystem registry service
4 */
5
6#pragma once
7
8#include <3ds/exheader.h>
9#include <3ds/services/fs.h>
10
11/// Initializes fs:REG.
12Result fsRegInit(void);
13
14/// Exits fs:REG.
15void fsRegExit(void);
16
17/**
18 * @brief Gets the current fs:REG session handle.
19 * @return The current fs:REG session handle.
20 */
21Handle *fsRegGetSessionHandle(void);
22
23/**
24 * @brief Registers a program's storage information.
25 * @param pid The Process ID of the program.
26 * @param programHandle The program handle.
27 * @param programInfo Information about the program.
28 * @param storageInfo Storage information to register.
29 */
30Result FSREG_Register(u32 pid, u64 programHandle, const FS_ProgramInfo *programInfo, const ExHeader_Arm11StorageInfo *storageInfo);
31
32/**
33 * @brief Unregisters a program's storage information.
34 * @param pid The Process ID of the program.
35 */
36Result FSREG_Unregister(u32 pid);
37
38/**
39 * @brief Retrives the exheader information set(s) (SCI+ACI) about a program.
40 * @param exheaderInfos[out] Pointer to the output exheader information set(s).
41 * @param maxNumEntries The maximum number of entries.
42 * @param programHandle The program handle.
43 */
44Result FSREG_GetProgramInfo(ExHeader_Info *exheaderInfos, u32 maxNumEntries, u64 programHandle);
45
46/**
47 * @brief Loads a program.
48 * @param programHandle[out] Pointer to the output the program handle to.
49 * @param programInfo Information about the program to load.
50 */
51Result FSREG_LoadProgram(u64 *programHandle, const FS_ProgramInfo *programInfo);
52
53/**
54 * @brief Unloads a program.
55 * @param programHandle The program handle.
56 */
57Result FSREG_UnloadProgram(u64 programHandle);
58
59/**
60 * @brief Checks if a program has been loaded by fs:REG.
61 * @param programHandle The program handle.
62 */
63Result FSREG_CheckHostLoadId(u64 programHandle);
NCCH extended header definitions.
Filesystem Services.
The ARM11 filesystem info of a title.
Definition exheader.h:120
Main extended header data, as returned by PXIPM, Loader and FSREG service commands.
Definition exheader.h:181
Program information.
Definition fs.h:183
uint64_t u64
64-bit unsigned integer
Definition types.h:24
u32 Handle
Resource handle.
Definition types.h:41
s32 Result
Function result.
Definition types.h:42
uint32_t u32
32-bit unsigned integer
Definition types.h:23