foobar2000 SDK  2015-08-03
Public Member Functions | Private Member Functions | Private Attributes
foobar2000_io::abort_callback_impl

#include <abort_callback.h>

+ Inheritance diagram for foobar2000_io::abort_callback_impl:

Public Member Functions

 abort_callback_impl ()
 
void abort ()
 
abort_callback_event get_abort_event () const
 
bool is_aborting () const
 
void reset ()
 
void set ()
 
void set_state (bool p_state)
 
- Public Member Functions inherited from foobar2000_io::abort_callback
void check () const
 
void check_e () const
 
abort_callback_event get_handle () const
 
bool is_set () const
 
void sleep (double p_timeout_seconds) const
 
bool sleep_ex (double p_timeout_seconds) const
 
bool waitForEvent (pfc::eventHandle_t evtHandle, double timeOut)
 
bool waitForEvent (pfc::event &evt, double timeOut)
 

Private Member Functions

 abort_callback_impl (const abort_callback_impl &)
 
const abort_callback_imploperator= (const abort_callback_impl &)
 

Private Attributes

volatile bool m_aborting
 
pfc::event m_event
 

Additional Inherited Members

- Protected Member Functions inherited from foobar2000_io::abort_callback
 abort_callback ()
 
 ~abort_callback ()
 

Detailed Description

Implementation of abort_callback interface.

Definition at line 53 of file abort_callback.h.

Constructor & Destructor Documentation

foobar2000_io::abort_callback_impl::abort_callback_impl ( )
inline

Definition at line 55 of file abort_callback.h.

55 : m_aborting(false) {}
foobar2000_io::abort_callback_impl::abort_callback_impl ( const abort_callback_impl )
private

Member Function Documentation

void foobar2000_io::abort_callback_impl::abort ( )
inline

Definition at line 56 of file abort_callback.h.

56 {set_state(true);}
abort_callback_event foobar2000_io::abort_callback_impl::get_abort_event ( ) const
inlinevirtual

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.

Implements foobar2000_io::abort_callback.

Definition at line 64 of file abort_callback.h.

64 {return m_event.get_handle();}
HANDLE get_handle() const
Definition: event.h:10
bool foobar2000_io::abort_callback_impl::is_aborting ( ) const
inlinevirtual

Returns whether user has requested the operation to be aborted.

Implements foobar2000_io::abort_callback.

Definition at line 62 of file abort_callback.h.

62 {return m_aborting;}
const abort_callback_impl& foobar2000_io::abort_callback_impl::operator= ( const abort_callback_impl )
private
void foobar2000_io::abort_callback_impl::reset ( )
inline

Definition at line 58 of file abort_callback.h.

58 {set_state(false);}
void foobar2000_io::abort_callback_impl::set ( )
inline

Definition at line 57 of file abort_callback.h.

57 {set_state(true);}
void foobar2000_io::abort_callback_impl::set_state ( bool  p_state)
inline

Definition at line 60 of file abort_callback.h.

60 {m_aborting = p_state; m_event.set_state(p_state);}
void set_state(bool p_state)

Field Documentation

volatile bool foobar2000_io::abort_callback_impl::m_aborting
private

Definition at line 70 of file abort_callback.h.

pfc::event foobar2000_io::abort_callback_impl::m_event
private

Definition at line 71 of file abort_callback.h.


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