# HG changeset patch # User Sebastien Jodogne # Date 1711116206 -3600 # Node ID af6998ed73dd6c1b8801f4c42036afea3b43bb38 # Parent 711b136e8fe8a6677ad975530075c75df8ba3515 fix deprecated calls diff -r 711b136e8fe8 -r af6998ed73dd Framework/Plugins/PluginInitialization.cpp --- a/Framework/Plugins/PluginInitialization.cpp Fri Mar 22 14:42:36 2024 +0100 +++ b/Framework/Plugins/PluginInitialization.cpp Fri Mar 22 15:03:26 2024 +0100 @@ -43,6 +43,7 @@ bool InitializePlugin(OrthancPluginContext* context, + const std::string& pluginName, const std::string& dbms, bool isIndex) { @@ -151,7 +152,7 @@ std::string(isIndex ? "index" : "storage area") + " into a " + dbms + " database"); - OrthancPluginSetDescription(context, description.c_str()); + OrthancPlugins::SetDescription(pluginName, description.c_str()); return true; } diff -r 711b136e8fe8 -r af6998ed73dd Framework/Plugins/PluginInitialization.h --- a/Framework/Plugins/PluginInitialization.h Fri Mar 22 14:42:36 2024 +0100 +++ b/Framework/Plugins/PluginInitialization.h Fri Mar 22 15:03:26 2024 +0100 @@ -29,6 +29,7 @@ namespace OrthancDatabases { bool InitializePlugin(OrthancPluginContext* context, + const std::string& pluginName, const std::string& dbms, bool isIndex); } diff -r 711b136e8fe8 -r af6998ed73dd MySQL/Plugins/IndexPlugin.cpp --- a/MySQL/Plugins/IndexPlugin.cpp Fri Mar 22 14:42:36 2024 +0100 +++ b/MySQL/Plugins/IndexPlugin.cpp Fri Mar 22 15:03:26 2024 +0100 @@ -30,6 +30,7 @@ #include +#define ORTHANC_PLUGIN_NAME "mysql-index" extern "C" { @@ -37,7 +38,7 @@ { GOOGLE_PROTOBUF_VERIFY_VERSION; - if (!OrthancDatabases::InitializePlugin(context, "MySQL", true)) + if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "MySQL", true)) { return -1; } @@ -103,7 +104,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "mysql-index"; + return ORTHANC_PLUGIN_NAME; } diff -r 711b136e8fe8 -r af6998ed73dd MySQL/Plugins/StoragePlugin.cpp --- a/MySQL/Plugins/StoragePlugin.cpp Fri Mar 22 14:42:36 2024 +0100 +++ b/MySQL/Plugins/StoragePlugin.cpp Fri Mar 22 15:03:26 2024 +0100 @@ -28,12 +28,14 @@ #include #include +#define ORTHANC_PLUGIN_NAME "mysql-storage" + extern "C" { ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) { - if (!OrthancDatabases::InitializePlugin(context, "MySQL", false)) + if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "MySQL", false)) { return -1; } @@ -95,7 +97,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "mysql-storage"; + return ORTHANC_PLUGIN_NAME; } diff -r 711b136e8fe8 -r af6998ed73dd Odbc/Plugins/IndexPlugin.cpp --- a/Odbc/Plugins/IndexPlugin.cpp Fri Mar 22 14:42:36 2024 +0100 +++ b/Odbc/Plugins/IndexPlugin.cpp Fri Mar 22 15:03:26 2024 +0100 @@ -28,6 +28,8 @@ #include +#define ORTHANC_PLUGIN_NAME "odbc-index" + #if defined(_WIN32) # ifdef _MSC_VER @@ -59,7 +61,7 @@ { GOOGLE_PROTOBUF_VERIFY_VERSION; - if (!OrthancDatabases::InitializePlugin(context, "ODBC", true)) + if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "ODBC", true)) { return -1; } @@ -141,7 +143,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "odbc-index"; + return ORTHANC_PLUGIN_NAME; } diff -r 711b136e8fe8 -r af6998ed73dd Odbc/Plugins/StoragePlugin.cpp --- a/Odbc/Plugins/StoragePlugin.cpp Fri Mar 22 14:42:36 2024 +0100 +++ b/Odbc/Plugins/StoragePlugin.cpp Fri Mar 22 15:03:26 2024 +0100 @@ -29,6 +29,8 @@ #include +#define ORTHANC_PLUGIN_NAME "odbc-storage" + namespace OrthancDatabases { @@ -113,7 +115,7 @@ ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) { - if (!OrthancDatabases::InitializePlugin(context, "ODBC", false)) + if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "ODBC", false)) { return -1; } @@ -191,7 +193,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "odbc-storage"; + return ORTHANC_PLUGIN_NAME; } diff -r 711b136e8fe8 -r af6998ed73dd PostgreSQL/Plugins/IndexPlugin.cpp --- a/PostgreSQL/Plugins/IndexPlugin.cpp Fri Mar 22 14:42:36 2024 +0100 +++ b/PostgreSQL/Plugins/IndexPlugin.cpp Fri Mar 22 15:03:26 2024 +0100 @@ -28,6 +28,8 @@ #include +#define ORTHANC_PLUGIN_NAME "postgresql-index" + extern "C" { @@ -35,7 +37,7 @@ { GOOGLE_PROTOBUF_VERIFY_VERSION; - if (!OrthancDatabases::InitializePlugin(context, "PostgreSQL", true)) + if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "PostgreSQL", true)) { return -1; } @@ -97,7 +99,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "postgresql-index"; + return ORTHANC_PLUGIN_NAME; } diff -r 711b136e8fe8 -r af6998ed73dd PostgreSQL/Plugins/StoragePlugin.cpp --- a/PostgreSQL/Plugins/StoragePlugin.cpp Fri Mar 22 14:42:36 2024 +0100 +++ b/PostgreSQL/Plugins/StoragePlugin.cpp Fri Mar 22 15:03:26 2024 +0100 @@ -26,11 +26,14 @@ #include #include +#define ORTHANC_PLUGIN_NAME "postgresql-storage" + + extern "C" { ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) { - if (!OrthancDatabases::InitializePlugin(context, "PostgreSQL", false)) + if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "PostgreSQL", false)) { return -1; } @@ -88,7 +91,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "postgresql-storage"; + return ORTHANC_PLUGIN_NAME; } diff -r 711b136e8fe8 -r af6998ed73dd SQLite/Plugins/IndexPlugin.cpp --- a/SQLite/Plugins/IndexPlugin.cpp Fri Mar 22 14:42:36 2024 +0100 +++ b/SQLite/Plugins/IndexPlugin.cpp Fri Mar 22 15:03:26 2024 +0100 @@ -27,6 +27,8 @@ #include +#define ORTHANC_PLUGIN_NAME "sqlite-index" + extern "C" { @@ -34,7 +36,7 @@ { GOOGLE_PROTOBUF_VERIFY_VERSION; - if (!OrthancDatabases::InitializePlugin(context, "SQLite", true)) + if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "SQLite", true)) { return -1; } @@ -94,7 +96,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "sqlite-index"; + return ORTHANC_PLUGIN_NAME; }