summaryrefslogtreecommitdiff
path: root/source/api_wrappers/linux/CEventObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/api_wrappers/linux/CEventObject.h')
-rw-r--r--source/api_wrappers/linux/CEventObject.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/source/api_wrappers/linux/CEventObject.h b/source/api_wrappers/linux/CEventObject.h
new file mode 100644
index 0000000..9c86087
--- /dev/null
+++ b/source/api_wrappers/linux/CEventObject.h
@@ -0,0 +1,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 */
+