summaryrefslogtreecommitdiff
path: root/src/mir_core/db.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-09 18:39:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-09 18:39:03 +0000
commitf5add60f90e833abe8817bbe3beb64fe5a2b76a8 (patch)
tree145f0aa625d0d465027c8e618ff88d90f35da107 /src/mir_core/db.cpp
parent7eb32d55bc5a4a195ddf903c83b8da47f449fa5f (diff)
db_get_contact - fast access to the cached contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@8518 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core/db.cpp')
-rw-r--r--src/mir_core/db.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mir_core/db.cpp b/src/mir_core/db.cpp
index b851a6a96c..140af537c0 100644
--- a/src/mir_core/db.cpp
+++ b/src/mir_core/db.cpp
@@ -364,6 +364,11 @@ MIR_CORE_DLL(INT_PTR) db_unset(MCONTACT hContact, const char *szModule, const ch
return currDb->DeleteContactSetting(hContact, szModule, szSetting);
}
+MIR_CORE_DLL(DBCachedContact*) db_get_contact(MCONTACT hContact)
+{
+ return (currDb == NULL) ? NULL : currDb->m_cache->GetCachedContact(hContact);
+}
+
MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto)
{
return (currDb == NULL) ? NULL : currDb->FindFirstContact(szProto);