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
@@ -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.
@@ -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,10 +143,9 @@ protected:
void unlock( const QString &fileName );
private:
+ OContactAccess* mAccess;
OpieConverter* mConverter;
- QString mFileName;
-
QString mLockUniqueName;
KDirWatch mDirWatch;