comparison OrthancServer/Sources/OrthancInitialization.cpp @ 5207:e7529e6241d2 db-protobuf

first successful protobuf communication
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 Mar 2023 21:31:56 +0200
parents 32df369198ac
children 3de0235dedb6
comparison
equal deleted inserted replaced
5206:fb3add662286 5207:e7529e6241d2
49 49
50 #include <OrthancServerResources.h> 50 #include <OrthancServerResources.h>
51 51
52 #include <dcmtk/dcmnet/diutil.h> // For DCM_dcmnetLogger 52 #include <dcmtk/dcmnet/diutil.h> // For DCM_dcmnetLogger
53 53
54 #if ORTHANC_ENABLE_PLUGINS == 1
55 # include <google/protobuf/any.h>
56 #endif
57
54 58
55 static const char* const STORAGE_DIRECTORY = "StorageDirectory"; 59 static const char* const STORAGE_DIRECTORY = "StorageDirectory";
56 static const char* const ORTHANC_STORAGE = "OrthancStorage"; 60 static const char* const ORTHANC_STORAGE = "OrthancStorage";
57 61
58 62
313 static const char* const MALLOC_ARENA_MAX = "MallocArenaMax"; 317 static const char* const MALLOC_ARENA_MAX = "MallocArenaMax";
314 static const char* const LOAD_PRIVATE_DICTIONARY = "LoadPrivateDictionary"; 318 static const char* const LOAD_PRIVATE_DICTIONARY = "LoadPrivateDictionary";
315 319
316 OrthancConfiguration::WriterLock lock; 320 OrthancConfiguration::WriterLock lock;
317 321
322 #if ORTHANC_ENABLE_PLUGINS == 1
323 GOOGLE_PROTOBUF_VERIFY_VERSION;
324 #endif
325
318 InitializeServerEnumerations(); 326 InitializeServerEnumerations();
319 327
320 // Read the user-provided configuration 328 // Read the user-provided configuration
321 lock.GetConfiguration().Read(configurationFile); 329 lock.GetConfiguration().Read(configurationFile);
322 330
389 397
390 void OrthancFinalize() 398 void OrthancFinalize()
391 { 399 {
392 OrthancConfiguration::WriterLock lock; 400 OrthancConfiguration::WriterLock lock;
393 Orthanc::FinalizeFramework(); 401 Orthanc::FinalizeFramework();
402
403 #if ORTHANC_ENABLE_PLUGINS == 1
404 google::protobuf::ShutdownProtobufLibrary();
405 #endif
394 } 406 }
395 407
396 408
397 static IDatabaseWrapper* CreateSQLiteWrapper() 409 static IDatabaseWrapper* CreateSQLiteWrapper()
398 { 410 {