summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
authorulf69 <ulf69>2004-08-02 18:32:08 (UTC)
committer ulf69 <ulf69>2004-08-02 18:32:08 (UTC)
commit863c4c3678e59ef125c08c00e9532ded5b540f67 (patch) (side-by-side diff)
tree449428c45689ffe10ff1ce4caa18f959c4dfe402 /kabc/plugins/sharpdtm/resourcesharpdtm.cpp
parent983127ce46c9ff6663d08dedd450da3fe7dd549b (diff)
downloadkdepimpi-863c4c3678e59ef125c08c00e9532ded5b540f67.zip
kdepimpi-863c4c3678e59ef125c08c00e9532ded5b540f67.tar.gz
kdepimpi-863c4c3678e59ef125c08c00e9532ded5b540f67.tar.bz2
added support for syncprofiles for resources and export/import capabilities
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
@@ -1,5 +1,5 @@
/*
This file is part of libkabc.
- Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
+ Copyright (c) 2004 Ulf Schenk
This library is free software; you can redistribute it and/or
@@ -63,6 +63,6 @@ extern "C"
}
-ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
- : Resource( config ), mConverter (0)
+ResourceSharpDTM::ResourceSharpDTM( const KConfig *config, bool syncable )
+ : Resource( config, syncable ), mConverter (0)
{
// we can not choose the filename. Therefore use the default to display
@@ -72,6 +72,6 @@ ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
}
-ResourceSharpDTM::ResourceSharpDTM( const QString &fileName )
- : Resource( 0 )
+ResourceSharpDTM::ResourceSharpDTM( const QString &fileName, bool syncable )
+ : Resource( 0, syncable )
{
// qDebug("ResourceFile::ResourceSharpDTM : 3 %s, %s", fileName.latin1(), formatName.latin1());
@@ -356,2 +356,27 @@ 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;
+}
+
+
+