comparison Plugins/Samples/Common/IOrthancConnection.h @ 2180:71b8bec8ca91

improvements
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 25 Nov 2016 17:00:39 +0100
parents de32f3b4ff09
children 761dfdabe437
comparison
equal deleted inserted replaced
2179:de32f3b4ff09 2180:71b8bec8ca91
34 34
35 #include "DicomPath.h" 35 #include "DicomPath.h"
36 36
37 #include <boost/noncopyable.hpp> 37 #include <boost/noncopyable.hpp>
38 #include <string> 38 #include <string>
39 #include <json/value.h>
39 40
40 namespace OrthancPlugins 41 namespace OrthancPlugins
41 { 42 {
42 class IOrthancConnection : public boost::noncopyable 43 class IOrthancConnection : public boost::noncopyable
43 { 44 {
50 const std::string& uri) = 0; 51 const std::string& uri) = 0;
51 52
52 virtual void RestApiPost(std::string& result, 53 virtual void RestApiPost(std::string& result,
53 const std::string& uri, 54 const std::string& uri,
54 const std::string& body) = 0; 55 const std::string& body) = 0;
56
57 static void ParseJson(Json::Value& result,
58 const std::string& content);
59
60 static void RestApiGet(Json::Value& result,
61 IOrthancConnection& orthanc,
62 const std::string& uri);
63
64 static void RestApiGet(Json::Value& result,
65 IOrthancConnection& orthanc,
66 const std::string& uri,
67 const std::string& body);
55 }; 68 };
56 } 69 }