/*---------------------------------------------------------------------------* Project: NintendoWare File: io_IOStream.cpp Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. 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. $Revision: 13145 $ *---------------------------------------------------------------------------*/ #include "precompiled.h" #include #include #include #include namespace nw { namespace io { NW_UT_RUNTIME_TYPEINFO_ROOT_DEFINITION( IOStream ); s32 IOStream::Read(void* /*buf*/, u32 /*length*/) { NW_ASSERTMSG( CanRead(), "Stream don't support READ function\n" ); return 0; } bool IOStream::ReadAsync( void* /*buf*/, u32 /*length*/, IOStreamCallback /*callback*/, void* /*arg*/) { NW_ASSERTMSG( CanRead(), "Stream don't support READ function\n" ); NW_ASSERTMSG( CanAsync(), "Stream don't support ASYNC function\n" ); return false; } s32 IOStream::Write(const void* /*buf*/, u32 /*length*/) { NW_ASSERTMSG( CanWrite(), "Stream don't support WRITE function\n" ); return 0; } bool IOStream::WriteAsync( const void* /*buf*/, u32 /*length*/, IOStreamCallback /*callback*/, void* /*arg*/) { NW_ASSERTMSG( CanWrite(), "Stream don't support WRITE function\n" ); NW_ASSERTMSG( CanAsync(), "Stream don't support ASYNC function\n" ); return false; } s32 IOStream::WaitAsync() const { NW_ASSERTMSG( CanAsync(), "Stream don't support ASYNC function\n" ); while ( IsBusy() ) {} return mAsyncResult; } bool IOStream::IsBusy() const { NW_ASSERTMSG( CanAsync(), "Stream don't support ASYNC function\n" ); return false; } } /* namespace io */ } /* namespace nw */