• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/libkopete

Kopete::ContactListStorage

Kopete::ContactListStorage Class Reference

#include <kopetecontactliststorage.h>

Inheritance diagram for Kopete::ContactListStorage:

Inheritance graph
[legend]

List of all members.


Detailed Description

Provide a storage for Kopete Contact List.

Author:
Matt Rogers <mattr@kde.org>

Michaƫl Larouche <larouche@kde.org>

Definition at line 34 of file kopetecontactliststorage.h.


Public Member Functions

 ContactListStorage ()
virtual ~ContactListStorage ()
Group::List groups () const
MetaContact::List contacts () const
virtual bool isValid () const =0
virtual QString errorMessage () const =0
virtual bool isBusy () const =0
virtual void load ()=0
virtual void save ()=0

Protected Member Functions

void addMetaContact (Kopete::MetaContact *metaContact)
void addGroup (Kopete::Group *group)
Kopete::Group * group (unsigned int groupId) const
Kopete::Group * findGroup (const QString &displayName, int type=Kopete::Group::Normal)

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

Group::List Kopete::ContactListStorage::groups (  )  const

Get the Group list for this storage.

Returns:
Group list.

Definition at line 47 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 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 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.

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 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.

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.

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.

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.

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.


The documentation for this class was generated from the following files:
  • kopetecontactliststorage.h
  • kopetecontactliststorage.cpp

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal