Move SASL maybeSupports into Network class
[quassel.git] / src / common / network.h
index 969c3b9..a56b093 100644 (file)
@@ -39,6 +39,9 @@
 #include "ircuser.h"
 #include "ircchannel.h"
 
+// IRCv3 capabilities
+#include "irccap.h"
+
 // defined below!
 struct NetworkInfo;
 
@@ -280,6 +283,17 @@ public :
     // QHash returns the default constructed value if not found, in this case, empty string
     // See:  https://doc.qt.io/qt-4.8/qhash.html#value
 
+    /**
+     * Check if the given authentication mechanism is likely to be supported.
+     *
+     * This depends on the server advertising SASL support and either declaring available mechanisms
+     * (SASL 3.2), or just indicating something is supported (SASL 3.1).
+     *
+     * @param[in] saslMechanism  Desired SASL mechanism
+     * @return True if mechanism supported or unknown, otherwise false
+     */
+    bool saslMaybeSupports(const QString &saslMechanism) const;
+
     IrcUser *newIrcUser(const QString &hostmask, const QVariantMap &initData = QVariantMap());
     inline IrcUser *newIrcUser(const QByteArray &hostmask) { return newIrcUser(decodeServerString(hostmask)); }
     IrcUser *ircUser(QString nickname) const;