kabc
resourcecached.h
00001 /* 00002 This file is part of kabc. 00003 Copyright (c) 2004 Tobias Koenig <tokoe@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KABC_RESOURCECACHED_H 00022 #define KABC_RESOURCECACHED_H 00023 00024 #include <kabc/kabc_export.h> 00025 #include <kabc/resource.h> 00026 00027 #include <kresources/idmapper.h> 00028 00029 namespace KABC { 00030 00031 class KABC_EXPORT_DEPRECATED ResourceCached : public Resource 00032 { 00033 Q_OBJECT 00034 00035 public: 00036 ResourceCached(); 00037 ResourceCached( const KConfigGroup &group ); 00038 ~ResourceCached(); 00039 00045 virtual void writeConfig( KConfigGroup &group ); 00046 00052 virtual void insertAddressee( const Addressee &addr ); 00053 00059 virtual void removeAddressee( const Addressee &addr ); 00060 00069 bool loadFromCache(); 00070 00076 void saveToCache(); 00077 00083 void cleanUpCache( const KABC::Addressee::List &list ); 00084 00088 KRES::IdMapper &idMapper(); 00089 00093 bool hasChanges() const; 00094 00098 void clearChanges(); 00099 00107 void clearChange( const KABC::Addressee &addr ); 00108 00117 void clearChange( const QString &uid ); 00118 00122 KABC::Addressee::List addedAddressees() const; 00123 00127 KABC::Addressee::List changedAddressees() const; 00128 00132 KABC::Addressee::List deletedAddressees() const; 00133 00134 protected: 00145 virtual QString cacheFile() const; 00146 00155 virtual QString changesCacheFile( const QString &type ) const; 00156 00167 void loadChangesCache(); 00168 00179 void saveChangesCache(); 00180 00187 void setIdMapperIdentifier(); 00188 00189 private: 00190 class Private; 00191 Private *const d; 00192 }; 00193 00194 } 00195 00196 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:55 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:55 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.