diff 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
line wrap: on
line diff
--- a/Core/WebServiceParameters.h	Mon Sep 17 12:08:49 2018 +0200
+++ b/Core/WebServiceParameters.h	Tue Sep 18 15:38:18 2018 +0200
@@ -47,7 +47,7 @@
   class WebServiceParameters
   {
   public:
-    typedef std::map<std::string, std::string>  HttpHeaders;
+    typedef std::map<std::string, std::string>  Dictionary;
 
   private:
     std::string  url_;
@@ -57,7 +57,8 @@
     std::string  certificateKeyFile_;
     std::string  certificateKeyPassword_;
     bool         pkcs11Enabled_;
-    HttpHeaders  headers_;
+    Dictionary   headers_;
+    Dictionary   userProperties_;
 
     void FromSimpleFormat(const Json::Value& peer);
 
@@ -135,7 +136,7 @@
       headers_.clear();
     }
 
-    const HttpHeaders& GetHttpHeaders() const
+    const Dictionary& GetHttpHeaders() const
     {
       return headers_;
     }
@@ -145,6 +146,24 @@
     bool LookupHttpHeader(std::string& value,
                           const std::string& key) const; 
 
+    void AddUserProperty(const std::string& key,
+                         const std::string& value);
+
+    void ClearUserProperties()
+    {
+      userProperties_.clear();
+    }
+
+    const Dictionary& GetUserProperties() const
+    {
+      return userProperties_;
+    }
+
+    void ListUserProperties(std::set<std::string>& target) const; 
+
+    bool LookupUserProperty(std::string& value,
+                            const std::string& key) const; 
+
     bool IsAdvancedFormatNeeded() const;
 
     void Unserialize(const Json::Value& peer);