Mercurial > hg > orthanc-databases
comparison 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 |
comparison
equal
deleted
inserted
replaced
368:82f73188b58d | 569:f18e46d7dbf8 |
---|---|
1 /** | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4 * Department, University Hospital of Liege, Belgium | 4 * Department, University Hospital of Liege, Belgium |
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium | 5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium | |
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
6 * | 8 * |
7 * This program is free software: you can redistribute it and/or | 9 * This program is free software: you can redistribute it and/or |
8 * modify it under the terms of the GNU Affero General Public License | 10 * modify it under the terms of the GNU Affero General Public License |
9 * as published by the Free Software Foundation, either version 3 of | 11 * as published by the Free Software Foundation, either version 3 of |
10 * the License, or (at your option) any later version. | 12 * the License, or (at your option) any later version. |
23 #include "../../Framework/Plugins/PluginInitialization.h" | 25 #include "../../Framework/Plugins/PluginInitialization.h" |
24 | 26 |
25 #include <Logging.h> | 27 #include <Logging.h> |
26 #include <Toolbox.h> | 28 #include <Toolbox.h> |
27 | 29 |
30 #include <google/protobuf/any.h> | |
31 | |
32 #define ORTHANC_PLUGIN_NAME "postgresql-index" | |
33 | |
28 | 34 |
29 extern "C" | 35 extern "C" |
30 { | 36 { |
31 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) | 37 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) |
32 { | 38 { |
33 if (!OrthancDatabases::InitializePlugin(context, "PostgreSQL", true)) | 39 GOOGLE_PROTOBUF_VERIFY_VERSION; |
40 | |
41 if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "PostgreSQL", true)) | |
34 { | 42 { |
35 return -1; | 43 return -1; |
36 } | 44 } |
37 | 45 |
38 Orthanc::Toolbox::InitializeOpenSsl(); | 46 Orthanc::Toolbox::InitializeOpenSsl(); |
84 ORTHANC_PLUGINS_API void OrthancPluginFinalize() | 92 ORTHANC_PLUGINS_API void OrthancPluginFinalize() |
85 { | 93 { |
86 LOG(WARNING) << "PostgreSQL index is finalizing"; | 94 LOG(WARNING) << "PostgreSQL index is finalizing"; |
87 OrthancDatabases::IndexBackend::Finalize(); | 95 OrthancDatabases::IndexBackend::Finalize(); |
88 Orthanc::Toolbox::FinalizeOpenSsl(); | 96 Orthanc::Toolbox::FinalizeOpenSsl(); |
97 google::protobuf::ShutdownProtobufLibrary(); | |
89 } | 98 } |
90 | 99 |
91 | 100 |
92 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() | 101 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() |
93 { | 102 { |
94 return "postgresql-index"; | 103 return ORTHANC_PLUGIN_NAME; |
95 } | 104 } |
96 | 105 |
97 | 106 |
98 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion() | 107 ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion() |
99 { | 108 { |