summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AVS/src/options.cpp2
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp14
-rw-r--r--plugins/BasicHistory/src/Options.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp8
-rw-r--r--plugins/Clist_nicer/src/contact.cpp4
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp2
-rw-r--r--plugins/Clist_nicer/src/viewmodes.cpp8
-rw-r--r--plugins/CloudFile/src/events.cpp2
-rw-r--r--plugins/CmdLine/src/mimcmd_handlers.cpp8
-rw-r--r--plugins/CmdLine/src/utils.cpp2
-rw-r--r--plugins/DbEditorPP/src/copymodule.cpp4
-rw-r--r--plugins/DbEditorPP/src/deletemodule.cpp4
-rw-r--r--plugins/DbEditorPP/src/exportimport.cpp2
-rw-r--r--plugins/DbEditorPP/src/modsettingenum.cpp2
-rw-r--r--plugins/DbEditorPP/src/moduletree.cpp2
-rw-r--r--plugins/DbEditorPP/src/renamemodule.cpp2
-rw-r--r--plugins/FingerprintNG/src/options.cpp2
-rw-r--r--plugins/FloatingContacts/src/main.cpp2
-rw-r--r--plugins/GmailNotifier/src/utility.cpp2
-rwxr-xr-xplugins/Msg_Export/src/options.cpp2
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp4
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp10
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp6
-rw-r--r--plugins/NewsAggregator/Src/Update.cpp2
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp4
-rw-r--r--plugins/Popup/src/opt_contacts.cpp4
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/SMS/src/SMS_svc.cpp2
-rw-r--r--plugins/SMS/src/functions.cpp2
-rw-r--r--plugins/SMS/src/senddlg.cpp2
-rw-r--r--plugins/Scriver/src/msgoptions.cpp4
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/SeenPlugin/src/missed.cpp4
-rw-r--r--plugins/SeenPlugin/src/utils.cpp2
-rw-r--r--plugins/Sessions/Src/Main.cpp12
-rw-r--r--plugins/Sessions/Src/Options.cpp6
-rw-r--r--plugins/SmileyAdd/src/smileys.cpp4
-rw-r--r--plugins/TabSRMM/src/container.cpp4
-rw-r--r--plugins/TabSRMM/src/globals.cpp4
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp4
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp4
-rw-r--r--plugins/TabSRMM/src/trayicon.cpp2
-rw-r--r--plugins/TipperYM/src/options.cpp4
-rw-r--r--plugins/TipperYM/src/popwin.cpp4
-rw-r--r--plugins/UserInfoEx/src/dlg_anniversarylist.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp2
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp4
-rw-r--r--plugins/UserInfoEx/src/svc_avatar.cpp4
-rw-r--r--plugins/UserInfoEx/src/svc_refreshci.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp6
-rw-r--r--plugins/Variables/src/contact.cpp2
-rw-r--r--plugins/Variables/src/parse_miranda.cpp8
-rw-r--r--plugins/Weather/src/weather_addstn.cpp2
-rw-r--r--plugins/Weather/src/weather_contacts.cpp2
-rw-r--r--plugins/Weather/src/weather_data.cpp2
-rw-r--r--plugins/Weather/src/weather_mwin.cpp4
-rw-r--r--plugins/Weather/src/weather_update.cpp2
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3comm.cpp2
-rw-r--r--plugins/YAPP/src/options.cpp2
59 files changed, 113 insertions, 113 deletions
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 7940a80475..c6de060ac0 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -406,7 +406,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar
BOOL newVal = ListView_GetCheckState(hwndList, i);
if (oldVal && !newVal)
- for (auto &hContact : contact_iter(szProto))
+ for (auto &hContact : Contacts(szProto))
DeleteAvatarFromCache(hContact, TRUE);
if (newVal)
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index 88f20deb9f..d9d1b86a59 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -1496,7 +1496,7 @@ void HistoryWindow::ReloadContacts()
}
}
- for (auto &_hContact : contact_iter()) {
+ for (auto &_hContact : Contacts()) {
if (HistoryEventList::GetContactMessageNumber(_hContact) && (metaContactProto == nullptr || !db_mc_isSub(_hContact))) {
HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
if (hItem == nullptr)
@@ -1627,7 +1627,7 @@ void HistoryWindow::SavePos(bool all)
{
MCONTACT contactToSave = m_hContact;
if (all) {
- for (auto &_hContact : contact_iter()) {
+ for (auto &_hContact : Contacts()) {
db_unset(_hContact, MODULE, "history_x");
db_unset(_hContact, MODULE, "history_y");
db_unset(_hContact, MODULE, "history_width");
@@ -1825,7 +1825,7 @@ void HistoryWindow::DoImport(IImport::ImportType type)
std::wstring err;
std::vector<MCONTACT> contacts;
- for (auto &_hContact : contact_iter())
+ for (auto &_hContact : Contacts())
contacts.push_back(_hContact);
bool changeContact = false;
@@ -2049,7 +2049,7 @@ MCONTACT HistoryWindow::GetNextContact(MCONTACT hContact, int adder)
HWND contactList = GetDlgItem(m_hWnd, IDC_LIST_CONTACTS);
if (adder > 0) {
if (hContact != NULL) {
- for (auto &cc : contact_iter())
+ for (auto &cc : Contacts())
if (SendMessage(contactList, CLM_FINDCONTACT, cc, 0) != NULL)
return cc;
@@ -2057,7 +2057,7 @@ MCONTACT HistoryWindow::GetNextContact(MCONTACT hContact, int adder)
return NULL;
}
- for (auto &cc : contact_iter()) {
+ for (auto &cc : Contacts()) {
if (cc == hContact)
break;
@@ -2067,7 +2067,7 @@ MCONTACT HistoryWindow::GetNextContact(MCONTACT hContact, int adder)
}
else {
MCONTACT lastContact = NULL;
- for (auto &cc : contact_iter()) {
+ for (auto &cc : Contacts()) {
if (cc == hContact)
break;
@@ -2077,7 +2077,7 @@ MCONTACT HistoryWindow::GetNextContact(MCONTACT hContact, int adder)
if (hContact != NULL) {
if (lastContact == NULL && !HistoryEventList::GetContactMessageNumber(NULL)) {
- for (auto &cc : contact_iter())
+ for (auto &cc : Contacts())
if (SendMessage(contactList, CLM_FINDCONTACT, cc, 0) != NULL)
lastContact = cc;
}
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp
index b86a6cc91f..22f3cb55ae 100644
--- a/plugins/BasicHistory/src/Options.cpp
+++ b/plugins/BasicHistory/src/Options.cpp
@@ -550,7 +550,7 @@ void Options::SaveTasks(std::list<TaskOptions>* tasks)
db_set_s(0, MODULE, buf, it->zipPassword.c_str());
mir_snprintf(buf, "IsInTask_%d", i);
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
db_unset(hContact, MODULE, buf);
for (size_t j = 0; j < it->contacts.size(); ++j)
@@ -605,7 +605,7 @@ void Options::SaveTasks(std::list<TaskOptions>* tasks)
db_unset(NULL, MODULE, buf);
mir_snprintf(buf, "IsInTask_%d", i);
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
db_unset(hContact, MODULE, buf);
}
}
@@ -691,7 +691,7 @@ void Options::LoadTasks()
}
mir_snprintf(buf, "IsInTask_%d", i);
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (db_get_b(hContact, MODULE, buf, 0) == 1)
to.contacts.push_back(hContact);
@@ -1562,7 +1562,7 @@ void SaveList(HWND hwnd, MCONTACT hSystem, TaskOptions* to)
if (hSystem)
to->isSystem = SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM)hSystem, 0) != 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwnd, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
to->contacts.push_back(hContact);
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 3c9ea70dc1..565d2edaeb 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -174,7 +174,7 @@ static DWORD GetMaskForItem(HANDLE hItem)
static void UpdateStickies()
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, (BYTE)db_get_dw(hContact, CLVM_MODULE, g_szModename, 0) ? 1 : 0);
@@ -432,7 +432,7 @@ void SaveState()
T2Utf szModeName(szTempModeName);
DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem == nullptr)
continue;
@@ -624,7 +624,7 @@ void DeleteViewMode(char * szName)
SetWindowText(hwndSelector, TranslateT("All contacts"));
}
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (db_get_dw(hContact, CLVM_MODULE, szName, -1) != -1)
db_set_dw(hContact, CLVM_MODULE, szName, 0);
}
@@ -793,7 +793,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
case IDC_CLEARALL:
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 0);
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp
index f62749c3eb..7b815b40d8 100644
--- a/plugins/Clist_nicer/src/contact.cpp
+++ b/plugins/Clist_nicer/src/contact.cpp
@@ -113,7 +113,7 @@ void MF_UpdateThread(LPVOID)
ResetEvent(hEvent);
while (mf_updatethread_running) {
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
MF_CalcFrequency(hContact, 50, 1);
if (mf_updatethread_running)
WaitForSingleObject(hEvent, 5000);
@@ -130,7 +130,7 @@ void MF_InitCheck(void)
{
BYTE bMsgFrequency = db_get_b(NULL, "CList", "fhistdata", 0);
if (!bMsgFrequency) {
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
MF_CalcFrequency(hContact, 100, 0);
db_set_b(NULL, "CList", "fhistdata", 1);
}
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index 815a4e3e95..57a70373d5 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -1281,7 +1281,7 @@ void LoadPerContactSkins(wchar_t *tszFileName)
}
if (items) {
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *szProto = GetContactProto(hContact);
if (szProto == nullptr)
continue;
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp
index 01c19789a5..c6851bf790 100644
--- a/plugins/Clist_nicer/src/viewmodes.cpp
+++ b/plugins/Clist_nicer/src/viewmodes.cpp
@@ -134,7 +134,7 @@ static DWORD GetMaskForItem(HANDLE hItem)
static void UpdateStickies()
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
MCONTACT hItem = (MCONTACT)SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, db_get_b(hContact, "CLVM", sttModeName, 0) ? 1 : 0);
@@ -374,7 +374,7 @@ void SaveState()
DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
unsigned int stickies = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
if (SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
@@ -652,7 +652,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
Clist_Broadcast(CLM_AUTOREBUILD, 0, 0);
SetWindowText(hwndSelector, TranslateT("No view mode"));
}
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (db_get_dw(hContact, "CLVM", szBuf, -1) != -1)
db_set_dw(hContact, "CLVM", szBuf, 0);
@@ -695,7 +695,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
break;
case IDC_CLEARALL:
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 0);
diff --git a/plugins/CloudFile/src/events.cpp b/plugins/CloudFile/src/events.cpp
index 874ce16f72..aa79ee3288 100644
--- a/plugins/CloudFile/src/events.cpp
+++ b/plugins/CloudFile/src/events.cpp
@@ -7,7 +7,7 @@ static int OnProtoAck(WPARAM, LPARAM lParam)
if (ack->type != ACKTYPE_STATUS)
return 0;
- for (auto &hContact : contact_iter(ack->szModule)) {
+ for (auto &hContact : Contacts(ack->szModule)) {
MessageWindowData msgw;
if (Srmm_GetWindowData(hContact, msgw) || !(msgw.uState & MSG_WINDOW_STATE_EXISTS))
continue;
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp
index 122f7bfedd..acad40a2ed 100644
--- a/plugins/CmdLine/src/mimcmd_handlers.cpp
+++ b/plugins/CmdLine/src/mimcmd_handlers.cpp
@@ -1227,7 +1227,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r
int count = 0;
reply->code = MIMRES_SUCCESS;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
GetContactProto(hContact, protocol, _countof(protocol));
ptrW contact(GetContactName(hContact, protocol));
@@ -1257,7 +1257,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r
reply->code = MIMRES_SUCCESS;
*reply->message = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
GetContactProto(hContact, protocol, _countof(protocol));
ptrW contact(GetContactName(hContact, protocol));
@@ -1270,7 +1270,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r
reply->code = MIMRES_SUCCESS;
*reply->message = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
MEVENT hUnreadEvent = db_event_firstUnread(hContact);
if (hUnreadEvent != NULL)
mir_forkthread(OpenMessageWindowThread, (void*)hContact);
@@ -1324,7 +1324,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re
reply->code = MIMRES_SUCCESS;
mir_snwprintf(reply->message, TranslateT("No unread messages found."));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
MEVENT hEvent = db_event_firstUnread(hContact);
if (hEvent != NULL) {
count = 0;
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp
index a7298887c6..6304a1498a 100644
--- a/plugins/CmdLine/src/utils.cpp
+++ b/plugins/CmdLine/src/utils.cpp
@@ -171,7 +171,7 @@ MCONTACT GetContactFromID(wchar_t *szID, char *szProto)
char cProtocol[256];
int found = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
GetContactProto(hContact, cProtocol, sizeof(cProtocol));
ptrW szHandle(GetContactID(hContact, cProtocol));
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp
index 61962fa89c..5ca149ee4e 100644
--- a/plugins/DbEditorPP/src/copymodule.cpp
+++ b/plugins/DbEditorPP/src/copymodule.cpp
@@ -31,7 +31,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar
mir_snwprintf(msg, TranslateT("Copy module \"%s\""), _A2T(mac->module));
SetWindowText(hwnd, msg);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (ApplyProtoFilter(hContact))
continue;
@@ -61,7 +61,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar
}
else {
SetCursor(LoadCursor(nullptr, IDC_WAIT));
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
copyModule(mac->module, mac->hContact, hContact);
SetCursor(LoadCursor(nullptr, IDC_ARROW));
diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp
index 5d3104d233..4b07c0519b 100644
--- a/plugins/DbEditorPP/src/deletemodule.cpp
+++ b/plugins/DbEditorPP/src/deletemodule.cpp
@@ -47,7 +47,7 @@ void __cdecl PopulateModuleDropListThreadFunc(void *param)
continue;
}
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (!IsModuleEmpty(hContact, module->name)) {
SendDlgItemMessageA(hwnd, IDC_CONTACTS, CB_ADDSTRING, 0, (LPARAM)module->name);
moduleEmpty = 0;
@@ -94,7 +94,7 @@ INT_PTR CALLBACK DeleteModuleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM)
char module[FLD_SIZE];
GetDlgItemTextA(hwnd, IDC_CONTACTS, module, _countof(module));
SetCursor(LoadCursor(nullptr, IDC_WAIT));
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
deleteModule(hContact, module, 0);
// do the null
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp
index 82fc93f5eb..6ae2f27626 100644
--- a/plugins/DbEditorPP/src/exportimport.cpp
+++ b/plugins/DbEditorPP/src/exportimport.cpp
@@ -256,7 +256,7 @@ MCONTACT CheckNewContact(const char *myProto, const char *uid, const char *myNam
{
char szProto[FLD_SIZE], szName[NAME_SIZE];
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (!db_get_static(hContact, "Protocol", "p", szProto, _countof(szProto)))
if (!mir_strcmp(szProto, myProto))
if (GetValueA(hContact, szProto, uid, szName, _countof(szName)) && !mir_strcmp(szName, myName))
diff --git a/plugins/DbEditorPP/src/modsettingenum.cpp b/plugins/DbEditorPP/src/modsettingenum.cpp
index eef1292d39..630096c738 100644
--- a/plugins/DbEditorPP/src/modsettingenum.cpp
+++ b/plugins/DbEditorPP/src/modsettingenum.cpp
@@ -160,7 +160,7 @@ int fixResidentSettings()
fixing = 1;
int cnt = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
for (ModSetLinkLinkItem *module = ModuleList.first; module; module = module->next) {
if (IsModuleEmpty(hContact, module->name))
continue;
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp
index 662c66ea85..5502e5c62e 100644
--- a/plugins/DbEditorPP/src/moduletree.cpp
+++ b/plugins/DbEditorPP/src/moduletree.cpp
@@ -46,7 +46,7 @@ int doContacts(HTREEITEM contactsRoot, ModuleSettingLL *modlist, MCONTACT hSelec
char szProto[FLD_SIZE];
wchar_t name[NAME_SIZE];
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (ApplyProtoFilter(hContact))
continue;
diff --git a/plugins/DbEditorPP/src/renamemodule.cpp b/plugins/DbEditorPP/src/renamemodule.cpp
index c4b12f9b88..f242fe5f1f 100644
--- a/plugins/DbEditorPP/src/renamemodule.cpp
+++ b/plugins/DbEditorPP/src/renamemodule.cpp
@@ -44,7 +44,7 @@ static INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
if (IsDlgButtonChecked(hwnd, CHK_ADD2ALL)) {
// null contact
db_set_b(NULL, modulename, "(Default)", 0);
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
db_set_b(hContact, modulename, "(Default)", 0);
}
else db_set_b((MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), modulename, "(Default)", 0);
diff --git a/plugins/FingerprintNG/src/options.cpp b/plugins/FingerprintNG/src/options.cpp
index 76482ee8b3..388a9e7175 100644
--- a/plugins/FingerprintNG/src/options.cpp
+++ b/plugins/FingerprintNG/src/options.cpp
@@ -101,7 +101,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
ClearFI();
RegisterIcons();
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
OnExtraImageApply(hContact, 0);
}
break;
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index e4fbafb88c..46aafdfbad 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -669,7 +669,7 @@ void SaveContactsPos()
static void LoadContacts()
{
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
LoadContact(hContact);
}
diff --git a/plugins/GmailNotifier/src/utility.cpp b/plugins/GmailNotifier/src/utility.cpp
index bae5a91a74..64bb3cfa11 100644
--- a/plugins/GmailNotifier/src/utility.cpp
+++ b/plugins/GmailNotifier/src/utility.cpp
@@ -4,7 +4,7 @@ void BuildList(void)
{
g_accs.destroy();
- for (auto &hContact : contact_iter(MODULE_NAME)) {
+ for (auto &hContact : Contacts(MODULE_NAME)) {
ptrA szName(db_get_sa(hContact, MODULE_NAME, "name"));
if (szName != nullptr) {
Account *p = new Account;
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp
index a769468e64..7765d1cc95 100755
--- a/plugins/Msg_Export/src/options.cpp
+++ b/plugins/Msg_Export/src/options.cpp
@@ -626,7 +626,7 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wPar
int nUser = 0;
tstring sTmp;
LVITEM sItem = { 0 };
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
PROTOACCOUNT *pa = Proto_GetAccount(GetContactProto(hContact));
if (pa == nullptr)
continue;
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index a6c772801c..7dc168b153 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -787,7 +787,7 @@ void UpdateFileToColWidth()
{
clFileTo1ColWidth.clear();
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
tstring sNick = pcli->pfnGetContactDisplayName(hContact, 0);
string::size_type &rnValue = clFileTo1ColWidth[GetFilePathFromUser(hContact)];
if (rnValue < sNick.size())
@@ -1395,7 +1395,7 @@ int nContactDeleted(WPARAM wparam, LPARAM /*lparam*/)
tstring sFilePath = GetFilePathFromUser(hContact);
// Test if there is another user using this file
- for (auto &hOtherContact : contact_iter())
+ for (auto &hOtherContact : Contacts())
if (hContact != hOtherContact && sFilePath == GetFilePathFromUser(hOtherContact))
return 0; // we found another contact abort mission :-)
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index 4d43ddcbc4..bf3b9f77fc 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -39,7 +39,7 @@ CExportFeed::CExportFeed()
void CExportFeed::OnInitDialog()
{
Utils_RestoreWindowPositionNoSize(m_hwnd, NULL, MODULE, "ExportDlg");
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
wchar_t *message = db_get_wsa(hContact, MODULE, "Nick");
if (message != nullptr) {
m_feedslist.AddString(message);
@@ -692,7 +692,7 @@ void CFeedEditor::OnInitDialog()
m_list->GetItemText(m_iItem, 0, SelNick, _countof(SelNick));
m_list->GetItemText(m_iItem, 1, SelUrl, _countof(SelNick));
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
if ((dbNick == NULL) || (mir_wstrcmp(dbNick, SelNick) != 0))
continue;
@@ -874,7 +874,7 @@ void CFeedEditor::OnUseAuth(CCtrlBase*)
void COptionsMain::UpdateList()
{
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
UpdateListFlag = TRUE;
wchar_t *ptszNick = db_get_wsa(hContact, MODULE, "Nick");
if (ptszNick) {
@@ -928,7 +928,7 @@ void COptionsMain::OnInitDialog()
void COptionsMain::OnApply()
{
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
for (int i = 0; i < m_feeds.GetItemCount(); i++) {
wchar_t nick[MAX_PATH];
@@ -998,7 +998,7 @@ void COptionsMain::OnDeleteButtonClick(CCtrlBase*)
m_feeds.GetItemText(isel, 0, nick, _countof(nick));
m_feeds.GetItemText(isel, 1, url, _countof(url));
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
if (dbNick == NULL)
break;
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp
index 8be70f3541..36e25ba073 100644
--- a/plugins/NewsAggregator/Src/Services.cpp
+++ b/plugins/NewsAggregator/Src/Services.cpp
@@ -36,7 +36,7 @@ int NewsAggrInit(WPARAM, LPARAM)
else
mir_wstrncpy(tszRoot, VARSW(L"%miranda_userdata%\\Avatars\\" _A2W(DEFAULT_AVATARS_FOLDER)), _countof(tszRoot));
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
if (!db_get_b(NULL, MODULE, "StartupRetrieve", 1))
db_set_dw(hContact, MODULE, "LastCheck", time(nullptr));
db_set_w(hContact, MODULE, "Status", ID_STATUS_ONLINE);
@@ -98,7 +98,7 @@ INT_PTR NewsAggrSetStatus(WPARAM wp, LPARAM)
if(nStatus != g_nStatus) {
g_nStatus = nStatus;
- for (auto &hContact : contact_iter(MODULE))
+ for (auto &hContact : Contacts(MODULE))
db_set_w(hContact, MODULE, "Status", nStatus);
ProtoBroadcastAck(MODULE, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, g_nStatus);
@@ -133,7 +133,7 @@ INT_PTR NewsAggrGetInfo(WPARAM, LPARAM lParam)
INT_PTR CheckAllFeeds(WPARAM, LPARAM lParam)
{
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
if (lParam && db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME))
UpdateListAdd(hContact);
else if (!lParam)
diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp
index feaaf9840d..893a00239b 100644
--- a/plugins/NewsAggregator/Src/Update.cpp
+++ b/plugins/NewsAggregator/Src/Update.cpp
@@ -30,7 +30,7 @@ void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD)
// only run if it is not current updating and the auto update option is enabled
if (!ThreadRunning && !Miranda_IsTerminated()) {
bool HaveUpdates = FALSE;
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
if (db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME)) {
double diff = difftime(time(nullptr), (time_t)db_get_dw(hContact, MODULE, "LastCheck", 0));
if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && diff >= db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME) * 60) {
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index d2e646c5e8..4eff01b870 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -431,7 +431,7 @@ MCONTACT GetContactByNick(const wchar_t *nick)
{
MCONTACT hContact = NULL;
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW contactNick(::db_get_wsa(hContact, MODULE, "Nick"));
if (!mir_wstrcmpi(contactNick, nick))
break;
@@ -443,7 +443,7 @@ MCONTACT GetContactByURL(const wchar_t *url)
{
MCONTACT hContact = NULL;
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW contactURL(::db_get_wsa(hContact, MODULE, "URL"));
if (!mir_wstrcmpi(contactURL, url))
break;
diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp
index d42762c740..d9315e2f16 100644
--- a/plugins/Popup/src/opt_contacts.cpp
+++ b/plugins/Popup/src/opt_contacts.cpp
@@ -30,7 +30,7 @@ static void sttResetListOptions(HWND hwndList)
static void sttSetAllContactIcons(HWND hwndList)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
DWORD dwMode = db_get_b(hContact, MODULNAME, "ShowMode", 0);
for (int i = 0; i < 4 /*_countof(sttIcons)*/; ++i)
@@ -99,7 +99,7 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM, LPARAM lParam)
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
HWND hwndList = GetDlgItem(hwnd, IDC_LIST);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
for (int i = 0; i < 4 /*_countof(sttIcons)*/; ++i) {
if (SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, 0))) {
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 565ccee576..89e281b136 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -392,7 +392,7 @@ INT_PTR OnMenuCommandShowList(WPARAM, LPARAM)
BYTE buf[1];
dbe.pBlob = buf;
- for (auto &curContact : contact_iter()) {
+ for (auto &curContact : Contacts()) {
__time64_t curTime = GetLastUsedTimeStamp(curContact);
MEVENT curEvent = db_event_last(curContact);
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index 99e3059127..77c4b1c1e9 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -77,7 +77,7 @@ int SendSMSMenuCommand(WPARAM wParam, LPARAM)
EnableWindow(GetDlgItem(hwndSendSms, IDC_NAME), TRUE);
EnableWindow(GetDlgItem(hwndSendSms, IDC_SAVENUMBER), FALSE);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (GetContactPhonesCount(hContact)) {
SendDlgItemMessage(hwndSendSms, IDC_NAME, CB_ADDSTRING, 0, (LPARAM)pcli->pfnGetContactDisplayName(hContact, 0));
SendSMSWindowSMSContactAdd(hwndSendSms, hContact);
diff --git a/plugins/SMS/src/functions.cpp b/plugins/SMS/src/functions.cpp
index 0adc6aee21..81406f3ed8 100644
--- a/plugins/SMS/src/functions.cpp
+++ b/plugins/SMS/src/functions.cpp
@@ -183,7 +183,7 @@ MCONTACT HContactFromPhone(LPWSTR lpwszPhone, size_t dwPhoneSize)
{
if (lpwszPhone && dwPhoneSize) {
//check not already on list
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (IsContactPhone(hContact, lpwszPhone, dwPhoneSize))
return hContact;
}
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp
index ed13941203..99d0012e80 100644
--- a/plugins/SMS/src/senddlg.cpp
+++ b/plugins/SMS/src/senddlg.cpp
@@ -1051,7 +1051,7 @@ void SendSMSWindowFillTreeView(HWND hWnd)
HWND hWndTreeView = GetDlgItem(hWnd, IDC_NUMBERSLIST);
TreeView_DeleteAllItems(hWndTreeView);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HTREEITEM hParent = nullptr;
LPSTR lpszProto = GetContactProto(hContact);
if (lpszProto) {
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 6dae9ab64a..ecaac38ec9 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -828,7 +828,7 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
if (hItemUnknown && db_get_b(0, SRMM_MODULE, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && db_get_b(hContact, SRMM_MODULE, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -843,7 +843,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
if (hItemUnknown)
db_set_b(0, SRMM_MODULE, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
db_set_b(hContact, SRMM_MODULE, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index f22f60c430..3af9114bac 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -248,7 +248,7 @@ static void RestoreUnreadMessageAlerts(void)
{
OBJLIST<MSavedEvent> arEvents(10, NumericKeySortT);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
DBEVENTINFO dbei = {};
dbei.cbBlob = 0;
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp
index 5e608c213e..8f202e7f61 100644
--- a/plugins/SeenPlugin/src/missed.cpp
+++ b/plugins/SeenPlugin/src/missed.cpp
@@ -42,7 +42,7 @@ int RemoveUser(int pos)
int ResetMissed(void)
{
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
db_set_b(hContact, S_MOD, "Missed", 0);
memset(&mcs, 0, sizeof(mcs));
@@ -51,7 +51,7 @@ int ResetMissed(void)
int CheckIfOnline(void)
{
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (pcli->pfnGetContactIcon(hContact) != ICON_OFFLINE)
db_set_b(hContact, S_MOD, "Missed", 2);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 4a1538cd36..5537de86dc 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -654,7 +654,7 @@ static void cleanThread(void *param)
// I hope in 10 secons all logged-in contacts will be listed
if (WaitForSingleObject(g_hShutdownEvent, 10000) == WAIT_TIMEOUT) {
- for (auto &hContact : contact_iter(szProto)) {
+ for (auto &hContact : Contacts(szProto)) {
WORD oldStatus = db_get_w(hContact, S_MOD, "StatusTriger", ID_STATUS_OFFLINE) | 0x8000;
if (oldStatus > ID_STATUS_OFFLINE) {
if (db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 6ee67026ad..d5b790ad32 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -204,7 +204,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
GetDlgItemText(hdlg, IDC_LIST, szUserSessionName, _countof(szUserSessionName));
szUserSessionName[length + 1] = '\0';
if (IsDlgButtonChecked(hdlg, IDC_SELCONTACTS) && bSC) {
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
BYTE res = (BYTE)SendMessage(hClistControl, CLM_GETCHECKMARK, SendMessage(hClistControl, CLM_FINDCONTACT, hContact, 0), 0);
if (res) {
user_session_list[i] = hContact;
@@ -408,7 +408,7 @@ int SaveSessionHandles(WPARAM, LPARAM lparam)
return 1;
int k = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if ((k = CheckForDuplicate(session_list, hContact)) != -1 && !(g_bExclHidden && !CheckContactVisibility(hContact))) {
AddSessionMark(hContact, lparam, '1');
AddInSessionOrder(hContact, lparam, k, 1);
@@ -528,7 +528,7 @@ int LoadSession(WPARAM, LPARAM lparam)
if (session_list_recovered[0] && lparam == 256 && mode == 0)
memcpy(session_list_t, session_list_recovered, sizeof(session_list_t));
else
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (LoadContactsFromMask(hContact, mode, lparam)) {
int i = GetInSessionOrder(hContact, mode, lparam);
session_list_t[i] = hContact;
@@ -577,7 +577,7 @@ int LoadSession(WPARAM, LPARAM lparam)
int DelUserDefSession(int ses_count)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
RemoveSessionMark(hContact, 1, ses_count);
SetInSessionOrder(hContact, 1, ses_count, 0);
}
@@ -613,7 +613,7 @@ int DelUserDefSession(int ses_count)
int DeleteAutoSession(int ses_count)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
RemoveSessionMark(hContact, 0, ses_count);
SetInSessionOrder(hContact, 0, ses_count, 0);
}
@@ -841,7 +841,7 @@ extern "C" __declspec(dllexport) int Load(void)
int i = 0;
memset(session_list_recovered, 0, sizeof(session_list_recovered));
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (db_get_b(hContact, MODNAME, "wasInLastSession", 0))
session_list_recovered[i++] = hContact;
}
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp
index f19d90c1e1..28d5fbb075 100644
--- a/plugins/Sessions/Src/Options.cpp
+++ b/plugins/Sessions/Src/Options.cpp
@@ -46,7 +46,7 @@ int OpLoadSessionContacts(WPARAM, LPARAM lparam)
{
memset(session_list_t, 0, sizeof(session_list_t));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (LoadContactsFromMask(hContact, 1, lparam)) {
int i = GetInSessionOrder(hContact, 1, lparam);
session_list_t[i] = hContact;
@@ -314,7 +314,7 @@ static INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
if (!hOpClistControl)
EnableWindow(GetDlgItem(hdlg, IDC_DEL), TRUE);
else {
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
SendMessage(hOpClistControl, CLM_SETCHECKMARK, hContact, 0);
for (int i = 0; session_list_t[i] > 0; i++) {
@@ -361,7 +361,7 @@ static INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
case IDC_SAVE:
{
int i = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
BYTE res = (BYTE)SendDlgItemMessage(hdlg, IDC_EMCLIST, CLM_GETCHECKMARK,
SendDlgItemMessage(hdlg, IDC_EMCLIST, CLM_FINDCONTACT, hContact, 0), 0);
if (res) {
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp
index ceeff234c1..7559abaea1 100644
--- a/plugins/SmileyAdd/src/smileys.cpp
+++ b/plugins/SmileyAdd/src/smileys.cpp
@@ -748,7 +748,7 @@ void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc)
{
CMStringW tname(_A2T(acc->szModuleName));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *proto = GetContactProto(hContact);
if (proto == nullptr)
continue;
@@ -841,7 +841,7 @@ void SmileyCategoryListType::AddAllProtocolsAsCategory(void)
for (int i = 0; i < protoCount; i++)
AddAccountAsCategory(accList[i], defaultFile);
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
AddContactTransportAsCategory(hContact, defaultFile);
CMStringW cats;
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 41cfdfb025..c9b3ebeb1b 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -2191,7 +2191,7 @@ void TSAPI DeleteContainer(int iIndex)
db_set_ws(0, CONTAINER_KEY, szIndex, L"**free**");
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
ptrW tszValue(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!mir_wstrcmp(tszValue, tszContainerName))
db_unset(hContact, SRMSGMOD_T, CONTAINER_SUBKEY);
@@ -2225,7 +2225,7 @@ void TSAPI RenameContainer(int iIndex, const wchar_t *szNew)
db_set_ws(0, CONTAINER_KEY, szIndex, szNew);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
ptrW tszValue(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!mir_wstrcmp(tszValue, tszContainerName))
db_set_ws(hContact, SRMSGMOD_T, CONTAINER_SUBKEY, szNew);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index adc81218a0..11fb6aa266 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -454,7 +454,7 @@ int CGlobals::PreshutdownSendRecv(WPARAM, LPARAM)
::TN_ModuleDeInit();
::CloseAllContainers();
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
db_set_dw(hContact, SRMSGMOD_T, "messagecount", 0);
::SI_DeinitStatusIcons();
@@ -501,7 +501,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
{
OBJLIST<MSavedEvent> arEvents(10, NumericKeySortT);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (db_get_dw(hContact, "SendLater", "count", 0))
sendLater->addContact(hContact);
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index d0b5a2e5dd..e87aa97f88 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -881,7 +881,7 @@ class COptTypingDlg : public CDlgBase
if (hItemUnknown && M.GetByte(SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && db_get_b(hContact, SRMSGMOD, SRMSGSET_TYPING, defType))
SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -896,7 +896,7 @@ class COptTypingDlg : public CDlgBase
if (hItemUnknown)
db_set_b(0, SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
db_set_b(hContact, SRMSGMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 43d26950e9..baf21a59d5 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -205,7 +205,7 @@ int SendQueue::sendQueued(CTabBaseDlg *dat, const int iEntry)
size_t iSendLength = getSendLength(iEntry);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
CContactCache *c = CContactCache::getContactCache(hContact);
@@ -221,7 +221,7 @@ int SendQueue::sendQueued(CTabBaseDlg *dat, const int iEntry)
return 0;
}
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
doSendLater(iEntry, nullptr, hContact, false);
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp
index 122266d5f2..2c12278a9a 100644
--- a/plugins/TabSRMM/src/trayicon.cpp
+++ b/plugins/TabSRMM/src/trayicon.cpp
@@ -287,7 +287,7 @@ void TSAPI LoadFavoritesAndRecent()
if (recentEntries == nullptr)
return;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (M.GetByte(hContact, "isFavorite", 0))
AddContactToFavorites(hContact, nullptr, nullptr, nullptr, 0, nullptr, 1, PluginConfig.g_hMenuFavorites);
if ((dwRecent = M.GetDword(hContact, "isRecent", 0)) != 0 && iIndex < nen_options.wMaxRecent) {
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 289b748916..02786dbd07 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -1842,7 +1842,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && db_get_b(hContact, MODULE, "FavouriteContact", 0))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -1859,7 +1859,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam,
BYTE isChecked;
int count = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
isChecked = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index 533c1abee9..5425e098aa 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -1470,7 +1470,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if (dwItems & TRAYTIP_NUMCONTACTS) {
int iCount = 0, iCountOnline = 0;
- for (auto &hContact : contact_iter(pa->szModuleName)) {
+ for (auto &hContact : Contacts(pa->szModuleName)) {
if (db_get_w(hContact, pa->szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
iCountOnline++;
iCount++;
@@ -1588,7 +1588,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
bool bTitlePainted = false;
int iCount = 0, iCountOnline = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (db_get_b(hContact, MODULE, "FavouriteContact", 0)) {
char *proto = GetContactProto(hContact);
if (proto == nullptr)
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
index 9ef92feeab..73ab8c733b 100644
--- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
@@ -741,7 +741,7 @@ class CAnnivList
mtNow.GetLocalTime();
// insert the items into the list
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
// ignore meta subcontacts here, as they are not interesting.
if (!db_mc_isSub(hContact)) {
// filter protocol
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index 77fdb16776..23c19e0e3d 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -499,7 +499,7 @@ BYTE CExImContactBase::isHandle(MCONTACT hContact)
**/
MCONTACT CExImContactBase::findHandle()
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (isHandle(hContact)) {
_hContact = hContact;
_isNewContact = FALSE;
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index cd8d14ec6e..78466a2838 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -466,7 +466,7 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam
DB::Module::Delete(NULL, USERINFO"ExW");
// delete old contactsettings
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
db_unset(hContact, USERINFO, "PListColWidth0");
db_unset(hContact, USERINFO, "PListColWidth1");
db_unset(hContact, USERINFO, "PListColWidth2");
@@ -669,7 +669,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam
// walk through all the contacts stored in the DB
MAnnivDate mdb;
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
mdb.DBMoveBirthDate(hContact, bOld, bNew);
}
diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp
index 0ed9bd5b12..6fe5421881 100644
--- a/plugins/UserInfoEx/src/svc_avatar.cpp
+++ b/plugins/UserInfoEx/src/svc_avatar.cpp
@@ -102,7 +102,7 @@ namespace NServices
if (bEnable && !ghChangedHook) {
// walk through all the contacts stored in the DB
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
// don't set if avatar is locked!
if (!db_get_b(hContact, "ContactPhoto", "Locked", 0)) {
BYTE bInvalidAvatar = TRUE;
@@ -144,7 +144,7 @@ namespace NServices
ghChangedHook = nullptr;
// walk through all the contacts stored in the DB
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
DeleteAvatar(hContact);
}
}
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp
index ac280af39a..b409fb78b6 100644
--- a/plugins/UserInfoEx/src/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/src/svc_refreshci.cpp
@@ -692,7 +692,7 @@ public:
{
int iWait = 100;
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (QueueAddRefreshContact(hContact, iWait))
iWait += 5000;
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 4c85441be5..c1e60e7531 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -564,7 +564,7 @@ void SvcReminderCheckAll(const ENotify notify)
// walk through all the contacts stored in the DB
CEvent evt;
WORD a1 = 0;
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
CheckContact(hContact, now, evt, notify != NOTIFY_CLIST, &a1);
if (notify != NOTIFY_CLIST) {
@@ -727,7 +727,7 @@ static INT_PTR BackupBirthdayService(WPARAM hContact, LPARAM lParam)
WORD a1 = 0;
//walk through all the contacts stored in the DB
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (!db_mc_isSub(hContact) && !mdb.DBGetBirthDate(hContact))
mdb.BackupBirthday(hContact, nullptr, TRUE, &a1);
}
@@ -858,7 +858,7 @@ void SvcReminderEnable(BYTE bEnable)
UpdateTimer(TRUE);
}
else { // Reminder is off
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
NotifyWithExtraIcon(hContact, CEvent());
gRemindOpts.RemindState = REMIND_OFF;
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp
index 9c8e51ecaa..9e40bc71dd 100644
--- a/plugins/Variables/src/contact.cpp
+++ b/plugins/Variables/src/contact.cpp
@@ -197,7 +197,7 @@ MCONTACT getContactFromString(const wchar_t *tszContact, DWORD dwFlags, int nMat
MCONTACT hContact;
LIST<void> arResults(1);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
// <_HANDLE_:hContact>
tmp.Format(L"<%s:%d>", _A2W(PROTOID_HANDLE), hContact);
bool bMatch = (tmp == tszContact);
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index 8eb429ba81..0dad8e92a0 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -439,7 +439,7 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
DBEVENTINFO dbe = {};
if (flags & DBE_FIRST) {
- for (auto &hSearchContact : contact_iter()) {
+ for (auto &hSearchContact : Contacts()) {
hSearchEvent = findDbEvent(hSearchContact, NULL, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
@@ -452,7 +452,7 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
hDbEvent = hMatchEvent;
}
else if (flags & DBE_LAST) {
- for (auto &hSearchContact : contact_iter()) {
+ for (auto &hSearchContact : Contacts()) {
hSearchEvent = findDbEvent(hSearchContact, NULL, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
@@ -468,7 +468,7 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
dbe.cbBlob = 0;
if (!db_event_get(hDbEvent, &dbe)) {
priorTimestamp = dbe.timestamp;
- for (auto &hSearchContact : contact_iter()) {
+ for (auto &hSearchContact : Contacts()) {
hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
@@ -484,7 +484,7 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
else if (flags & DBE_PREV) {
if (!db_event_get(hDbEvent, &dbe)) {
priorTimestamp = dbe.timestamp;
- for (auto &hSearchContact : contact_iter()) {
+ for (auto &hSearchContact : Contacts()) {
hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp
index 87825b72a5..59f5720d22 100644
--- a/plugins/Weather/src/weather_addstn.cpp
+++ b/plugins/Weather/src/weather_addstn.cpp
@@ -39,7 +39,7 @@ INT_PTR WeatherAddToList(WPARAM, LPARAM lParam)
return 0;
// search for existing contact
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
// check if it is a weather contact
if (IsMyContact(hContact)) {
DBVARIANT dbv;
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp
index 647e855e99..efde7bc6d2 100644
--- a/plugins/Weather/src/weather_contacts.cpp
+++ b/plugins/Weather/src/weather_contacts.cpp
@@ -444,7 +444,7 @@ int ContactDeleted(WPARAM wParam, LPARAM)
// now the default station is deleted, try to get a new one
// start looking for other weather stations
- for (auto &hContact : contact_iter(WEATHERPROTONAME)) {
+ for (auto &hContact : Contacts(WEATHERPROTONAME)) {
tszID = db_get_wsa(hContact, WEATHERPROTONAME, "ID");
if (tszID == NULL)
continue;
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp
index 90a8a05c0a..cc3fcbbf27 100644
--- a/plugins/Weather/src/weather_data.cpp
+++ b/plugins/Weather/src/weather_data.cpp
@@ -112,7 +112,7 @@ void EraseAllInfo()
MCONTACT LastContact = NULL;
DBVARIANT dbv;
// loop through all contacts
- for (auto &hContact : contact_iter(WEATHERPROTONAME)) {
+ for (auto &hContact : Contacts(WEATHERPROTONAME)) {
db_set_w(hContact, WEATHERPROTONAME, "Status", ID_STATUS_OFFLINE);
db_set_w(hContact, WEATHERPROTONAME, "StatusIcon", ID_STATUS_OFFLINE);
db_unset(hContact, "CList", "MyHandle");
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index c219c2a9ca..12d24e8dfb 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -348,7 +348,7 @@ void InitMwin(void)
mir_strcpy(fontid.prefix, "fnt1");
Font_RegisterW(&fontid);
- for (auto &hContact : contact_iter(WEATHERPROTONAME))
+ for (auto &hContact : Contacts(WEATHERPROTONAME))
if (db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0))
addWindow(hContact);
@@ -357,7 +357,7 @@ void InitMwin(void)
void DestroyMwin(void)
{
- for (auto &hContact : contact_iter(WEATHERPROTONAME)) {
+ for (auto &hContact : Contacts(WEATHERPROTONAME)) {
DWORD frameId = db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0);
if (frameId)
CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp
index 66feef7258..91a1755ede 100644
--- a/plugins/Weather/src/weather_update.cpp
+++ b/plugins/Weather/src/weather_update.cpp
@@ -307,7 +307,7 @@ static void UpdateThreadProc(void *)
void UpdateAll(BOOL AutoUpdate, BOOL RemoveData)
{
// add all weather contact to the update queue list
- for (auto &hContact : contact_iter(WEATHERPROTONAME))
+ for (auto &hContact : Contacts(WEATHERPROTONAME))
if (!db_get_b(hContact, WEATHERPROTONAME, "AutoUpdate", FALSE) || !AutoUpdate) {
if (RemoveData)
DBDataManage(hContact, WDBM_REMOVE, 0, 0);
diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp
index 280244d8a1..30d1097e35 100644
--- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp
@@ -283,7 +283,7 @@ int RegisterPOP3Plugin(WPARAM, LPARAM)
for (Finder = POP3Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) {
Finder->hContact = NULL;
- for (auto &hContact : contact_iter(YAMN_DBMODULE)) {
+ for (auto &hContact : Contacts(YAMN_DBMODULE)) {
if (!db_get_s(hContact, YAMN_DBMODULE, "Id", &dbv)) {
if (mir_strcmp(dbv.pszVal, Finder->Name) == 0) {
Finder->hContact = hContact;
diff --git a/plugins/YAPP/src/options.cpp b/plugins/YAPP/src/options.cpp
index 5fd2230882..262f3abe7a 100644
--- a/plugins/YAPP/src/options.cpp
+++ b/plugins/YAPP/src/options.cpp
@@ -99,7 +99,7 @@ void ShowExamplePopups()
pd.ptzText = TranslateT("Thequickbrownfoxjumpedoverthelazydog.");
ShowPopup(pd);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (options.av_layout != PAV_NONE && ServiceExists(MS_AV_DRAWAVATAR)) {
AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
if (ace && (ace->dwFlags & AVS_BITMAP_VALID)) {