RemotePublisher Class

Publishes hub changes to a remote node. More...

Header: #include <RemotePublisher>
Inherits: QObject

Public Functions

RemotePublisher(QObject *parent = 0)
void connectToServer(const QString &hostName, int port)
void connectToServer(const QString &hostName, int port, int msecs)
QString errorToString(QAbstractSocket::SocketError error)
void registerHub(LiveHubEngine *hub)
QAbstractSocket::SocketState state() const

Public Slots

QUuid activateDocument(const LiveDocument &document)
QUuid beginBulkSend()
QUuid checkPin(const QString &pin)
void disconnectFromServer()
QUuid endBulkSend()
QUuid initComplete()
QUuid sendDocument(const LiveDocument &document)
QUuid setRotation(int rotation)
void setWorkspace(const QString &path)
QUuid setXOffset(int offset)
QUuid setYOffset(int offset)

Signals

void activeDocumentChanged(const LiveDocument &document)
void clearLog()
void connected()
void connectionError(QAbstractSocket::SocketError error)
void disconnected()
void needsPinAuthentication()
void needsPublishWorkspace()
void pinOk(bool ok)
void remoteLog(int type, const QString &msg, const QUrl &url = QUrl(), int line = -1, int column = -1)
void sendingError(const QUuid &uuid, QAbstractSocket::SocketError socketError)
void sentSuccessfully(const QUuid &uuid)

Detailed Description

To see the progress which commands were really sent successfully to to the server you have to connect the signals from the LiveHubEngine yourself and monitor the QUuids you got and wait for sendingError() or sentSuccessfully() signals

Member Function Documentation

RemotePublisher::RemotePublisher(QObject *parent = 0)

Standard Constructor using parent as parent

[slot] QUuid RemotePublisher::activateDocument(const LiveDocument &document)

Send "activateDocument(QString)" to IPC-server on activate document. document defines the Document which should be activated

[signal] void RemotePublisher::activeDocumentChanged(const LiveDocument &document)

The signal is emitted after receiving the activeDocumentChanged IPC call, to indicate the client's active document has changed.

[slot] QUuid RemotePublisher::beginBulkSend()

Sends "beginBulkSend()" via IPC.

[slot] QUuid RemotePublisher::checkPin(const QString &pin)

Send checkPin with pin argument and returns the package uuid.

[signal] void RemotePublisher::clearLog()

The signal is emmited after receiving a clearLog call from a remote client.

[signal] void RemotePublisher::connected()

* * * The signal is emitted when the IPC is connected

[signal] void RemotePublisher::connectionError(QAbstractSocket::SocketError error)

* * * The signal is emitted when a connection error error appears on the IPC * level

[slot] void RemotePublisher::disconnectFromServer()

Disconnects this publisher from the IPC

[signal] void RemotePublisher::disconnected()

* * * The signal is emitted when the IPC is disconnected

[slot] QUuid RemotePublisher::endBulkSend()

Sends "endBulkSend()" via IPC.

[slot] QUuid RemotePublisher::initComplete()

Sends initComplete via IPC

[signal] void RemotePublisher::needsPinAuthentication()

The signal is emitted after receiving the needsPinAuthentication IPC call, to indicate the client requires a pin authentication to continue.

[signal] void RemotePublisher::needsPublishWorkspace()

The signal is emitted after receiving the needsPublishWorkspace IPC call, to indicate the client asks for (re)sending all workspace documents.

[signal] void RemotePublisher::pinOk(bool ok)

* * * The signal is emitted after receiving the pinOk IPC call * with ok to indicate a valid pin

[signal] void RemotePublisher::remoteLog(int type, const QString &msg, const QUrl &url = QUrl(), int line = -1, int column = -1)

The signal is emmited after receiving a log call from a remote client. With the type, msg, url, line and column of the log entry.

[slot] QUuid RemotePublisher::sendDocument(const LiveDocument &document)

Sends "sendDocument(QString)" using document to identify the document to be send to via IPC.

[signal] void RemotePublisher::sendingError(const QUuid &uuid, QAbstractSocket::SocketError socketError)

The signal is emitted when an error occurred while sending a package uuid with the error socketError

[signal] void RemotePublisher::sentSuccessfully(const QUuid &uuid)

The signal is emitted after the package identified by uuid has been send

[slot] QUuid RemotePublisher::setRotation(int rotation)

Sends the setRotation with rotation as argument via IPC

[slot] void RemotePublisher::setWorkspace(const QString &path)

Sets the current workspace to path. Documents location will be adjusted based on this workspace path.

[slot] QUuid RemotePublisher::setXOffset(int offset)

Sends the setXOffset with offset as argument via IPC

[slot] QUuid RemotePublisher::setYOffset(int offset)

Sends the setYOffset with offset as argument via IPC

void RemotePublisher::connectToServer(const QString &hostName, int port)

Set Ipc destination to use hostName and port

See also IpcClient::connectToServer.

void RemotePublisher::connectToServer(const QString &hostName, int port, int msecs)

Set IPC destination to use hostName and port, waits until the socket is connected, up to msecs milliseconds

See also IpcClient::connectToServer.

QString RemotePublisher::errorToString(QAbstractSocket::SocketError error)

Converts the socket error error into a string

void RemotePublisher::registerHub(LiveHubEngine *hub)

Register the hub to be used with this publisher

QAbstractSocket::SocketState RemotePublisher::state() const

Return the state of the IpcClient

See also IpcClient::state().

© 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.