comparison Core/WebServiceParameters.h @ 2823:807169f85ba9

OrthancPluginGetPeerUserProperty()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 18 Sep 2018 15:38:18 +0200
parents dc7330089736
children 4e43e67f8ecf
comparison
equal deleted inserted replaced
2822:a0b729ac0549 2823:807169f85ba9
45 namespace Orthanc 45 namespace Orthanc
46 { 46 {
47 class WebServiceParameters 47 class WebServiceParameters
48 { 48 {
49 public: 49 public:
50 typedef std::map<std::string, std::string> HttpHeaders; 50 typedef std::map<std::string, std::string> Dictionary;
51 51
52 private: 52 private:
53 std::string url_; 53 std::string url_;
54 std::string username_; 54 std::string username_;
55 std::string password_; 55 std::string password_;
56 std::string certificateFile_; 56 std::string certificateFile_;
57 std::string certificateKeyFile_; 57 std::string certificateKeyFile_;
58 std::string certificateKeyPassword_; 58 std::string certificateKeyPassword_;
59 bool pkcs11Enabled_; 59 bool pkcs11Enabled_;
60 HttpHeaders headers_; 60 Dictionary headers_;
61 Dictionary userProperties_;
61 62
62 void FromSimpleFormat(const Json::Value& peer); 63 void FromSimpleFormat(const Json::Value& peer);
63 64
64 void FromAdvancedFormat(const Json::Value& peer); 65 void FromAdvancedFormat(const Json::Value& peer);
65 66
133 void ClearHttpHeaders() 134 void ClearHttpHeaders()
134 { 135 {
135 headers_.clear(); 136 headers_.clear();
136 } 137 }
137 138
138 const HttpHeaders& GetHttpHeaders() const 139 const Dictionary& GetHttpHeaders() const
139 { 140 {
140 return headers_; 141 return headers_;
141 } 142 }
142 143
143 void ListHttpHeaders(std::set<std::string>& target) const; 144 void ListHttpHeaders(std::set<std::string>& target) const;
144 145
145 bool LookupHttpHeader(std::string& value, 146 bool LookupHttpHeader(std::string& value,
146 const std::string& key) const; 147 const std::string& key) const;
148
149 void AddUserProperty(const std::string& key,
150 const std::string& value);
151
152 void ClearUserProperties()
153 {
154 userProperties_.clear();
155 }
156
157 const Dictionary& GetUserProperties() const
158 {
159 return userProperties_;
160 }
161
162 void ListUserProperties(std::set<std::string>& target) const;
163
164 bool LookupUserProperty(std::string& value,
165 const std::string& key) const;
147 166
148 bool IsAdvancedFormatNeeded() const; 167 bool IsAdvancedFormatNeeded() const;
149 168
150 void Unserialize(const Json::Value& peer); 169 void Unserialize(const Json::Value& peer);
151 170