summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-25 21:19:01 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-25 21:19:01 +0000
commit831890a8024a9519cdf725c5a098898734e54e93 (patch)
tree2a124d40ecb90fd74b331230ce966dee374719c5 /plugins
parentd84c40216b5e60224eb365f633b5f142d459fc9e (diff)
metacontacts in the database cache
git-svn-id: http://svn.miranda-ng.org/main/trunk@8276 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Db3x_mmap/src/dbcontacts.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp
index 576b19a4f8..09bb9a3e91 100644
--- a/plugins/Db3x_mmap/src/dbcontacts.cpp
+++ b/plugins/Db3x_mmap/src/dbcontacts.cpp
@@ -245,6 +245,19 @@ void CDb3Mmap::FillContacts()
DBCachedContact *cc = m_cache->AddContactToCache(dwContactID);
cc->dwDriverData = dwOffset;
CheckProto(cc, "");
+
+ DBVARIANT dbv; dbv.type = DBVT_DWORD;
+ cc->nSubs = (0 != GetContactSetting(dwContactID, "MetaContacts", "NumContacts", &dbv)) ? -1 : dbv.dVal;
+ if (cc->nSubs != -1) {
+ cc->pSubs = (MCONTACT*)malloc(cc->nSubs*sizeof(MCONTACT));
+ for (int i = 0; i < cc->nSubs; i++) {
+ char setting[100];
+ mir_snprintf(setting, sizeof(setting), "Handle%d", i);
+ cc->pSubs[i] = (0 != GetContactSetting(dwContactID, "MetaContacts", setting, &dbv)) ? INVALID_CONTACT_ID : dbv.dVal;
+ }
+ }
+ cc->activeID = (0 != GetContactSetting(dwContactID, "MetaContacts", "Default", &dbv)) ? INVALID_CONTACT_ID : dbv.dVal;
+ cc->parentID = (0 != GetContactSetting(dwContactID, "MetaContacts", "Handle", &dbv)) ? INVALID_CONTACT_ID : dbv.dVal;
dwOffset = p->ofsNext;
}