/*---------------------------------------------------------------------------* Project: Horizon File: fs_Parameters.h Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 23174 $ *---------------------------------------------------------------------------*/ #ifndef NN_FS_FS_PARAMETERS_H_ #define NN_FS_FS_PARAMETERS_H_ #include #include #include #include #include #include #include namespace nn { namespace fs { static const size_t MAX_ARCHIVE_NAME_LENGTH = 7; static const size_t MAX_FILE_PATH_LENGTH = MAX_ARCHIVE_NAME_LENGTH + 1 + 253; // 下記二つは非推奨 static const size_t MAX_FILENAME_WCHAR_LEN = (MAX_FILE_PATH_LENGTH + 1) * sizeof(wchar_t); static const size_t MAX_PATHNAME_WCHAR_LEN = (MAX_FILE_PATH_LENGTH + 1) * sizeof(wchar_t); enum OpenMode { OPEN_MODE_READ = (1u << 0), OPEN_MODE_WRITE = (1u << 1), OPEN_MODE_CREATE = (1u << 2) }; /*! @brief ファイルの読み書きの位置を指定することを示す定数群です。 */ enum PositionBase { /*! @brief ファイルの先頭を基準としてファイルのカレント位置を設定することを示す定数です。 */ POSITION_BASE_BEGIN, /*! @brief ファイルのカレント位置を基準としてファイルのカレント位置を設定することを示す定数です。 */ POSITION_BASE_CURRENT, /*! @brief ファイルの末尾を基準としてファイルのカレント位置を設定することを示す定数です。 */ POSITION_BASE_END }; enum OpenModeRaw { #if defined(NN_DEBUGGER_KMC_PARTNER) READ_ONLY = 0 #elif defined(NN_DEBUGGER_ARM_REALVIEW) READ_ONLY = 1 #endif }; enum MediaType { MEDIA_TYPE_NAND = 0, MEDIA_TYPE_SDMC = 1, MEDIA_TYPE_CTRCARD = 2 }; struct Attributes { bool isDirectory; bool isHidden; bool isArchive; bool isReadOnly; }; struct Transaction { bit32 dummy; }; struct ShortName { char body[10]; char ext[4]; bool valid; bit8 pad; }; struct DirectoryEntry { wchar_t entryName[MAX_FILE_PATH_LENGTH + 1]; ShortName shortName; nn::fs::Attributes attributes; s64 entrySize; }; struct PathMark { bit32 rawPathMark; }; typedef bit64 SaveDataId; typedef bit64 ExtSaveDataId; typedef bit32 ContentIdx; typedef bit64 TitleId; struct TitleDataSpecifier { TitleId id; nn::util::SizedEnum1 media; NN_PADDING3; NN_PADDING4; static TitleDataSpecifier Make(MediaType media, TitleId id) { TitleDataSpecifier ret; ret.id = id; ret.media = media; return ret; } }; typedef TitleDataSpecifier ProgramLaunchInfo; namespace detail { struct ArchiveHandleTag {}; } typedef nn::util::Int64 ArchiveHandle; } // end of namespace tcb } // end of namespace nn #endif // ifndef NN_FS_FS_ENUMS_H_