FreeRDP
Loading...
Searching...
No Matches
WinPREvent Class Reference

Public Member Functions

 WinPREvent (bool initial=false)
 
 WinPREvent (const WinPREvent &other)=delete
 
 WinPREvent (WinPREvent &&other)=delete
 
WinPREventoperator= (const WinPREvent &other)=delete
 
WinPREventoperator= (WinPREvent &&other)=delete
 
void set ()
 
void clear ()
 
bool isSet () const
 
HANDLE handle () const
 

Detailed Description

Definition at line 27 of file sdl_common_utils.hpp.

Constructor & Destructor Documentation

◆ WinPREvent()

WinPREvent::WinPREvent ( bool  initial = false)
explicit

Definition at line 43 of file sdl_common_utils.cpp.

43 : _handle(CreateEventA(nullptr, TRUE, initial, nullptr))
44{
45}

◆ ~WinPREvent()

WinPREvent::~WinPREvent ( )

Definition at line 47 of file sdl_common_utils.cpp.

48{
49 (void)CloseHandle(_handle);
50}

Member Function Documentation

◆ clear()

void WinPREvent::clear ( )

Definition at line 57 of file sdl_common_utils.cpp.

58{
59 (void)ResetEvent(_handle);
60}

◆ handle()

HANDLE WinPREvent::handle ( ) const

Definition at line 67 of file sdl_common_utils.cpp.

68{
69 return _handle;
70}

◆ isSet()

bool WinPREvent::isSet ( ) const

Definition at line 62 of file sdl_common_utils.cpp.

63{
64 return WaitForSingleObject(_handle, 0) == WAIT_OBJECT_0;
65}

◆ set()

void WinPREvent::set ( )

Definition at line 52 of file sdl_common_utils.cpp.

53{
54 (void)SetEvent(_handle);
55}

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