comparison Plugins/Engine/OrthancPluginDatabase.h @ 1672:4c5a85c3ff43 db-changes

sample database plugin now working
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 02 Oct 2015 12:20:49 +0200
parents de1413733c97
children 2ad22b2970a2
comparison
equal deleted inserted replaced
1671:2f2e2ec17bc4 1672:4c5a85c3ff43
70 OrthancPluginDatabaseContext* GetContext() 70 OrthancPluginDatabaseContext* GetContext()
71 { 71 {
72 return reinterpret_cast<OrthancPluginDatabaseContext*>(this); 72 return reinterpret_cast<OrthancPluginDatabaseContext*>(this);
73 } 73 }
74 74
75 void CheckSuccess(OrthancPluginErrorCode code);
76
75 void ResetAnswers(); 77 void ResetAnswers();
76 78
77 void ForwardAnswers(std::list<int64_t>& target); 79 void ForwardAnswers(std::list<int64_t>& target);
78 80
79 void ForwardAnswers(std::list<std::string>& target); 81 void ForwardAnswers(std::list<std::string>& target);
88 const OrthancPluginDatabaseBackend& backend, 90 const OrthancPluginDatabaseBackend& backend,
89 const OrthancPluginDatabaseExtensions* extensions, 91 const OrthancPluginDatabaseExtensions* extensions,
90 size_t extensionsSize, 92 size_t extensionsSize,
91 void *payload); 93 void *payload);
92 94
95 virtual void Open()
96 {
97 CheckSuccess(backend_.open(payload_));
98 }
99
100 virtual void Close()
101 {
102 CheckSuccess(backend_.close(payload_));
103 }
104
93 const SharedLibrary& GetSharedLibrary() const 105 const SharedLibrary& GetSharedLibrary() const
94 { 106 {
95 return library_; 107 return library_;
96 } 108 }
97 109