Qore FtpClientDataProvider Module Reference  1.0
FtpClientDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
26 namespace FtpClientDataProvider {
28 class FtpClientDataProvider : public AbstractDataProvider {
29 
30 public:
32  const ProviderInfo = <DataProviderInfo>{
33  "type": "FtpClientDataProvider",
34  "constructor_options": ConstructorOptions,
35  "supports_children": True,
36  };
37 
39  const ConstructorOptions = {
40  "timeout": <DataProviderOptionInfo>{
41  "type": AbstractDataProviderType::get(IntType),
42  "desc": "I/O timeout to use in milliseconds",
43  },
44  "url": <DataProviderOptionInfo>{
45  "type": AbstractDataProviderType::get(StringType),
46  "desc": "A URL for an FTP or FTPS connection",
47  "required": True,
48  },
49  };
50 
51  FtpClient ftp;
52 
53 protected:
54  const ChildMap = {
55  "create-file": Class::forName("FtpClientDataProvider::FtpClientCreateFileDataProvider"),
56  "delete": Class::forName("FtpClientDataProvider::FtpClientDeleteDataProvider"),
57  "get-file": Class::forName("FtpClientDataProvider::FtpClientGetFileDataProvider"),
58  "list": Class::forName("FtpClientDataProvider::FtpClientListDataProvider"),
59  "mkdir": Class::forName("FtpClientDataProvider::FtpClientMkdirDataProvider"),
60  "move": Class::forName("FtpClientDataProvider::FtpClientMoveDataProvider"),
61  "stat": Class::forName("FtpClientDataProvider::FtpClientStatDataProvider"),
62  };
63 
64 public:
65 
67  constructor(__7_ hash<auto> options);
68 
69 
71  constructor(FtpClient ftp);
72 
73 
75  string getName();
76 
77 
79  __7_ string getDesc();
80 
81 
83  __7_ list<hash<DataProviderSummaryInfo>> getChildProviderSummaryInfo();
84 
85 
87  static FtpClient getFtpClientConnection(hash<auto> options);
88 
90  static string getPath(FtpClient ftp, string path1);
91 
93 
95 protected:
96  __7_ list<string> getChildProviderNamesImpl();
97 public:
98 
99 
101 
105 protected:
106  __7_ AbstractDataProvider getChildProviderImpl(string name);
107 public:
108 
109 
111 protected:
112  hash<DataProviderInfo> getStaticInfoImpl();
113 public:
114 
115 };
116 };
string getName()
Returns the data provider name.
__7_ list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
__7_ list< hash< DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
__7_ AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
static FtpClient getFtpClientConnection(hash< auto > options)
Returns an FTP connection from constructor options.
constructor(FtpClient ftp)
Creates the object from an FTP connection.
__7_ string getDesc()
Returns the data provider description.
constructor(__7_ hash< auto > options)
Creates the object from constructor options.
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
static string getPath(FtpClient ftp, string path1)
Returns the path based on the FtpClient's base path.
const True
Qore FtpClientDataProvider module definition.
Definition: FtpClientCreateFileDataProvider.qc.dox.h:26