summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/opie/resourceopie.h
Side-by-side diff
Diffstat (limited to 'kabc/plugins/opie/resourceopie.h') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.h36
1 files changed, 20 insertions, 16 deletions
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
@@ -34,18 +34,16 @@ $Id$
#include <sys/types.h>
#include "resource.h"
-//class QTimer;
-//class FormatPlugin;
+class OContactAccess;
namespace KABC {
-//US class FormatPlugin;
class ResourceConfigWidget;
class OpieConverter;
/**
@internal
*/
class ResourceOpie : public Resource
@@ -56,18 +54,18 @@ public:
/**
Constructor.
@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.
*/
~ResourceOpie();
@@ -103,48 +101,54 @@ public:
* Returns true if all addressees could be saved otherwise false.
*
* @param ticket The ticket returned by @ref requestSaveTicket()
*/
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.
* This method is mainly called by KABC::AddressBook.
*/
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();
protected:
void init( const QString &fileName );
bool lock( const QString &fileName );
void unlock( const QString &fileName );
private:
+ OContactAccess* mAccess;
OpieConverter* mConverter;
- QString mFileName;
-
QString mLockUniqueName;
KDirWatch mDirWatch;
};
}