1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: fs_IpcFile.h 4 5 Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 21127 $ 14 *---------------------------------------------------------------------------*/ 15 16 // 17 // このファイルを編集しないでください。 18 // このファイルは自動生成されます。 19 // 20 21 #ifndef NN_FS_FS_IPCFILE_H_ 22 #define NN_FS_FS_IPCFILE_H_ 23 24 #include <nn/Handle.h> 25 #include <nn/Result.h> 26 #include <nn/types.h> 27 #include <nn/fs/fs_Parameters.h> 28 29 30 31 namespace nn { 32 namespace fs { 33 namespace ipc { 34 35 class File 36 { 37 public: 38 enum Tag 39 { 40 TAG_IPC_ERROR, 41 TAG_OPEN_SUB_FILE, 42 TAG_READ, 43 TAG_WRITE, 44 TAG_GET_SIZE, 45 TAG_SET_SIZE, 46 TAG_GET_ATTRIBUTES, 47 TAG_SET_ATTRIBUTES, 48 TAG_CLOSE, 49 TAG_IPC_END 50 }; 51 52 private: 53 Handle m_Session; 54 55 public: File(Handle session)56 File(Handle session) : m_Session(session) {} 57 58 public: 59 nn::Result OpenSubFile( nn::Handle* pOut, s64 offset, s64 length ); 60 nn::Result Read( s32* pRead, s64 offset, void* pBuffer, size_t size ); 61 nn::Result Write( s32* pWritten, s64 offset, const void* pBuffer, size_t size, bool flush ); 62 nn::Result GetSize( s64* pOut ); 63 nn::Result SetSize( s64 size ); 64 nn::Result GetAttributes( nn::fs::Attributes* pOut ); 65 nn::Result SetAttributes( nn::fs::Attributes attributes ); 66 nn::Result Close(); 67 }; 68 69 } // end of namespace ipc 70 } // end of namespace fs 71 } // end of namespace nn 72 73 74 75 #endif // ifndef NN_FS_FS_IPCFILE_H_ 76