Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmldebugconnection_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant
4
5#ifndef QQMLDEBUGCONNECTION_P_H
6#define QQMLDEBUGCONNECTION_P_H
7
8#include <QtCore/qobject.h>
9#include <QtNetwork/qabstractsocket.h>
10#include <QtCore/private/qglobal_p.h>
11
12//
13// W A R N I N G
14// -------------
15//
16// This file is not part of the Qt API. It exists purely as an
17// implementation detail. This header file may change from version to
18// version without notice, or even be removed.
19//
20// We mean it.
21//
22
24
25class QQmlDebugClient;
28{
29 Q_OBJECT
30 Q_DECLARE_PRIVATE(QQmlDebugConnection)
31public:
34
35 void connectToHost(const QString &hostName, quint16 port);
36 void startLocalServer(const QString &fileName);
37
38 int currentDataStreamVersion() const;
39 void setMaximumDataStreamVersion(int maximumVersion);
40
41 bool isConnected() const;
42 bool isConnecting() const;
43
44 void close();
45 bool waitForConnected(int msecs = 30000);
46
47 QQmlDebugClient *client(const QString &name) const;
48 bool addClient(const QString &name, QQmlDebugClient *client);
49 bool removeClient(const QString &name);
50
51 float serviceVersion(const QString &serviceName) const;
52 bool sendMessage(const QString &name, const QByteArray &message);
53
55 void connected();
57 void socketError(QAbstractSocket::SocketError socketError);
58 void socketStateChanged(QAbstractSocket::SocketState socketState);
59
60private:
61 void newConnection();
62 void socketConnected();
63 void socketDisconnected();
64 void protocolReadyRead();
65 void handshakeTimeout();
66};
67
68QT_END_NAMESPACE
69
70#endif // QQMLDEBUGCONNECTION_P_H
QPointer< QQmlDebugConnection > connection
QQmlDebugClient(const QString &name, QQmlDebugConnection *parent)
QString name() const
virtual void messageReceived(const QByteArray &message)
float serviceVersion() const
QQmlDebugClient(QQmlDebugClientPrivate &dd)
void sendMessage(const QByteArray &message)
State state() const
QQmlDebugConnection * connection() const
bool addClient(const QString &name, QQmlDebugClient *client)
void socketError(QAbstractSocket::SocketError socketError)
void setMaximumDataStreamVersion(int maximumVersion)
bool sendMessage(const QString &name, const QByteArray &message)
bool removeClient(const QString &name)
QQmlDebugClient * client(const QString &name) const
float serviceVersion(const QString &serviceName) const
void socketStateChanged(QAbstractSocket::SocketState socketState)
bool waitForConnected(int msecs=30000)
void startLocalServer(const QString &fileName)
void connectToHost(const QString &hostName, quint16 port)
Combined button and popup list for selecting options.