summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/sharpdtm/resourcesharpdtm.h
Unidiff
Diffstat (limited to 'kabc/plugins/sharpdtm/resourcesharpdtm.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.h b/kabc/plugins/sharpdtm/resourcesharpdtm.h
index d2e2a52..f495e9d 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.h
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libkabc. 2 This file is part of libkabc.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2004 Ulf Schenk
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
@@ -56,12 +56,12 @@ public:
56 56
57 @param cfg The config object where custom resource settings are stored. 57 @param cfg The config object where custom resource settings are stored.
58 */ 58 */
59 ResourceSharpDTM( const KConfig *cfg ); 59 ResourceSharpDTM( const KConfig *cfg, bool syncable );
60 60
61 /** 61 /**
62 Construct file resource on file @arg fileName using format @arg formatName. 62 Construct file resource on file @arg fileName using format @arg formatName.
63 */ 63 */
64 ResourceSharpDTM( const QString &fileName ); 64 ResourceSharpDTM( const QString &fileName, bool syncable );
65 65
66 /** 66 /**
67 * Destructor. 67 * Destructor.
@@ -104,26 +104,32 @@ public:
104 virtual bool save( Ticket *ticket ); 104 virtual bool save( Ticket *ticket );
105 105
106 /** 106 /**
107 * Remove a addressee from its source.
108 * This method is mainly called by KABC::AddressBook.
109 */
110 virtual void removeAddressee( const Addressee& addr );
111
112 /**
107 * Set name of file to be used for saving. 113 * Set name of file to be used for saving.
108 */ 114 */
109 void setFileName( const QString & ); 115 virtual void setFileName( const QString & );
110 116
111 /** 117 /**
112 * Return name of file used for loading and saving the address book. 118 * This method is called by an error handler if the application
119 * crashed
113 */ 120 */
114 QString fileName() const; 121 virtual void cleanUp();
115 122
116 /** 123 /**
117 * Remove a addressee from its source. 124 * This method returns the number of elements that are currently in the resource.
118 * This method is mainly called by KABC::AddressBook.
119 */ 125 */
120 virtual void removeAddressee( const Addressee& addr ); 126 virtual int count() const;
121 127
122 /** 128 /**
123 * This method is called by an error handler if the application 129 * This method removes all elements from the resource!! (Not from the addressbook)
124 * crashed
125 */ 130 */
126 virtual void cleanUp(); 131 virtual bool clear();
132
127 133
128protected slots: 134protected slots:
129 void fileChanged(); 135 void fileChanged();
@@ -137,8 +143,6 @@ protected:
137private: 143private:
138 SharpDTMConverter* mConverter; 144 SharpDTMConverter* mConverter;
139 145
140 QString mFileName;
141
142 QString mLockUniqueName; 146 QString mLockUniqueName;
143 147
144 KDirWatch mDirWatch; 148 KDirWatch mDirWatch;