X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fclientsettings.h;h=3ae5ae43d96cae04c0264cbd749541833bbf647f;hb=8438c6f685ed43943d36996ada054941a30e3cb3;hp=3ae810e63fe6d1fff92f3dccf2465cb9060c6b30;hpb=64bc0567e3fe373ab996a23ed690ec5631bb417f;p=quassel.git diff --git a/src/client/clientsettings.h b/src/client/clientsettings.h index 3ae810e6..3ae5ae43 100644 --- a/src/client/clientsettings.h +++ b/src/client/clientsettings.h @@ -59,6 +59,12 @@ public: void setLastAccount(AccountId); AccountId autoConnectAccount(); void setAutoConnectAccount(AccountId); + bool autoConnectOnStartup(); + void setAutoConnectOnStartup(bool); + bool autoConnectToFixedAccount(); + void setAutoConnectToFixedAccount(bool); + + void clearAccounts(); void storeAccountData(AccountId id, const QVariantMap &data); QVariantMap retrieveAccountData(AccountId); @@ -67,7 +73,6 @@ public: void setJumpKeyMap(const QHash &keyMap); QHash jumpKeyMap(); -protected: void setAccountValue(const QString &key, const QVariant &data); QVariant accountValue(const QString &key, const QVariant &def = QVariant()); @@ -102,23 +107,31 @@ public: bool nicksCaseSensitive(); }; - // ======================================== -// KnownHostsSettings +// CoreConnectionSettings // ======================================== -class KnownHostsSettings : public ClientSettings { + +class CoreConnectionSettings : public ClientSettings { public: - KnownHostsSettings(); + enum NetworkDetectionMode { + UseSolid, + UsePingTimeout, + NoActiveDetection + }; - QByteArray knownDigest(const QHostAddress &address); - void saveKnownHost(const QHostAddress &address, const QByteArray &certDigest); - bool isKnownHost(const QHostAddress &address, const QByteArray &certDigest); + CoreConnectionSettings(); -#ifdef HAVE_SSL - QByteArray knownDigest(const QSslSocket *socket); - void saveKnownHost(const QSslSocket *socket); - bool isKnownHost(const QSslSocket *socket); -#endif + void setNetworkDetectionMode(NetworkDetectionMode mode); + NetworkDetectionMode networkDetectionMode(); + + void setAutoReconnect(bool autoReconnect); + bool autoReconnect(); + + void setPingTimeoutInterval(int interval); + int pingTimeoutInterval(); + + void setReconnectInterval(int interval); + int reconnectInterval(); }; // ========================================