Remoto - VFS
|
The standard library of nodes needed to build a VFS. More...
#include <VFS_stdlib.h>
Public Member Functions | |
virtual QString | arguments (QString type) |
Return an argument string for each stdlib node's constructor. More... | |
virtual QString | code (QString nodename, QString libname, QString &error) |
Return code for namespace stdlib. More... | |
virtual VFS_node * | create (QString type, QVariantMap env, QDomElement child) |
Create a new node instance. More... | |
virtual QString | description (QString type) |
Descriptive text about an individual node. More... | |
virtual bool | initialize () |
Register the browser and vfsclient types. More... | |
virtual bool | licensed (QString type) |
Check remoto licensing. More... | |
virtual QStringList | provides () |
A string list of node names that this plugin is prepared to create. More... | |
Public Member Functions inherited from VFS_node_interface | |
virtual | ~VFS_node_interface () |
QString | describe () |
Describe all the nodes in a plugin. More... | |
bool | isRemote () |
If a plugin represents a remote resource, this value will be true. More... | |
VFS_node * | remoteNode () |
Return the node needed to satisfy a remote request. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from VFS_node_interface | |
VFS_node_interface (VFS_node *remoteNode=nullptr) | |
VFS_node_interface::VFS_node_interface. More... | |
QString | argumentString (QMetaObject s) |
Format a constructor string based on a node's metadata object. More... | |
Protected Attributes inherited from VFS_node_interface | |
bool | _remote |
Does this plugin exist on another resource? More... | |
VFS_node * | _remoteNode |
The node responding to requests for remote resources. More... | |
The standard library of nodes needed to build a VFS.
Any basic VFS can be created using the nodes found here. This includes networking, file storage, authentication, timers, etc. In addition, it can serve the default javascript GUI which has a paneManager, logging panes, widgets for forms, menus, etc.
Included Nodes:
Config file tag | Node Class | Brief |
---|---|---|
node | VFS_node | VFS_node is the base class from which all other VFS_node classes derive. |
aclnode | VFS_aclnode | A subclass of VFS_application for having a generic VFS_node with ACL support. |
hd | VFS_HD | A VFS_datastore subclass for storing data on a locally attached hard drive or NFS share. |
qrc | VFS_QRC | Qt resource data node. |
ephemeral | VFS_ephemeral | A VFS_datastore subclass for storing data directly in memory as if it was a filesystem. |
applications | VFS_applications | This is an empty wrapper that will elevate a node to VFS_application status, which will use ACLs for permissions. |
cron | VFS_cron | VFS_cron will emit diffs to subscribers based on wall-clock time. |
curl | VFS_curl | VFS_curl reads data from a url when read() is called. |
stream | VFS_stream | VFS_stream stores data sequentially within a buffer. |
pulse | VFS_pulse | VFS_pulse provides an event pulse that can be subscribed to. |
ifrrame | VFS_iframe | VFS_iframe is a button for opening an iframe in a panel. |
sessions | VFS_sessionManager | VFS_sessionManager manages connected clients and their session data. |
acl | VFS_acl | The ACL class for maintaining permission to nodes. |
nopasswd | VFS_nopasswd | The VFS_nopasswd authenticator uses a nopasswd file to store username, uidnumber, a real name, and group membership. |
passwd | VFS_passwd | The VFS_passwd authenticator uses a passwd file to store username, hashed password, uidnumber, a real name, and group membership. |
curlauth | VFS_curlauth | The VFS_curlauth authenticator performs a POST request to a url for authentication. |
tcp_export | VFS_tcp_export | Open a listening TCP socket for mounting one VFS into another. |
tcp_mount | VFS_tcp_mount | The VFS_tcp_mount class is a client side connection that will attempt to connect to another VFS instance. |
udp_socket | VFS_udp_socket | Open a UDP port in write or read/write mode. |
httpd_browser | VFS_httpd_browser | A subclass of VFS_httpd which will display a summary of the current state of the VFS. |
remotoserver | VFS_remotoserver | VFS_remotoserver is a subclass of VFS_websocket_server. |
Definition at line 6 of file VFS_stdlib.h.
|
virtual |
Return an argument string for each stdlib node's constructor.
type | The type being queried |
Reimplemented from VFS_node_interface.
Definition at line 186 of file VFS_stdlib.cpp.
|
virtual |
Return code for namespace stdlib.
nodename | The nodename of the plugin to query for code. |
libname | The libname to fetch. |
error | An error string to write back to if there's a problem. |
Check to see if the path exists in the ":/VFS_stdlib/" Qt resource. If it does, check the if it is an image resource ending with .jpg,.jpeg,.gif,.png,.svg, and if so, prepend a mime type to a base64 encoding of the data. Otherwise, return the raw file.
If the path doesn't exist, send an error message and call VFS_node::code() for error handling.
Reimplemented from VFS_node_interface.
Definition at line 513 of file VFS_stdlib.cpp.
|
virtual |
Create a new node instance.
Base implementation that does nothing.
Plugins bundle groups of node definitions together. This is the factory function for creating new nodes.
For example:
Please note the entries for a config file:
As a pure virtual function, this must be implemented in all plugins.
type | The node type, as listed in provides() and referenced in a config.xml |
env | The constructor environment |
child | The config DOM element |
Subclasses must implement this for a plugin to be useful. This base implementation is present so that a minimal plugin can implement initialize() without providing any nodes.
Reimplemented from VFS_node_interface.
Definition at line 307 of file VFS_stdlib.cpp.
|
virtual |
Descriptive text about an individual node.
type | The node name |
The implementation of this pure method will look something like:
Reimplemented from VFS_node_interface.
Definition at line 109 of file VFS_stdlib.cpp.
|
virtual |
Register the browser
and vfsclient
types.
Any entry that is a directory must end with a slash.
Reimplemented from VFS_node_interface.
Definition at line 45 of file VFS_stdlib.cpp.
|
virtual |
Check remoto licensing.
type | The node type |
Remoto itself will use node creation as a licensing mechanism.
true
for all nodes. Reimplemented from VFS_node_interface.
Definition at line 267 of file VFS_stdlib.cpp.
|
virtual |
A string list of node names that this plugin is prepared to create.
Base implementation that returns an empty list.
Plugins bundle groups of node definitions together. This is the list of nodes.
For example:
As a pure virtual function, this must be implemented in all plugins.
Subclasses must implement this for a plugin to be useful. This base implementation is present so that a minimal plugin can implement initialize() without providing any nodes.
Reimplemented from VFS_node_interface.
Definition at line 276 of file VFS_stdlib.cpp.