Remoto - VFS: VFS_node_interface.h Source File
Remoto - VFS
VFS_node_interface.h
Go to the documentation of this file.
1 
2 #ifndef VFS_NODE_INTERFACE_H
3 #define VFS_NODE_INTERFACE_H
4 
5 #include <QDomElement>
6 
7 #include "VFS_base/VFS_node.h"
8 
10 {
11  protected:
12  //pure virtual should be protected, probably
13  explicit VFS_node_interface(VFS_node *remoteNode = nullptr);
14 
15  public:
16  virtual ~VFS_node_interface();
17 
18  //initialize the node, which may be identifying types or connecting to a license server.
19  virtual bool initialize();
20 
21  //describe all nodes in a plugin
22  QString describe();
23 
24  //a description for each node
25  virtual QString description(QString type);
26 
27  //the arguments for each node
28  virtual QString arguments(QString type);
29 
30  //check to see if a valid license is found for this plugin
31  virtual bool licensed(QString type);
32 
33  //list of nodes provided by this package
34  virtual QStringList provides();
35 
36  //create a node by name with given parameters and environment
37  virtual VFS_node *create(QString type, QVariantMap env, QDomElement child);
38 
39  //return the code identified by nodename:libname
40  virtual QString code(QString nodename, QString libname, QString &error);
41 
42  //is this a remote resource?
43  bool isRemote();
45 
46  protected:
47  //format QMetaObject constructor data as a string.
48  QString argumentString( QMetaObject s );
49 
50  bool _remote;
52 };
53 
54 #define VFS_node_interface_iid "com.remoto.plugins.VFS_node_interface"
55 
56 Q_DECLARE_INTERFACE(VFS_node_interface, VFS_node_interface_iid)
57 
58 #endif //VFS_NODE_INTERFACE_H
#define VFS_node_interface_iid
The interface class for dynamically loaded plugins.
virtual QString description(QString type)
Descriptive text about an individual node.
bool isRemote()
If a plugin represents a remote resource, this value will be true.
virtual bool initialize()
The plugin initializer.
VFS_node_interface(VFS_node *remoteNode=nullptr)
VFS_node_interface::VFS_node_interface.
QString argumentString(QMetaObject s)
Format a constructor string based on a node's metadata object.
bool _remote
Does this plugin exist on another resource?
virtual bool licensed(QString type)
A licensing mechanism for node creation.
QString describe()
Describe all the nodes in a plugin.
virtual QString arguments(QString type)
Describe the arguments needed to create a node.
VFS_node * _remoteNode
The node responding to requests for remote resources.
virtual QString code(QString nodename, QString libname, QString &error)
Request code or other resource from a plugin bundle.
virtual QStringList provides()
A string list of node names that this plugin is prepared to create.
VFS_node * remoteNode()
Return the node needed to satisfy a remote request.
virtual VFS_node * create(QString type, QVariantMap env, QDomElement child)
Create a new node instance.
VFS_node is the base class from which all other VFS_node classes derive.
Definition: VFS_node.h:143