Handle STATUSMSG messages
[quassel.git] / src / common / network.h
index b83c699..c6f8f67 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2015 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -50,30 +50,30 @@ class Network : public SyncableObject
     Q_OBJECT
     Q_ENUMS(ConnectionState)
 
-    Q_PROPERTY(QString networkName READ networkName WRITE setNetworkName STORED false)
-    Q_PROPERTY(QString currentServer READ currentServer WRITE setCurrentServer STORED false)
-    Q_PROPERTY(QString myNick READ myNick WRITE setMyNick STORED false)
-    Q_PROPERTY(int latency READ latency WRITE setLatency STORED false)
-    Q_PROPERTY(QByteArray codecForServer READ codecForServer WRITE setCodecForServer STORED false)
-    Q_PROPERTY(QByteArray codecForEncoding READ codecForEncoding WRITE setCodecForEncoding STORED false)
-    Q_PROPERTY(QByteArray codecForDecoding READ codecForDecoding WRITE setCodecForDecoding STORED false)
-    Q_PROPERTY(IdentityId identityId READ identity WRITE setIdentity STORED false)
-    Q_PROPERTY(bool isConnected READ isConnected WRITE setConnected STORED false)
-    //Q_PROPERTY(Network::ConnectionState connectionState READ connectionState WRITE setConnectionState STORED false)
-    Q_PROPERTY(int connectionState READ connectionState WRITE setConnectionState STORED false)
-    Q_PROPERTY(bool useRandomServer READ useRandomServer WRITE setUseRandomServer STORED false)
-    Q_PROPERTY(QStringList perform READ perform WRITE setPerform STORED false)
-    Q_PROPERTY(bool useAutoIdentify READ useAutoIdentify WRITE setUseAutoIdentify STORED false)
-    Q_PROPERTY(QString autoIdentifyService READ autoIdentifyService WRITE setAutoIdentifyService STORED false)
-    Q_PROPERTY(QString autoIdentifyPassword READ autoIdentifyPassword WRITE setAutoIdentifyPassword STORED false)
-    Q_PROPERTY(bool useSasl READ useSasl WRITE setUseSasl STORED false)
-    Q_PROPERTY(QString saslAccount READ saslAccount WRITE setSaslAccount STORED false)
-    Q_PROPERTY(QString saslPassword READ saslPassword WRITE setSaslPassword STORED false)
-    Q_PROPERTY(bool useAutoReconnect READ useAutoReconnect WRITE setUseAutoReconnect STORED false)
-    Q_PROPERTY(quint32 autoReconnectInterval READ autoReconnectInterval WRITE setAutoReconnectInterval STORED false)
-    Q_PROPERTY(quint16 autoReconnectRetries READ autoReconnectRetries WRITE setAutoReconnectRetries STORED false)
-    Q_PROPERTY(bool unlimitedReconnectRetries READ unlimitedReconnectRetries WRITE setUnlimitedReconnectRetries STORED false)
-    Q_PROPERTY(bool rejoinChannels READ rejoinChannels WRITE setRejoinChannels STORED false)
+    Q_PROPERTY(QString networkName READ networkName WRITE setNetworkName)
+    Q_PROPERTY(QString currentServer READ currentServer WRITE setCurrentServer)
+    Q_PROPERTY(QString myNick READ myNick WRITE setMyNick)
+    Q_PROPERTY(int latency READ latency WRITE setLatency)
+    Q_PROPERTY(QByteArray codecForServer READ codecForServer WRITE setCodecForServer)
+    Q_PROPERTY(QByteArray codecForEncoding READ codecForEncoding WRITE setCodecForEncoding)
+    Q_PROPERTY(QByteArray codecForDecoding READ codecForDecoding WRITE setCodecForDecoding)
+    Q_PROPERTY(IdentityId identityId READ identity WRITE setIdentity)
+    Q_PROPERTY(bool isConnected READ isConnected WRITE setConnected)
+    //Q_PROPERTY(Network::ConnectionState connectionState READ connectionState WRITE setConnectionState)
+    Q_PROPERTY(int connectionState READ connectionState WRITE setConnectionState)
+    Q_PROPERTY(bool useRandomServer READ useRandomServer WRITE setUseRandomServer)
+    Q_PROPERTY(QStringList perform READ perform WRITE setPerform)
+    Q_PROPERTY(bool useAutoIdentify READ useAutoIdentify WRITE setUseAutoIdentify)
+    Q_PROPERTY(QString autoIdentifyService READ autoIdentifyService WRITE setAutoIdentifyService)
+    Q_PROPERTY(QString autoIdentifyPassword READ autoIdentifyPassword WRITE setAutoIdentifyPassword)
+    Q_PROPERTY(bool useSasl READ useSasl WRITE setUseSasl)
+    Q_PROPERTY(QString saslAccount READ saslAccount WRITE setSaslAccount)
+    Q_PROPERTY(QString saslPassword READ saslPassword WRITE setSaslPassword)
+    Q_PROPERTY(bool useAutoReconnect READ useAutoReconnect WRITE setUseAutoReconnect)
+    Q_PROPERTY(quint32 autoReconnectInterval READ autoReconnectInterval WRITE setAutoReconnectInterval)
+    Q_PROPERTY(quint16 autoReconnectRetries READ autoReconnectRetries WRITE setAutoReconnectRetries)
+    Q_PROPERTY(bool unlimitedReconnectRetries READ unlimitedReconnectRetries WRITE setUnlimitedReconnectRetries)
+    Q_PROPERTY(bool rejoinChannels READ rejoinChannels WRITE setRejoinChannels)
 
 public :
         enum ConnectionState {
@@ -131,6 +131,7 @@ public :
     inline bool isMe(IrcUser *ircuser) const { return (ircuser->nick().toLower() == myNick().toLower()); }
 
     bool isChannelName(const QString &channelname) const;
+    bool isStatusMsg(const QString &target) const;
 
     inline bool isConnected() const { return _connected; }
     //Network::ConnectionState connectionState() const;
@@ -213,10 +214,6 @@ 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 &currentServer);
@@ -372,8 +369,6 @@ private:
 
     bool _autoAwayActive; // when this is active handle305 and handle306 don't trigger any output
 
-    static QString _networksIniPath;
-
     friend class IrcUser;
     friend class IrcChannel;
 };