summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.h
authorzautrix <zautrix>2004-10-13 13:18:51 (UTC)
committer zautrix <zautrix>2004-10-13 13:18:51 (UTC)
commitd41893fb0a49fbb080326a4c1fd98e1a032a182a (patch) (unidiff)
tree9b95603ff93801accaa94de4b73d88ea9c5c9386 /kabc/addressbook.h
parentefdd0735bda81dcd82dfb6d6dc0d0c143f249336 (diff)
downloadkdepimpi-d41893fb0a49fbb080326a4c1fd98e1a032a182a.zip
kdepimpi-d41893fb0a49fbb080326a4c1fd98e1a032a182a.tar.gz
kdepimpi-d41893fb0a49fbb080326a4c1fd98e1a032a182a.tar.bz2
merge contact fixes
Diffstat (limited to 'kabc/addressbook.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index df9048b..a6bf451 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -176,173 +176,173 @@ class AddressBook : public QObject
176 */ 176 */
177 void clear(); 177 void clear();
178 178
179 /** 179 /**
180 Insert an Addressee object into address book. If an object with the same 180 Insert an Addressee object into address book. If an object with the same
181 unique id already exists in the address book it it replaced by the new 181 unique id already exists in the address book it it replaced by the new
182 one. If not the new object is appended to the address book. 182 one. If not the new object is appended to the address book.
183 */ 183 */
184 void insertAddressee( const Addressee &, bool setRev = true, bool takeResource = false); 184 void insertAddressee( const Addressee &, bool setRev = true, bool takeResource = false);
185 185
186 /** 186 /**
187 Removes entry from the address book. 187 Removes entry from the address book.
188 */ 188 */
189 void removeAddressee( const Addressee & ); 189 void removeAddressee( const Addressee & );
190 190
191 /** 191 /**
192 This is like @ref removeAddressee() just above, with the difference that 192 This is like @ref removeAddressee() just above, with the difference that
193 the first element is a iterator, returned by @ref begin(). 193 the first element is a iterator, returned by @ref begin().
194 */ 194 */
195 void removeAddressee( const Iterator & ); 195 void removeAddressee( const Iterator & );
196 196
197 /** 197 /**
198 Find the specified entry in address book. Returns end(), if the entry 198 Find the specified entry in address book. Returns end(), if the entry
199 couldn't be found. 199 couldn't be found.
200 */ 200 */
201 Iterator find( const Addressee & ); 201 Iterator find( const Addressee & );
202 202
203 /** 203 /**
204 Find the entry specified by an unique id. Returns an empty Addressee 204 Find the entry specified by an unique id. Returns an empty Addressee
205 object, if the address book does not contain an entry with this id. 205 object, if the address book does not contain an entry with this id.
206 */ 206 */
207 Addressee findByUid( const QString & ); 207 Addressee findByUid( const QString & );
208 208
209 209
210 /** 210 /**
211 Returns a list of all addressees in the address book. This list can 211 Returns a list of all addressees in the address book. This list can
212 be sorted with @ref KABC::AddresseeList for example. 212 be sorted with @ref KABC::AddresseeList for example.
213 */ 213 */
214 Addressee::List allAddressees(); 214 Addressee::List allAddressees();
215 215
216 /** 216 /**
217 Find all entries with the specified name in the address book. Returns 217 Find all entries with the specified name in the address book. Returns
218 an empty list, if no entries could be found. 218 an empty list, if no entries could be found.
219 */ 219 */
220 Addressee::List findByName( const QString & ); 220 Addressee::List findByName( const QString & );
221 221
222 /** 222 /**
223 Find all entries with the specified email address in the address book. 223 Find all entries with the specified email address in the address book.
224 Returns an empty list, if no entries could be found. 224 Returns an empty list, if no entries could be found.
225 */ 225 */
226 Addressee::List findByEmail( const QString & ); 226 Addressee::List findByEmail( const QString & );
227 227
228 /** 228 /**
229 Find all entries wich have the specified category in the address book. 229 Find all entries wich have the specified category in the address book.
230 Returns an empty list, if no entries could be found. 230 Returns an empty list, if no entries could be found.
231 */ 231 */
232 Addressee::List findByCategory( const QString & ); 232 Addressee::List findByCategory( const QString & );
233 233
234 /** 234 /**
235 Return a string identifying this addressbook. 235 Return a string identifying this addressbook.
236 */ 236 */
237 virtual QString identifier(); 237 virtual QString identifier();
238 238
239 /** 239 /**
240 Used for debug output. 240 Used for debug output.
241 */ 241 */
242 void dump() const; 242 void dump() const;
243 243
244 void emitAddressBookLocked() { emit addressBookLocked( this ); } 244 void emitAddressBookLocked() { emit addressBookLocked( this ); }
245 void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); } 245 void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); }
246 void emitAddressBookChanged() { emit addressBookChanged( this ); } 246 void emitAddressBookChanged() { emit addressBookChanged( this ); }
247 247
248 /** 248 /**
249 Return list of all Fields known to the address book which are associated 249 Return list of all Fields known to the address book which are associated
250 with the given field category. 250 with the given field category.
251 */ 251 */
252 Field::List fields( int category = Field::All ); 252 Field::List fields( int category = Field::All );
253 253
254 /** 254 /**
255 Add custom field to address book. 255 Add custom field to address book.
256 256
257 @param label User visible label of the field. 257 @param label User visible label of the field.
258 @param category Ored list of field categories. 258 @param category Ored list of field categories.
259 @param key Identifier used as key for reading and writing the field. 259 @param key Identifier used as key for reading and writing the field.
260 @param app String used as application key for reading and writing 260 @param app String used as application key for reading and writing
261 the field. 261 the field.
262 */ 262 */
263 bool addCustomField( const QString &label, int category = Field::All, 263 bool addCustomField( const QString &label, int category = Field::All,
264 const QString &key = QString::null, 264 const QString &key = QString::null,
265 const QString &app = QString::null ); 265 const QString &app = QString::null );
266 266
267 267
268 /** 268 /**
269 Add address book resource. 269 Add address book resource.
270 */ 270 */
271 bool addResource( Resource * ); 271 bool addResource( Resource * );
272 272
273 /** 273 /**
274 Remove address book resource. 274 Remove address book resource.
275 */ 275 */
276 bool removeResource( Resource * ); 276 bool removeResource( Resource * );
277 277
278 /** 278 /**
279 Return pointer list of all resources. 279 Return pointer list of all resources.
280 */ 280 */
281 QPtrList<Resource> resources(); 281 QPtrList<Resource> resources();
282 282
283 /** 283 /**
284 Set the @p ErrorHandler, that is used by @ref error() to 284 Set the @p ErrorHandler, that is used by @ref error() to
285 provide gui-independend error messages. 285 provide gui-independend error messages.
286 */ 286 */
287 void setErrorHandler( ErrorHandler * ); 287 void setErrorHandler( ErrorHandler * );
288 288
289 /** 289 /**
290 Shows gui independend error messages. 290 Shows gui independend error messages.
291 */ 291 */
292 void error( const QString& ); 292 void error( const QString& );
293 293
294 /** 294 /**
295 Query all resources to clean up their lock files 295 Query all resources to clean up their lock files
296 */ 296 */
297 void cleanUp(); 297 void cleanUp();
298 298
299 // sync stuff 299 // sync stuff
300 //Addressee::List getExternLastSyncAddressees(); 300 //Addressee::List getExternLastSyncAddressees();
301 void resetTempSyncStat(); 301 void resetTempSyncStat();
302 QStringList uidList(); 302 QStringList uidList();
303 void removeSyncAddressees( bool removeDeleted = false ); 303 void removeSyncAddressees( bool removeDeleted = false );
304 void mergeAB( AddressBook *aBook, const QString& profile ); 304 void mergeAB( AddressBook *aBook, const QString& profile, bool isSubset );
305 Addressee findByExternUid( const QString& uid , const QString& profile ); 305 Addressee findByExternUid( const QString& uid , const QString& profile );
306 bool containsExternalUid( const QString& uid ); 306 bool containsExternalUid( const QString& uid );
307 307
308 void preExternSync( AddressBook* aBook, const QString& csd ); 308 void preExternSync( AddressBook* aBook, const QString& csd, bool isSubset );
309 void postExternSync( AddressBook* aBook, const QString& csd ); 309 void postExternSync( AddressBook* aBook, const QString& csd );
310 signals: 310 signals:
311 /** 311 /**
312 Emitted, when the address book has changed on disk. 312 Emitted, when the address book has changed on disk.
313 */ 313 */
314 void addressBookChanged( AddressBook * ); 314 void addressBookChanged( AddressBook * );
315 315
316 /** 316 /**
317 Emitted, when the address book has been locked for writing. 317 Emitted, when the address book has been locked for writing.
318 */ 318 */
319 void addressBookLocked( AddressBook * ); 319 void addressBookLocked( AddressBook * );
320 320
321 /** 321 /**
322 Emitted, when the address book has been unlocked. 322 Emitted, when the address book has been unlocked.
323 */ 323 */
324 void addressBookUnlocked( AddressBook * ); 324 void addressBookUnlocked( AddressBook * );
325 325
326 protected: 326 protected:
327 void deleteRemovedAddressees(); 327 void deleteRemovedAddressees();
328 void setStandardResource( Resource * ); 328 void setStandardResource( Resource * );
329 Resource *standardResource(); 329 Resource *standardResource();
330 KRES::Manager<Resource> *resourceManager(); 330 KRES::Manager<Resource> *resourceManager();
331 331
332 void init(const QString &config, const QString &family); 332 void init(const QString &config, const QString &family);
333 333
334 private: 334 private:
335//US QPtrList<Resource> mDummy; // Remove in KDE 4 335//US QPtrList<Resource> mDummy; // Remove in KDE 4
336 336
337 337
338 struct AddressBookData; 338 struct AddressBookData;
339 AddressBookData *d; 339 AddressBookData *d;
340 bool blockLSEchange; 340 bool blockLSEchange;
341}; 341};
342 342
343QDataStream &operator<<( QDataStream &, const AddressBook & ); 343QDataStream &operator<<( QDataStream &, const AddressBook & );
344QDataStream &operator>>( QDataStream &, AddressBook & ); 344QDataStream &operator>>( QDataStream &, AddressBook & );
345 345
346} 346}
347 347
348#endif 348#endif