/*---------------------------------------------------------------------------* 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: 30789 $ *---------------------------------------------------------------------------*/ #ifndef NN_FS_FS_PARAMETERS_H_ #define NN_FS_FS_PARAMETERS_H_ #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; /*! @brief ファイルのオープンモードを示す列挙定数です。 ファイルのオープンモードをこれらの論理和で指定します。 */ enum OpenMode { OPEN_MODE_READ = (1u << 0), //!< 読み込みモードで開きます。 OPEN_MODE_WRITE = (1u << 1), //!< 書き込みモードで開きます。 OPEN_MODE_CREATE = (1u << 2) //!< ファイルが無ければファイルを作成します。OPEN_MODE_WRITE を同時に指定する必要があります。 }; /*! @brief ファイルの読み書きの位置を指定することを示す定数群です。 */ enum PositionBase { /*! @brief ファイルの先頭を基準としてファイルのカレント位置を設定することを示す定数です。 */ POSITION_BASE_BEGIN, /*! @brief ファイルのカレント位置を基準としてファイルのカレント位置を設定することを示す定数です。 */ POSITION_BASE_CURRENT, /*! @brief ファイルの末尾を基準としてファイルのカレント位置を設定することを示す定数です。 */ POSITION_BASE_END }; struct Transaction { bit32 dummy; }; struct Attributes { bool isDirectory; bool isHidden; bool isArchive; bool isReadOnly; }; 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; }; enum MediaType { MEDIA_TYPE_NAND = 0, MEDIA_TYPE_SDMC = 1, MEDIA_TYPE_CTRCARD = 2 }; namespace detail { struct ArchiveHandleTag {}; } typedef nn::util::Int64 ArchiveHandle; typedef bit64 ExtSaveDataId; typedef bit64 TitleId; } // end of namespace tcb } // end of namespace nn namespace nn { namespace CTR { typedef struct DUMMY1 { bit8 data[948]; } Dummy1; typedef struct DUMMY2 { bit8 data[9152]; } Dummy2; }} #endif // ifndef NN_FS_FS_ENUMS_H_