diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-09 11:17:16 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-09 11:17:16 +0300 |
commit | c1137914b90fd115909178ba8e037281708cfd9a (patch) | |
tree | 8541542c8ddd138537c74292824e4f5647e1b8e8 /src | |
parent | 1c81465a63439cb37c3fbedb0ced3a839ded4a46 (diff) |
UnregisterDatabasePlugin - a function to unload database driver on the flow
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/db_intf.cpp | 7 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 3 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/mir_app/src/db_intf.cpp b/src/mir_app/src/db_intf.cpp index c3279fc13b..6207dedeab 100644 --- a/src/mir_app/src/db_intf.cpp +++ b/src/mir_app/src/db_intf.cpp @@ -35,6 +35,13 @@ MIR_APP_DLL(void) RegisterDatabasePlugin(DATABASELINK *pDescr) arDbPlugins.insert(pDescr);
}
+MIR_APP_DLL(void) UnregisterDatabasePlugin(DATABASELINK *pDescr)
+{
+ int idx = arDbPlugins.indexOf(pDescr);
+ if (idx != -1)
+ arDbPlugins.remove(idx);
+}
+
MIR_APP_DLL(DATABASELINK*) GetDatabasePlugin(const char *pszDriverName)
{
for (auto &it : arDbPlugins)
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 960ee9e602..f7ca388bde 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -214,7 +214,8 @@ Profile_GetPathW @293 Profile_SetDefault @294
Chat_GetDefaultEventDescr @295
FindDatabasePlugin @296
-RegisterDatabasePlugin @298
+RegisterDatabasePlugin @297
+UnregisterDatabasePlugin @298
Chat_CustomizeApi @299
Clist_FindItem @314 NONAME
Colour_Get @315
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 071500ff5d..6714b366cb 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -214,7 +214,8 @@ Profile_GetPathW @293 Profile_SetDefault @294
Chat_GetDefaultEventDescr @295
FindDatabasePlugin @296
-RegisterDatabasePlugin @298
+RegisterDatabasePlugin @297
+UnregisterDatabasePlugin @298
Chat_CustomizeApi @299
Clist_FindItem @314 NONAME
Colour_Get @315
|