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 "../Exception.h"
|
|
|
|
|
#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
|
|
|
|
|
{
|
2010-12-27 01:01:25 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
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;
|
|
|
|
|
Exception* exc;
|
|
|
|
|
int _nbytes;
|
|
|
|
|
|
|
|
|
|
public:
|
2010-12-27 01:01:25 +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();
|
|
|
|
|
Exception* Exception_();
|
|
|
|
|
int NBytes();
|
|
|
|
|
bool Done;
|
|
|
|
|
|
2010-12-27 01:01:25 +00:00
|
|
|
|
StreamAsyncResult(Object* state);
|
|
|
|
|
StreamAsyncResult(const IAsyncResult* &obj);
|
|
|
|
|
StreamAsyncResult(const StreamAsyncResult &obj);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
|
|
void SetComplete(Exception* e);
|
|
|
|
|
void SetComplete(Exception* e, int nbytes);
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif //_SYSTEM_IO_STREAMASYNCRESULT_
|