+ SignalProxy,
+ AuthHandler
+};
+
+
+/*** Handshake, handled by AuthHandler ***/
+
+struct HandshakeMessage {
+ inline Handler handler() const { return AuthHandler; }
+};
+
+
+struct RegisterClient : public HandshakeMessage
+{
+ inline RegisterClient(const QString &clientVersion, const QString &buildDate, bool sslSupported = false)
+ : clientVersion(clientVersion)
+ , buildDate(buildDate)
+ , sslSupported(sslSupported) {}
+
+ QString clientVersion;
+ QString buildDate;
+
+ // this is only used by the LegacyProtocol in compat mode
+ bool sslSupported;
+};
+
+
+struct ClientDenied : public HandshakeMessage
+{
+ inline ClientDenied(const QString &errorString)
+ : errorString(errorString) {}
+
+ QString errorString;
+};
+
+
+struct ClientRegistered : public HandshakeMessage
+{
+ inline ClientRegistered(quint32 coreFeatures, bool coreConfigured, const QVariantList &backendInfo, bool sslSupported, const QDateTime &coreStartTime)
+ : coreFeatures(coreFeatures)
+ , coreConfigured(coreConfigured)
+ , backendInfo(backendInfo)
+ , sslSupported(sslSupported)
+ , coreStartTime(coreStartTime)
+ {}
+
+ quint32 coreFeatures;
+ bool coreConfigured;
+ QVariantList backendInfo; // TODO: abstract this better
+
+ // this is only used by the LegacyProtocol in compat mode
+ bool sslSupported;
+ QDateTime coreStartTime;
+};
+
+
+struct SetupData : public HandshakeMessage
+{
+ inline SetupData(const QString &adminUser, const QString &adminPassword, const QString &backend, const QVariantMap &setupData)
+ : adminUser(adminUser), adminPassword(adminPassword), backend(backend), setupData(setupData) {}
+
+ QString adminUser;
+ QString adminPassword;
+ QString backend;
+ QVariantMap setupData;
+};
+
+
+struct SetupFailed : public HandshakeMessage
+{
+ inline SetupFailed(const QString &errorString)
+ : errorString(errorString) {}
+
+ QString errorString;