summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
Side-by-side diff
Diffstat (limited to 'kabc/plugins/sharpdtm/resourcesharpdtm.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp35
1 files changed, 30 insertions, 5 deletions
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
index 31b99ca..7b909de 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
@@ -2,3 +2,3 @@
This file is part of libkabc.
- Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
+ Copyright (c) 2004 Ulf Schenk
@@ -64,4 +64,4 @@ extern "C"
-ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
- : Resource( config ), mConverter (0)
+ResourceSharpDTM::ResourceSharpDTM( const KConfig *config, bool syncable )
+ : Resource( config, syncable ), mConverter (0)
{
@@ -73,4 +73,4 @@ ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
-ResourceSharpDTM::ResourceSharpDTM( const QString &fileName )
- : Resource( 0 )
+ResourceSharpDTM::ResourceSharpDTM( const QString &fileName, bool syncable )
+ : Resource( 0, syncable )
{
@@ -357 +357,26 @@ void ResourceSharpDTM::cleanUp()
+/**
+ * This method returns the number of elements that are currently in the resource.
+ */
+int ResourceSharpDTM::count() const
+{
+ if (mAccess != 0)
+ return mAccess->count();
+ else
+ return 0;
+}
+
+
+/**
+ * This method removes all elements from the resource!! (Not from the addressbook)
+ */
+bool ResourceSharpDTM::clear()
+{
+ if (mAccess != 0)
+ return mAccess->deleteCard(0, SlZDataBase::AllCard );
+ else
+ return false;
+}
+
+
+