diff options
| -rw-r--r-- | include/m_utils.h | 14 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 2 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/skype_utils.h | 12 |
3 files changed, 15 insertions, 13 deletions
diff --git a/include/m_utils.h b/include/m_utils.h index e44a3609c6..d7dc704085 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -517,6 +517,20 @@ struct MIR_APP_EXPORT MAsyncObject : public MNonCopyable MIR_APP_DLL(void) Utils_InvokeAsync(MAsyncObject *pObj);
/////////////////////////////////////////////////////////////////////////////////////////
+
+class MEventHandle
+{
+ HANDLE _hEvent;
+public:
+ __inline explicit MEventHandle() { _hEvent = CreateEvent(NULL, 0, 0, NULL); }
+ __inline explicit MEventHandle(HANDLE hEvent) : _hEvent(hEvent) {}
+ __inline ~MEventHandle() { CloseHandle(_hEvent); }
+ __inline void Set() { SetEvent(_hEvent); }
+ __inline void Wait(uint32_t dwMilliseconds = INFINITE) { WaitForSingleObject(_hEvent, dwMilliseconds); }
+ __inline operator HANDLE() { return _hEvent; }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
// compatibility functions
#ifndef _WINDOWS
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 6cdf9fdde6..e81c733f31 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -202,7 +202,7 @@ private: bool m_isTerminated = true;
mir_cs m_requestQueueLock;
LIST<AsyncHttpRequest> m_requests;
- EventHandle m_hRequestQueueEvent;
+ MEventHandle m_hRequestQueueEvent;
HANDLE m_hRequestQueueThread;
void __cdecl WorkerThread(void *);
diff --git a/protocols/SkypeWeb/src/skype_utils.h b/protocols/SkypeWeb/src/skype_utils.h index ee80c82c8c..64b72124b3 100644 --- a/protocols/SkypeWeb/src/skype_utils.h +++ b/protocols/SkypeWeb/src/skype_utils.h @@ -38,18 +38,6 @@ int getMoodIndex(const char *pszMood); int64_t getRandomId();
CMStringA getMessageId(const JSONNode &node);
-class EventHandle
-{
- HANDLE _hEvent;
-public:
- __inline explicit EventHandle() { _hEvent = CreateEvent(NULL, 0, 0, NULL); }
- __inline explicit EventHandle(HANDLE hEvent) : _hEvent(hEvent) {}
- __inline ~EventHandle() { CloseHandle(_hEvent); }
- __inline void Set() { SetEvent(_hEvent); }
- __inline void Wait(uint32_t dwMilliseconds = INFINITE) { WaitForSingleObject(_hEvent, dwMilliseconds); }
- __inline operator HANDLE() { return _hEvent; }
-};
-
struct CFileUploadParam : public MZeroedObject
{
OBJLIST<wchar_t> arFileName;
|
