X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fclientignorelistmanager.h;h=9692b835073c864760aa642a6c95ae613a268d2d;hb=694f9bfbf7f1af19108461c7e00d133e55082bce;hp=61a9c49a42e9d29e53a210ad484fc22ae8fd71b9;hpb=12feae2e4609b90c87d3c1857031909248143fd7;p=quassel.git diff --git a/src/client/clientignorelistmanager.h b/src/client/clientignorelistmanager.h index 61a9c49a..9692b835 100644 --- a/src/client/clientignorelistmanager.h +++ b/src/client/clientignorelistmanager.h @@ -22,21 +22,32 @@ #define CLIENTIGNORELISTMANAGER_H #include "ignorelistmanager.h" +#include class ClientIgnoreListManager : public IgnoreListManager { - SYNCABLE_OBJECT - Q_OBJECT + SYNCABLE_OBJECT + Q_OBJECT public: - explicit ClientIgnoreListManager(QObject *parent = 0); - inline virtual const QMetaObject *syncMetaObject() const { return &IgnoreListManager::staticMetaObject; } + 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(); + 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