2010-12-04 16:14:34 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* StreamAsyncResult.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX StreamAsyncResult definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
|
|
|
|
#ifndef _SYSTEM_IO_STREAMASYNCRESULT_
|
|
|
|
|
#define _SYSTEM_IO_STREAMASYNCRESULT_
|
|
|
|
|
|
|
|
|
|
#include "../Interfaces.h"
|
2011-06-09 12:57:16 +00:00
|
|
|
|
#include "../Object.h"
|
2010-12-04 16:14:34 +00:00
|
|
|
|
#include "../Types.h"
|
|
|
|
|
#include "../Threading/WaitHandle.h"
|
|
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
|
{
|
|
|
|
|
namespace IO
|
|
|
|
|
{
|
2011-11-07 01:29:50 +00:00
|
|
|
|
//
|
2011-06-09 12:57:16 +00:00
|
|
|
|
class StreamAsyncResult : public IAsyncResult, virtual Object
|
2010-12-04 16:14:34 +00:00
|
|
|
|
{
|
2010-12-27 01:01:25 +00:00
|
|
|
|
Object* _state;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
bool completed;
|
|
|
|
|
bool done;
|
2011-11-07 01:29:50 +00:00
|
|
|
|
//Exception* exc;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
int _nbytes;
|
|
|
|
|
|
|
|
|
|
public:
|
2011-11-07 01:29:50 +00:00
|
|
|
|
Object* AsyncState();
|
2011-06-09 12:57:16 +00:00
|
|
|
|
Threading::WaitHandle* AsyncWaitHandle();
|
2010-12-04 16:14:34 +00:00
|
|
|
|
virtual bool CompletedSynchronously();
|
|
|
|
|
bool IsCompleted();
|
2011-11-07 01:29:50 +00:00
|
|
|
|
//Exception* getException();
|
2010-12-04 16:14:34 +00:00
|
|
|
|
int NBytes();
|
|
|
|
|
bool Done;
|
|
|
|
|
|
2010-12-27 01:01:25 +00:00
|
|
|
|
StreamAsyncResult(Object* state);
|
2011-11-07 01:29:50 +00:00
|
|
|
|
StreamAsyncResult(const IAsyncResult &obj);
|
2010-12-27 01:01:25 +00:00
|
|
|
|
StreamAsyncResult(const StreamAsyncResult &obj);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
//void SetComplete(Exception* e);
|
|
|
|
|
//void SetComplete(Exception* e, int nbytes);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif //_SYSTEM_IO_STREAMASYNCRESULT_
|