RemoteReceiver Class
Receives commands from the remote publisher. More...
Header: | #include <RemoteReceiver> |
Inherits: | QObject |
Public Types
enum | ConnectionOption { NoConnectionOption, UpdateDocumentsOnConnect, BlockingConnect } |
flags | ConnectionOptions |
Public Functions
RemoteReceiver(QObject *parent = 0) | |
bool | listen(int port, RemoteReceiver::ConnectionOptions options) |
QString | pin() const |
void | registerNode(LiveNodeEngine *node) |
void | setMaxConnections(int max) |
void | setPin(const QString &pin) |
Signals
void | activateDocument(const LiveDocument &document) |
void | beginBulkUpdate() |
void | clientConnected(const QHostAddress &address) |
void | clientDisconnected(const QHostAddress &address) |
void | endBulkUpdate() |
void | initComplete() |
void | pinOk(bool ok) |
void | reload() |
void | rotationChanged(int rotation) |
void | updateDocument(const LiveDocument &document, const QByteArray &content) |
void | updateDocumentsOnConnectFinished(bool ok) |
void | xOffsetChanged(int offset) |
void | yOffsetChanged(int offset) |
Detailed Description
Receives commands from a remote publisher to publish workspace files and to setup the active document.
Member Type Documentation
enum RemoteReceiver::ConnectionOption
flags RemoteReceiver::ConnectionOptions
This enum type is used to select optional connection related features:
Constant | Value | Description |
---|---|---|
RemoteReceiver::NoConnectionOption | 0x0 | No optional feature is enabled. |
RemoteReceiver::UpdateDocumentsOnConnect | 0x1 | The remote publisher will be asked to publish all workspace files on connect. This applies to the very first connection only. |
RemoteReceiver::BlockingConnect | 0x2 | Call to listen() will block until a connection from remote publisher is open and (optional) PIN exchange and (optional) initial documents update finishes. |
The ConnectionOptions type is a typedef for QFlags<ConnectionOption>. It stores an OR combination of ConnectionOption values.
See also listen().
Member Function Documentation
RemoteReceiver::RemoteReceiver(QObject *parent = 0)
Standard Constructor using parent as parent
[signal]
void RemoteReceiver::activateDocument(const LiveDocument &document)
This signal is emitted when the remote active document document has changed
[signal]
void RemoteReceiver::beginBulkUpdate()
This signal is emitted before an expected sequence of updateDocument emissions.
[signal]
void RemoteReceiver::clientConnected(const QHostAddress &address)
This signal is emitted when a new client with address address has been connected
[signal]
void RemoteReceiver::clientDisconnected(const QHostAddress &address)
This signal is emitted when a client with address address has been disconnected
[signal]
void RemoteReceiver::endBulkUpdate()
This signal is emitted after an expected sequence of updateDocument emissions.
[signal]
void RemoteReceiver::initComplete()
This signal is emitted to notify that the initial message exchange was completed
[signal]
void RemoteReceiver::pinOk(bool ok)
This signal is emitted to notiify that the pin entered on the remote side is valid, if ok equals true
[signal]
void RemoteReceiver::reload()
This signal is emitted to notify that a relaod is requested by the remote client
[signal]
void RemoteReceiver::rotationChanged(int rotation)
This signal is emitted to notify the view to apply the rotation with the angle rotation
[signal]
void RemoteReceiver::updateDocument(const LiveDocument &document, const QByteArray &content)
This signal is emitted to notify that a document has changed its content
[signal]
void RemoteReceiver::updateDocumentsOnConnectFinished(bool ok)
This signal is emitted to notify that the (optional) initial update of all workspace documents finished. ok indicates its result.
See also UpdateDocumentsOnConnect.
[signal]
void RemoteReceiver::xOffsetChanged(int offset)
This signal is emitted to notify the view to apply the x-offset offset
[signal]
void RemoteReceiver::yOffsetChanged(int offset)
This signal is emitted to notify the view to apply the y-offset offset
bool RemoteReceiver::listen(int port, RemoteReceiver::ConnectionOptions options)
Listens on remote publisher connections on port with given options. If options contains BlockingConnect the return value indicates whether PIN exchange and/or initial documents update was successful. Otherwise the return value is always true
.
QString RemoteReceiver::pin() const
Returns the current pin
See also setPin().
void RemoteReceiver::registerNode(LiveNodeEngine *node)
Register the node to be notified about changes
void RemoteReceiver::setMaxConnections(int max)
Set maximum allowed client connection to max
void RemoteReceiver::setPin(const QString &pin)
Sets the pin to access this live node
See also pin().
© 2019 Luxoft Sweden AB. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.