diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
commit | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch) | |
tree | 5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/Spamotron | |
parent | c39340bf493a1745a41317bbf937fc7eb6cbb26a (diff) |
- 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
Diffstat (limited to 'plugins/Spamotron')
-rw-r--r-- | plugins/Spamotron/src/bayes.cpp | 4 | ||||
-rw-r--r-- | plugins/Spamotron/src/common.h | 12 | ||||
-rw-r--r-- | plugins/Spamotron/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/Spamotron/src/popups.cpp | 2 | ||||
-rw-r--r-- | plugins/Spamotron/src/spamotron.cpp | 6 | ||||
-rw-r--r-- | plugins/Spamotron/src/utils.cpp | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/plugins/Spamotron/src/bayes.cpp b/plugins/Spamotron/src/bayes.cpp index 8a00005150..9df33ba9a1 100644 --- a/plugins/Spamotron/src/bayes.cpp +++ b/plugins/Spamotron/src/bayes.cpp @@ -221,7 +221,7 @@ double get_msg_score(TCHAR *msg) return tmp1 / (tmp1 + tmp2);
}
-void queue_message(HANDLE hContact, DWORD msgtime, TCHAR *message)
+void queue_message(HCONTACT hContact, DWORD msgtime, TCHAR *message)
{
char *tmp;
sqlite3_stmt *stmt;
@@ -245,7 +245,7 @@ void queue_message(HANDLE hContact, DWORD msgtime, TCHAR *message) sqlite3_finalize(stmt);
}
-void bayes_approve_contact(HANDLE hContact)
+void bayes_approve_contact(HCONTACT hContact)
{
const char *message;
TCHAR *messageW;
diff --git a/plugins/Spamotron/src/common.h b/plugins/Spamotron/src/common.h index e8d0903b13..2e9501c0ff 100644 --- a/plugins/Spamotron/src/common.h +++ b/plugins/Spamotron/src/common.h @@ -42,7 +42,7 @@ #define _getOptD(a,b) _getCOptD(NULL, a, b)
#define _setOptD(a,b) _setCOptD(NULL, a, b)
-TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, HANDLE hContact, const char* option, const TCHAR *def);
+TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, HCONTACT hContact, const char* option, const TCHAR *def);
#define _getOptS(a,b,c,d) _getCOptS(a, b, NULL, c, d)
#define _setCOptTS(a,b,c) db_set_ts(a, PLUGIN_NAME, b, c)
#define _setCOptS(a,b,c) db_set_s(a, PLUGIN_NAME, b, c)
@@ -105,11 +105,11 @@ BOOL _isvalidregex(TCHAR* strSearch); BOOL _regmatch(TCHAR* str, TCHAR* strSearch);
BOOL Contains(TCHAR* dst, TCHAR* src);
BOOL isOneDay(DWORD timestamp1, DWORD timestamp2);
-void MarkUnread(HANDLE hContact);
+void MarkUnread(HCONTACT hContact);
-int ShowPopup(HANDLE hContact, BYTE popupType, TCHAR *line1, TCHAR *line2);
+int ShowPopup(HCONTACT hContact, BYTE popupType, TCHAR *line1, TCHAR *line2);
int ShowPopupPreview(HWND optDlg, BYTE popupType, TCHAR *line1, TCHAR *line2);
-int _notify(HANDLE hContact, BYTE type, TCHAR *message, TCHAR *origmessage);
+int _notify(HCONTACT hContact, BYTE type, TCHAR *message, TCHAR *origmessage);
int LogToSystemHistory(char *message, char *origmessage);
#define POPUP_DEFAULT 0
#define POPUP_BLOCKED 1
@@ -151,8 +151,8 @@ void learn_spam(TCHAR *msg); int get_token_count(int type);
int get_msg_count(int type);
double get_msg_score(TCHAR *msg);
-void queue_message(HANDLE hContact, DWORD msgtime, TCHAR *message);
-void bayes_approve_contact(HANDLE hContact);
+void queue_message(HCONTACT hContact, DWORD msgtime, TCHAR *message);
+void bayes_approve_contact(HCONTACT hContact);
void dequeue_messages();
#ifdef _DEBUG
diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index a2e4e3e0b3..7a3cdf0672 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -2,7 +2,7 @@ TCHAR currentResponse[256] = {0};
-TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, HANDLE hContact, const char* option, const TCHAR *def)
+TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, HCONTACT hContact, const char* option, const TCHAR *def)
{
DBVARIANT dbv = {0};
_tcsnset(buf, 0, buflen);
diff --git a/plugins/Spamotron/src/popups.cpp b/plugins/Spamotron/src/popups.cpp index 585f36170c..ee11962bed 100644 --- a/plugins/Spamotron/src/popups.cpp +++ b/plugins/Spamotron/src/popups.cpp @@ -192,7 +192,7 @@ int ShowPopupPreview(HWND optDlg, BYTE popupType, TCHAR *line1, TCHAR *line2) }
-int ShowPopup(HANDLE hContact, BYTE popupType, TCHAR *line1, TCHAR *line2)
+int ShowPopup(HCONTACT hContact, BYTE popupType, TCHAR *line1, TCHAR *line2)
{
POPUPDATAT ppdp = {0};
switch (popupType)
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index 78b95f6e8e..0c79c8b958 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -50,7 +50,7 @@ int OnDBEventAdded(WPARAM wParam, LPARAM lParam) int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
DBEVENTINFO *dbei = (DBEVENTINFO *)lParam;
char *msgblob;
POPUPDATA ppdp = {0};
@@ -68,7 +68,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) // get hContact from DBEVENTINFO as icq_proto.c doesn't pass hContact the usual way for some reason.
if (dbei->eventType == EVENTTYPE_AUTHREQUEST)
- hContact = *((PHANDLE)(dbei->pBlob+sizeof(DWORD)));
+ hContact = (HCONTACT)*(PDWORD(dbei->pBlob+sizeof(DWORD)));
// get maximum length of the message a protocol supports
maxmsglen = CallProtoService(dbei->szModule, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)hContact);
@@ -524,7 +524,7 @@ void RemoveNotOnListSettings() {
DBVARIANT dbv;
char protoName[256] = {0};
- HANDLE hContact = db_find_first();
+ HCONTACT hContact = db_find_first();
strcpy(protoName, "proto_");
while (hContact != NULL) {
if (db_get_s(hContact, "Protocol", "p", &dbv) == 0) {
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp index 5f930e47bd..4858ee2297 100644 --- a/plugins/Spamotron/src/utils.cpp +++ b/plugins/Spamotron/src/utils.cpp @@ -433,7 +433,7 @@ TCHAR* ReplaceVarsNum(TCHAR *dst, unsigned int len, int num) return dst;
}
-int _notify(HANDLE hContact, BYTE type, TCHAR *message, TCHAR *origmessage)
+int _notify(HCONTACT hContact, BYTE type, TCHAR *message, TCHAR *origmessage)
{
char *tmp, *tmporig;
TCHAR msg[MAX_BUFFER_LENGTH];
@@ -484,7 +484,7 @@ int LogToSystemHistory(char *message, char *origmessage) return 0;
}
-void MarkUnread(HANDLE hContact)
+void MarkUnread(HCONTACT hContact)
{
// We're not actually marking anything. We just pushing saved events to the database from a temporary location
DBVARIANT _dbv = {0};
|