EasyUSB::IEndpoint Class Reference

Interface class for asynchronous callbacks. More...


Public Member Functions

 IEndpoint ()
 Default constructor.
virtual bool OnIOCancelled (AsyncIO *pAIO)
 Called if an asynchronous IO was cancelled.
virtual bool OnIOCompleted (AsyncIO *pAIO)
 Called if an asynchronous IO completed.
virtual bool OnIOFailed (AsyncIO *pAIO)
 Called if an asynchronous IO failed.
virtual bool OnIOSuccess (AsyncIO *pAIO)
 Called if an asynchronous IO completed successfully.
virtual bool OnIOTimedOut (AsyncIO *pAIO)
 Called if an asynchronous IO times out.
 ~IEndpoint ()
 Default destructor.

Protected Member Functions

Endpoint *const GetEndpoint ()
 Gets the endpoint this interface is assigned to.


Detailed Description

Interface class for asynchronous callbacks.

Do NEVER delete the AsyncIO objects passed to you in callback functions. Use a return value of false to indicate the API that it should delete the object after all callbacks completed. Functions which are not overloaded will always return true to keep the AsyncIO object alive. The return value has no effect if AsyncIO::Flags::FIRE_AND_FORGET is set. In this case the object is always deleted.


Constructor & Destructor Documentation

EasyUSB::IEndpoint::IEndpoint (  ) 

Default constructor.

EasyUSB::IEndpoint::~IEndpoint (  ) 

Default destructor.


Member Function Documentation

Endpoint* const EasyUSB::IEndpoint::GetEndpoint (  )  [inline, protected]

Gets the endpoint this interface is assigned to.

Returns:
Constant pointer to the endpoint.

virtual bool EasyUSB::IEndpoint::OnIOCancelled ( AsyncIO pAIO  )  [inline, virtual]

Called if an asynchronous IO was cancelled.

Parameters:
pAIO A pointer to the AsyncIO.
Note:
This may occur if the device was unplugged, while the transfer was in progress or if you call Endpoint::Flush().

virtual bool EasyUSB::IEndpoint::OnIOCompleted ( AsyncIO pAIO  )  [inline, virtual]

Called if an asynchronous IO completed.

Parameters:
pAIO A pointer to the completed AsyncIO.
Note:
This functions gets always called, independent of the successful or errornous completion.

virtual bool EasyUSB::IEndpoint::OnIOFailed ( AsyncIO pAIO  )  [inline, virtual]

Called if an asynchronous IO failed.

Parameters:
pAIO A pointer to the AsyncIO.
Note:
This usually means, that the device was lost.

virtual bool EasyUSB::IEndpoint::OnIOSuccess ( AsyncIO pAIO  )  [inline, virtual]

Called if an asynchronous IO completed successfully.

Parameters:
pAIO A pointer to the AsynciO.

virtual bool EasyUSB::IEndpoint::OnIOTimedOut ( AsyncIO pAIO  )  [inline, virtual]

Called if an asynchronous IO times out.

Parameters:
pAIO A pointer to the AsyncIO.


Generated on Tue Nov 4 22:13:26 2008 for EasyUSB Connect by  doxygen 1.5.6