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

kopete/libkopete

  • Kopete
  • ContactListStorage
Public Member Functions | Protected Member Functions | List of all members
Kopete::ContactListStorage Class Referenceabstract

#include <kopetecontactliststorage.h>

Inheritance diagram for Kopete::ContactListStorage:
Inheritance graph
[legend]

Public Member Functions

 ContactListStorage ()
 
virtual ~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
 

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
 

Detailed Description

Provide a storage for Kopete Contact List.

Author
Matt Rogers mattr.nosp@m.@kde.nosp@m..org
Michaƫl Larouche larou.nosp@m.che@.nosp@m.kde.o.nosp@m.rg

Definition at line 34 of file kopetecontactliststorage.h.

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
groupGroup 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
metaContactMetaContact 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
displayNameis the display name to search
typeis 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
groupIdThe 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:
  • kopetecontactliststorage.h
  • kopetecontactliststorage.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

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

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal