diff options
author | aunsane <aunsane@gmail.com> | 2018-08-30 23:35:31 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-08-30 23:35:31 +0300 |
commit | c31a30a806845a930087834a9b9667abccba156f (patch) | |
tree | 37b5c05842d2b31749c3c802ab0d53c05d172272 /protocols/Tox/src/tox_proto.h | |
parent | 452dc9428a541f41542726c4bface33cd9c89df2 (diff) |
Tox: using timers instead of threads
Diffstat (limited to 'protocols/Tox/src/tox_proto.h')
-rw-r--r-- | protocols/Tox/src/tox_proto.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index 9ea063c4ab..c7c41174c2 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -60,7 +60,7 @@ public: static INT_PTR ParseToxUri(WPARAM, LPARAM lParam);
private:
- CToxThread *m_toxThread;
+ Tox *m_tox;
mir_cs m_profileLock;
ptrW m_accountName;
ptrW m_defaultGroup;
@@ -68,10 +68,10 @@ private: CTransferList transfers;
ULONG hMessageProcess;
- HANDLE hConnectingThread;
- HANDLE hCheckingThread;
- HANDLE hPollingThread;
- HANDLE hTerminateEvent;
+ int m_retriesCount;
+ HANDLE m_hTimerQueue;
+ HANDLE m_hPollingTimer;
+ HANDLE m_hCheckingTimer;
static HANDLE hProfileFolderPath;
@@ -108,11 +108,11 @@ private: // tox connection
bool IsOnline();
- void TryConnect(Tox *tox);
- void CheckConnection(Tox *tox, int &retriesCount);
+ void TryConnect();
+ void CheckConnection();
- void __cdecl CheckingThread(void*);
- void __cdecl PollingThread(void*);
+ static void __stdcall OnToxCheck(void*, BYTE);
+ static void __stdcall OnToxPoll(void*, BYTE);
// accounts
int __cdecl OnAccountRenamed(WPARAM, LPARAM);
|