diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/Boltun/src | |
parent | 7193759b046338c6f47ff2edb34743a1465791cd (diff) |
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Boltun/src')
-rw-r--r-- | plugins/Boltun/src/Engine/TalkEngine.cpp | 8 | ||||
-rw-r--r-- | plugins/Boltun/src/Engine/TalkEngine.h | 8 | ||||
-rw-r--r-- | plugins/Boltun/src/actionQueue.cpp | 20 | ||||
-rw-r--r-- | plugins/Boltun/src/actionQueue.h | 4 | ||||
-rw-r--r-- | plugins/Boltun/src/boltun.cpp | 10 |
5 files changed, 25 insertions, 25 deletions
diff --git a/plugins/Boltun/src/Engine/TalkEngine.cpp b/plugins/Boltun/src/Engine/TalkEngine.cpp index d771012a5f..3fe283c64a 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.cpp +++ b/plugins/Boltun/src/Engine/TalkEngine.cpp @@ -76,7 +76,7 @@ TalkBot::TalkBot(const Mind& goodMind) :mind(goodMind), beSilent(false), makeLowercase(false),
understandAlways(false)
{
- contactDatas = new PerContactData<Mind, ContactData, HCONTACT>(mind);
+ contactDatas = new PerContactData<Mind, ContactData, MCONTACT>(mind);
}
TalkBot::~TalkBot()
@@ -84,7 +84,7 @@ TalkBot::~TalkBot() delete contactDatas;
}
-tstring TalkBot::GetInitMessage(HCONTACT contact)
+tstring TalkBot::GetInitMessage(MCONTACT contact)
{
ContactData* d = contactDatas->GetData(contact);
tstring s = d->initial.GetString();
@@ -272,7 +272,7 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact return tstring();
}
-TalkBot::MessageInfo* TalkBot::Reply(HCONTACT contact, tstring incomingMessage, bool saveChoice)
+TalkBot::MessageInfo* TalkBot::Reply(MCONTACT contact, tstring incomingMessage, bool saveChoice)
{
TCHAR* str = new TCHAR[incomingMessage.length()+1];
_tcscpy(str, incomingMessage.c_str());
@@ -370,7 +370,7 @@ bool TalkBot::FindExact(ContactData *contactData, const tstring &incomingMessage return true;
}
-void TalkBot::AnswerGiven(HCONTACT contact, const TalkBot::MessageInfo& info)
+void TalkBot::AnswerGiven(MCONTACT contact, const TalkBot::MessageInfo& info)
{
ContactData *contactData = contactDatas->GetData(contact);
RecordAnswer(contactData, info);
diff --git a/plugins/Boltun/src/Engine/TalkEngine.h b/plugins/Boltun/src/Engine/TalkEngine.h index 9701b09637..423d6a2666 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.h +++ b/plugins/Boltun/src/Engine/TalkEngine.h @@ -74,7 +74,7 @@ private: }
};
- PerContactData<Mind, ContactData, HCONTACT>* contactDatas;
+ PerContactData<Mind, ContactData, MCONTACT>* contactDatas;
const Mind mind;
bool beSilent;
bool makeLowercase;
@@ -103,9 +103,9 @@ public: void SetLowercase(const bool isLowercase);
void SetUnderstandAlways(const bool understandAlways);
//const MindData *GetData();
- std::tstring GetInitMessage(HCONTACT contact);
- MessageInfo* Reply(HCONTACT contact, const std::tstring incomingMessage, bool saveChoice);
- void AnswerGiven(HCONTACT contact, const MessageInfo &info);
+ std::tstring GetInitMessage(MCONTACT contact);
+ MessageInfo* Reply(MCONTACT contact, const std::tstring incomingMessage, bool saveChoice);
+ void AnswerGiven(MCONTACT contact, const MessageInfo &info);
};
#endif
diff --git a/plugins/Boltun/src/actionQueue.cpp b/plugins/Boltun/src/actionQueue.cpp index fab338a8dc..1c3bf5a25c 100644 --- a/plugins/Boltun/src/actionQueue.cpp +++ b/plugins/Boltun/src/actionQueue.cpp @@ -29,22 +29,22 @@ using namespace std; extern TalkBot* bot;
-typedef void (*ActionHandler)(HCONTACT hContact, const TalkBot::MessageInfo *inf);
+typedef void (*ActionHandler)(MCONTACT hContact, const TalkBot::MessageInfo *inf);
typedef struct _QueueElement {
- HCONTACT hContact;
+ MCONTACT hContact;
const TalkBot::MessageInfo *inf;
ActionHandler Handler;
bool Sticky;
int TimeOffset;
- _QueueElement(HCONTACT contact, ActionHandler handler, int timeOffset, const TalkBot::MessageInfo *info = NULL, bool sticky = false)
+ _QueueElement(MCONTACT contact, ActionHandler handler, int timeOffset, const TalkBot::MessageInfo *info = NULL, bool sticky = false)
:hContact(contact), Handler(handler), TimeOffset(timeOffset), inf(info), Sticky(sticky)
{
}
} QueueElement;
static list<QueueElement> actionQueue;
-static set<HCONTACT> typingContacts;
+static set<MCONTACT> typingContacts;
UINT_PTR timerID = 0;
CriticalSection cs;
@@ -72,7 +72,7 @@ void UpdateTimer() timerID = 0;
}
-static bool NotifyTyping(HCONTACT hContact)
+static bool NotifyTyping(MCONTACT hContact)
{
int res = db_get_b(hContact, "SRMsg", "SupportTyping", 2);
if (res == 2)
@@ -80,7 +80,7 @@ static bool NotifyTyping(HCONTACT hContact) return res != 0;
}
-static void TimerAnswer(HCONTACT hContact, const TalkBot::MessageInfo* info)
+static void TimerAnswer(MCONTACT hContact, const TalkBot::MessageInfo* info)
{
DBEVENTINFO ldbei;
int size = (int)info->Answer.length() + 1;
@@ -118,7 +118,7 @@ static void TimerAnswer(HCONTACT hContact, const TalkBot::MessageInfo* info) typingContactsLock.Leave();
}
-static void StartTyping(HCONTACT hContact, const TalkBot::MessageInfo*)
+static void StartTyping(MCONTACT hContact, const TalkBot::MessageInfo*)
{
CallService(MS_PROTO_SELFISTYPING, (WPARAM)hContact,
(LPARAM)PROTOTYPE_SELFTYPING_ON);
@@ -127,7 +127,7 @@ static void StartTyping(HCONTACT hContact, const TalkBot::MessageInfo*) typingContactsLock.Leave();
}
-void DoAnswer(HCONTACT hContact, const TalkBot::MessageInfo *info, bool sticky = false)
+void DoAnswer(MCONTACT hContact, const TalkBot::MessageInfo *info, bool sticky = false)
{
if (info->Answer[0] == _T('\0'))
return;
@@ -206,7 +206,7 @@ void DoAnswer(HCONTACT hContact, const TalkBot::MessageInfo *info, bool sticky = cs.Leave();
}
-void AnswerToContact(HCONTACT hContact, const TCHAR* messageToAnswer)
+void AnswerToContact(MCONTACT hContact, const TCHAR* messageToAnswer)
{
if (Config.TalkWarnContacts && db_get_b(hContact, BOLTUN_KEY,
DB_CONTACT_WARNED, FALSE) == FALSE)
@@ -218,7 +218,7 @@ void AnswerToContact(HCONTACT hContact, const TCHAR* messageToAnswer) DoAnswer(hContact, bot->Reply(hContact, messageToAnswer, false));
}
-void StartChatting(HCONTACT hContact)
+void StartChatting(MCONTACT 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 e8d62b8f6b..492bdcb24e 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(HCONTACT hContact, const TCHAR* messageToAnswer);
+void AnswerToContact(MCONTACT hContact, const TCHAR* messageToAnswer);
-void StartChatting(HCONTACT hContact);
+void StartChatting(MCONTACT 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 709e5b3a9f..bdea12d4d9 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(HCONTACT hContact)
+static bool BoltunAutoChat(MCONTACT hContact)
{
if (db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT
, FALSE) == TRUE)
@@ -212,7 +212,7 @@ static bool BoltunAutoChat(HCONTACT hContact) static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hDbEvent = (HANDLE)lParam;
if (!BoltunAutoChat(hContact))
return 0;
@@ -501,7 +501,7 @@ static int MessageOptInit(WPARAM wParam, LPARAM lParam) static int ContactClick(WPARAM wParam, LPARAM lParam, BOOL clickNotToChat)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)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);
@@ -545,7 +545,7 @@ static INT_PTR ContactClickNotToChat(WPARAM wParam, LPARAM lParam) static INT_PTR ContactClickStartChatting(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
StartChatting(hContact);
return 0;
}
@@ -554,7 +554,7 @@ static int MessagePrebuild(WPARAM wParam, LPARAM lParam) {
CLISTMENUITEM clmi = { sizeof(clmi) };
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!blInit || (db_get_b(hContact,"CList","NotOnList",0) == 1))
{
clmi.flags = CMIM_FLAGS | CMIF_GRAYED;
|