Qore ConnectionProvider Module Reference  1.5
ConnectionSchemeCache.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
26 namespace ConnectionProvider {
29 public struct AllowedValueInfo {
31  auto value;
32 
34  string desc;
35 };
36 
38 public struct ConnectionOptionInfo {
40  string type;
41 
43  string desc;
44 
46  bool sensitive = False;
47 
49  *softlist<hash<AllowedValueInfo>> allowed_values;
50 
53 
56 };
57 
59 public struct ConnectionSchemeInfo {
61  Class cls;
62 
64  *hash<string, hash<ConnectionOptionInfo>> options;
65 
67 
73 };
74 
77 
78 public:
80  const SchemeMap = ...;
81 
82 
83 protected:
85  static hash<string, hash<ConnectionSchemeInfo>> cache = {
88 
91 
94  };
95 
97  static Mutex lck();
98 
99 public:
100 
102 
108  static bool registerScheme(string scheme, hash<ConnectionSchemeInfo> entry);
109 
111  static hash<string, hash<ConnectionSchemeInfo>> get();
112 
114  static int size();
115 
117  static bool empty();
118 
120 
122  static *list<string> listSchemes();
123 
125 
130  static *hash<ConnectionSchemeInfo> getScheme(string scheme);
131 
133 
139  static hash<ConnectionSchemeInfo> getSchemeEx(string scheme);
140 
142 
153  static *hash<ConnectionSchemeInfo> getSchemeImpl(string scheme, bool throw_exception, *code scheme_loader);
154 
156 protected:
157  static bool tryLoadModule(string mod, bool throw_exception);
158 public:
159 
160 };
161 };
Connection option information.
Definition: ConnectionSchemeCache.qc.dox.h:38
static *hash< ConnectionSchemeInfo > getScheme(string scheme)
Returns info for the given connection scheme or NOTHING if not present.
string type
Option value type.
Definition: ConnectionSchemeCache.qc.dox.h:40
static bool tryLoadModule(string mod, bool throw_exception)
Try to load the given module.
*softlist< hash< AllowedValueInfo > > allowed_values
List of allowed values (enum)
Definition: ConnectionSchemeCache.qc.dox.h:49
static Mutex lck()
Connection provider cache lock.
Class cls
The connection class.
Definition: ConnectionSchemeCache.qc.dox.h:61
const ConnectionScheme
Connection entry info.
Definition: HttpConnection.qc.dox.h:52
static bool registerScheme(string scheme, hash< ConnectionSchemeInfo > entry)
Register a new connection provider in the cache.
*string required_options
Required option string.
Definition: ConnectionSchemeCache.qc.dox.h:72
Connection provider type cache class.
Definition: ConnectionSchemeCache.qc.dox.h:76
const False
static hash< ConnectionSchemeInfo > getSchemeEx(string scheme)
Returns info for the given connection scheme or throws an exception if not present.
*hash< string, hash< ConnectionOptionInfo > > options
Connection options: name -> option info.
Definition: ConnectionSchemeCache.qc.dox.h:64
bool sensitive
Is the value sensitive? (password or other authentication info)
Definition: ConnectionSchemeCache.qc.dox.h:46
static bool empty()
Returns True if the cache is empty, False if not.
static int size()
Returns the number of types in the cache.
const ConnectionScheme
Connection entry info.
Definition: FtpConnection.qc.dox.h:37
static *list< string > listSchemes()
Returns a list of all cached schemes.
auto value
The value.
Definition: ConnectionSchemeCache.qc.dox.h:31
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...
auto default_value
Any default value.
Definition: ConnectionSchemeCache.qc.dox.h:52
bool subst_env_vars
Do environment variable substitution on the value?
Definition: ConnectionSchemeCache.qc.dox.h:55
Connection provider information.
Definition: ConnectionSchemeCache.qc.dox.h:59
Allowed value hash.
Definition: ConnectionSchemeCache.qc.dox.h:29
string desc
Description.
Definition: ConnectionSchemeCache.qc.dox.h:43
static hash< string, hash< ConnectionSchemeInfo > > cache
Connection provider cache.
Definition: ConnectionSchemeCache.qc.dox.h:85
const ConnectionScheme
Connection entry info.
Definition: FilesystemConnection.qc.dox.h:40
const SchemeMap
Map of known connection schemes to modules.
Definition: ConnectionSchemeCache.qc.dox.h:80
the ConnectionProvider namespace. All classes used in the ConnectionProvider module should be inside ...
Definition: AbstractConnection.qc.dox.h:26
string desc
Description for the value.
Definition: ConnectionSchemeCache.qc.dox.h:34