diff options
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/commonheaders.h | 1 | ||||
-rw-r--r-- | src/mir_core/db.cpp | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mir_core/commonheaders.h b/src/mir_core/commonheaders.h index 2d04e12f4b..5afcda256e 100644 --- a/src/mir_core/commonheaders.h +++ b/src/mir_core/commonheaders.h @@ -55,6 +55,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_system.h>
#include <m_system_cpp.h>
#include <m_database.h>
+#include <m_db_int.h>
#include <newpluginapi.h>
#include "miranda.h"
diff --git a/src/mir_core/db.cpp b/src/mir_core/db.cpp index af6a89537f..36902702ff 100644 --- a/src/mir_core/db.cpp +++ b/src/mir_core/db.cpp @@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
+static MIDatabase* currDb = NULL;
+
MIR_CORE_DLL(int) db_get_b(HANDLE hContact, const char *szModule, const char *szSetting, int errorValue)
{
DBVARIANT dbv;
@@ -202,3 +204,8 @@ MIR_CORE_DLL(INT_PTR) db_set_blob(HANDLE hContact, const char *szModule, const c cws.value.pbVal = (unsigned char*)val;
return CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&cws);
}
+
+MIR_CORE_DLL(void) db_setCurrent(MIDatabase* _db)
+{
+ currDb = _db;
+}
|