Mercurial > hg > orthanc-databases
comparison MySQL/Plugins/IndexPlugin.cpp @ 381:9cde77ca9ad9 db-protobuf
initializing and finalizing protobuf
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 30 Mar 2023 21:16:57 +0200 |
parents | 16aac0287485 |
children | 3d6886f3e5b3 |
comparison
equal
deleted
inserted
replaced
380:cb91096fef06 | 381:9cde77ca9ad9 |
---|---|
26 | 26 |
27 #include <HttpClient.h> | 27 #include <HttpClient.h> |
28 #include <Logging.h> | 28 #include <Logging.h> |
29 #include <Toolbox.h> | 29 #include <Toolbox.h> |
30 | 30 |
31 #include <google/protobuf/any.h> | |
32 | |
31 | 33 |
32 extern "C" | 34 extern "C" |
33 { | 35 { |
34 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) | 36 ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) |
35 { | 37 { |
38 GOOGLE_PROTOBUF_VERIFY_VERSION; | |
39 | |
36 if (!OrthancDatabases::InitializePlugin(context, "MySQL", true)) | 40 if (!OrthancDatabases::InitializePlugin(context, "MySQL", true)) |
37 { | 41 { |
38 return -1; | 42 return -1; |
39 } | 43 } |
40 | 44 |
91 OrthancDatabases::IndexBackend::Finalize(); | 95 OrthancDatabases::IndexBackend::Finalize(); |
92 | 96 |
93 OrthancDatabases::MySQLDatabase::GlobalFinalization(); | 97 OrthancDatabases::MySQLDatabase::GlobalFinalization(); |
94 Orthanc::HttpClient::GlobalFinalize(); | 98 Orthanc::HttpClient::GlobalFinalize(); |
95 Orthanc::Toolbox::FinalizeOpenSsl(); | 99 Orthanc::Toolbox::FinalizeOpenSsl(); |
100 google::protobuf::ShutdownProtobufLibrary(); | |
96 } | 101 } |
97 | 102 |
98 | 103 |
99 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() | 104 ORTHANC_PLUGINS_API const char* OrthancPluginGetName() |
100 { | 105 { |