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 /plugins | |
parent | 1c81465a63439cb37c3fbedb0ced3a839ded4a46 (diff) |
UnregisterDatabasePlugin - a function to unload database driver on the flow
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Import/src/dbrw/dbrw.cpp | 5 | ||||
-rw-r--r-- | plugins/Import/src/dbrw/dbrw.h | 1 | ||||
-rw-r--r-- | plugins/Import/src/main.cpp | 8 | ||||
-rw-r--r-- | plugins/Import/src/mcontacts.cpp | 5 | ||||
-rw-r--r-- | plugins/Import/src/stdafx.h | 5 | ||||
-rw-r--r-- | plugins/Import/src/textjson.cpp | 5 |
6 files changed, 29 insertions, 0 deletions
diff --git a/plugins/Import/src/dbrw/dbrw.cpp b/plugins/Import/src/dbrw/dbrw.cpp index 0faa76150c..78a9f5697c 100644 --- a/plugins/Import/src/dbrw/dbrw.cpp +++ b/plugins/Import/src/dbrw/dbrw.cpp @@ -103,3 +103,8 @@ void RegisterDbrw() {
RegisterDatabasePlugin(&dblink);
}
+
+void UnregisterDbrw()
+{
+ UnregisterDatabasePlugin(&dblink);
+}
diff --git a/plugins/Import/src/dbrw/dbrw.h b/plugins/Import/src/dbrw/dbrw.h index 0d93bc8c47..37c5fe09fa 100644 --- a/plugins/Import/src/dbrw/dbrw.h +++ b/plugins/Import/src/dbrw/dbrw.h @@ -28,3 +28,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DBRW_HEADER_STR "SQLite format 3"
void RegisterDbrw();
+void UnregisterDbrw();
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index 875bb59419..8426b289ff 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -158,3 +158,11 @@ int CMPlugin::Load() RegisterJson();
return 0;
}
+
+int CMPlugin::Unload()
+{
+ UnregisterDbrw();
+ UnregisterMContacts();
+ UnregisterJson();
+ return 0;
+}
diff --git a/plugins/Import/src/mcontacts.cpp b/plugins/Import/src/mcontacts.cpp index deb180203f..8f09c0feb0 100644 --- a/plugins/Import/src/mcontacts.cpp +++ b/plugins/Import/src/mcontacts.cpp @@ -320,3 +320,8 @@ void RegisterMContacts() {
RegisterDatabasePlugin(&dblink);
}
+
+void UnregisterMContacts()
+{
+ UnregisterDatabasePlugin(&dblink);
+}
diff --git a/plugins/Import/src/stdafx.h b/plugins/Import/src/stdafx.h index b2c4cf6f1e..57511c051c 100644 --- a/plugins/Import/src/stdafx.h +++ b/plugins/Import/src/stdafx.h @@ -104,6 +104,7 @@ public: CMPlugin();
int Load() override;
+ int Unload() override;
};
// Keys
@@ -320,7 +321,11 @@ extern CImportBatch *g_pBatch; extern HWND g_hwndWizard, g_hwndAccMerge;
void RegisterIcons(void);
+
void RegisterMContacts();
+void UnregisterMContacts();
+
void RegisterJson();
+void UnregisterJson();
INT_PTR ImportContact(WPARAM hContact, LPARAM);
diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp index 74c44c9ad7..1c03beca4c 100644 --- a/plugins/Import/src/textjson.cpp +++ b/plugins/Import/src/textjson.cpp @@ -412,3 +412,8 @@ void RegisterJson() {
RegisterDatabasePlugin(&dblink);
}
+
+void UnregisterJson()
+{
+ UnregisterDatabasePlugin(&dblink);
+}
|