| # kabc Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# resourcedir.h

    00001 #ifndef KABC_RESOURCEDIR_H
    00002 #define KABC_RESOURCEDIR_H
    00003
    00004 #include <kconfig.h>
    00005 #include <kdirwatch.h>
    00006
    00007 #include <sys/types.h>
    00008
    00009 #include "resource.h"
    00010
    00011 class QTimer;
    00012
    00013 namespace KABC {
    00014
    00015 class FormatPlugin;
    00016
    00020 class ResourceDir : public QObject, public Resource
    00021 {
    00022   Q_OBJECT
    00023
    00024 public:
    00025   ResourceDir( AddressBook *, const KConfig * );
    00026   ResourceDir( AddressBook *, const QString &filename, FormatPlugin *format=0 );
    00027   ~ResourceDir();
    00028
    00029   bool open();
    00030   void close();
    00031
    00032   Ticket *requestSaveTicket();
    00033
    00034   bool load();
    00035   bool save( Ticket * );
    00036
    00040   void setPath( const QString & );
    00041
    00045   QString path() const;
    00046
    00050   virtual QString identifier() const;
    00051
    00056   void removeAddressee( const Addressee& addr );
    00057
    00062   virtual void cleanUp();
    00063
    00064 protected slots:
    00065   void pathChanged();
    00066
    00067 protected:
    00068   bool lock( const QString &path );
    00069   void unlock( const QString &path );
    00070
    00071 private:
    00072   void init( const QString &path, FormatPlugin *format );
    00073
    00074   FormatPlugin *mFormat;
    00075
    00076   KDirWatch mDirWatch;
    00077
    00078   QString mPath;
    00079   QString mLockUniqueName;
    00080 };
    00081
    00082 }
    00083 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:29:21 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001