Qore ConnectionProvider Module Reference 1.11
Loading...
Searching...
No Matches
ConnectionSchemeCache.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
27namespace ConnectionProvider {
29public hashdecl AllowedValueInfo {
31 auto value;
32
34 string desc;
35};
36
38public hashdecl ConnectionOptionInfo {
40 string type;
41
43 string desc;
44
46 bool sensitive = False;
47
49 *softlist<hash<AllowedValueInfo>> allowed_values;
50
53
55 bool subst_env_vars = False;
56
58 bool freeform = False;
59};
60
62public hashdecl ConnectionSchemeInfo {
64 Class cls;
65
67 *hash<string, hash<ConnectionOptionInfo>> options;
68
70
76};
77
80
81public:
83 const SchemeMap = {
84 "awsrests": "AwsRestClient",
85
86 "billwerkrest": "BillwerkRestClient",
87 "billwerkrests": "BillwerkRestClient",
88
89 "cdsrests": "CdsRestClient",
90
91 "grests": "GoogleRestClient",
92
93 "hue": "HueRestClient",
94
95 "jsonrpc": "JsonRpcClient",
96 "jsonrpcs": "JsonRpcClient",
97
98 "pop3": "Pop3Client",
99 "pop3s": "Pop3Client",
100
101 "rest": "RestClient",
102 "rests": "RestClient",
103
104 "sewiorest": "SewioRestClient",
105 "sewiorests": "SewioRestClient",
106
107 "sfrests": "SalesforceRestClient",
108
109 "sfsoap": "SalesforceSoapClient",
110 "sfsoaps": "SalesforceSoapClient",
111
112 "sap4hanarests": "Sap4HanaRestClient",
113
114 "snrests": "ServiceNowRestClient",
115
116 "sewiows": "SewioWebSocketClient",
117 "sewiowss": "SewioWebSocketClient",
118
119 "soap": "SoapClient",
120 "soaps": "SoapClient",
121
122 "sftp": "Ssh2Connections",
123
124 "ssh": "Ssh2Connections",
125
126 "smtp": "SmtpClient",
127 "smtps": "SmtpClient",
128 "smtptls": "SmtpClient",
129 "esmtp": "SmtpClient",
130 "esmtps": "SmtpClient",
131 "esmtptls": "SmtpClient",
132
133 "telnet": "TelnetClient",
134
135 "ws": "WebSocketClient",
136 "wss": "WebSocketClient",
137
138 "xmlrpc": "XmlRpcClient",
139 "xmlrpcs": "XmlRpcClient",
140
141 "yamlrpc": "YamlRpcClient",
142 "yamlrpcs": "YamlRpcClient",
143
144 "zeyosrest": "ZeyosRestClient",
145 "zeyosrests": "ZeyosRestClient",
146 };
147
148protected:
150 static hash<string, hash<ConnectionSchemeInfo>> cache = {
153
156
159 };
160
162 static Mutex lck();
163
165 static bool load_all;
166
167public:
168
170
176 static bool registerScheme(string scheme, hash<ConnectionSchemeInfo> entry);
177
179 static hash<string, hash<ConnectionSchemeInfo>> getLoadAll();
180
182 static hash<string, hash<ConnectionSchemeInfo>> get();
183
185 static int size();
186
188 static bool empty();
189
191
193 static *list<string> listSchemes();
194
196
201 static *hash<ConnectionSchemeInfo> getScheme(string scheme);
202
204
210 static hash<ConnectionSchemeInfo> getSchemeEx(string scheme);
211
213
224 static *hash<ConnectionSchemeInfo> getSchemeImpl(string scheme, bool throw_exception, *code scheme_loader);
225
227protected:
228 static bool tryLoadModule(string mod, bool throw_exception);
229public:
230
231};
232};
Connection provider type cache class.
Definition: ConnectionSchemeCache.qc.dox.h:79
static *list< string > listSchemes()
Returns a list of all cached schemes.
static *hash< ConnectionSchemeInfo > getScheme(string scheme)
Returns info for the given connection scheme or NOTHING if not present.
static bool tryLoadModule(string mod, bool throw_exception)
Try to load the given module.
static *hash< ConnectionSchemeInfo > getSchemeImpl(string scheme, bool throw_exception, *code scheme_loader)
Returns info for the given connection scheme; either throws an exception if not present or returns NO...
static hash< ConnectionSchemeInfo > getSchemeEx(string scheme)
Returns info for the given connection scheme or throws an exception if not present.
const SchemeMap
Map of known connection schemes to modules.
Definition: ConnectionSchemeCache.qc.dox.h:83
static hash< string, hash< ConnectionSchemeInfo > > get()
Returns the entire cache.
static hash< string, hash< ConnectionSchemeInfo > > cache
Connection provider cache.
Definition: ConnectionSchemeCache.qc.dox.h:150
static bool registerScheme(string scheme, hash< ConnectionSchemeInfo > entry)
Register a new connection provider in the cache.
static bool load_all
Load all flag.
Definition: ConnectionSchemeCache.qc.dox.h:165
static int size()
Returns the number of types in the cache.
static hash< string, hash< ConnectionSchemeInfo > > getLoadAll()
Loads all possible schemes and returns the entire cache.
static bool empty()
Returns True if the cache is empty, False if not.
static Mutex lck()
Connection provider cache lock.
const ConnectionScheme
Connection entry info.
Definition: FilesystemConnection.qc.dox.h:40
const ConnectionScheme
Connection entry info.
Definition: FtpConnection.qc.dox.h:37
const ConnectionScheme
Connection entry info.
Definition: HttpConnection.qc.dox.h:59
The ConnectionProvider namespace.
Definition: AbstractConnection.qc.dox.h:28
Allowed value hash.
Definition: ConnectionSchemeCache.qc.dox.h:29
string desc
Description for the value.
Definition: ConnectionSchemeCache.qc.dox.h:34
auto value
The value.
Definition: ConnectionSchemeCache.qc.dox.h:31
Connection option information.
Definition: ConnectionSchemeCache.qc.dox.h:38
bool subst_env_vars
Do environment variable substitution on the value?
Definition: ConnectionSchemeCache.qc.dox.h:55
auto default_value
Any default value.
Definition: ConnectionSchemeCache.qc.dox.h:52
string type
Option value type.
Definition: ConnectionSchemeCache.qc.dox.h:40
string desc
Description.
Definition: ConnectionSchemeCache.qc.dox.h:43
*softlist< hash< AllowedValueInfo > > allowed_values
List of allowed values (enum)
Definition: ConnectionSchemeCache.qc.dox.h:49
bool freeform
Modifier for the "file-as-string" type; can a freeform location option be returned?
Definition: ConnectionSchemeCache.qc.dox.h:58
bool sensitive
Is the value sensitive? (password or other authentication info)
Definition: ConnectionSchemeCache.qc.dox.h:46
Connection provider information.
Definition: ConnectionSchemeCache.qc.dox.h:62
*string required_options
Required option string.
Definition: ConnectionSchemeCache.qc.dox.h:75
*hash< string, hash< ConnectionOptionInfo > > options
Connection options: name -> option info.
Definition: ConnectionSchemeCache.qc.dox.h:67
Class cls
The connection class.
Definition: ConnectionSchemeCache.qc.dox.h:64