summaryrefslogtreecommitdiff
path: root/src/webchannel/qwebchannelabstracttransport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webchannel/qwebchannelabstracttransport.cpp')
-rw-r--r--src/webchannel/qwebchannelabstracttransport.cpp39
1 files changed, 38 insertions, 1 deletions
diff --git a/src/webchannel/qwebchannelabstracttransport.cpp b/src/webchannel/qwebchannelabstracttransport.cpp
index 86c3121..0d56ff6 100644
--- a/src/webchannel/qwebchannelabstracttransport.cpp
+++ b/src/webchannel/qwebchannelabstracttransport.cpp
@@ -43,16 +43,53 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class QWebChannelAbstractTransport
+
+ \inmodule QtWebChannel
+ \brief Communication channel between the C++ QWebChannel server and a HTML/JS client.
+ \since 5.4
+
+ Users of the QWebChannel must implement this interface and connect instances of it
+ to the QWebChannel server for every client that should be connected to the QWebChannel.
+ The {Standalone Example} shows how this can be done using QtWebSockets. QtWebKit implements
+ this interface internally and uses the native WebKit IPC mechanism to transmit messages
+ to HTML clients.
+
+ \note The JSON message protocol is considered internal and might change over time.
+
+ \sa {Standalone Example}
+*/
+
+/*!
+ \fn QWebChannelAbstractTransport::messageReceived(const QJsonObject &message, QWebChannelAbstractTransport *transport)
+
+ This signal must be emitted when a new JSON \a message was received from the remote client. The
+ \a transport argument should be set to this transport object.
+*/
+
+/*!
+ \fn QWebChannelAbstractTransport::sendMessage(const QJsonObject &message)
+
+ Send a JSON \a message to the remote client. An implementation would serialize the message and
+ transmit it to the remote JavaScript client.
+*/
+
+/*!
+ Constructs a transport object with the given \a parent.
+*/
QWebChannelAbstractTransport::QWebChannelAbstractTransport(QObject *parent)
: QObject(parent)
{
}
+/*!
+ Destroys the transport object.
+*/
QWebChannelAbstractTransport::~QWebChannelAbstractTransport()
{
}
-
QT_END_NAMESPACE