kopete/libkopete
Kopete::ContactListStorage Class Reference
#include <kopetecontactliststorage.h>

Detailed Description
Provide a storage for Kopete Contact List.
Definition at line 34 of file kopetecontactliststorage.h.
Public Member Functions | |
| ContactListStorage () | |
| MetaContact::List | contacts () const |
| virtual QString | errorMessage () const =0 |
| Group::List | groups () const |
| virtual bool | isBusy () const =0 |
| virtual bool | isValid () const =0 |
| virtual void | load ()=0 |
| virtual void | save ()=0 |
| virtual | ~ContactListStorage () |
Protected Member Functions | |
| void | addGroup (Kopete::Group *group) |
| void | addMetaContact (Kopete::MetaContact *metaContact) |
| Kopete::Group * | findGroup (const QString &displayName, int type=Kopete::Group::Normal) |
| Kopete::Group * | group (unsigned int groupId) const |
Constructor & Destructor Documentation
| Kopete::ContactListStorage::ContactListStorage | ( | ) |
Definition at line 36 of file kopetecontactliststorage.cpp.
| Kopete::ContactListStorage::~ContactListStorage | ( | ) | [virtual] |
Definition at line 42 of file kopetecontactliststorage.cpp.
Member Function Documentation
| void Kopete::ContactListStorage::addGroup | ( | Kopete::Group * | group | ) | [protected] |
Add a Group to internal list.
Derived ContactListStorage use this method to add new Group.
- Parameters:
-
group Group to add.
Definition at line 62 of file kopetecontactliststorage.cpp.
| void Kopete::ContactListStorage::addMetaContact | ( | Kopete::MetaContact * | metaContact | ) | [protected] |
Add a MetaContact to internal list.
Derived ContactListStorage use this method to add new MetaContact.
- Parameters:
-
metaContact MetaContact to add.
Definition at line 57 of file kopetecontactliststorage.cpp.
| MetaContact::List Kopete::ContactListStorage::contacts | ( | ) | const |
Get the MetaContact list for this storage.
- Returns:
- MetaContact list.
Definition at line 52 of file kopetecontactliststorage.cpp.
| virtual QString Kopete::ContactListStorage::errorMessage | ( | ) | const [pure virtual] |
Get a nice error message.
Use this method to find out why an operation of the ContactListStorage failed. The resulting error message is already translated.
Derived ContactListStorage must implement this method.
- Returns:
- Translated error message
Implemented in Kopete::XmlContactStorage.
| Kopete::Group * Kopete::ContactListStorage::findGroup | ( | const QString & | displayName, | |
| int | type = Kopete::Group::Normal | |||
| ) | [protected] |
Find a group with his displayName.
If a group already exists with the given name and the given type, the existing group will be returned. Otherwise, a new group will be created.
- Parameters:
-
displayName is the display name to search type is the Group::GroupType to search, the default value is Group::Normal
- Returns:
- always a valid Group
Definition at line 77 of file kopetecontactliststorage.cpp.
| Kopete::Group * Kopete::ContactListStorage::group | ( | unsigned int | groupId | ) | const [protected] |
Get the Group with the given id for this storage.
- Parameters:
-
groupId The unique id to search.
- Returns:
- Group or 0L if nothing is found.
Definition at line 67 of file kopetecontactliststorage.cpp.
| Group::List Kopete::ContactListStorage::groups | ( | ) | const |
Get the Group list for this storage.
- Returns:
- Group list.
Definition at line 47 of file kopetecontactliststorage.cpp.
| virtual bool Kopete::ContactListStorage::isBusy | ( | ) | const [pure virtual] |
Check if the current ContactListStorage is busy.
Derived ContactListStorage must implement this method.
- Returns:
- true if this ContactListStorage is busy.
Implemented in Kopete::XmlContactStorage.
| virtual bool Kopete::ContactListStorage::isValid | ( | ) | const [pure virtual] |
Check if the current ContactListStorage.
Call this method to verify if the loading of the storage went without problems.
Kopete::ContactListStorage *storage = new Kopete::XmlContactStorage; storage->load(); if( !storage->isValid() ) { kDebug() << "Contact list storage failed. Reason: " << storage->errorMessage(); }
Derived ContactListStorage must implement this method.
- Returns:
- true if this ContactListStorage is valid.
Implemented in Kopete::XmlContactStorage.
| virtual void Kopete::ContactListStorage::load | ( | ) | [pure virtual] |
Load the contact list.
Derived ContactListStorage must implement this method.
Implemented in Kopete::XmlContactStorage.
| virtual void Kopete::ContactListStorage::save | ( | ) | [pure virtual] |
Save the contact list.
Derived ContactListStorage must implement this method.
Implemented in Kopete::XmlContactStorage.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference