Diffstat (limited to 'kabc/plugins/opie/resourceopie.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/opie/resourceopie.h | 40 |
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 | |||
@@ -37,12 +37,10 @@ $Id$ | |||
37 | #include "resource.h" | 37 | #include "resource.h" |
38 | 38 | ||
39 | 39 | ||
40 | //class QTimer; | 40 | class OContactAccess; |
41 | //class FormatPlugin; | ||
42 | 41 | ||
43 | namespace KABC { | 42 | namespace KABC { |
44 | 43 | ||
45 | //US class FormatPlugin; | ||
46 | class ResourceConfigWidget; | 44 | class ResourceConfigWidget; |
47 | class OpieConverter; | 45 | class OpieConverter; |
48 | /** | 46 | /** |
@@ -59,12 +57,12 @@ public: | |||
59 | 57 | ||
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 | /** |
70 | * Destructor. | 68 | * Destructor. |
@@ -86,7 +84,7 @@ public: | |||
86 | * Closes the file again. | 84 | * Closes the file again. |
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() |
92 | */ | 90 | */ |
@@ -106,15 +104,6 @@ public: | |||
106 | */ | 104 | */ |
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 | /** |
120 | * Remove a addressee from its source. | 109 | * Remove a addressee from its source. |
@@ -123,11 +112,27 @@ public: | |||
123 | virtual void removeAddressee( const Addressee& addr ); | 112 | virtual void removeAddressee( const Addressee& addr ); |
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 |
128 | */ | 122 | */ |
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 | |||
131 | protected slots: | 136 | protected slots: |
132 | void fileChanged(); | 137 | void fileChanged(); |
133 | 138 | ||
@@ -138,12 +143,11 @@ protected: | |||
138 | void unlock( const QString &fileName ); | 143 | void unlock( const QString &fileName ); |
139 | 144 | ||
140 | private: | 145 | private: |
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 | }; |
149 | 153 | ||