From 863c4c3678e59ef125c08c00e9532ded5b540f67 Mon Sep 17 00:00:00 2001 From: ulf69 Date: Mon, 02 Aug 2004 18:32:08 +0000 Subject: added support for syncprofiles for resources and export/import capabilities --- (limited to 'kabc/plugins/opie/resourceopie.h') diff --git a/kabc/plugins/opie/resourceopie.h b/kabc/plugins/opie/resourceopie.h index 9db9485..ca30fee 100644 --- a/kabc/plugins/opie/resourceopie.h +++ b/kabc/plugins/opie/resourceopie.h @@ -37,12 +37,10 @@ $Id$ #include "resource.h" -//class QTimer; -//class FormatPlugin; +class OContactAccess; namespace KABC { -//US class FormatPlugin; class ResourceConfigWidget; class OpieConverter; /** @@ -59,12 +57,12 @@ public: @param cfg The config object where custom resource settings are stored. */ - ResourceOpie( const KConfig *cfg ); + ResourceOpie( const KConfig *cfg, bool syncable ); /** Construct file resource on file @arg fileName using format @arg formatName. */ - ResourceOpie( const QString &fileName ); + ResourceOpie( const QString &fileName, bool syncable ); /** * Destructor. @@ -86,7 +84,7 @@ public: * Closes the file again. */ virtual void doClose(); - + /** * Requests a save ticket, that is used by @ref save() */ @@ -106,15 +104,6 @@ public: */ virtual bool save( Ticket *ticket ); - /** - * Set name of file to be used for saving. - */ - void setFileName( const QString & ); - - /** - * Return name of file used for loading and saving the address book. - */ - QString fileName() const; /** * Remove a addressee from its source. @@ -123,11 +112,27 @@ public: virtual void removeAddressee( const Addressee& addr ); /** + * Set name of file to be used for saving. + */ + virtual void setFileName( const QString & ); + + /** * This method is called by an error handler if the application * crashed */ virtual void cleanUp(); + /** + * This method returns the number of elements that are currently in the resource. + */ + virtual int count() const; + + /** + * This method removes all elements from the resource!! (Not from the addressbook) + */ + virtual bool clear(); + + protected slots: void fileChanged(); @@ -138,12 +143,11 @@ protected: void unlock( const QString &fileName ); private: + OContactAccess* mAccess; OpieConverter* mConverter; - - QString mFileName; QString mLockUniqueName; - + KDirWatch mDirWatch; }; -- cgit v0.9.0.2