Mercurial > hg > orthanc-stone
comparison RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h @ 1955:c0aa4b03f219
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Oct 2022 10:50:48 +0200 |
parents | 224d7763eede |
children | 07964689cb0b |
comparison
equal
deleted
inserted
replaced
1954:b33a104821a7 | 1955:c0aa4b03f219 |
---|---|
113 # define HAS_ORTHANC_PLUGIN_STORAGE_COMMITMENT_SCP 1 | 113 # define HAS_ORTHANC_PLUGIN_STORAGE_COMMITMENT_SCP 1 |
114 #else | 114 #else |
115 # define HAS_ORTHANC_PLUGIN_STORAGE_COMMITMENT_SCP 0 | 115 # define HAS_ORTHANC_PLUGIN_STORAGE_COMMITMENT_SCP 0 |
116 #endif | 116 #endif |
117 | 117 |
118 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) | |
119 # define HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API 1 | |
120 #else | |
121 # define HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API 0 | |
122 #endif | |
123 | |
118 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 10, 1) | 124 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 10, 1) |
119 # define HAS_ORTHANC_PLUGIN_WEBDAV 1 | 125 # define HAS_ORTHANC_PLUGIN_WEBDAV 1 |
120 #else | 126 #else |
121 # define HAS_ORTHANC_PLUGIN_WEBDAV 0 | 127 # define HAS_ORTHANC_PLUGIN_WEBDAV 0 |
122 #endif | 128 #endif |
221 bool applyPlugins); | 227 bool applyPlugins); |
222 | 228 |
223 bool RestApiPost(const std::string& uri, | 229 bool RestApiPost(const std::string& uri, |
224 const Json::Value& body, | 230 const Json::Value& body, |
225 bool applyPlugins); | 231 bool applyPlugins); |
232 | |
233 #if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 | |
234 bool RestApiPost(const std::string& uri, | |
235 const Json::Value& body, | |
236 const std::map<std::string, std::string>& httpHeaders, | |
237 bool applyPlugins); | |
238 | |
239 bool RestApiPost(const std::string& uri, | |
240 const void* body, | |
241 size_t bodySize, | |
242 const std::map<std::string, std::string>& httpHeaders, | |
243 bool applyPlugins); | |
244 #endif | |
226 | 245 |
227 bool RestApiPut(const std::string& uri, | 246 bool RestApiPut(const std::string& uri, |
228 const Json::Value& body, | 247 const Json::Value& body, |
229 bool applyPlugins); | 248 bool applyPlugins); |
230 | 249 |
532 bool RestApiPost(Json::Value& result, | 551 bool RestApiPost(Json::Value& result, |
533 const std::string& uri, | 552 const std::string& uri, |
534 const void* body, | 553 const void* body, |
535 size_t bodySize, | 554 size_t bodySize, |
536 bool applyPlugins); | 555 bool applyPlugins); |
556 | |
557 #if HAS_ORTHANC_PLUGIN_GENERIC_CALL_REST_API == 1 | |
558 bool RestApiPost(Json::Value& result, | |
559 const std::string& uri, | |
560 const Json::Value& body, | |
561 const std::map<std::string, std::string>& httpHeaders, | |
562 bool applyPlugins); | |
563 #endif | |
537 | 564 |
538 bool RestApiPost(Json::Value& result, | 565 bool RestApiPost(Json::Value& result, |
539 const std::string& uri, | 566 const std::string& uri, |
540 const Json::Value& body, | 567 const Json::Value& body, |
541 bool applyPlugins); | 568 bool applyPlugins); |
726 const std::string& peer, | 753 const std::string& peer, |
727 const std::string& key) const; | 754 const std::string& key) const; |
728 | 755 |
729 bool DoGet(MemoryBuffer& target, | 756 bool DoGet(MemoryBuffer& target, |
730 size_t index, | 757 size_t index, |
731 const std::string& uri) const; | 758 const std::string& uri, |
759 const std::map<std::string, std::string>& headers) const; | |
732 | 760 |
733 bool DoGet(MemoryBuffer& target, | 761 bool DoGet(MemoryBuffer& target, |
734 const std::string& name, | 762 const std::string& name, |
735 const std::string& uri) const; | 763 const std::string& uri, |
764 const std::map<std::string, std::string>& headers) const; | |
736 | 765 |
737 bool DoGet(Json::Value& target, | 766 bool DoGet(Json::Value& target, |
738 size_t index, | 767 size_t index, |
739 const std::string& uri) const; | 768 const std::string& uri, |
769 const std::map<std::string, std::string>& headers) const; | |
740 | 770 |
741 bool DoGet(Json::Value& target, | 771 bool DoGet(Json::Value& target, |
742 const std::string& name, | 772 const std::string& name, |
743 const std::string& uri) const; | 773 const std::string& uri, |
774 const std::map<std::string, std::string>& headers) const; | |
744 | 775 |
745 bool DoPost(MemoryBuffer& target, | 776 bool DoPost(MemoryBuffer& target, |
746 size_t index, | 777 size_t index, |
747 const std::string& uri, | 778 const std::string& uri, |
748 const std::string& body) const; | 779 const std::string& body, |
780 const std::map<std::string, std::string>& headers) const; | |
749 | 781 |
750 bool DoPost(MemoryBuffer& target, | 782 bool DoPost(MemoryBuffer& target, |
751 const std::string& name, | 783 const std::string& name, |
752 const std::string& uri, | 784 const std::string& uri, |
753 const std::string& body) const; | 785 const std::string& body, |
786 const std::map<std::string, std::string>& headers) const; | |
754 | 787 |
755 bool DoPost(Json::Value& target, | 788 bool DoPost(Json::Value& target, |
756 size_t index, | 789 size_t index, |
757 const std::string& uri, | 790 const std::string& uri, |
758 const std::string& body) const; | 791 const std::string& body, |
792 const std::map<std::string, std::string>& headers) const; | |
759 | 793 |
760 bool DoPost(Json::Value& target, | 794 bool DoPost(Json::Value& target, |
761 const std::string& name, | 795 const std::string& name, |
762 const std::string& uri, | 796 const std::string& uri, |
763 const std::string& body) const; | 797 const std::string& body, |
798 const std::map<std::string, std::string>& headers) const; | |
764 | 799 |
765 bool DoPut(size_t index, | 800 bool DoPut(size_t index, |
766 const std::string& uri, | 801 const std::string& uri, |
767 const std::string& body) const; | 802 const std::string& body, |
803 const std::map<std::string, std::string>& headers) const; | |
768 | 804 |
769 bool DoPut(const std::string& name, | 805 bool DoPut(const std::string& name, |
770 const std::string& uri, | 806 const std::string& uri, |
771 const std::string& body) const; | 807 const std::string& body, |
808 const std::map<std::string, std::string>& headers) const; | |
772 | 809 |
773 bool DoDelete(size_t index, | 810 bool DoDelete(size_t index, |
774 const std::string& uri) const; | 811 const std::string& uri, |
812 const std::map<std::string, std::string>& headers) const; | |
775 | 813 |
776 bool DoDelete(const std::string& name, | 814 bool DoDelete(const std::string& name, |
777 const std::string& uri) const; | 815 const std::string& uri, |
816 const std::map<std::string, std::string>& headers) const; | |
778 }; | 817 }; |
779 #endif | 818 #endif |
780 | 819 |
781 | 820 |
782 | 821 |
1262 size_t size, | 1301 size_t size, |
1263 const std::string& transferSyntax); | 1302 const std::string& transferSyntax); |
1264 #endif | 1303 #endif |
1265 }; | 1304 }; |
1266 | 1305 |
1267 | 1306 // helper method to convert Http headers from the plugin SDK to a std::map |
1307 void GetHttpHeaders(std::map<std::string, std::string>& result, const OrthancPluginHttpRequest* request); | |
1268 | 1308 |
1269 #if HAS_ORTHANC_PLUGIN_WEBDAV == 1 | 1309 #if HAS_ORTHANC_PLUGIN_WEBDAV == 1 |
1270 class IWebDavCollection : public boost::noncopyable | 1310 class IWebDavCollection : public boost::noncopyable |
1271 { | 1311 { |
1272 public: | 1312 public: |