Loading...
Searching...
No Matches
FilesystemConnection.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// Qore FilesystemConnection class definition
/* FilesystemConnection.qc Copyright 2016 - 2024 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
namespace ConnectionProvider {
class FilesystemConnection : public AbstractConnectionWithInfo {
public:
const ConnectionScheme = ...;
const DataProviderSubtypeMap = ...;
protected:
static hash<string, *hash<string, hash<DataProviderOptionInfo>>> subtype_info;
static Mutex subtype_lck();
public:
constructor(string name, string description, string url, hash<auto> attributes = {}, hash<auto> options = {}, *Logger logger)
;
constructor(hash<auto> config, *hash<auto> attr) ;
string getType();
bool hasDataProvider();
AbstractDataProvider getDataProvider(*hash<auto> constructor_options);
protected:
setupFsOpts();
public:
protected:
checkSubtypeInfo();
public:
protected:
*hash<string, *hash<string, hash<DataProviderOptionInfo>>> getDataProviderSubtypesImpl();
public:
protected:
loadSubtypeInfo();
public:
protected:
AbstractDataProvider getDataProviderImpl(string subtype, *hash<auto> constructor_options);
public:
protected:
*hash<string, hash<DataProviderOptionInfo>> getDataProviderConstructorOptionsImpl();
public:
protected:
Dir getImpl(bool connect = True, *hash rtopts);
public:
protected:
hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
public:
};
}; // ConnectionProvider namespace
ConnectionProvider::AbstractConnection::url
string url
Connection URL (potentially with password info)
Definition AbstractConnection.qc.dox.h:85
ConnectionProvider::AbstractConnection::name
string name
Connection name.
Definition AbstractConnection.qc.dox.h:73
ConnectionProvider::AbstractConnectionWithInfo
abstract base class for connections
Definition AbstractConnectionWithInfo.qc.dox.h:32
ConnectionProvider::FilesystemConnection
class for filesystem connections; returns an object of type Qore::Dir
Definition FilesystemConnection.qc.dox.h:36
ConnectionProvider::FilesystemConnection::subtype_info
static hash< string, *hash< string, hash< DataProviderOptionInfo > > > subtype_info
Data provider subtype info.
Definition FilesystemConnection.qc.dox.h:49
ConnectionProvider::FilesystemConnection::hasDataProvider
bool hasDataProvider()
returns True
ConnectionProvider::FilesystemConnection::checkSubtypeInfo
checkSubtypeInfo()
Verifies that subtype info has been loaded from external modules.
ConnectionProvider::FilesystemConnection::getDataProviderImpl
AbstractDataProvider getDataProviderImpl(string subtype, *hash< auto > constructor_options)
returns a data provider object for connection subtype passed as an argument
ConnectionProvider::FilesystemConnection::getDataProviderConstructorOptionsImpl
*hash< string, hash< DataProviderOptionInfo > > getDataProviderConstructorOptionsImpl()
Returns a hash of data provider constructor option info, if applicable.
ConnectionProvider::FilesystemConnection::getDataProviderSubtypesImpl
*hash< string, *hash< string, hash< DataProviderOptionInfo > > > getDataProviderSubtypesImpl()
Returns a hash of supported data provider subtypes.
ConnectionProvider::FilesystemConnection::setupFsOpts
setupFsOpts()
Common constructor initialization.
ConnectionProvider::FilesystemConnection::getDataProvider
AbstractDataProvider getDataProvider(*hash< auto > constructor_options)
Returns a data provider object for this connection.
ConnectionProvider::FilesystemConnection::subtype_lck
static Mutex subtype_lck()
Data provider subtype lock.
ConnectionProvider::FilesystemConnection::ConnectionScheme
const ConnectionScheme
Connection entry info.
Definition FilesystemConnection.qc.dox.h:40
ConnectionProvider::FilesystemConnection::constructor
constructor(hash< auto > config, *hash< auto > attr)
creates the FilesystemConnection object
ConnectionProvider::FilesystemConnection::constructor
constructor(string name, string description, string url, hash< auto > attributes={}, hash< auto > options={}, *Logger logger)
creates the FilesystemConnection object
ConnectionProvider::FilesystemConnection::getType
string getType()
returns "file"
ConnectionProvider::FilesystemConnection::getConnectionSchemeInfoImpl
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
ConnectionProvider::FilesystemConnection::getImpl
Dir getImpl(bool connect=True, *hash rtopts)
returns a Qore::Dir object
ConnectionProvider::FilesystemConnection::DataProviderSubtypeMap
const DataProviderSubtypeMap
Data provider subtypes supported.
Definition FilesystemConnection.qc.dox.h:44
ConnectionProvider::FilesystemConnection::loadSubtypeInfo
loadSubtypeInfo()
Loads subtype info from external modules.
ConnectionProvider
The ConnectionProvider namespace.
Definition AbstractConnection.qc.dox.h:28