From ddba4ede6b451d0cfcd0d32b5180fbd0689966bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:04:30 +0000 Subject: - HANDLE hContact => HCONTACT - GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Boltun/src/actionQueue.cpp | 18 +++++++++--------- plugins/Boltun/src/actionQueue.h | 4 ++-- plugins/Boltun/src/boltun.cpp | 11 ++++++----- 3 files changed, 17 insertions(+), 16 deletions(-) (limited to 'plugins/Boltun/src') diff --git a/plugins/Boltun/src/actionQueue.cpp b/plugins/Boltun/src/actionQueue.cpp index 3514ae994b..3f0fead59b 100644 --- a/plugins/Boltun/src/actionQueue.cpp +++ b/plugins/Boltun/src/actionQueue.cpp @@ -29,15 +29,15 @@ using namespace std; extern TalkBot* bot; -typedef void (*ActionHandler)(HANDLE hContact, const TalkBot::MessageInfo *inf); +typedef void (*ActionHandler)(HCONTACT hContact, const TalkBot::MessageInfo *inf); typedef struct _QueueElement { - HANDLE hContact; + HCONTACT hContact; const TalkBot::MessageInfo *inf; ActionHandler Handler; bool Sticky; int TimeOffset; - _QueueElement(HANDLE contact, ActionHandler handler, int timeOffset, const TalkBot::MessageInfo *info = NULL, bool sticky = false) + _QueueElement(HCONTACT contact, ActionHandler handler, int timeOffset, const TalkBot::MessageInfo *info = NULL, bool sticky = false) :hContact(contact), Handler(handler), TimeOffset(timeOffset), inf(info), Sticky(sticky) { } @@ -72,7 +72,7 @@ void UpdateTimer() timerID = 0; } -static bool NotifyTyping(HANDLE hContact) +static bool NotifyTyping(HCONTACT hContact) { int res = db_get_b(hContact, "SRMsg", "SupportTyping", 2); if (res == 2) @@ -80,7 +80,7 @@ static bool NotifyTyping(HANDLE hContact) return res != 0; } -static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info) +static void TimerAnswer(HCONTACT hContact, const TalkBot::MessageInfo* info) { DBEVENTINFO ldbei; int size = (int)info->Answer.length() + 1; @@ -118,7 +118,7 @@ static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info) typingContactsLock.Leave(); } -static void StartTyping(HANDLE hContact, const TalkBot::MessageInfo*) +static void StartTyping(HCONTACT hContact, const TalkBot::MessageInfo*) { CallService(MS_PROTO_SELFISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_SELFTYPING_ON); @@ -127,7 +127,7 @@ static void StartTyping(HANDLE hContact, const TalkBot::MessageInfo*) typingContactsLock.Leave(); } -void DoAnswer(HANDLE hContact, const TalkBot::MessageInfo *info, bool sticky = false) +void DoAnswer(HCONTACT hContact, const TalkBot::MessageInfo *info, bool sticky = false) { if (info->Answer[0] == _T('\0')) return; @@ -206,7 +206,7 @@ void DoAnswer(HANDLE hContact, const TalkBot::MessageInfo *info, bool sticky = f cs.Leave(); } -void AnswerToContact(HANDLE hContact, const TCHAR* messageToAnswer) +void AnswerToContact(HCONTACT hContact, const TCHAR* messageToAnswer) { if (Config.TalkWarnContacts && db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_WARNED, FALSE) == FALSE) @@ -218,7 +218,7 @@ void AnswerToContact(HANDLE hContact, const TCHAR* messageToAnswer) DoAnswer(hContact, bot->Reply(hContact, messageToAnswer, false)); } -void StartChatting(HANDLE hContact) +void StartChatting(HCONTACT hContact) { DoAnswer(hContact, new TalkBot::MessageInfo(bot->GetInitMessage(hContact)), true); } diff --git a/plugins/Boltun/src/actionQueue.h b/plugins/Boltun/src/actionQueue.h index 780bbde97a..e8d62b8f6b 100644 --- a/plugins/Boltun/src/actionQueue.h +++ b/plugins/Boltun/src/actionQueue.h @@ -21,8 +21,8 @@ #ifndef ACTIONQUEUE_H #define ACTIONQUEUE_H -void AnswerToContact(HANDLE hContact, const TCHAR* messageToAnswer); +void AnswerToContact(HCONTACT hContact, const TCHAR* messageToAnswer); -void StartChatting(HANDLE hContact); +void StartChatting(HCONTACT hContact); #endif /* ACTIONQUEUE_H */ \ No newline at end of file diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 26a370b50e..709e5b3a9f 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -178,7 +178,7 @@ static bool LoadMind(const TCHAR* filename, int &line) return true; }*/ -static bool BoltunAutoChat(HANDLE hContact) +static bool BoltunAutoChat(HCONTACT hContact) { if (db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT , FALSE) == TRUE) @@ -212,7 +212,8 @@ static bool BoltunAutoChat(HANDLE hContact) static int MessageEventAdded(WPARAM wParam, LPARAM lParam) { - HANDLE hContact = (HANDLE)wParam, hDbEvent = (HANDLE)lParam; + HCONTACT hContact = (HCONTACT)wParam; + HANDLE hDbEvent = (HANDLE)lParam; if (!BoltunAutoChat(hContact)) return 0; @@ -500,7 +501,7 @@ static int MessageOptInit(WPARAM wParam, LPARAM lParam) static int ContactClick(WPARAM wParam, LPARAM lParam, BOOL clickNotToChat) { - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; BOOL boltunautochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_AUTO_CHAT, FALSE); BOOL boltunnottochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT, FALSE); @@ -544,7 +545,7 @@ static INT_PTR ContactClickNotToChat(WPARAM wParam, LPARAM lParam) static INT_PTR ContactClickStartChatting(WPARAM wParam, LPARAM lParam) { - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; StartChatting(hContact); return 0; } @@ -553,7 +554,7 @@ static int MessagePrebuild(WPARAM wParam, LPARAM lParam) { CLISTMENUITEM clmi = { sizeof(clmi) }; - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; if (!blInit || (db_get_b(hContact,"CList","NotOnList",0) == 1)) { clmi.flags = CMIM_FLAGS | CMIF_GRAYED; -- cgit v1.2.3