summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/opie/resourceopie.h
Unidiff
Diffstat (limited to 'kabc/plugins/opie/resourceopie.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.h40
1 files changed, 22 insertions, 18 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
@@ -38,10 +38,8 @@ $Id$
38 38
39 39
40//class QTimer; 40class OContactAccess;
41//class FormatPlugin;
42 41
43namespace KABC { 42namespace KABC {
44 43
45//US class FormatPlugin;
46class ResourceConfigWidget; 44class ResourceConfigWidget;
47class OpieConverter; 45class OpieConverter;
@@ -60,10 +58,10 @@ public:
60 @param cfg The config object where custom resource settings are stored. 58 @param cfg The config object where custom resource settings are stored.
61 */ 59 */
62 ResourceOpie( const KConfig *cfg ); 60 ResourceOpie( const KConfig *cfg, bool syncable );
63 61
64 /** 62 /**
65 Construct file resource on file @arg fileName using format @arg formatName. 63 Construct file resource on file @arg fileName using format @arg formatName.
66 */ 64 */
67 ResourceOpie( const QString &fileName ); 65 ResourceOpie( const QString &fileName, bool syncable );
68 66
69 /** 67 /**
@@ -87,5 +85,5 @@ public:
87 */ 85 */
88 virtual void doClose(); 86 virtual void doClose();
89 87
90 /** 88 /**
91 * Requests a save ticket, that is used by @ref save() 89 * Requests a save ticket, that is used by @ref save()
@@ -107,13 +105,4 @@ public:
107 virtual bool save( Ticket *ticket ); 105 virtual bool save( Ticket *ticket );
108 106
109 /**
110 * Set name of file to be used for saving.
111 */
112 void setFileName( const QString & );
113
114 /**
115 * Return name of file used for loading and saving the address book.
116 */
117 QString fileName() const;
118 107
119 /** 108 /**
@@ -124,4 +113,9 @@ public:
124 113
125 /** 114 /**
115 * Set name of file to be used for saving.
116 */
117 virtual void setFileName( const QString & );
118
119 /**
126 * This method is called by an error handler if the application 120 * This method is called by an error handler if the application
127 * crashed 121 * crashed
@@ -129,4 +123,15 @@ public:
129 virtual void cleanUp(); 123 virtual void cleanUp();
130 124
125 /**
126 * This method returns the number of elements that are currently in the resource.
127 */
128 virtual int count() const;
129
130 /**
131 * This method removes all elements from the resource!! (Not from the addressbook)
132 */
133 virtual bool clear();
134
135
131protected slots: 136protected slots:
132 void fileChanged(); 137 void fileChanged();
@@ -139,10 +144,9 @@ protected:
139 144
140private: 145private:
146 OContactAccess* mAccess;
141 OpieConverter* mConverter; 147 OpieConverter* mConverter;
142
143 QString mFileName;
144 148
145 QString mLockUniqueName; 149 QString mLockUniqueName;
146 150
147 KDirWatch mDirWatch; 151 KDirWatch mDirWatch;
148}; 152};