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
171namespace YamlRpcClient {
173
181class YamlRpcClient : public Qore::HTTPClient {
182
183public:
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
198protected:
199 hash headers;
200 int flags = YAML::None;
201 string path;
202
203public:
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
264class YamlRpcConnection : public ConnectionProvider::HttpBasedConnection {
265
266public:
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
296protected:
297 YamlRpcClient getImpl(bool connect = True, *hash<auto> rtopts);
298public:
299
300
302protected:
303 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
304public:
305
306};
307};
constructor(hash opts=hash(), bool do_not_connect=False)
calls the base class HTTPClient constructor, overrides the "protocols" key to "yamlrpc"
static string makeRequest(string method, auto arg, int flags=YAML::None)
makes a YAML-RPC request string
auto callArgsWithInfo(reference< auto > info, string method, auto args)
makes a call to the YAML-RPC server using the third argument as the list of arguments to send
constructor(bool do_not_connect=False)
simple constructor using default arguments
auto call(string method)
makes a method call to the YAML-RPC server using the remaining arguments after the method name as the...
auto callArgs(string method, auto args)
makes a call to the YAML-RPC server using the second argument as the list of arguments to send
class for YAML-RPC connections; returns YamlRpcClient objects
Definition: YamlRpcClient.qm.dox.h:264
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
const ConnectionScheme
Connection entry info.
Definition: YamlRpcClient.qm.dox.h:270
YamlRpcClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a YamlRpcClient::YamlRpcClient object
string getType()
returns "yamlrpc"
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