X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fnetwork.h;h=704d67aacb4c918499aad65093e46a94c0bb597c;hp=bee38e9656eb2c6a4140a71436b4c9e8f9f9e826;hb=6c19be8efa70b6fb76d2c43aa96ab5c908e039e3;hpb=710edfe368ed1db79cc274164523d14afc1b2c9d diff --git a/src/common/network.h b/src/common/network.h index bee38e96..704d67aa 100644 --- a/src/common/network.h +++ b/src/common/network.h @@ -203,6 +203,10 @@ public: inline bool autoAwayActive() const { return _autoAwayActive; } inline void setAutoAwayActive(bool active) { _autoAwayActive = active; } + static QStringList presetNetworks(bool onlyDefault = false); + static QStringList presetDefaultChannels(const QString &networkName); + static NetworkInfo networkInfoFromPreset(const QString &networkName); + public slots: void setNetworkName(const QString &networkName); void setCurrentServer(const QString ¤tServer); @@ -350,12 +354,17 @@ private: bool _autoAwayActive; // when this is active handle305 and handle306 don't trigger any output + static QString _networksIniPath; + friend class IrcUser; friend class IrcChannel; }; //! Stores all editable information about a network (as opposed to runtime state). struct NetworkInfo { + // set some default values, note that this does not initialize e.g. name and id + NetworkInfo(); + NetworkId networkId; QString networkName; IdentityId identity; @@ -365,7 +374,6 @@ struct NetworkInfo { QByteArray codecForEncoding; QByteArray codecForDecoding; - // Server entry: QString "Host", uint "Port", QString "Password", bool "UseSSL" Network::ServerList serverList; bool useRandomServer;