summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin10/lib/mir_core.libbin56252 -> 56468 bytes
-rw-r--r--bin10/lib/mir_core64.libbin51456 -> 51652 bytes
-rw-r--r--bin12/lib/mir_core.libbin56252 -> 56468 bytes
-rw-r--r--bin12/lib/mir_core64.libbin51456 -> 51652 bytes
-rw-r--r--copylib.cmd2
-rw-r--r--include/delphi/m_db_int.inc6
-rw-r--r--include/m_db_int.h14
-rw-r--r--src/mir_core/db.cpp5
-rw-r--r--src/mir_core/mir_core.def1
9 files changed, 26 insertions, 2 deletions
diff --git a/bin10/lib/mir_core.lib b/bin10/lib/mir_core.lib
index 63f04f9dc4..3b78ffd620 100644
--- a/bin10/lib/mir_core.lib
+++ b/bin10/lib/mir_core.lib
Binary files differ
diff --git a/bin10/lib/mir_core64.lib b/bin10/lib/mir_core64.lib
index 670376cdbf..612fde0e76 100644
--- a/bin10/lib/mir_core64.lib
+++ b/bin10/lib/mir_core64.lib
Binary files differ
diff --git a/bin12/lib/mir_core.lib b/bin12/lib/mir_core.lib
index 0ddb5ab484..c1953c4d82 100644
--- a/bin12/lib/mir_core.lib
+++ b/bin12/lib/mir_core.lib
Binary files differ
diff --git a/bin12/lib/mir_core64.lib b/bin12/lib/mir_core64.lib
index 8180f25634..2e3e6d2bea 100644
--- a/bin12/lib/mir_core64.lib
+++ b/bin12/lib/mir_core64.lib
Binary files differ
diff --git a/copylib.cmd b/copylib.cmd
index 96f3832ae1..6378049b2d 100644
--- a/copylib.cmd
+++ b/copylib.cmd
@@ -1,7 +1,5 @@
@echo off
copy /Y .\Bin10\Debug\Obj\mir_core\mir_core.lib .\Bin10\lib
copy /Y .\Bin10\Debug64\Obj\mir_core\mir_core64.lib .\Bin10\lib
-copy /Y .\Bin11\Debug\Obj\mir_core\mir_core.lib .\Bin11\lib
-copy /Y .\Bin11\Debug64\Obj\mir_core\mir_core64.lib .\Bin11\lib
copy /Y .\Bin12\Debug\Obj\mir_core\mir_core.lib .\Bin12\lib
copy /Y .\Bin12\Debug64\Obj\mir_core\mir_core64.lib .\Bin12\lib \ No newline at end of file
diff --git a/include/delphi/m_db_int.inc b/include/delphi/m_db_int.inc
index 211cb7efba..d068fa1a3d 100644
--- a/include/delphi/m_db_int.inc
+++ b/include/delphi/m_db_int.inc
@@ -210,6 +210,12 @@ type
end;
///////////////////////////////////////////////////////////////////////////////
+// cache access functions
+
+function db_get_contact(hContact:TMCONTACT):PDBCachedContact; stdcall;
+ external CoreDLL name 'db_get_contact';
+
+///////////////////////////////////////////////////////////////////////////////
// Database list's services
const
diff --git a/include/m_db_int.h b/include/m_db_int.h
index 59a555e720..df07a68da8 100644
--- a/include/m_db_int.h
+++ b/include/m_db_int.h
@@ -212,6 +212,20 @@ struct DATABASELINK
};
///////////////////////////////////////////////////////////////////////////////
+// cache access function
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+MIR_CORE_DLL(DBCachedContact*) db_get_contact(MCONTACT);
+
+#if defined(__cplusplus)
+}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
// Database list's services
// MS_DB_REGISTER_PLUGIN : registers a database plugin
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);
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def
index 6f8d466469..0d8eaf3e21 100644
--- a/src/mir_core/mir_core.def
+++ b/src/mir_core/mir_core.def
@@ -251,3 +251,4 @@ db_get_static_utf @248
db_mc_isMeta @249
db_mc_isSub @250
db_mc_getMeta @251
+db_get_contact @252