comparison Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp @ 406:de6de66d70b2 db-protobuf

integration mainline->db-protobuf
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 15 Apr 2023 13:54:42 +0200
parents c4f0f8087564 1938ba8fba35
children c1b0f3c4e1f5
comparison
equal deleted inserted replaced
404:3cd39c8cade9 406:de6de66d70b2
251 } 251 }
252 252
253 // helper class to convert std::map of headers to the plugin SDK C structure 253 // helper class to convert std::map of headers to the plugin SDK C structure
254 class PluginHttpHeaders 254 class PluginHttpHeaders
255 { 255 {
256 private:
256 std::vector<const char*> headersKeys_; 257 std::vector<const char*> headersKeys_;
257 std::vector<const char*> headersValues_; 258 std::vector<const char*> headersValues_;
259
258 public: 260 public:
259 261 explicit PluginHttpHeaders(const std::map<std::string, std::string>& httpHeaders)
260 PluginHttpHeaders(const std::map<std::string, std::string>& httpHeaders)
261 { 262 {
262 for (std::map<std::string, std::string>::const_iterator 263 for (std::map<std::string, std::string>::const_iterator
263 it = httpHeaders.begin(); it != httpHeaders.end(); it++) 264 it = httpHeaders.begin(); it != httpHeaders.end(); ++it)
264 { 265 {
265 headersKeys_.push_back(it->first.c_str()); 266 headersKeys_.push_back(it->first.c_str());
266 headersValues_.push_back(it->second.c_str()); 267 headersValues_.push_back(it->second.c_str());
267 } 268 }
268 } 269 }