1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: fs_IOutputStream.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: 29703 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_FS_FS_IOUTPUTSTREAM_H_ 17 #define NN_FS_FS_IOUTPUTSTREAM_H_ 18 19 #include <nn/fs/fs_IPositionable.h> 20 21 namespace nn { 22 namespace fs { 23 24 class IOutputStream : public virtual IPositionable 25 { 26 public: ~IOutputStream()27 virtual ~IOutputStream() {}; 28 29 virtual Result TryWrite(s32* pOut, const void* buffer, size_t size, bool flush=true) = 0; 30 virtual s32 Write(const void* buffer, size_t size, bool flush=true) = 0; 31 32 virtual Result TrySetSize(s64 size) = 0; 33 virtual void SetSize(s64 size) = 0; 34 }; 35 36 } 37 } 38 39 #endif /* NN_FS_FS_IOUTPUTSTREAM_H_ */ 40