diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-10 07:46:53 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-10 07:46:53 +0000 |
commit | f90be5cdeec5875d1022e1ef35f5b101bd76ac84 (patch) | |
tree | 59e5e8bf3b6a87dbee148bd63f841a8a62daac5f /protocols/AimOscar | |
parent | ed10055737300c07e485eb22b27ccf92ffadab7c (diff) |
service call replaced with the direct function call
git-svn-id: http://svn.miranda-ng.org/main/trunk@1857 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar')
-rw-r--r-- | protocols/AimOscar/theme.cpp | 16 | ||||
-rw-r--r-- | protocols/AimOscar/utility.cpp | 24 |
2 files changed, 20 insertions, 20 deletions
diff --git a/protocols/AimOscar/theme.cpp b/protocols/AimOscar/theme.cpp index 9217c68d1c..085c7335d7 100644 --- a/protocols/AimOscar/theme.cpp +++ b/protocols/AimOscar/theme.cpp @@ -283,13 +283,13 @@ void remove_AT_icons(CAimProto* ppro) {
if (!ServiceExists(MS_CLIST_EXTRA_ADD_ICON)) return;
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
if (ppro->is_my_contact(hContact) && !ppro->getByte(hContact, "ChatRoom", 0))
clear_AT_icon(hContact);
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
}
@@ -297,36 +297,36 @@ void remove_ES_icons(CAimProto* ppro) {
if (!ServiceExists(MS_CLIST_EXTRA_ADD_ICON)) return;
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
if (ppro->is_my_contact(hContact) && !ppro->getByte(hContact, "ChatRoom", 0))
clear_ES_icon(hContact);
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
}
void add_AT_icons(CAimProto* ppro)
{
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
if (ppro->is_my_contact(hContact))
set_AT_icon(ppro, hContact);
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
}
void add_ES_icons(CAimProto* ppro)
{
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
if (ppro->is_my_contact(hContact))
set_ES_icon(ppro, hContact);
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
}
diff --git a/protocols/AimOscar/utility.cpp b/protocols/AimOscar/utility.cpp index b1a2709d74..4c487cf818 100644 --- a/protocols/AimOscar/utility.cpp +++ b/protocols/AimOscar/utility.cpp @@ -169,7 +169,7 @@ bool CAimProto::is_my_contact(HANDLE hContact) HANDLE CAimProto::find_chat_contact(const char* room)
{
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
if (is_my_contact(hContact))
@@ -182,7 +182,7 @@ HANDLE CAimProto::find_chat_contact(const char* room) if (found) return hContact;
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
return NULL;
}
@@ -191,7 +191,7 @@ HANDLE CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool tempora {
char* norm_sn = normalize_name(sn);
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
if (is_my_contact(hContact))
@@ -208,7 +208,7 @@ HANDLE CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool tempora }
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
if (addIfNeeded)
@@ -341,12 +341,12 @@ void CAimProto::offline_contact(HANDLE hContact, bool remove_settings) void CAimProto::offline_contacts(void)
{
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
if (is_my_contact(hContact))
offline_contact(hContact,true);
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
allow_list.destroy();
block_list.destroy();
@@ -410,7 +410,7 @@ unsigned short CAimProto::search_for_free_item_id(HANDLE hbuddy)//returns a free retry:
id = get_random();
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
if (is_my_contact(hContact))
@@ -423,7 +423,7 @@ retry: if (item_id == id) goto retry; //found one no need to look through anymore
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
setBuddyId(hbuddy, 1, id);
@@ -436,7 +436,7 @@ unsigned short* CAimProto::get_members_of_group(unsigned short group_id, unsigne unsigned short* list = NULL;
size = 0;
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
if (is_my_contact(hContact))
@@ -457,14 +457,14 @@ unsigned short* CAimProto::get_members_of_group(unsigned short group_id, unsigne }
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
return list;
}
void CAimProto::upload_nicks(void)
{
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
DBVARIANT dbv;
@@ -473,7 +473,7 @@ void CAimProto::upload_nicks(void) set_local_nick(hContact, dbv.pszVal, NULL);
DBFreeVariant(&dbv);
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
}
|