/*---------------------------------------------------------------------------* Project: NintendoWare File: io_IOStream.cpp Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. 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. The content herein is highly confidential and should be handled accordingly. $Revision: 31311 $ *---------------------------------------------------------------------------*/ #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 */