kopete/libkopete
Kopete::BlackLister Class Reference
#include <kopeteblacklister.h>

Detailed Description
Manages the list of blacklisted contacts for an account.This class manages the list of contacts the user wishes to ignore permanently. In order to use the this class, there is no need to create an instance. Use the Kopete::Account::blackLister() instead.
Keep in mind that this class does not discard messages from blocked users - It only manages the list. It is the up to the protocol to check whether a user is blocked, and act accordingly. A protocol may re-implement Kopete::Account::block() and Kopete::Account::unblock() and use Kopete::Account::blackLister() as a persistent list manager only, or connect the signals contactAdded() and contactRemoved() to its slots.
Definition at line 45 of file kopeteblacklister.h.
Public Slots | |
| void | addContact (Contact *contact) |
| void | addContact (const QString &contactId) |
| void | removeContact (const QString &contactId) |
| void | removeContact (Contact *contact) |
Signals | |
| void | contactAdded (const QString &contactId) |
| void | contactRemoved (const QString &contactId) |
Public Member Functions | |
| BlackLister (const QString &protocolId, const QString &accountId, QObject *parent=0) | |
| bool | isBlocked (const QString &contactId) |
| bool | isBlocked (Contact *contact) |
| ~BlackLister () | |
Constructor & Destructor Documentation
| Kopete::BlackLister::BlackLister | ( | const QString & | protocolId, | |
| const QString & | accountId, | |||
| QObject * | parent = 0 | |||
| ) |
Create an instance, and read the blacklist from disk if it exists.
- Parameters:
-
protocolId is the ID of the protocol owning accountId accountId is the ID of the owning Account. parent The QObject parent for this class. name The QObject name for this class.
Definition at line 38 of file kopeteblacklister.cpp.
| Kopete::BlackLister::~BlackLister | ( | ) |
Definition at line 48 of file kopeteblacklister.cpp.
Member Function Documentation
| void Kopete::BlackLister::addContact | ( | Contact * | contact | ) | [slot] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 74 of file kopeteblacklister.cpp.
| void Kopete::BlackLister::addContact | ( | const QString & | contactId | ) | [slot] |
Add a contact to the blacklist.
This function emits the contactAdded() signal.
- Parameters:
-
contactId is the ID of the contact to be added to the list.
Definition at line 64 of file kopeteblacklister.cpp.
| void Kopete::BlackLister::contactAdded | ( | const QString & | contactId | ) | [signal] |
A new contact has been added to the list.
Connect to this signal if you want to perform additional actions, and you prefer not to derive from this class.
| void Kopete::BlackLister::contactRemoved | ( | const QString & | contactId | ) | [signal] |
A contact has been removed from the list.
Connect to this signal if you want to perform additional actions, and you prefer not to derive from this class.
| bool Kopete::BlackLister::isBlocked | ( | const QString & | contactId | ) |
- Returns:
trueif the contact with IDcontactIdis blocked,falseotherwise.
Definition at line 54 of file kopeteblacklister.cpp.
| bool Kopete::BlackLister::isBlocked | ( | Contact * | contact | ) |
- Returns:
trueifcontactis blocked,falseotherwise.
Definition at line 59 of file kopeteblacklister.cpp.
| void Kopete::BlackLister::removeContact | ( | const QString & | contactId | ) | [slot] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 95 of file kopeteblacklister.cpp.
| void Kopete::BlackLister::removeContact | ( | Contact * | contact | ) | [slot] |
Remove a contact from the blacklist.
Removes the contact from the blacklist. This function emits the contactRemoved() signal.
- Parameters:
-
contact is the contact to be removed from the list.
Definition at line 81 of file kopeteblacklister.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference