summaryrefslogtreecommitdiff
path: root/source/api_wrappers/linux/CEventObject.h
blob: 987b33ed2911930f2c7e3c0b19f28728d57b0557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*******************************************************************************
*
*  File name: CEventObjectObject.h
*  Language: Visual C++
*  Description: CEventObjectObject class declarations
*
*
* Copyright (C) ST-Ericsson SA 2011
* License terms: 3-clause BSD license
*
*******************************************************************************/

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//

#ifndef _CEVENTOBJECT_H
#define _CEVENTOBJECT_H

#include <semaphore.h>

#include "Types.h"
#include "CWaitableObject.h"

//class used to wrap the OS methods for even signaling
//implements Wait() method used when waiting for event to occur

class CEventObject : public CWaitableObject
{
public:
    CEventObject();
    virtual ~CEventObject();
    void SetEvent();
    void UnsetEvent();
    DWORD Wait(DWORD dwTimeout = INFINITE);
private:
    sem_t *m_sem;
};

#endif /* _CEVENTOBJECT_H */