Mercurial > hg > orthanc
comparison OrthancFramework/Sources/WebServiceParameters.h @ 4300:b30a8de92ad9
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 19:33:18 +0100 |
parents | 2d5209153b32 |
children | 3af1d763763a |
comparison
equal
deleted
inserted
replaced
4299:3f85db78c441 | 4300:b30a8de92ad9 |
---|---|
56 void FromAdvancedFormat(const Json::Value& peer); | 56 void FromAdvancedFormat(const Json::Value& peer); |
57 | 57 |
58 public: | 58 public: |
59 WebServiceParameters(); | 59 WebServiceParameters(); |
60 | 60 |
61 explicit WebServiceParameters(const Json::Value& serialized) | 61 explicit WebServiceParameters(const Json::Value& serialized); |
62 { | |
63 Unserialize(serialized); | |
64 } | |
65 | 62 |
66 const std::string& GetUrl() const | 63 const std::string& GetUrl() const; |
67 { | |
68 return url_; | |
69 } | |
70 | 64 |
71 void SetUrl(const std::string& url); | 65 void SetUrl(const std::string& url); |
72 | 66 |
73 void ClearCredentials(); | 67 void ClearCredentials(); |
74 | 68 |
75 void SetCredentials(const std::string& username, | 69 void SetCredentials(const std::string& username, |
76 const std::string& password); | 70 const std::string& password); |
77 | 71 |
78 const std::string& GetUsername() const | 72 const std::string& GetUsername() const; |
79 { | |
80 return username_; | |
81 } | |
82 | 73 |
83 const std::string& GetPassword() const | 74 const std::string& GetPassword() const; |
84 { | |
85 return password_; | |
86 } | |
87 | 75 |
88 void ClearClientCertificate(); | 76 void ClearClientCertificate(); |
89 | 77 |
90 void SetClientCertificate(const std::string& certificateFile, | 78 void SetClientCertificate(const std::string& certificateFile, |
91 const std::string& certificateKeyFile, | 79 const std::string& certificateKeyFile, |
92 const std::string& certificateKeyPassword); | 80 const std::string& certificateKeyPassword); |
93 | 81 |
94 const std::string& GetCertificateFile() const | 82 const std::string& GetCertificateFile() const; |
95 { | |
96 return certificateFile_; | |
97 } | |
98 | 83 |
99 const std::string& GetCertificateKeyFile() const | 84 const std::string& GetCertificateKeyFile() const; |
100 { | |
101 return certificateKeyFile_; | |
102 } | |
103 | 85 |
104 const std::string& GetCertificateKeyPassword() const | 86 const std::string& GetCertificateKeyPassword() const; |
105 { | |
106 return certificateKeyPassword_; | |
107 } | |
108 | 87 |
109 void SetPkcs11Enabled(bool enabled) | 88 void SetPkcs11Enabled(bool enabled); |
110 { | |
111 pkcs11Enabled_ = enabled; | |
112 } | |
113 | 89 |
114 bool IsPkcs11Enabled() const | 90 bool IsPkcs11Enabled() const; |
115 { | |
116 return pkcs11Enabled_; | |
117 } | |
118 | 91 |
119 void AddHttpHeader(const std::string& key, | 92 void AddHttpHeader(const std::string& key, |
120 const std::string& value) | 93 const std::string& value); |
121 { | |
122 headers_[key] = value; | |
123 } | |
124 | 94 |
125 void ClearHttpHeaders() | 95 void ClearHttpHeaders(); |
126 { | |
127 headers_.clear(); | |
128 } | |
129 | 96 |
130 const Dictionary& GetHttpHeaders() const | 97 const Dictionary& GetHttpHeaders() const; |
131 { | |
132 return headers_; | |
133 } | |
134 | 98 |
135 void ListHttpHeaders(std::set<std::string>& target) const; | 99 void ListHttpHeaders(std::set<std::string>& target) const; |
136 | 100 |
137 bool LookupHttpHeader(std::string& value, | 101 bool LookupHttpHeader(std::string& value, |
138 const std::string& key) const; | 102 const std::string& key) const; |
139 | 103 |
140 void AddUserProperty(const std::string& key, | 104 void AddUserProperty(const std::string& key, |
141 const std::string& value); | 105 const std::string& value); |
142 | 106 |
143 void ClearUserProperties() | 107 void ClearUserProperties(); |
144 { | |
145 userProperties_.clear(); | |
146 } | |
147 | 108 |
148 const Dictionary& GetUserProperties() const | 109 const Dictionary& GetUserProperties() const; |
149 { | |
150 return userProperties_; | |
151 } | |
152 | 110 |
153 void ListUserProperties(std::set<std::string>& target) const; | 111 void ListUserProperties(std::set<std::string>& target) const; |
154 | 112 |
155 bool LookupUserProperty(std::string& value, | 113 bool LookupUserProperty(std::string& value, |
156 const std::string& key) const; | 114 const std::string& key) const; |