diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-18 18:55:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-18 18:55:32 +0000 |
commit | ffed014ccd5370a5073594d55dd0dc88080e0b3d (patch) | |
tree | 6d8c5c00d7d5e22607e55aa5ce73c1e2b8139044 /plugins/Dbx_mdb/src/dbcontacts.cpp | |
parent | cdad72e9512d163ed15bc89bd0a93e7da2ee4c50 (diff) |
contacts cache details to be completely hidden from the outside world
git-svn-id: http://svn.miranda-ng.org/main/trunk@11873 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbcontacts.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbcontacts.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/Dbx_mdb/src/dbcontacts.cpp b/plugins/Dbx_mdb/src/dbcontacts.cpp index cf13a782b9..14267ab9ff 100644 --- a/plugins/Dbx_mdb/src/dbcontacts.cpp +++ b/plugins/Dbx_mdb/src/dbcontacts.cpp @@ -46,6 +46,11 @@ STDMETHODIMP_(LONG) CDbxMdb::GetContactCount(void) return m_contactCount;
}
+STDMETHODIMP_(LONG) CDbxMdb::GetContactSize(void)
+{
+ return sizeof(DBCachedContact);
+}
+
STDMETHODIMP_(MCONTACT) CDbxMdb::FindFirstContact(const char *szProto)
{
mir_cslock lck(m_csDbAccess);
@@ -102,9 +107,8 @@ STDMETHODIMP_(MCONTACT) CDbxMdb::AddContact() {
DWORD dwContactId;
- DBContact dbc;
+ DBContact dbc = { 0 };
dbc.signature = DBCONTACT_SIGNATURE;
- dbc.eventCount = 0;
{
mir_cslock lck(m_csDbAccess);
dwContactId = m_dwMaxContactId++;
@@ -119,8 +123,7 @@ STDMETHODIMP_(MCONTACT) CDbxMdb::AddContact() break;
}
- DBCachedContact *cc = m_cache->AddContactToCache(dwContactId);
- cc->dwDriverData = 0;
+ m_cache->AddContactToCache(dwContactId);
}
NotifyEventHooks(hContactAddedEvent, dwContactId, 0);
@@ -185,7 +188,9 @@ void CDbxMdb::FillContacts() DatabaseCorruption(NULL);
DBCachedContact *cc = m_cache->AddContactToCache(*(DWORD*)key.mv_data);
- cc->dwDriverData = dbc->eventCount;
+ cc->dwEventCount = dbc->eventCount;
+ cc->dwFirstUnread = dbc->dwFirstUnread;
+ cc->tsFirstUnread = dbc->tsFirstUnread;
arContacts.insert(cc);
}
}
|