21#ifndef KABC_RESOURCE_H 
   22#define KABC_RESOURCE_H 
   24#include <tderesources/resource.h> 
   26#include "addressbook.h" 
   39    friend class Resource;
 
   47    Ticket( Resource *resource );
 
   55class KABC_EXPORT Resource : 
public KRES::Resource
 
   76        virtual const Addressee &operator*() 
const;
 
   82        virtual bool operator==( 
const Iterator &it );
 
   83        virtual bool operator!=( 
const Iterator &it );
 
  103        virtual const Addressee &operator*() 
const ;
 
  111        struct ConstIteratorData;
 
  112        ConstIteratorData *d;
 
  160    virtual void writeConfig( 
TDEConfig *config );
 
  167    virtual Ticket *requestSaveTicket() = 0;
 
  174    virtual void releaseSaveTicket( 
Ticket* ) = 0;
 
  181    virtual bool load() = 0;
 
  192    virtual bool asyncLoad();
 
  197    virtual void insertAddressee( 
const Addressee& );
 
  202    virtual void removeAddressee( 
const Addressee& addr );
 
  211    virtual bool save( 
Ticket *ticket ) = 0;
 
  224    virtual bool asyncSave( 
Ticket *ticket );
 
  233    virtual Addressee findByUid( 
const TQString &uid );
 
  241    virtual Addressee::List findByName( 
const TQString &name );
 
  249    virtual Addressee::List findByEmail( 
const TQString &email );
 
  257    virtual Addressee::List findByCategory( 
const TQString &category );
 
  262    virtual void clear();
 
  278    void loadingFinished( Resource *resource );
 
  287    void loadingError( Resource *resource, 
const TQString &msg );
 
  295    void savingFinished( Resource *resource );
 
  304    void savingError( Resource *resource, 
const TQString &msg );
 
  307    Ticket *createTicket( Resource * );
 
  308    Addressee::Map mAddrMap;
 
  313    class ResourcePrivate;
 
Helper class for handling coordinated save of address books.
 
static data, shared by ALL addressee objects