2 #include <QJsonDocument>
51 VFS_tcp_export::VFS_tcp_export(QString exportRoot, quint16 port, QHostAddress address,
bool ssl, QString sslCertPath, QString sslKeyPath, QByteArray icon, QString broadcastName, QString broadcastAddress, QString multicastAddress, quint16 multicastPort, QJsonArray tags)
53 , _exportRoot(exportRoot)
55 , _broadcastName(broadcastName)
56 , _broadcastAddress(broadcastAddress)
57 , _multicastPort(multicastPort)
58 , _multicastAddress(multicastAddress)
68 VFS::ERROR(
"A multicast port was specified, but a broadcastAddress was not. Will not broadcast.",0,
className());
208 QByteArray datagram = QJsonDocument(b).toJson();
static char * get(QString which="")
Fetch an icon from the library.
QString className()
Return the class name of a node.
void finished(bool andDelete=false)
Emitted if a thread fails to create its node, or a node is rm()'d, or any other reason a node has com...
The socket client created by VFS_tcp_export.
virtual ~VFS_tcp_export()
Q_INVOKABLE VFS_tcp_export(QString exportRoot, quint16 port, QHostAddress address=QHostAddress::Any, bool ssl=false, QString sslCertPath="", QString sslKeyPath="", QByteArray icon="", QString broadcastName="", QString broadcastAddress="", QString multicastAddress="", quint16 multicastPort=0, QJsonArray tags=QJsonArray())
VFS_tcp_export constructor.
virtual void timerEvent(QTimerEvent *event)
A timer event has fired, probably for sendBroadcast.
QString _broadcastAddress
virtual VFS_tcp_client * newClient(QTcpSocket *socket, bool ssl=false, QSslConfiguration sslConfiguration=QSslConfiguration())
Create a new VFS_tcp_export_client with the new socket.
QByteArray _icon
The optional override icon.
virtual QByteArray icon()
VFS_tcp_mount::icon.
virtual void startBroadcast()
Start broadcasting this mount.
QHostAddress _multicastAddress
virtual QString reportDetails()
Report details of this node.
QString _exportRoot
The VFS path to export.
virtual bool listen()
Open the server socket and listen for new connections.
QUdpSocket _broadcastSocket
virtual void sendBroadcast()
Broadcast information about this mount to the network.
virtual void clientMessage(QByteArray message)
A client message has been received.
Open a listening TCP port for other clients to connect to.
virtual QString reportDetails()
Report details of this node.
virtual bool listen()
Open the server socket and listen for new connections.
quint16 _port
TCP port to listen on, or 0 to find an available one.
static void LOG(QString message, int level=0, QString user="server")
Send a message to the VFS::_messages VFS_stream.
static void ERROR(QString message, int level=0, QString user="server")
Send a message to the VFS::_errors VFS_stream.
static void WARN(QString message, int level=0, QString user="server")
Send a message to the VFS::_warnings VFS_stream.
message(m)
Change the message of an existing arrowMessage.
QString cleanPath(QString path)
Clean and normalize a VFS path.