Mercurial > hg > orthanc-databases
diff PostgreSQL/Plugins/IndexPlugin.cpp @ 569:f18e46d7dbf8 attach-custom-data
merged find-refactoring -> attach-custom-data
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 24 Sep 2024 15:04:21 +0200 |
parents | 54d518dcd74a |
children |
line wrap: on
line diff
--- a/PostgreSQL/Plugins/IndexPlugin.cpp Wed Feb 01 16:24:37 2023 +0100 +++ b/PostgreSQL/Plugins/IndexPlugin.cpp Tue Sep 24 15:04:21 2024 +0200 @@ -2,7 +2,9 @@ * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium - * Copyright (C) 2017-2021 Osimis S.A., Belgium + * Copyright (C) 2017-2023 Osimis S.A., Belgium + * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium + * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License @@ -25,12 +27,18 @@ #include <Logging.h> #include <Toolbox.h> +#include <google/protobuf/any.h> + +#define ORTHANC_PLUGIN_NAME "postgresql-index" + extern "C" { ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) { - if (!OrthancDatabases::InitializePlugin(context, "PostgreSQL", true)) + GOOGLE_PROTOBUF_VERIFY_VERSION; + + if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "PostgreSQL", true)) { return -1; } @@ -86,12 +94,13 @@ LOG(WARNING) << "PostgreSQL index is finalizing"; OrthancDatabases::IndexBackend::Finalize(); Orthanc::Toolbox::FinalizeOpenSsl(); + google::protobuf::ShutdownProtobufLibrary(); } ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "postgresql-index"; + return ORTHANC_PLUGIN_NAME; }