foobar2000_io::abort_callback Class Reference

#include <abort_callback.h>

Inheritance diagram for foobar2000_io::abort_callback:

foobar2000_io::abort_callback_impl foobar2000_io::archive_callback

List of all members.

Public Member Functions

virtual bool is_aborting () const =0
 Returns whether user has requested the operation to be aborted.
virtual abort_callback_event get_abort_event () const =0
void check () const
 Checks if user has requested the operation to be aborted, and throws exception_aborted if so.
void check_e () const
 For compatibility with old code. Do not call.
void sleep (double p_timeout_seconds) const
 Sleeps p_timeout_seconds or less when aborted, throws exception_aborted on abort.
bool sleep_ex (double p_timeout_seconds) const
 Sleeps p_timeout_seconds or less when aborted, returns true when execution should continue, false when not.

Protected Member Functions

 abort_callback ()
 ~abort_callback ()


Detailed Description

This class is used to signal underlying worker code whether user has decided to abort a potentially time-consuming operation. It is commonly required by all file related operations. Code that receives an abort_callback object should periodically check it and abort any operations being performed if it is signaled, typically throwing exception_aborted.
See abort_callback_impl for an implementation.

Constructor & Destructor Documentation

foobar2000_io::abort_callback::abort_callback (  )  [inline, protected]

foobar2000_io::abort_callback::~abort_callback (  )  [inline, protected]


Member Function Documentation

virtual bool foobar2000_io::abort_callback::is_aborting (  )  const [pure virtual]

Returns whether user has requested the operation to be aborted.

Implemented in foobar2000_io::abort_callback_impl.

virtual abort_callback_event foobar2000_io::abort_callback::get_abort_event (  )  const [pure virtual]

Retrieves event object that can be used with some OS calls. The even object becomes signaled when abort is triggered. On win32, this is equivalent to win32 event handle (see: CreateEvent).
You must not close this handle or call any methods that change this handle's state (SetEvent() or ResetEvent()), you can only wait for it.

Implemented in foobar2000_io::abort_callback_impl.

void foobar2000_io::abort_callback::check (  )  const

Checks if user has requested the operation to be aborted, and throws exception_aborted if so.

void foobar2000_io::abort_callback::check_e (  )  const [inline]

For compatibility with old code. Do not call.

void foobar2000_io::abort_callback::sleep ( double  p_timeout_seconds  )  const

Sleeps p_timeout_seconds or less when aborted, throws exception_aborted on abort.

bool foobar2000_io::abort_callback::sleep_ex ( double  p_timeout_seconds  )  const

Sleeps p_timeout_seconds or less when aborted, returns true when execution should continue, false when not.


The documentation for this class was generated from the following file:

Generated on Thu Aug 28 21:16:04 2008 for foobar2000 SDK by  doxygen 1.5.5