Mercurial > hg > orthanc-databases
comparison Odbc/Plugins/IndexPlugin.cpp @ 417:15bfd9a76f8d pg-transactions
merge
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 23 Jun 2023 14:26:58 +0200 |
parents | eb80f7c5e7d8 |
children | ecd0b719cff5 |
comparison
equal
deleted
inserted
replaced
370:d2b5d9c92214 | 417:15bfd9a76f8d |
---|---|
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-2022 Osimis S.A., Belgium | 5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | 6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
7 * | 7 * |
8 * This program is free software: you can redistribute it and/or | 8 * This program is free software: you can redistribute it and/or |
9 * modify it under the terms of the GNU Affero General Public License | 9 * modify it under the terms of the GNU Affero General Public License |
10 * as published by the Free Software Foundation, either version 3 of | 10 * as published by the Free Software Foundation, either version 3 of |
11 * the License, or (at your option) any later version. | 11 * the License, or (at your option) any later version. |
40 # include <ltdl.h> | 40 # include <ltdl.h> |
41 # include <libltdl/lt_dlloader.h> | 41 # include <libltdl/lt_dlloader.h> |
42 #endif | 42 #endif |
43 | 43 |
44 | 44 |
45 #include <google/protobuf/any.h> | |
46 | |
47 | |
45 static const char* const KEY_ODBC = "Odbc"; | 48 static const char* const KEY_ODBC = "Odbc"; |
46 | 49 |
47 | 50 |
48 extern "C" | 51 extern "C" |
49 { | 52 { |
52 #endif | 55 #endif |
53 | 56 |
54 | 57 |
55 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) | 58 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) |
56 { | 59 { |
60 GOOGLE_PROTOBUF_VERIFY_VERSION; | |
61 | |
57 if (!OrthancDatabases::InitializePlugin(context, "ODBC", true)) | 62 if (!OrthancDatabases::InitializePlugin(context, "ODBC", true)) |
58 { | 63 { |
59 return -1; | 64 return -1; |
60 } | 65 } |
61 | 66 |
128 | 133 |
129 ORTHANC_PLUGINS_API void OrthancPluginFinalize() | 134 ORTHANC_PLUGINS_API void OrthancPluginFinalize() |
130 { | 135 { |
131 LOG(WARNING) << "ODBC index is finalizing"; | 136 LOG(WARNING) << "ODBC index is finalizing"; |
132 OrthancDatabases::IndexBackend::Finalize(); | 137 OrthancDatabases::IndexBackend::Finalize(); |
138 google::protobuf::ShutdownProtobufLibrary(); | |
133 } | 139 } |
134 | 140 |
135 | 141 |
136 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() | 142 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() |
137 { | 143 { |