X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclientignorelistmanager.h;h=51f020302a11d8718c71948cdf67f0f06868e58e;hp=841ff4f6924cfc603b500d12fc828f6869e50959;hb=86bd6b1ffb870e65af6d830a2ea16471c348ed5a;hpb=27302bba72a29977e81b9a0b2d8cde3a62ebc818 diff --git a/src/client/clientignorelistmanager.h b/src/client/clientignorelistmanager.h index 841ff4f6..51f02030 100644 --- a/src/client/clientignorelistmanager.h +++ b/src/client/clientignorelistmanager.h @@ -22,20 +22,31 @@ #define CLIENTIGNORELISTMANAGER_H #include "ignorelistmanager.h" +#include class ClientIgnoreListManager : public IgnoreListManager { + SYNCABLE_OBJECT Q_OBJECT public: explicit ClientIgnoreListManager(QObject *parent = 0); inline virtual const QMetaObject *syncMetaObject() const { return &IgnoreListManager::staticMetaObject; } + //! Fetch all matching ignore rules for a given hostmask + /** \param hostmask The hostmask of the user + * \param network The network name + * \param channel The channel name + * \return Returns a QMap with the rule as key and a bool, representing if the rule is enabled or not, as value + */ + QMap matchingRulesForHostmask(const QString &hostmask, const QString &network, const QString &channel) const; + signals: void ignoreListChanged(); -private slots: - void ignoreListUpdated(const QVariantMap &newMap); +private: + // matches an ignore rule against a given string + bool pureMatch(const IgnoreListItem &item, const QString &string) const; }; #endif // CLIENTIGNORELISTMANAGER_H