summaryrefslogtreecommitdiff
path: root/protocols/NewsAggregator
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/NewsAggregator')
-rw-r--r--protocols/NewsAggregator/Src/Options.cpp12
-rw-r--r--protocols/NewsAggregator/Src/Services.cpp12
-rw-r--r--protocols/NewsAggregator/Src/Update.cpp4
-rw-r--r--protocols/NewsAggregator/Src/Utils.cpp4
4 files changed, 16 insertions, 16 deletions
diff --git a/protocols/NewsAggregator/Src/Options.cpp b/protocols/NewsAggregator/Src/Options.cpp
index 21285a32c1..4869867d9a 100644
--- a/protocols/NewsAggregator/Src/Options.cpp
+++ b/protocols/NewsAggregator/Src/Options.cpp
@@ -162,7 +162,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, EM_LIMITTEXT, 3, 0);
SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999);
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact != NULL)
{
if (IsMyContact(hContact))
@@ -214,7 +214,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
DBFreeVariant(&dbNick);
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
WindowList_Add(hChangeFeedDlgList,hwndDlg,hContact);
Utils_RestoreWindowPositionNoSize(hwndDlg,hContact,MODULE,"ChangeDlg");
@@ -547,7 +547,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
ListView_GetItemText(hwndList, sel, 0, nick, MAX_PATH);
ListView_GetItemText(hwndList, sel, 1, url, MAX_PATH);
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact != NULL)
{
if(IsMyContact(hContact))
@@ -572,7 +572,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
}
DBFreeVariant(&dbNick);
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
}
return FALSE;
@@ -587,7 +587,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
{
case PSN_APPLY:
{
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
int i = 0;
while (hContact != NULL)
{
@@ -600,7 +600,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
DBDeleteContactSetting(hContact,"CList","Hidden");
i += 1;
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
break;
}
diff --git a/protocols/NewsAggregator/Src/Services.cpp b/protocols/NewsAggregator/Src/Services.cpp
index ed53a2a048..b057f515be 100644
--- a/protocols/NewsAggregator/Src/Services.cpp
+++ b/protocols/NewsAggregator/Src/Services.cpp
@@ -42,27 +42,27 @@ static void __cdecl WorkingThread(void* param)
{
int nStatus = (int)param;
// UpdateAll(FALSE, FALSE);
- HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact= db_find_first();
while (hContact != NULL)
{
if(IsMyContact(hContact))
{
SetContactStatus(hContact, nStatus);
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
}
int NewsAggrInit(WPARAM wParam,LPARAM lParam)
{
- HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact= db_find_first();
while (hContact != NULL)
{
if(IsMyContact(hContact))
{
SetContactStatus(hContact, ID_STATUS_OFFLINE);
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
NetlibInit();
InitIcons();
@@ -169,14 +169,14 @@ INT_PTR NewsAggrGetInfo(WPARAM wParam,LPARAM lParam)
INT_PTR CheckAllFeeds(WPARAM wParam,LPARAM lParam)
{
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact != NULL)
{
if (IsMyContact(hContact) && lParam && DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60))
UpdateListAdd(hContact);
else if (IsMyContact(hContact) && !lParam)
UpdateListAdd(hContact);
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
if (!ThreadRunning)
mir_forkthread(UpdateThreadProc, NULL);
diff --git a/protocols/NewsAggregator/Src/Update.cpp b/protocols/NewsAggregator/Src/Update.cpp
index 0c2431e9a0..c0b42eb759 100644
--- a/protocols/NewsAggregator/Src/Update.cpp
+++ b/protocols/NewsAggregator/Src/Update.cpp
@@ -31,7 +31,7 @@ VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
if (!ThreadRunning && !Miranda_Terminated())
{
BOOL HaveUpdates = FALSE;
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact != NULL)
{
if(IsMyContact(hContact))
@@ -46,7 +46,7 @@ VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
}
}
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
if (!ThreadRunning && HaveUpdates)
mir_forkthread(UpdateThreadProc, NULL);
diff --git a/protocols/NewsAggregator/Src/Utils.cpp b/protocols/NewsAggregator/Src/Utils.cpp
index 1fb25eddb3..197cc5a0ba 100644
--- a/protocols/NewsAggregator/Src/Utils.cpp
+++ b/protocols/NewsAggregator/Src/Utils.cpp
@@ -267,7 +267,7 @@ VOID UpdateList(HWND hwndList)
// Some code to create the list-view control.
// Initialize LVITEM members that are common to all
// items.
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
int i = 0;
while (hContact != NULL)
{
@@ -295,7 +295,7 @@ VOID UpdateList(HWND hwndList)
DBFreeVariant(&dbNick);
}
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
UpdateListFlag = FALSE;
}