mirror of
https://github.com/qt/qtmqtt.git
synced 2026-10-25 16:16:26 +00:00
QMqttClient: make ClientState, ClientError and ProtocolVersion Q_ENUM-s
Change-Id: I94e2b559e561d9c1dd93b82996a5748a841fca3e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
This commit is contained in:
parent
b09e6d3869
commit
7467bbdc84
@ -58,11 +58,14 @@ public:
|
||||
AbstractSocket,
|
||||
SecureSocket
|
||||
};
|
||||
|
||||
enum ClientState {
|
||||
Disconnected = 0,
|
||||
Connecting,
|
||||
Connected
|
||||
};
|
||||
Q_ENUM(ClientState)
|
||||
|
||||
enum ClientError {
|
||||
// Protocol states
|
||||
NoError = 0,
|
||||
@ -77,16 +80,20 @@ public:
|
||||
UnknownError,
|
||||
Mqtt5SpecificError
|
||||
};
|
||||
Q_ENUM(ClientError)
|
||||
|
||||
enum ProtocolVersion {
|
||||
MQTT_3_1 = 3,
|
||||
MQTT_3_1_1 = 4,
|
||||
MQTT_5_0 = 5
|
||||
};
|
||||
Q_ENUM(ProtocolVersion)
|
||||
|
||||
private:
|
||||
Q_OBJECT
|
||||
Q_ENUMS(ClientState)
|
||||
Q_ENUMS(ClientError)
|
||||
Q_ENUMS(ProtocolVersion)
|
||||
Q_PROPERTY(QString clientId READ clientId WRITE setClientId NOTIFY clientIdChanged)
|
||||
Q_PROPERTY(QString hostname READ hostname WRITE setHostname NOTIFY hostnameChanged)
|
||||
Q_PROPERTY(quint16 port READ port WRITE setPort NOTIFY portChanged)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user