summaryrefslogtreecommitdiff
path: root/plugins/YahooGroups
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/YahooGroups
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (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/YahooGroups')
-rw-r--r--plugins/YahooGroups/src/services.cpp12
-rw-r--r--plugins/YahooGroups/src/utils.cpp14
-rw-r--r--plugins/YahooGroups/src/utils.h12
3 files changed, 18 insertions, 20 deletions
diff --git a/plugins/YahooGroups/src/services.cpp b/plugins/YahooGroups/src/services.cpp
index e5c1175db4..104ce5a949 100644
--- a/plugins/YahooGroups/src/services.cpp
+++ b/plugins/YahooGroups/src/services.cpp
@@ -106,7 +106,7 @@ void AddNewGroup(char *newGroup)
availableGroups.Add(_strdup(group + 1));
}
-void AddContactToGroup(HANDLE hContact, char *group)
+void AddContactToGroup(HCONTACT hContact, char *group)
{
const int MAX_SIZE = 1024;
wchar_t wide[MAX_SIZE] = {0};
@@ -159,13 +159,13 @@ void CreateGroup(char *group)
}
}
-void ProcessContacts(void (*callback)(HANDLE, char *), char *protocol)
+void ProcessContacts(void (*callback)(HCONTACT, char *), char *protocol)
{
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
callback(hContact, protocol);
}
-void YahooMoveCallback(HANDLE hContact, char *unused)
+void YahooMoveCallback(HCONTACT hContact, char *unused)
{
char protocol[128] = {0};
GetContactProtocol(hContact, protocol, sizeof(protocol));
@@ -182,7 +182,7 @@ void YahooMoveCallback(HANDLE hContact, char *unused)
}
}
-void ResetGroupCallback(HANDLE hContact, char *protocol)
+void ResetGroupCallback(HCONTACT hContact, char *protocol)
{
char p[128] = {0};
@@ -197,13 +197,11 @@ void ResetGroupCallback(HANDLE hContact, char *protocol)
INT_PTR YahooGroupsMoveService(WPARAM wParam, LPARAM lParam)
{
ProcessContacts(YahooMoveCallback, NULL);
-
return 0;
}
INT_PTR YahooGroupsResetService(WPARAM wParam, LPARAM lParam)
{
ProcessContacts(ResetGroupCallback, NULL);
-
return 0;
}
diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp
index 2c2c761d9b..4274f8c38a 100644
--- a/plugins/YahooGroups/src/utils.cpp
+++ b/plugins/YahooGroups/src/utils.cpp
@@ -132,7 +132,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData)
i = size;
}
-int GetStringFromDatabase(HANDLE hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size)
+int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -163,7 +163,7 @@ int GetStringFromDatabase(HANDLE hContact, char *szModule, char *szSettingName,
return res;
}
-int GetStringFromDatabase(HANDLE hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count)
+int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -204,7 +204,7 @@ int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult,
return GetStringFromDatabase(NULL, ModuleName, szSettingName, szError, szResult, count);
}
-TCHAR *GetContactName(HANDLE hContact, char *szProto)
+TCHAR *GetContactName(HCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo;
char proto[200];
@@ -240,12 +240,12 @@ TCHAR *GetContactName(HANDLE hContact, char *szProto)
return buffer;
}
-void GetContactProtocol(HANDLE hContact, char *szProto, int size)
+void GetContactProtocol(HCONTACT hContact, char *szProto, int size)
{
GetStringFromDatabase(hContact, "Protocol", "p", NULL, szProto, size);
}
-TCHAR *GetContactID(HANDLE hContact)
+TCHAR *GetContactID(HCONTACT hContact)
{
char protocol[256];
GetContactProtocol(hContact, protocol, sizeof(protocol));
@@ -253,7 +253,7 @@ TCHAR *GetContactID(HANDLE hContact)
return GetContactID(hContact, protocol);
}
-TCHAR *GetContactID(HANDLE hContact, char *szProto)
+TCHAR *GetContactID(HCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo;
@@ -322,7 +322,7 @@ HANDLE GetContactFromID(TCHAR *szID, char *szProto)
TCHAR *tmp;
int found = 0;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
GetContactProtocol(hContact, cProtocol, sizeof(cProtocol));
szHandle = GetContactID(hContact, cProtocol);
diff --git a/plugins/YahooGroups/src/utils.h b/plugins/YahooGroups/src/utils.h
index 9133633caf..c3dc480dfa 100644
--- a/plugins/YahooGroups/src/utils.h
+++ b/plugins/YahooGroups/src/utils.h
@@ -44,17 +44,17 @@ void ScreenToClient(HWND hWnd, LPRECT rect);
void AnchorMoveWindow(HWND window, const WINDOWPOS *parentPos, int anchors);
RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int anchors);
-int GetStringFromDatabase(HANDLE hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size);
-int GetStringFromDatabase(HANDLE hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count);
+int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size);
+int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count);
int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, int size);
int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, int count);
-TCHAR *GetContactName(HANDLE hContact, char *szProto);
-TCHAR *GetContactID(HANDLE hContact);
-TCHAR *GetContactID(HANDLE hContact, char *szProto);
+TCHAR *GetContactName(HCONTACT hContact, char *szProto);
+TCHAR *GetContactID(HCONTACT hContact);
+TCHAR *GetContactID(HCONTACT hContact, char *szProto);
HANDLE GetContactFromID(TCHAR *szID, char *szProto);
HANDLE GetContactFromID(TCHAR *szID, wchar_t *szProto);
-void GetContactProtocol(HANDLE hContact, char *szProto, int size);
+void GetContactProtocol(HCONTACT hContact, char *szProto, int size);
int MyPUShowMessage(char *lpzText, BYTE kind);