Mercurial > hg > orthanc
comparison Plugins/Engine/OrthancPluginDatabase.h @ 1630:ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Sep 2015 13:26:45 +0200 |
parents | c40fe92a68e7 |
children | eb8fbcf008b5 |
comparison
equal
deleted
inserted
replaced
1629:bad4772b605c | 1630:ffd23c0104af |
---|---|
32 | 32 |
33 #pragma once | 33 #pragma once |
34 | 34 |
35 #include "../../OrthancServer/IDatabaseWrapper.h" | 35 #include "../../OrthancServer/IDatabaseWrapper.h" |
36 #include "../Include/orthanc/OrthancCDatabasePlugin.h" | 36 #include "../Include/orthanc/OrthancCDatabasePlugin.h" |
37 #include "SharedLibrary.h" | |
37 | 38 |
38 namespace Orthanc | 39 namespace Orthanc |
39 { | 40 { |
40 class OrthancPluginDatabase : public IDatabaseWrapper | 41 class OrthancPluginDatabase : public IDatabaseWrapper |
41 { | 42 { |
42 private: | 43 private: |
43 class Transaction; | 44 class Transaction; |
44 | 45 |
45 typedef std::pair<int64_t, ResourceType> AnswerResource; | 46 typedef std::pair<int64_t, ResourceType> AnswerResource; |
46 | 47 |
48 SharedLibrary& library_; | |
47 _OrthancPluginDatabaseAnswerType type_; | 49 _OrthancPluginDatabaseAnswerType type_; |
48 OrthancPluginDatabaseBackend backend_; | 50 OrthancPluginDatabaseBackend backend_; |
49 OrthancPluginDatabaseExtensions extensions_; | 51 OrthancPluginDatabaseExtensions extensions_; |
50 void* payload_; | 52 void* payload_; |
51 IDatabaseListener* listener_; | 53 IDatabaseListener* listener_; |
75 bool ForwardSingleAnswer(std::string& target); | 77 bool ForwardSingleAnswer(std::string& target); |
76 | 78 |
77 bool ForwardSingleAnswer(int64_t& target); | 79 bool ForwardSingleAnswer(int64_t& target); |
78 | 80 |
79 public: | 81 public: |
80 OrthancPluginDatabase(const OrthancPluginDatabaseBackend& backend, | 82 OrthancPluginDatabase(SharedLibrary& library, |
83 const OrthancPluginDatabaseBackend& backend, | |
81 const OrthancPluginDatabaseExtensions* extensions, | 84 const OrthancPluginDatabaseExtensions* extensions, |
82 size_t extensionsSize, | 85 size_t extensionsSize, |
83 void *payload); | 86 void *payload); |
87 | |
88 const SharedLibrary& GetSharedLibrary() const | |
89 { | |
90 return library_; | |
91 } | |
84 | 92 |
85 virtual void AddAttachment(int64_t id, | 93 virtual void AddAttachment(int64_t id, |
86 const FileInfo& attachment); | 94 const FileInfo& attachment); |
87 | 95 |
88 virtual void AttachChild(int64_t parent, | 96 virtual void AttachChild(int64_t parent, |