Qore YamlRpcClient Module Reference  1.5
YamlRpcClient.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* YamlRpcClient.qm Copyright 2012 - 2021 Qore Technologies, s.r.o.
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23 */
24 
25 // minimum qore version
26 
27 // requires the binary yaml module
28 
29 // need mime definitions
30 
31 
32 // do not use $ signs in declarations
33 // require type declarations
34 // enable all warnings
35 // do not ignore arg errors in calls, disallow access to all NOOP variants
36 
37 }
38 
170 namespace YamlRpcClient {
173 
181 class YamlRpcClient : public Qore::HTTPClient {
182 
183 public:
185  const Version = "1.0";
186 
188  const DefaultOptions = ...;
189 
190 
192  const VersionString = sprintf("Qore-YAML-RPC-Client/%s", YamlRpcClient::Version);
193 
195  const DefaultHeaders = ...;
196 
197 
198 protected:
199  hash headers;
200  int flags = YAML::None;
201  string path;
202 
203 public:
204 
206 
217  constructor(hash opts = hash(), bool do_not_connect = False) ;
218 
219 
221 
223  constructor(bool do_not_connect = False) ;
224 
225 
227 
231  auto callArgs(string method, auto args);
232 
233 
235 
240  auto callArgsWithInfo(reference<auto> info, string method, auto args);
241 
242 
244 
247  auto call(string method);
248 
249 
251  static string makeRequest(string method, auto arg, int flags = YAML::None);
252 };
253 
255 
264 class YamlRpcConnection : public ConnectionProvider::HttpBasedConnection {
265 
266 public:
267  hash<auto> real_opts;
268 
270  const ConnectionScheme = ...;
271 
272 
274 
282  constructor(string name, string description, string url, hash<auto> attributes = {}, hash<auto> options = {})
283  ;
284 
285 
287  string getType();
288 
289 
291 
296 protected:
297  YamlRpcClient getImpl(bool connect = True, *hash<auto> rtopts);
298 public:
299 
300 
302 protected:
303  hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
304 public:
305 
306 };
307 };
class for YAML-RPC connections; returns YamlRpcClient objects
Definition: YamlRpcClient.qm.dox.h:264
string getType()
returns "yamlrpc"
YamlRpcClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a YamlRpcClient::YamlRpcClient object
constructor(string name, string description, string url, hash< auto > attributes={}, hash< auto > options={})
creates the YamlRpcConnection object
the YamlRpcClient namespace holds all public definitions in the YamlRpcClient module ...
Definition: YamlRpcClient.qm.dox.h:171
const ConnectionScheme
Connection entry info.
Definition: YamlRpcClient.qm.dox.h:270
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.