summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-16 21:10:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-16 21:10:14 +0300
commit61b9b52fcc31ff4c0a533100c15f8d4fa7b2b93a (patch)
treebf06978de54d091be2b71ce5140ea69028dc8f3e
parent12225716d38830a23477b97a6979b6414faeec7b (diff)
class renaming, part II
-rw-r--r--plugins/AuthState/src/main.cpp2
-rw-r--r--plugins/AuthState/src/options.h2
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp2
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp4
-rw-r--r--plugins/BuddyExpectator/src/options.cpp2
-rw-r--r--plugins/BuddyPounce/src/dialog.cpp2
-rw-r--r--plugins/ConnectionNotify/src/ConnectionNotify.cpp2
-rw-r--r--plugins/ContactsPlus/src/main.cpp2
-rw-r--r--plugins/CountryFlags/src/extraimg.cpp6
-rw-r--r--plugins/FavContacts/src/contact_cache.cpp2
-rw-r--r--plugins/FavContacts/src/favlist.h2
-rw-r--r--plugins/FavContacts/src/options.cpp8
-rw-r--r--plugins/FavContacts/src/services.cpp2
-rw-r--r--plugins/HistoryStats/src/dlgoption_subexclude.cpp4
-rw-r--r--plugins/HistoryStats/src/mirandahistory.cpp2
-rw-r--r--plugins/HistorySweeperLight/src/historysweeperlight.cpp2
-rw-r--r--plugins/HistorySweeperLight/src/options.cpp4
-rw-r--r--plugins/IgnoreState/src/main.cpp2
-rw-r--r--plugins/KeyboardNotify/src/ignore.cpp4
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp2
-rw-r--r--plugins/ListeningTo/src/players/mradio.cpp2
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp2
-rw-r--r--plugins/MessageState/src/messagestate.cpp2
-rw-r--r--plugins/MirFox/src/MirandaOptions.cpp2
-rw-r--r--plugins/MirFox/src/MirandaUtils.cpp2
-rw-r--r--plugins/MirFox/src/MirfoxData.cpp2
-rw-r--r--plugins/MirOTR/src/dllmain.cpp2
-rw-r--r--plugins/MirOTR/src/options.cpp2
-rw-r--r--plugins/MirOTR/src/utils.cpp2
-rw-r--r--plugins/MobileState/src/main.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/AwayOpt.cpp6
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Properties.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/SetAwayMsg.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/indsnd.cpp4
-rwxr-xr-xplugins/New_GPG/src/icons.cpp2
-rwxr-xr-xplugins/New_GPG/src/options.cpp4
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp4
-rw-r--r--plugins/NoHistory/src/options.cpp4
-rw-r--r--plugins/Non-IM Contact/src/files.cpp2
-rw-r--r--plugins/Non-IM Contact/src/services.cpp2
-rw-r--r--plugins/Non-IM Contact/src/timer.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp2
-rw-r--r--plugins/Quotes/src/ImportExport.cpp2
-rw-r--r--plugins/Quotes/src/QuotesProviders.cpp2
-rw-r--r--plugins/Rate/src/main.cpp2
-rw-r--r--plugins/SecureIM/src/crypt_icons.cpp2
-rw-r--r--plugins/SecureIM/src/crypt_lists.cpp2
-rw-r--r--plugins/SecureIM/src/options.cpp8
-rw-r--r--plugins/ShellExt/src/shlcom.cpp4
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp2
-rw-r--r--plugins/Spamotron/src/spamotron.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp4
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp4
-rw-r--r--plugins/WebView/src/main.cpp2
-rw-r--r--plugins/WebView/src/webview.cpp8
-rw-r--r--plugins/WebView/src/webview_datawnd.cpp2
-rw-r--r--plugins/WebView/src/webview_services.cpp8
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp2
-rw-r--r--plugins/WhenWasIt/src/notifiers.cpp2
-rw-r--r--plugins/WhenWasIt/src/services.cpp2
-rw-r--r--plugins/WhenWasIt/src/utils.cpp2
-rw-r--r--plugins/WinterSpeak/src/ConfigDatabase.cpp2
-rw-r--r--plugins/WinterSpeak/src/DialogConfigActive.cpp2
-rw-r--r--plugins/XSoundNotify/src/options.cpp2
-rw-r--r--plugins/YARelay/src/options.cpp2
-rw-r--r--protocols/MinecraftDynmap/src/chat.cpp2
-rw-r--r--protocols/Omegle/src/chat.cpp2
-rw-r--r--protocols/Sametime/src/sametime.cpp2
-rw-r--r--protocols/Sametime/src/session_announce_win.cpp2
-rw-r--r--protocols/Sametime/src/userlist.cpp6
-rw-r--r--protocols/Steam/src/steam_contacts.cpp6
72 files changed, 103 insertions, 103 deletions
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index cefe05a0be..675f8cbadf 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -157,7 +157,7 @@ int onModulesLoaded(WPARAM, LPARAM)
hExtraIcon = ExtraIcon_RegisterIcolib("authstate", LPGEN("Auth state"), iconList[ICON_BOTH].szName);
// Set initial value for all contacts
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
onExtraImageApplying((WPARAM)hContact, 1);
HookEvent(ME_OPT_INITIALISE, onOptInitialise);
diff --git a/plugins/AuthState/src/options.h b/plugins/AuthState/src/options.h
index 1f105b6dfb..66d2304a70 100644
--- a/plugins/AuthState/src/options.h
+++ b/plugins/AuthState/src/options.h
@@ -40,7 +40,7 @@ public:
void OnApply() override
{
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
onExtraImageApplying((WPARAM)hContact, 0);
}
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp
index 768f85bb74..876d3a568e 100644
--- a/plugins/AutoShutdown/src/watcher.cpp
+++ b/plugins/AutoShutdown/src/watcher.cpp
@@ -176,7 +176,7 @@ static BOOL CheckAllContactsOffline(void)
{
BOOL fSmartCheck, fAllOffline = TRUE; /* tentatively */
fSmartCheck = db_get_b(NULL, "AutoShutdown", "SmartOfflineCheck", SETTING_SMARTOFFLINECHECK_DEFAULT);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *pszProto = GetContactProto(hContact);
if (pszProto != nullptr && CallProtoService(pszProto, PS_GETSTATUS, 0, 0) != ID_STATUS_OFFLINE) {
if (db_get_b(hContact, pszProto, "ChatRoom", 0)) continue;
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 231386b321..030fbeb15c 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -542,7 +542,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam)
void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *proto = GetContactProto(hContact);
if (proto && (db_get_b(hContact, proto, "ChatRoom", 0) == 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND) && isContactGoneFor(hContact, options.iAbsencePeriod2) && (db_get_b(hContact, MODULE_NAME, "StillAbsentNotified", 0) == 0))
{
@@ -672,7 +672,7 @@ extern "C" int __declspec(dllexport) Load(void)
DBVARIANT dbv;
DWORD current_time = (DWORD)time(nullptr);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (!db_get(hContact, MODULE_NAME, "CreationTime", &dbv))
db_free(&dbv);
else
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp
index db6c577176..2cf090f633 100644
--- a/plugins/BuddyExpectator/src/options.cpp
+++ b/plugins/BuddyExpectator/src/options.cpp
@@ -246,7 +246,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
SaveOptions();
// clear all notified settings
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (db_get_b(hContact, MODULE_NAME, "StillAbsentNotified", 0))
db_set_b(hContact, MODULE_NAME, "StillAbsentNotified", 0);
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp
index 237204e886..8ae3ed9b05 100644
--- a/plugins/BuddyPounce/src/dialog.cpp
+++ b/plugins/BuddyPounce/src/dialog.cpp
@@ -12,7 +12,7 @@ void populateSettingsList(HWND hwnd2List)
void populateContacts(MCONTACT BPhContact, HWND hwnd2CB)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *szProto = GetContactProto(hContact);
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
wchar_t name[300];
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
index 498891c076..8221497252 100644
--- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp
+++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
@@ -866,7 +866,7 @@ extern "C" int __declspec(dllexport) Load(void)
Proto_RegisterModule(&pd);
//set all contacts to offline
- for (auto &hContact : contact_iter(PLUGINNAME))
+ for (auto &hContact : Contacts(PLUGINNAME))
db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE);
CreateProtoServiceFunction(PLUGINNAME, PS_GETCAPS, GetCaps);
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index c78cf1698e..e536d8ef43 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -89,7 +89,7 @@ static int HookDBEventAdded(WPARAM hContact, LPARAM hDbEvent)
static void ProcessUnreadEvents(void)
{
- 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 = {};
db_event_get(hDbEvent, &dbei);
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp
index d12ebf746b..292cd82fb8 100644
--- a/plugins/CountryFlags/src/extraimg.cpp
+++ b/plugins/CountryFlags/src/extraimg.cpp
@@ -63,14 +63,14 @@ static void CALLBACK SetExtraImage(MCONTACT hContact)
// always call in context of main thread
static void RemoveExtraImages(void)
{
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
ExtraIcon_Clear(hExtraIcon, hContact);
}
// always call in context of main thread
static void EnsureExtraImages(void)
{
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
SetExtraImage(hContact);
}
@@ -135,7 +135,7 @@ static int MsgWndEvent(WPARAM, LPARAM lParam)
void CALLBACK UpdateStatusIcons(LPARAM)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
/* is a message window opened for this contact? */
MessageWindowData msgw; /* output */
if (!Srmm_GetWindowData(hContact, msgw) && msgw.uState & MSG_WINDOW_STATE_EXISTS) {
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp
index 534fe7009b..13bd394571 100644
--- a/plugins/FavContacts/src/contact_cache.cpp
+++ b/plugins/FavContacts/src/contact_cache.cpp
@@ -80,7 +80,7 @@ void CContactCache::Rebuild()
unsigned long timestamp = time(nullptr);
m_lastUpdate = time(nullptr);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
TContactInfo *info = new TContactInfo;
info->hContact = hContact;
info->rate = 0;
diff --git a/plugins/FavContacts/src/favlist.h b/plugins/FavContacts/src/favlist.h
index 52c1679edf..c1836b44d6 100644
--- a/plugins/FavContacts/src/favlist.h
+++ b/plugins/FavContacts/src/favlist.h
@@ -111,7 +111,7 @@ public:
nGroups = 1;
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (db_get_b(hContact, "FavContacts", "IsFavourite", 0))
addContact(hContact, true);
diff --git a/plugins/FavContacts/src/options.cpp b/plugins/FavContacts/src/options.cpp
index c4e2ee901e..eac163e889 100644
--- a/plugins/FavContacts/src/options.cpp
+++ b/plugins/FavContacts/src/options.cpp
@@ -91,7 +91,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
hSelectedContact = db_find_first();
{
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_SETCHECKMARK,
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0),
db_get_b(hContact, "FavContacts", "IsFavourite", 0));
@@ -207,7 +207,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
sttSaveOptions();
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
BYTE fav = SendDlgItemMessage(hwnd, IDC_CLIST, CLM_GETCHECKMARK,
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0), 0);
if (fav != db_get_b(hContact, "FavContacts", "IsFavourite", 0))
@@ -225,7 +225,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
case CLN_NEWCONTACT:
iSelection = (INT_PTR)((NMCLISTCONTROL *)lParam)->hItem;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0) == iSelection) {
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_SETCHECKMARK, iSelection,
db_get_b(hContact, "FavContacts", "IsFavourite", 0));
@@ -236,7 +236,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
case CLN_CHECKCHANGED:
iSelection = (INT_PTR)((NMCLISTCONTROL *)lParam)->hItem;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0) == iSelection) {
hSelectedContact = hContact;
RedrawWindow(GetDlgItem(hwnd, IDC_CANVAS), nullptr, nullptr, RDW_INVALIDATE);
diff --git a/plugins/FavContacts/src/services.cpp b/plugins/FavContacts/src/services.cpp
index d221bdfc16..cdd8cbba7a 100644
--- a/plugins/FavContacts/src/services.cpp
+++ b/plugins/FavContacts/src/services.cpp
@@ -227,7 +227,7 @@ int ProcessModulesLoaded(WPARAM, LPARAM)
Hotkey_Register(&hotkey);
if (ServiceExists(MS_AV_GETAVATARBITMAP)) {
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (db_get_b(hContact, "FavContacts", "IsFavourite", 0))
CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
}
diff --git a/plugins/HistoryStats/src/dlgoption_subexclude.cpp b/plugins/HistoryStats/src/dlgoption_subexclude.cpp
index f94345ce7f..885cbb3d8a 100644
--- a/plugins/HistoryStats/src/dlgoption_subexclude.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subexclude.cpp
@@ -169,7 +169,7 @@ void DlgOption::SubExclude::saveSettings()
db.setModule(con::ModHistoryStats);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = reinterpret_cast<HANDLE>(SendMessage(hCList, CLM_FINDCONTACT, hContact, 0));
if (hItem) {
db.setContact(hContact);
@@ -240,7 +240,7 @@ void DlgOption::SubExclude::updateAllContacts(HWND hCList)
db.setModule(con::ModHistoryStats);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = reinterpret_cast<HANDLE>(SendMessage(hCList, CLM_FINDCONTACT, hContact, 0));
if (hItem) {
db.setContact(hContact);
diff --git a/plugins/HistoryStats/src/mirandahistory.cpp b/plugins/HistoryStats/src/mirandahistory.cpp
index fe96757165..792b6fcf46 100644
--- a/plugins/HistoryStats/src/mirandahistory.cpp
+++ b/plugins/HistoryStats/src/mirandahistory.cpp
@@ -61,7 +61,7 @@ void MirandaHistory::readContacts()
std::vector<MCONTACT> sources;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
db.setContact(hContact);
const char* pProtoName = GetContactProto(hContact);
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
index c54268c5cc..ffb4298471 100644
--- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp
+++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
@@ -201,7 +201,7 @@ void ShutdownAction(void)
SweepHistoryFromContact(NULL, Criteria, FALSE); // sweep system history, keepunread==0
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
SweepHistoryFromContact(hContact, Criteria, TRUE); // sweep contact history, keepunread==1
}
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp
index 3100ea18ce..b6826d4c57 100644
--- a/plugins/HistorySweeperLight/src/options.cpp
+++ b/plugins/HistorySweeperLight/src/options.cpp
@@ -91,7 +91,7 @@ static void ShowAllContactIcons(HWND hwndList)
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hSystemHistory,
MAKELPARAM(0, db_get_b(NULL, ModuleName, "SweepSHistory", 0)));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem,
MAKELPARAM(0, db_get_b(hContact, ModuleName, "SweepHistory", 0)));
@@ -150,7 +150,7 @@ void SaveSettings(HWND hwndDlg)
db_set_b(NULL, ModuleName, "SweepSHistory",
(BYTE)SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hSystemHistory, 0));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
int st = SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, 0);
diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp
index e5b30c0a39..ef00426533 100644
--- a/plugins/IgnoreState/src/main.cpp
+++ b/plugins/IgnoreState/src/main.cpp
@@ -135,7 +135,7 @@ int onModulesLoaded(WPARAM, LPARAM)
fill_filter();
// Set initial value for all contacts
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
applyExtraImage(hContact);
return 0;
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp
index f476905a4d..5869374523 100644
--- a/plugins/KeyboardNotify/src/ignore.cpp
+++ b/plugins/KeyboardNotify/src/ignore.cpp
@@ -171,7 +171,7 @@ static void SetAllContactIcons(HWND hwndList)
{
DWORD protoCaps;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if(hItem && SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX, 0)) == EMPTY_EXTRA_ICON) {
char *szProto = GetContactProto(hContact);
@@ -294,7 +294,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPa
{
case PSN_APPLY:
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, hContact, 0);
if(hItem)
SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 47c452af1a..6233fae662 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -178,7 +178,7 @@ int ModulesLoaded(WPARAM, LPARAM)
EnableDisablePlayers();
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *proto = GetContactProto(hContact);
if (proto != nullptr) {
DBVARIANT dbv;
diff --git a/plugins/ListeningTo/src/players/mradio.cpp b/plugins/ListeningTo/src/players/mradio.cpp
index b65a7e2db4..5b837e4aa9 100644
--- a/plugins/ListeningTo/src/players/mradio.cpp
+++ b/plugins/ListeningTo/src/players/mradio.cpp
@@ -34,7 +34,7 @@ void MRadio::EnableDisable()
int MRadio::GetData()
{
- for (auto &hContact : contact_iter("mRadio")) {
+ for (auto &hContact : Contacts("mRadio")) {
WORD status = db_get_w(hContact, "mRadio", "Status", ID_STATUS_OFFLINE);
if (status != ID_STATUS_ONLINE)
continue;
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index e93f6dc43e..46903559dd 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -1716,7 +1716,7 @@ extern "C" int __declspec(dllexport) Load(void)
Proto_RegisterModule(&pd);
// set all contacts to offline
- for (auto &hContact : contact_iter(PLUGINNAME))
+ for (auto &hContact : Contacts(PLUGINNAME))
db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE);
CreateProtoServiceFunction(PLUGINNAME, PS_GETCAPS, GetCaps);
diff --git a/plugins/MessageState/src/messagestate.cpp b/plugins/MessageState/src/messagestate.cpp
index c5b628a10e..3512aed20d 100644
--- a/plugins/MessageState/src/messagestate.cpp
+++ b/plugins/MessageState/src/messagestate.cpp
@@ -109,7 +109,7 @@ int OnModulesLoaded(WPARAM, LPARAM)
InitClistExtraIcon();
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
IconsUpdate(hContact);
return 0;
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp
index b57156d191..8831b932da 100644
--- a/plugins/MirFox/src/MirandaOptions.cpp
+++ b/plugins/MirFox/src/MirandaOptions.cpp
@@ -464,7 +464,7 @@ INT_PTR CALLBACK DlgProcOpts_Tab2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case PSN_APPLY:
{
- for (auto &hContact : contact_iter()){
+ for (auto &hContact : Contacts()){
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC2_CONTACTS_LIST, CLM_FINDCONTACT, hContact, 0);
if(hItem) {
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp
index 5391d8063f..877ad01dbc 100644
--- a/plugins/MirFox/src/MirandaUtils.cpp
+++ b/plugins/MirFox/src/MirandaUtils.cpp
@@ -504,7 +504,7 @@ void MirandaUtils::translateOldDBNames() {
}
//contacts "state"
- for (auto &hContact : contact_iter()){
+ for (auto &hContact : Contacts()){
logger->log_p(L"TranslateOldDBNames: found CONTACT: [" SCNuPTR L"]", hContact);
int keyValue = db_get_b(hContact, OLD_PLUGIN_DB_ID, "state", 0);
diff --git a/plugins/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp
index e63cdf25bb..aad3018e48 100644
--- a/plugins/MirFox/src/MirfoxData.cpp
+++ b/plugins/MirFox/src/MirfoxData.cpp
@@ -631,7 +631,7 @@ void MirfoxData::initializeMirandaContacts()
//get contects from miranda
- for (auto &hContact : contact_iter()){
+ for (auto &hContact : Contacts()){
//"Hidden" contacts not allowed in MirfoxData and SM, "NotOnList" contacts allowed and enabled
if (db_get_b(hContact, "CList", "Hidden", 0) == 1) continue;
diff --git a/plugins/MirOTR/src/dllmain.cpp b/plugins/MirOTR/src/dllmain.cpp
index e39ec14d2f..f3bc0c756c 100644
--- a/plugins/MirOTR/src/dllmain.cpp
+++ b/plugins/MirOTR/src/dllmain.cpp
@@ -82,7 +82,7 @@ extern "C" __declspec(dllexport) int Load(void)
// remove us as a filter to all contacts - fix filter type problem
if(db_get_b(0, MODULENAME, "FilterOrderFix", 0) != 2) {
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
Proto_RemoveFromContact(hContact, MODULENAME);
db_set_b(0, MODULENAME, "FilterOrderFix", 2);
}
diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp
index 8f57399a2d..c458cce276 100644
--- a/plugins/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/src/options.cpp
@@ -548,7 +548,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM
// items.
lvI.mask = LVIF_TEXT | LVIF_PARAM;// | LVIF_NORECOMPUTE;// | LVIF_IMAGE;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
const char *proto = GetContactProto(hContact);
if (proto && db_get_b(hContact, proto, "ChatRoom", 0) == 0 && Proto_IsProtoOnContact(hContact, MODULENAME) // ignore chatrooms
&& mir_strcmp(proto, META_PROTO) != 0) // and MetaContacts
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index 5c0c9d922e..acad664c75 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -9,7 +9,7 @@ void lib_cs_lock()
MCONTACT find_contact(const char* userid, const char* protocol)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
const char *proto = GetContactProto(hContact);
if(proto && mir_strcmp(proto, protocol) == 0) {
char *name = contact_get_id(hContact);
diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp
index 64928c8213..46a3f348f1 100644
--- a/plugins/MobileState/src/main.cpp
+++ b/plugins/MobileState/src/main.cpp
@@ -96,7 +96,7 @@ int onContactSettingChanged(WPARAM wParam, LPARAM lParam)
int onModulesLoaded(WPARAM, LPARAM)
{
// Set initial value for all contacts
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
ExtraIconsApply(hContact, 1);
return 0;
diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp
index 16e8b4d3ba..51e171a07b 100644
--- a/plugins/NewAwaySysMod/src/AwayOpt.cpp
+++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp
@@ -853,7 +853,7 @@ static void SetAllContactIcons(HWND hwndList, HANDLE hItemUnknown)
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItemUnknown, MAKELPARAM(IGNORECOLUMN, DBValueToIgnoreIcon(CContactSettings(ID_STATUS_ONLINE, INVALID_CONTACT_ID).Ignore)));
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItemUnknown, MAKELPARAM(AUTOREPLYCOLUMN, DBValueToOptReplyIcon(CContactSettings(ID_STATUS_ONLINE, INVALID_CONTACT_ID).Autoreply)));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
int Ignore = CContactSettings(ID_STATUS_ONLINE, hContact).Ignore;
@@ -921,7 +921,7 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam)
cii.pszText = TranslateT("** Not-on-list contacts **"); // == Unknown contacts
hItemUnknown = (HANDLE)SendMessage(hwndList, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *szProto = GetContactProto(hContact);
if (szProto) {
int Flag1 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
@@ -995,7 +995,7 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam)
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SaveItemState(hwndList, hContact, hItem);
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index 37f378319d..c0d049f1fb 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -133,7 +133,7 @@ int StatusMsgReq(WPARAM wParam, LPARAM lParam, CString &szProto)
// find the contact
char *szFoundProto;
MCONTACT hFoundContact = NULL; // if we'll find the contact only on some other protocol, but not on szProto, then we'll use that hContact.
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *szCurProto = GetContactProto(hContact);
if (db_get_dw(hContact, szCurProto, "UIN", 0) == lParam) {
szFoundProto = szCurProto;
diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp
index 64b6ac0f83..c68b1bfd17 100644
--- a/plugins/NewAwaySysMod/src/Properties.cpp
+++ b/plugins/NewAwaySysMod/src/Properties.cpp
@@ -34,7 +34,7 @@ void ResetSettingsOnStatusChange(const char *szProto = nullptr, int bResetPerson
if (bResetPersonalMsgs)
bResetPersonalMsgs = !g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_SAVEPERSONALMSGS);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
const char *szCurProto;
if (!szProto || ((szCurProto = GetContactProto(hContact)) && !mir_strcmp(szProto, szCurProto))) {
ResetContactSettingsOnStatusChange(hContact);
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
index e953b125c3..d591f306d4 100644
--- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
@@ -879,7 +879,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
}
CList->SetRedraw(false);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *szProto = GetContactProto(hContact);
if (szProto) {
int Flag1 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp
index 29e9bf0787..697e59dc34 100644
--- a/plugins/NewXstatusNotify/src/indsnd.cpp
+++ b/plugins/NewXstatusNotify/src/indsnd.cpp
@@ -301,7 +301,7 @@ void SetAllContactsIcons(HWND hwndList)
{
BYTE EnableSounds, EnablePopups, EnableXStatus, EnableXLogging, EnableStatusMsg, EnableSMsgLogging;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
char *szProto = GetContactProto(hContact);
@@ -542,7 +542,7 @@ INT_PTR CALLBACK DlgProcFiltering(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam)
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendMessage(hList, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
if (GetExtraImage(hList, hItem, EXTRA_IMAGE_SOUND) == EXTRA_IMAGE_SOUND)
diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp
index 87faa64938..3f4925a08f 100755
--- a/plugins/New_GPG/src/icons.cpp
+++ b/plugins/New_GPG/src/icons.cpp
@@ -68,7 +68,7 @@ void setSrmmIcon(MCONTACT h)
void RefreshContactListIcons()
{
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
setClistIcon(hContact);
Clist_EndRebuild();
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 07e3840372..f9e1a71348 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -59,7 +59,7 @@ public:
list_USERLIST.AddColumn(4, TranslateT("Protocol"), 60);
list_USERLIST.SetExtendedListViewStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_SINGLEROW);
int i = 1;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (isContactHaveKey(hContact)) {
wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0);
@@ -171,7 +171,7 @@ public:
ismetacontact = true;
}
tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID", "");
- for (auto &hcnttmp : contact_iter()) {
+ for (auto &hcnttmp : Contacts()) {
if (hcnttmp != hContact) {
char *tmp2 = UniGetContactSettingUtf(hcnttmp, szGPGModuleName, "KeyID", "");
if (!mir_strcmp(tmp, tmp2)) {
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 99eb4e35f7..a9acfe95af 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -1249,7 +1249,7 @@ void ExportGpGKeysFunc(int type)
if (!file.is_open())
return; //TODO: handle error
if (!type || type == 2) {
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *k = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", "");
std::string key;
if (!k[0]) {
@@ -1531,7 +1531,7 @@ INT_PTR ImportGpGKeys(WPARAM, LPARAM)
}
if (acc.length()) {
const char * uid = (const char*)CallProtoService(acc.c_str(), PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDSETTING, 0);
- for (auto &hContact : contact_iter(acc.c_str())) {
+ for (auto &hContact : Contacts(acc.c_str())) {
DBVARIANT dbv = { 0 };
db_get(hContact, acc.c_str(), uid, &dbv);
std::string id;
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp
index 592a2dbbd2..a631c749fa 100644
--- a/plugins/NoHistory/src/options.cpp
+++ b/plugins/NoHistory/src/options.cpp
@@ -77,7 +77,7 @@ static void ResetListOptions(HWND hwndList)
static void SetAllContactIcons(HWND hwndList)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
@@ -191,7 +191,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp
index b7e45a7154..b0164a9ed7 100644
--- a/plugins/Non-IM Contact/src/files.cpp
+++ b/plugins/Non-IM Contact/src/files.cpp
@@ -14,7 +14,7 @@ INT_PTR exportContacts(WPARAM, LPARAM)
if (!file)
return 0;
- for (auto &hContact : contact_iter(MODNAME)) {
+ for (auto &hContact : Contacts(MODNAME)) {
int tmp;
char DBVar[1024];
if (!db_get_static(hContact, MODNAME, "Name", DBVar, _countof(DBVar))) {
diff --git a/plugins/Non-IM Contact/src/services.cpp b/plugins/Non-IM Contact/src/services.cpp
index 649ae0100b..5396a5af42 100644
--- a/plugins/Non-IM Contact/src/services.cpp
+++ b/plugins/Non-IM Contact/src/services.cpp
@@ -62,7 +62,7 @@ int SetLCStatus(WPARAM wParam, LPARAM)
else if (db_get_w(NULL, MODNAME, "Timer", 1))
startTimer(TIMER);
- for (auto &hContact : contact_iter(MODNAME)) {
+ for (auto &hContact : Contacts(MODNAME)) {
if (LCStatus != ID_STATUS_OFFLINE)
replaceAllStrings(hContact);
diff --git a/plugins/Non-IM Contact/src/timer.cpp b/plugins/Non-IM Contact/src/timer.cpp
index 31b9616c46..b076d9284f 100644
--- a/plugins/Non-IM Contact/src/timer.cpp
+++ b/plugins/Non-IM Contact/src/timer.cpp
@@ -40,7 +40,7 @@ void timerFunc(void*)
}
/* update all the contacts */
- for (auto &hContact : contact_iter(MODNAME)) {
+ for (auto &hContact : Contacts(MODNAME)) {
int timer = db_get_w(hContact, MODNAME, "Timer", 15);
if (timer && !(timerCount % timer))
if (!db_get_static(hContact, MODNAME, "Name", text, _countof(text)))
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 5ac56f6adb..72489fc90d 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -328,7 +328,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all)
// item data of listbox-strings is the array position
FreeContacts();
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *pszProto = GetContactProto(hContact);
if (pszProto == nullptr)
continue;
diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp
index 279700170e..081023b6a2 100644
--- a/plugins/Quotes/src/ImportExport.cpp
+++ b/plugins/Quotes/src/ImportExport.cpp
@@ -222,7 +222,7 @@ INT_PTR Quotes_Export(WPARAM wp, LPARAM lp)
}
}
else {
- for (auto &hContact : contact_iter(QUOTES_MODULE_NAME)) {
+ for (auto &hContact : Contacts(QUOTES_MODULE_NAME)) {
CQuotesProviders::TQuotesProviderPtr pProvider = pProviders->GetContactProviderPtr(hContact);
if (pProvider) {
IXMLNode::TXMLNodePtr pNode = export_contact(hContact, pXmlEngine);
diff --git a/plugins/Quotes/src/QuotesProviders.cpp b/plugins/Quotes/src/QuotesProviders.cpp
index ebfff01994..f12c0f39df 100644
--- a/plugins/Quotes/src/QuotesProviders.cpp
+++ b/plugins/Quotes/src/QuotesProviders.cpp
@@ -51,7 +51,7 @@ void CQuotesProviders::InitProviders()
const WORD nCurrentVersion = 17;
WORD nVersion = db_get_w(NULL, QUOTES_MODULE_NAME, LAST_RUN_VERSION, 1);
- for (auto &hContact : contact_iter(QUOTES_MODULE_NAME)) {
+ for (auto &hContact : Contacts(QUOTES_MODULE_NAME)) {
TQuotesProviderPtr pProvider = GetContactProviderPtr(hContact);
if (pProvider) {
pProvider->AddContact(hContact);
diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp
index a5df2a30fe..f0df6cdaa6 100644
--- a/plugins/Rate/src/main.cpp
+++ b/plugins/Rate/src/main.cpp
@@ -99,7 +99,7 @@ static IconItem iconList[] =
int onModulesLoaded(WPARAM, LPARAM)
{
// Set initial value for all contacts
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
setExtraIcon(hContact, -1, FALSE);
return 0;
diff --git a/plugins/SecureIM/src/crypt_icons.cpp b/plugins/SecureIM/src/crypt_icons.cpp
index a428bdbefc..2d08e017e7 100644
--- a/plugins/SecureIM/src/crypt_icons.cpp
+++ b/plugins/SecureIM/src/crypt_icons.cpp
@@ -109,7 +109,7 @@ void RefreshContactListIcons(void)
for (auto &it : arIcoList)
it->hCLIcon = nullptr;
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (isSecureProtocol(hContact))
ShowStatusIcon(hContact);
}
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp
index 9ccba72941..29bc80c0b9 100644
--- a/plugins/SecureIM/src/crypt_lists.cpp
+++ b/plugins/SecureIM/src/crypt_lists.cpp
@@ -120,7 +120,7 @@ void loadContactList()
freeContactList();
loadSupportedProtocols();
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
addContact(hContact);
}
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp
index 0912acf37b..03977ca69a 100644
--- a/plugins/SecureIM/src/options.cpp
+++ b/plugins/SecureIM/src/options.cpp
@@ -975,7 +975,7 @@ void RefreshGeneralDlg(HWND hDlg, BOOL iInit)
char tmp[NAMSIZE];
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
pUinKey ptr = getUinKey(hContact);
if (ptr && isSecureProtocol(hContact) && !isChatRoom(hContact)) {
if (iInit) {
@@ -1061,7 +1061,7 @@ void RefreshPGPDlg(HWND hDlg, BOOL iInit)
char tmp[NAMSIZE];
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
pUinKey ptr = getUinKey(hContact);
if (ptr && ptr->mode == MODE_PGP && isSecureProtocol(hContact) && !isChatRoom(hContact)) {
LPSTR szKeyID = db_get_sa(hContact, MODULENAME, "pgp_abbr");
@@ -1121,7 +1121,7 @@ void RefreshGPGDlg(HWND hDlg, BOOL iInit)
char tmp[NAMSIZE];
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
pUinKey ptr = getUinKey(hContact);
if (ptr && ptr->mode == MODE_GPG && isSecureProtocol(hContact) && !isChatRoom(hContact)) {
if (iInit)
@@ -1174,7 +1174,7 @@ void ResetGeneralDlg(HWND hDlg)
lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
char tmp[NAMSIZE];
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (!isSecureProtocol(hContact) || isChatRoom(hContact))
continue;
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index 4d80f6cb10..020a2bd435 100644
--- a/plugins/ShellExt/src/shlcom.cpp
+++ b/plugins/ShellExt/src/shlcom.cpp
@@ -252,7 +252,7 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode)
TSlotInfo *pContacts = (TSlotInfo*)mir_alloc((dwContacts + 2) * sizeof(TSlotInfo));
int i = 0;
int dwOnline = 0;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (i >= dwContacts)
break;
@@ -342,7 +342,7 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode)
// worker thread to clear MRU, called by the IPC bridge
void __cdecl ClearMRUThread(void*)
{
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
if (db_get_b(hContact, SHLExt_Name, SHLExt_MRU, 0) > 0)
db_set_b(hContact, SHLExt_Name, SHLExt_MRU, 0);
}
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index c1de51a2d0..c373c84401 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -1617,7 +1617,7 @@ static int OnICQStatusMsgRequest(WPARAM wParam, LPARAM lParam, LPARAM lMirParam)
BOOL bContactFound = FALSE;
MCONTACT hContact;
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (db_get_dw(hContact, szProto, "UIN", 0) == (DWORD)lParam) {
bContactFound = TRUE;
break;
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index 10f4ec4dfb..a805dc8521 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -485,7 +485,7 @@ void RemoveNotOnListSettings()
DBVARIANT dbv;
char protoName[256] = { 0 };
mir_strcpy(protoName, "proto_");
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (db_get_s(hContact, "Protocol", "p", &dbv) == 0) {
mir_strcat(protoName, dbv.pszVal);
if (_getOptB(protoName, 0) != 0) {
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index c5b3981abc..be3667ed3a 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -255,7 +255,7 @@ void __cdecl CleanProtocolTmpThread(void *param)
}
std::list<MCONTACT> contacts;
- for (auto &hContact : contact_iter(szProto))
+ for (auto &hContact : Contacts(szProto))
if (db_get_b(hContact, "CList", "NotOnList", 0) || (L"Not In List" == DBGetContactSettingStringPAN(hContact, "CList", "Group", L"")))
contacts.push_back(hContact);
@@ -285,7 +285,7 @@ void __cdecl CleanProtocolExclThread(void *param)
}
std::list<MCONTACT> contacts;
- for (auto &hContact : contact_iter(szProto))
+ for (auto &hContact : Contacts(szProto))
if (db_get_b(hContact, "CList", "NotOnList", 0) && db_get_b(hContact, pluginName, "Excluded", 0))
contacts.push_back(hContact);
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 74b60f1e25..c5e0a5795d 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -719,7 +719,7 @@ void CTooltipNotify::LoadList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown
if (hItemUnknown && !m_sOptions.bIgnoreUnknown)
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, MODULENAME, CONTACT_IGNORE_TTNOTIFY, m_sOptions.bIgnoreNew))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -734,7 +734,7 @@ void CTooltipNotify::SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown
if (hItemUnknown)
m_sOptions.bIgnoreUnknown = (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 0 : 1);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
BYTE bChecked = (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0));
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index 3053895860..c69558c13f 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -70,7 +70,7 @@ void ChangeContactStatus(int con_stat)
if (con_stat == 3)
status_code = ID_STATUS_NA;
- for (auto &hContact : contact_iter(MODULENAME))
+ for (auto &hContact : Contacts(MODULENAME))
db_set_w(hContact, MODULENAME, "Status", status_code);
}
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp
index f15977bb1d..bd83ccab8b 100644
--- a/plugins/WebView/src/webview.cpp
+++ b/plugins/WebView/src/webview.cpp
@@ -94,7 +94,7 @@ void FillFontListThread(void *param)
/*****************************************************************************/
void TxtclrLoop()
{
- for (auto &hContact : contact_iter(MODULENAME)) {
+ for (auto &hContact : Contacts(MODULENAME)) {
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
SetDlgItemText(hwndDlg, IDC_DATA, L"");
InvalidateRect(hwndDlg, nullptr, 1);
@@ -104,7 +104,7 @@ void TxtclrLoop()
/*****************************************************************************/
void BGclrLoop()
{
- for (auto &hContact : contact_iter(MODULENAME)) {
+ for (auto &hContact : Contacts(MODULENAME)) {
HWND hwndDlg = (WindowList_Find(hWindowList, hContact));
SetDlgItemText(hwndDlg, IDC_DATA, L"");
SendDlgItemMessage(hwndDlg, IDC_DATA, EM_SETBKGNDCOLOR, 0, BackgoundClr);
@@ -118,7 +118,7 @@ void StartUpdate(void*)
StartUpDelay = 1;
Sleep(((db_get_dw(NULL, MODULENAME, START_DELAY_KEY, 0)) * SECOND));
- for (auto &hContact : contact_iter(MODULENAME))
+ for (auto &hContact : Contacts(MODULENAME))
GetData((void*)hContact);
StartUpDelay = 0;
@@ -128,7 +128,7 @@ void StartUpdate(void*)
void ContactLoop(void*)
{
if (StartUpDelay == 0) {
- for (auto &hContact : contact_iter(MODULENAME)) {
+ for (auto &hContact : Contacts(MODULENAME)) {
GetData((void*)hContact);
Sleep(10); // avoid 100% CPU
}
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp
index b467e396f1..2bd17e4863 100644
--- a/plugins/WebView/src/webview_datawnd.cpp
+++ b/plugins/WebView/src/webview_datawnd.cpp
@@ -128,7 +128,7 @@ static MCONTACT FindContactByUrl(HWND hwndDlg)
GetDlgItemText(hwndDlg, IDC_OPEN_URL, urltext, _countof(urltext));
GetWindowText(hwndDlg, titlebartxt, _countof(titlebartxt));
- for (auto &hContact : contact_iter(MODULENAME)) {
+ for (auto &hContact : Contacts(MODULENAME)) {
ptrW db1( db_get_wsa(hContact, MODULENAME, URL_KEY));
ptrW db2( db_get_wsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp
index 585b85fe77..6a3197e425 100644
--- a/plugins/WebView/src/webview_services.cpp
+++ b/plugins/WebView/src/webview_services.cpp
@@ -250,7 +250,7 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM)
// Make sure no contact has offline status for any reason on first time run
if ( db_get_b(NULL, MODULENAME, "FirstTime", 100) == 100) {
- for (auto &hContact : contact_iter(MODULENAME))
+ for (auto &hContact : Contacts(MODULENAME))
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
db_set_b(NULL, MODULENAME, "FirstTime", 1);
@@ -345,7 +345,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
if (psr->cbSize != sizeof(PROTOSEARCHRESULT))
return NULL;
// search for existing contact
- for (auto &hContact : contact_iter(MODULENAME)) {
+ for (auto &hContact : Contacts(MODULENAME)) {
// check ID to see if the contact already exist in the database
if (db_get_ws(hContact, MODULENAME, "URL", &dbv))
continue;
@@ -398,7 +398,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
wchar_t *Nend = wcschr(Newnick, '.');
if (Nend) *Nend = '\0';
- for (auto &hContact2 : contact_iter(MODULENAME)) {
+ for (auto &hContact2 : Contacts(MODULENAME)) {
if (!db_get_ws(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
if (!mir_wstrcmpi(Newnick, dbv.ptszVal)) {
// remove the flag for not on list and hidden, thus make the
@@ -456,6 +456,6 @@ INT_PTR GetInfo(WPARAM, LPARAM)
/*****************************************************************************/
void AckFunc(void*)
{
- for (auto &hContact : contact_iter(MODULENAME))
+ for (auto &hContact : Contacts(MODULENAME))
ProtoBroadcastAck(MODULENAME, hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index 1a98e5c4b3..4e1260f834 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -704,7 +704,7 @@ int LoadBirthdays(HWND hWnd, int bShowAll)
ListView_DeleteAllItems(hList);
int count = 0;
- for (auto &hContact : contact_iter())
+ for (auto &hContact : Contacts())
count = UpdateBirthdayEntry(hList, hContact, count, bShowAll, commonData.cShowAgeMode, 1);
SetBirthdaysCount(hWnd);
diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp
index 2f1e3e80ff..91605c80b3 100644
--- a/plugins/WhenWasIt/src/notifiers.cpp
+++ b/plugins/WhenWasIt/src/notifiers.cpp
@@ -205,7 +205,7 @@ int SoundNotifyBirthday(int dtb)
//called with oldClistIcon != -1 from dlg_handlers whtn the extra icon slot changes.
int RefreshAllContactListIcons(int oldClistIcon)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
if (oldClistIcon != -1)
ExtraIcon_Clear(hWWIExtraIcons, hContact);
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp
index 55a31d50af..efe7248156 100644
--- a/plugins/WhenWasIt/src/services.cpp
+++ b/plugins/WhenWasIt/src/services.cpp
@@ -299,7 +299,7 @@ int DoExport(wchar_t *fileName)
fwprintf(fout, L"%c%s", COMMENT_CHAR, TranslateT("Warning! Please do not mix Unicode and Ansi exported birthday files. You should use the same version (Ansi/Unicode) of WhenWasIt that was used to export the info.\n"));
fwprintf(fout, L"%c%s", COMMENT_CHAR, TranslateT("This file was exported with a Unicode version of WhenWasIt. Please only use a Unicode version of the plugin to import the birthdays.\n"));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
int year, month, day;
GetContactDOB(hContact, year, month, day);
if (IsDOBValid(year, month, day)) {
diff --git a/plugins/WhenWasIt/src/utils.cpp b/plugins/WhenWasIt/src/utils.cpp
index b44fbdc384..9c807e8643 100644
--- a/plugins/WhenWasIt/src/utils.cpp
+++ b/plugins/WhenWasIt/src/utils.cpp
@@ -151,7 +151,7 @@ wchar_t* GetContactID(MCONTACT hContact, char *szProto)
MCONTACT GetContactFromID(wchar_t *szID, char *szProto)
{
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *m_szProto = GetContactProto(hContact);
wchar_t *szHandle = GetContactID(hContact, szProto);
if (szHandle) {
diff --git a/plugins/WinterSpeak/src/ConfigDatabase.cpp b/plugins/WinterSpeak/src/ConfigDatabase.cpp
index 237ec202b8..d7b643c18c 100644
--- a/plugins/WinterSpeak/src/ConfigDatabase.cpp
+++ b/plugins/WinterSpeak/src/ConfigDatabase.cpp
@@ -89,7 +89,7 @@ void ConfigDatabase::load()
m_welcome_msg = DBGetContactSettingString(SPEAK, WELCOME_MSG, L"Welcome to Miranda");
// iterate through all the users and add them to the list if active
- for (auto &contact : contact_iter()) {
+ for (auto &contact : Contacts()) {
m_active_users[contact].status = (db_get_b(contact, SPEAK, ACTIVE_STATE, true) != 0);
m_active_users[contact].message = (db_get_b(contact, SPEAK, ACTIVE_MSG, true) != 0);
}
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp
index 65f59b26a4..dad1d5153b 100644
--- a/plugins/WinterSpeak/src/DialogConfigActive.cpp
+++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp
@@ -325,7 +325,7 @@ void DialogConfigActive::save(HWND window)
m_db.setActiveFlag(ConfigDatabase::ActiveFlag_FreeForChat, (IsDlgButtonChecked(window, IDC_ACTIVE_FREEFORCHAT) != 0));
m_db.setActiveFlag(ConfigDatabase::ActiveFlag_Invisible, (IsDlgButtonChecked(window, IDC_ACTIVE_INVISIBLE) != 0));
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(window, IDC_ACTIVE_USERS, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SaveItemMask(GetDlgItem(window, IDC_ACTIVE_USERS), hContact, hItem);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp
index f84c355f1d..ef8eb7c084 100644
--- a/plugins/XSoundNotify/src/options.cpp
+++ b/plugins/XSoundNotify/src/options.cpp
@@ -51,7 +51,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
PROTOACCOUNT *pa = (PROTOACCOUNT *)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_PROTO, CB_GETITEMDATA, cursel, 0);
SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_SETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_ADDSTRING, 0, (LPARAM)TranslateT("All contacts")), cursel);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
char *szUniqueId = nullptr;
if (db_get_b(hContact, pa->szModuleName, "ChatRoom", 0))
szUniqueId = "ChatRoomID";
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp
index fe5d3bdeb1..8a2fba246b 100644
--- a/plugins/YARelay/src/options.cpp
+++ b/plugins/YARelay/src/options.cpp
@@ -67,7 +67,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_COMBO_TO, CB_SETITEMDATA, (WPARAM)idx, 0);
SendDlgItemMessage(hwndDlg, IDC_COMBO_TO, CB_SETCURSEL, (WPARAM)idx, 0);
- for (auto &hContact : contact_iter()) {
+ for (auto &hContact : Contacts()) {
wchar_t *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
if (ptszNick){
idx = SendDlgItemMessage(hwndDlg, IDC_COMBO_TO, CB_ADDSTRING, 0, (LPARAM)ptszNick);
diff --git a/protocols/MinecraftDynmap/src/chat.cpp b/protocols/MinecraftDynmap/src/chat.cpp
index d51d02fcd1..7fd96f73e2 100644
--- a/protocols/MinecraftDynmap/src/chat.cpp
+++ b/protocols/MinecraftDynmap/src/chat.cpp
@@ -189,7 +189,7 @@ MCONTACT MinecraftDynmapProto::GetChatHandle()
/*if (chatHandle_ != NULL)
return chatHandle_;
- for (auto &hContact : acc_contact_iter()) {
+ for (auto &hContact : AccContacts()) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) > 0) {
ptrA id = db_get_sa(hContact, m_szModuleName, "ChatRoomId");
if (id != NULL && !strcmp(id, m_szModuleName))
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp
index e3ab206286..5af8301681 100644
--- a/protocols/Omegle/src/chat.cpp
+++ b/protocols/Omegle/src/chat.cpp
@@ -336,7 +336,7 @@ MCONTACT OmegleProto::GetChatHandle()
/*if (facy.chatHandle_ != NULL)
return facy.chatHandle_;
- for (auto &hContact : acc_contact_iter()) {
+ for (auto &hContact : AccContacts()) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) > 0) {
ptrA id = db_get_sa(hContact, m_szModuleName, "ChatRoomId");
if (id != NULL && !mir_strcmp(id, m_szModuleName))
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp
index 01770d382c..6f0d783b14 100644
--- a/protocols/Sametime/src/sametime.cpp
+++ b/protocols/Sametime/src/sametime.cpp
@@ -223,7 +223,7 @@ void CSametimeProto::SetAllOffline()
{
debugLogW(L"SetAllOffline() start");
- for (auto &hContact : acc_contact_iter()) {
+ for (auto &hContact : AccContacts()) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0)) {
db_delete_contact(hContact);
continue;
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp
index 50f564f1d3..6016e9df27 100644
--- a/protocols/Sametime/src/session_announce_win.cpp
+++ b/protocols/Sametime/src/session_announce_win.cpp
@@ -40,7 +40,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
lvI.iItem = 0;
lvI.iSubItem = 0;
- for (auto &hContact : proto->acc_contact_iter()) {
+ for (auto &hContact : proto->AccContacts()) {
if (db_get_b(hContact, proto->m_szModuleName, "ChatRoom", 0) == 0
&& db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
lvI.lParam = (LPARAM)hContact;
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp
index 777d174aa0..f155fa6cb0 100644
--- a/protocols/Sametime/src/userlist.cpp
+++ b/protocols/Sametime/src/userlist.cpp
@@ -4,7 +4,7 @@
MCONTACT CSametimeProto::FindContactByUserId(const char* id)
{
DBVARIANT dbv;
- for (auto &hContact : acc_contact_iter()) {
+ for (auto &hContact : AccContacts()) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
if (dbv.pszVal && mir_strcmp(id, dbv.pszVal) == 0) {
db_free(&dbv);
@@ -204,7 +204,7 @@ void CSametimeProto::ExportContactsToList(mwSametimeList* user_list)
mwIdBlock uid;
GList* gl = nullptr;
- for (auto &hContact : acc_contact_iter()) {
+ for (auto &hContact : AccContacts()) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
if (dbv.pszVal) {
if (GetAwareIdFromContact(hContact, &id_block)) {
@@ -594,7 +594,7 @@ void CSametimeProto::UserListCreate()
mwAwareIdBlock id_block;
GList *gl = nullptr;
- for (auto &hContact : acc_contact_iter()) {
+ for (auto &hContact : AccContacts()) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0 /*&& proto && !mir_strcmp( PROTO, proto)*/) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
if (dbv.pszVal) {
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index 9bdfdc8bf3..6bdae22900 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -2,7 +2,7 @@
void CSteamProto::SetAllContactStatuses(int status)
{
- for (auto &hContact : acc_contact_iter())
+ for (auto &hContact : AccContacts())
SetContactStatus(hContact, status);
}
@@ -71,7 +71,7 @@ MCONTACT CSteamProto::GetContactFromAuthEvent(MEVENT hEvent)
MCONTACT CSteamProto::GetContact(const char *steamId)
{
- for (auto &hContact : acc_contact_iter()) {
+ for (auto &hContact : AccContacts()) {
ptrA cSteamId(getStringA(hContact, "SteamID"));
if (!mir_strcmp(cSteamId, steamId))
return hContact;
@@ -428,7 +428,7 @@ void CSteamProto::OnGotFriendList(const JSONNode &root, void*)
}
// Check and update contacts in database
- for (auto &hContact : acc_contact_iter()) {
+ for (auto &hContact : AccContacts()) {
ptrA steamId(getStringA(hContact, "SteamID"));
if (steamId == nullptr)
continue;