Files
ss/include/rvl/CNT/cnt.h
T
2023-12-24 09:59:13 -05:00

31 lines
760 B
C

#ifndef RVL_SDK_CNT_H
#define RVL_SDK_CNT_H
#include "rvl/ARC.h"
#include <common.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct CNTHandle {
ARCHandle arcHandle; // at 0x0
s32 fd; // at 0x1C
} CNTHandle;
typedef struct CNTFileInfo {
CNTHandle *handle; // at 0x0
u32 offset; // at 0x4
u32 length; // at 0x8
u32 position; // at 0xC
} CNTFileInfo;
s32 contentFastOpenNAND(CNTHandle *handle, s32 entrynum, CNTFileInfo *info);
s32 contentConvertPathToEntrynumNAND(CNTHandle *handle, const char *path);
u32 contentGetLengthNAND(CNTFileInfo *info);
s32 contentReadNAND(CNTFileInfo *info, void *dst, s32 len, s32 offset);
s32 contentCloseNAND(CNTFileInfo *info);
#ifdef __cplusplus
}
#endif
#endif