summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.h
Unidiff
Diffstat (limited to 'kabc/addressee.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 0c488eb..fcadda6 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -1,861 +1,861 @@
1/*** Warning! This file has been generated by the script makeaddressee ***/ 1/*** Warning! This file has been generated by the script makeaddressee ***/
2/* 2/*
3 This file is part of libkabc. 3 This file is part of libkabc.
4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
11 This library is distributed in the hope that it will be useful, 11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details. 14 Library General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#ifndef KABC_ADDRESSEE_H 29#ifndef KABC_ADDRESSEE_H
30#define KABC_ADDRESSEE_H 30#define KABC_ADDRESSEE_H
31 31
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qstring.h> 33#include <qstring.h>
34#include <qregexp.h> 34#include <qregexp.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <qvaluelist.h> 36#include <qvaluelist.h>
37 37
38#include <ksharedptr.h> 38#include <ksharedptr.h>
39#include <kurl.h> 39#include <kurl.h>
40 40
41#include "address.h" 41#include "address.h"
42#include "agent.h" 42#include "agent.h"
43#include "geo.h" 43#include "geo.h"
44#include "key.h" 44#include "key.h"
45#include "phonenumber.h" 45#include "phonenumber.h"
46#include "picture.h" 46#include "picture.h"
47#include "secrecy.h" 47#include "secrecy.h"
48#include "sound.h" 48#include "sound.h"
49#include "timezone.h" 49#include "timezone.h"
50 50
51namespace KABC { 51namespace KABC {
52 52
53class Resource; 53class Resource;
54 54
55/** 55/**
56 @short address book entry 56 @short address book entry
57 57
58 This class represents an entry in the address book. 58 This class represents an entry in the address book.
59 59
60 The data of this class is implicitly shared. You can pass this class by value. 60 The data of this class is implicitly shared. You can pass this class by value.
61 61
62 If you need the name of a field for presenting it to the user you should use 62 If you need the name of a field for presenting it to the user you should use
63 the functions ending in Label(). They return a translated string which can be 63 the functions ending in Label(). They return a translated string which can be
64 used as label for the corresponding field. 64 used as label for the corresponding field.
65 65
66 About the name fields: 66 About the name fields:
67 67
68 givenName() is the first name and familyName() the last name. In some 68 givenName() is the first name and familyName() the last name. In some
69 countries the family name comes first, that's the reason for the 69 countries the family name comes first, that's the reason for the
70 naming. formattedName() is the full name with the correct formatting. 70 naming. formattedName() is the full name with the correct formatting.
71 It is used as an override, when the correct formatting can't be generated 71 It is used as an override, when the correct formatting can't be generated
72 from the other name fields automatically. 72 from the other name fields automatically.
73 73
74 realName() returns a fully formatted name(). It uses formattedName, if set, 74 realName() returns a fully formatted name(). It uses formattedName, if set,
75 otherwise it constucts the name from the name fields. As fallback, if 75 otherwise it constucts the name from the name fields. As fallback, if
76 nothing else is set it uses name(). 76 nothing else is set it uses name().
77 77
78 name() is the NAME type of RFC2426. It can be used as internal name for the 78 name() is the NAME type of RFC2426. It can be used as internal name for the
79 data enty, but shouldn't be used for displaying the data to the user. 79 data enty, but shouldn't be used for displaying the data to the user.
80 */ 80 */
81class Addressee 81class Addressee
82{ 82{
83 friend QDataStream &operator<<( QDataStream &, const Addressee & ); 83 friend QDataStream &operator<<( QDataStream &, const Addressee & );
84 friend QDataStream &operator>>( QDataStream &, Addressee & ); 84 friend QDataStream &operator>>( QDataStream &, Addressee & );
85 85
86 public: 86 public:
87 typedef QValueList<Addressee> List; 87 typedef QValueList<Addressee> List;
88 88
89 /** 89 /**
90 Construct an empty address book entry. 90 Construct an empty address book entry.
91 */ 91 */
92 Addressee(); 92 Addressee();
93 ~Addressee(); 93 ~Addressee();
94 94
95 Addressee( const Addressee & ); 95 Addressee( const Addressee & );
96 Addressee &operator=( const Addressee & ); 96 Addressee &operator=( const Addressee & );
97 97
98 bool operator==( const Addressee & ) const; 98 bool operator==( const Addressee & ) const;
99 bool operator!=( const Addressee & ) const; 99 bool operator!=( const Addressee & ) const;
100 // sync stuff 100 // sync stuff
101 void setTempSyncStat(int id); 101 void setTempSyncStat(int id);
102 int tempSyncStat() const; 102 int tempSyncStat() const;
103 void setIDStr( const QString & ); 103 void setIDStr( const QString & );
104 const QString IDStr() const; 104 const QString IDStr() const;
105 void setID( const QString &, const QString & ); 105 void setID( const QString &, const QString & );
106 const QString getID( const QString & ) const; 106 const QString getID( const QString & ) const;
107 void setCsum( const QString &, const QString & ); 107 void setCsum( const QString &, const QString & );
108 const QString getCsum( const QString & ) const ; 108 const QString getCsum( const QString & ) const ;
109 void removeID(const QString &); 109 void removeID(const QString &);
110 void computeCsum(const QString &dev); 110 void computeCsum(const QString &dev);
111 ulong getCsum4List( const QStringList & attList); 111 ulong getCsum4List( const QStringList & attList);
112 /** 112 /**
113 Return, if the address book entry is empty. 113 Return, if the address book entry is empty.
114 */ 114 */
115 bool isEmpty() const; 115 bool isEmpty() const;
116 void setExternalUID( const QString &id ); 116 void setExternalUID( const QString &id );
117 const QString externalUID() const; 117 const QString externalUID() const;
118 void setOriginalExternalUID( const QString &id ); 118 void setOriginalExternalUID( const QString &id );
119 QString originalExternalUID() const; 119 QString originalExternalUID() const;
120 void mergeContact( const Addressee& ad, bool isSubSet ); 120 void mergeContact( const Addressee& ad, bool isSubSet );
121 void simplifyEmails(); 121 void simplifyEmails();
122 void simplifyAddresses(); 122 void simplifyAddresses();
123 void simplifyPhoneNumbers(); 123 void simplifyPhoneNumbers();
124 void simplifyPhoneNumberTypes(); 124 void simplifyPhoneNumberTypes();
125 void makePhoneNumbersOLcompatible(); 125 void makePhoneNumbersOLcompatible();
126 int hasPhoneNumberType( int type ); 126 int hasPhoneNumberType( int type );
127 bool removeVoice(); 127 bool removeVoice();
128 bool containsAdr(const Addressee& addr ); 128 bool containsAdr(const Addressee& addr );
129 129
130 /** 130 /**
131 Set unique identifier. 131 Set unique identifier.
132 */ 132 */
133 void setUid( const QString &uid ); 133 void setUid( const QString &uid );
134 /** 134 /**
135 Return unique identifier. 135 Return unique identifier.
136 */ 136 */
137 const QString uid() const; 137 const QString uid() const;
138 /** 138 /**
139 Return translated label for uid field. 139 Return translated label for uid field.
140 */ 140 */
141 static QString uidLabel(); 141 static QString uidLabel();
142 142
143 /** 143 /**
144 Set name. 144 Set name.
145 */ 145 */
146 void setName( const QString &name ); 146 void setName( const QString &name );
147 /** 147 /**
148 Return name. 148 Return name.
149 */ 149 */
150 QString name() const; 150 QString name() const;
151 /** 151 /**
152 Return translated label for name field. 152 Return translated label for name field.
153 */ 153 */
154 static QString nameLabel(); 154 static QString nameLabel();
155 155
156 /** 156 /**
157 Set formatted name. 157 Set formatted name.
158 */ 158 */
159 void setFormattedName( const QString &formattedName ); 159 void setFormattedName( const QString &formattedName );
160 /** 160 /**
161 Return formatted name. 161 Return formatted name.
162 */ 162 */
163 QString formattedName() const; 163 QString formattedName() const;
164 /** 164 /**
165 Return translated label for formattedName field. 165 Return translated label for formattedName field.
166 */ 166 */
167 static QString formattedNameLabel(); 167 static QString formattedNameLabel();
168 168
169 /** 169 /**
170 Set family name. 170 Set family name.
171 */ 171 */
172 void setFamilyName( const QString &familyName ); 172 void setFamilyName( const QString &familyName );
173 /** 173 /**
174 Return family name. 174 Return family name.
175 */ 175 */
176 QString familyName() const; 176 QString familyName() const;
177 /** 177 /**
178 Return translated label for familyName field. 178 Return translated label for familyName field.
179 */ 179 */
180 static QString familyNameLabel(); 180 static QString familyNameLabel();
181 181
182 /** 182 /**
183 Set given name. 183 Set given name.
184 */ 184 */
185 void setGivenName( const QString &givenName ); 185 void setGivenName( const QString &givenName );
186 /** 186 /**
187 Return given name. 187 Return given name.
188 */ 188 */
189 QString givenName() const; 189 QString givenName() const;
190 /** 190 /**
191 Return translated label for givenName field. 191 Return translated label for givenName field.
192 */ 192 */
193 static QString givenNameLabel(); 193 static QString givenNameLabel();
194 194
195 /** 195 /**
196 Set additional names. 196 Set additional names.
197 */ 197 */
198 void setAdditionalName( const QString &additionalName ); 198 void setAdditionalName( const QString &additionalName );
199 /** 199 /**
200 Return additional names. 200 Return additional names.
201 */ 201 */
202 QString additionalName() const; 202 QString additionalName() const;
203 /** 203 /**
204 Return translated label for additionalName field. 204 Return translated label for additionalName field.
205 */ 205 */
206 static QString additionalNameLabel(); 206 static QString additionalNameLabel();
207 207
208 /** 208 /**
209 Set honorific prefixes. 209 Set honorific prefixes.
210 */ 210 */
211 void setPrefix( const QString &prefix ); 211 void setPrefix( const QString &prefix );
212 /** 212 /**
213 Return honorific prefixes. 213 Return honorific prefixes.
214 */ 214 */
215 QString prefix() const; 215 QString prefix() const;
216 /** 216 /**
217 Return translated label for prefix field. 217 Return translated label for prefix field.
218 */ 218 */
219 static QString prefixLabel(); 219 static QString prefixLabel();
220 220
221 /** 221 /**
222 Set honorific suffixes. 222 Set honorific suffixes.
223 */ 223 */
224 void setSuffix( const QString &suffix ); 224 void setSuffix( const QString &suffix );
225 /** 225 /**
226 Return honorific suffixes. 226 Return honorific suffixes.
227 */ 227 */
228 QString suffix() const; 228 QString suffix() const;
229 /** 229 /**
230 Return translated label for suffix field. 230 Return translated label for suffix field.
231 */ 231 */
232 static QString suffixLabel(); 232 static QString suffixLabel();
233 233
234 /** 234 /**
235 Set nick name. 235 Set nick name.
236 */ 236 */
237 void setNickName( const QString &nickName ); 237 void setNickName( const QString &nickName );
238 /** 238 /**
239 Return nick name. 239 Return nick name.
240 */ 240 */
241 QString nickName() const; 241 QString nickName() const;
242 /** 242 /**
243 Return translated label for nickName field. 243 Return translated label for nickName field.
244 */ 244 */
245 static QString nickNameLabel(); 245 static QString nickNameLabel();
246 246
247 /** 247 /**
248 Set birthday. 248 Set birthday.
249 */ 249 */
250 void setBirthday( const QDateTime &birthday ); 250 void setBirthday( const QDateTime &birthday );
251 /** 251 /**
252 Return birthday. 252 Return birthday.
253 */ 253 */
254 QDateTime birthday() const; 254 QDateTime birthday() const;
255 /** 255 /**
256 Return translated label for birthday field. 256 Return translated label for birthday field.
257 */ 257 */
258 static QString birthdayLabel(); 258 static QString birthdayLabel();
259 259
260 /** 260 /**
261 Return translated label for homeAddressStreet field. 261 Return translated label for homeAddressStreet field.
262 */ 262 */
263 static QString homeAddressStreetLabel(); 263 static QString homeAddressStreetLabel();
264 264
265 /** 265 /**
266 Return translated label for homeAddressLocality field. 266 Return translated label for homeAddressLocality field.
267 */ 267 */
268 static QString homeAddressLocalityLabel(); 268 static QString homeAddressLocalityLabel();
269 269
270 /** 270 /**
271 Return translated label for homeAddressRegion field. 271 Return translated label for homeAddressRegion field.
272 */ 272 */
273 static QString homeAddressRegionLabel(); 273 static QString homeAddressRegionLabel();
274 274
275 /** 275 /**
276 Return translated label for homeAddressPostalCode field. 276 Return translated label for homeAddressPostalCode field.
277 */ 277 */
278 static QString homeAddressPostalCodeLabel(); 278 static QString homeAddressPostalCodeLabel();
279 279
280 /** 280 /**
281 Return translated label for homeAddressCountry field. 281 Return translated label for homeAddressCountry field.
282 */ 282 */
283 static QString homeAddressCountryLabel(); 283 static QString homeAddressCountryLabel();
284 284
285 /** 285 /**
286 Return translated label for homeAddressLabel field. 286 Return translated label for homeAddressLabel field.
287 */ 287 */
288 static QString homeAddressLabelLabel(); 288 static QString homeAddressLabelLabel();
289 289
290 /** 290 /**
291 Return translated label for businessAddressStreet field. 291 Return translated label for businessAddressStreet field.
292 */ 292 */
293 static QString businessAddressStreetLabel(); 293 static QString businessAddressStreetLabel();
294 294
295 /** 295 /**
296 Return translated label for businessAddressLocality field. 296 Return translated label for businessAddressLocality field.
297 */ 297 */
298 static QString businessAddressLocalityLabel(); 298 static QString businessAddressLocalityLabel();
299 299
300 /** 300 /**
301 Return translated label for businessAddressRegion field. 301 Return translated label for businessAddressRegion field.
302 */ 302 */
303 static QString businessAddressRegionLabel(); 303 static QString businessAddressRegionLabel();
304 304
305 /** 305 /**
306 Return translated label for businessAddressPostalCode field. 306 Return translated label for businessAddressPostalCode field.
307 */ 307 */
308 static QString businessAddressPostalCodeLabel(); 308 static QString businessAddressPostalCodeLabel();
309 309
310 /** 310 /**
311 Return translated label for businessAddressCountry field. 311 Return translated label for businessAddressCountry field.
312 */ 312 */
313 static QString businessAddressCountryLabel(); 313 static QString businessAddressCountryLabel();
314 314
315 /** 315 /**
316 Return translated label for businessAddressLabel field. 316 Return translated label for businessAddressLabel field.
317 */ 317 */
318 static QString businessAddressLabelLabel(); 318 static QString businessAddressLabelLabel();
319 319
320 /** 320 /**
321 Return translated label for homePhone field. 321 Return translated label for homePhone field.
322 */ 322 */
323 static QString homePhoneLabel(); 323 static QString homePhoneLabel();
324 324
325 /** 325 /**
326 Return translated label for businessPhone field. 326 Return translated label for businessPhone field.
327 */ 327 */
328 static QString businessPhoneLabel(); 328 static QString businessPhoneLabel();
329 329
330 /** 330 /**
331 Return translated label for mobilePhone field. 331 Return translated label for mobilePhone field.
332 */ 332 */
333 static QString mobilePhoneLabel(); 333 static QString mobilePhoneLabel();
334 static QString mobileWorkPhoneLabel(); 334 static QString mobileWorkPhoneLabel();
335 static QString mobileHomePhoneLabel(); 335 static QString mobileHomePhoneLabel();
336 336
337 /** 337 /**
338 Return translated label for homeFax field. 338 Return translated label for homeFax field.
339 */ 339 */
340 static QString homeFaxLabel(); 340 static QString homeFaxLabel();
341 341
342 /** 342 /**
343 Return translated label for businessFax field. 343 Return translated label for businessFax field.
344 */ 344 */
345 static QString businessFaxLabel(); 345 static QString businessFaxLabel();
346 346
347 /** 347 /**
348 Return translated label for carPhone field. 348 Return translated label for carPhone field.
349 */ 349 */
350 static QString carPhoneLabel(); 350 static QString carPhoneLabel();
351 351
352 /** 352 /**
353 Return translated label for isdn field. 353 Return translated label for isdn field.
354 */ 354 */
355 static QString isdnLabel(); 355 static QString isdnLabel();
356 356
357 /** 357 /**
358 Return translated label for pager field. 358 Return translated label for pager field.
359 */ 359 */
360 static QString pagerLabel(); 360 static QString pagerLabel();
361 361 static QString otherPhoneLabel();
362 /** 362 /**
363 Return translated label for sip field. 363 Return translated label for sip field.
364 */ 364 */
365 static QString sipLabel(); 365 static QString sipLabel();
366 366
367 /** 367 /**
368 Return translated label for email field. 368 Return translated label for email field.
369 */ 369 */
370 static QString emailLabel(); 370 static QString emailLabel();
371 371
372 /** 372 /**
373 Set mail client. 373 Set mail client.
374 */ 374 */
375 void setMailer( const QString &mailer ); 375 void setMailer( const QString &mailer );
376 /** 376 /**
377 Return mail client. 377 Return mail client.
378 */ 378 */
379 QString mailer() const; 379 QString mailer() const;
380 /** 380 /**
381 Return translated label for mailer field. 381 Return translated label for mailer field.
382 */ 382 */
383 static QString mailerLabel(); 383 static QString mailerLabel();
384 384
385 /** 385 /**
386 Set time zone. 386 Set time zone.
387 */ 387 */
388 void setTimeZone( const TimeZone &timeZone ); 388 void setTimeZone( const TimeZone &timeZone );
389 /** 389 /**
390 Return time zone. 390 Return time zone.
391 */ 391 */
392 TimeZone timeZone() const; 392 TimeZone timeZone() const;
393 /** 393 /**
394 Return translated label for timeZone field. 394 Return translated label for timeZone field.
395 */ 395 */
396 static QString timeZoneLabel(); 396 static QString timeZoneLabel();
397 397
398 /** 398 /**
399 Set geographic position. 399 Set geographic position.
400 */ 400 */
401 void setGeo( const Geo &geo ); 401 void setGeo( const Geo &geo );
402 /** 402 /**
403 Return geographic position. 403 Return geographic position.
404 */ 404 */
405 Geo geo() const; 405 Geo geo() const;
406 /** 406 /**
407 Return translated label for geo field. 407 Return translated label for geo field.
408 */ 408 */
409 static QString geoLabel(); 409 static QString geoLabel();
410 410
411 /** 411 /**
412 Set title. 412 Set title.
413 */ 413 */
414 void setTitle( const QString &title ); 414 void setTitle( const QString &title );
415 /** 415 /**
416 Return title. 416 Return title.
417 */ 417 */
418 QString title() const; 418 QString title() const;
419 /** 419 /**
420 Return translated label for title field. 420 Return translated label for title field.
421 */ 421 */
422 static QString titleLabel(); 422 static QString titleLabel();
423 423
424 /** 424 /**
425 Set role. 425 Set role.
426 */ 426 */
427 void setRole( const QString &role ); 427 void setRole( const QString &role );
428 /** 428 /**
429 Return role. 429 Return role.
430 */ 430 */
431 QString role() const; 431 QString role() const;
432 /** 432 /**
433 Return translated label for role field. 433 Return translated label for role field.
434 */ 434 */
435 static QString roleLabel(); 435 static QString roleLabel();
436 436
437 /** 437 /**
438 Set organization. 438 Set organization.
439 */ 439 */
440 void setOrganization( const QString &organization ); 440 void setOrganization( const QString &organization );
441 /** 441 /**
442 Return organization. 442 Return organization.
443 */ 443 */
444 QString organization() const; 444 QString organization() const;
445 /** 445 /**
446 Return translated label for organization field. 446 Return translated label for organization field.
447 */ 447 */
448 static QString organizationLabel(); 448 static QString organizationLabel();
449 449
450 /** 450 /**
451 Set note. 451 Set note.
452 */ 452 */
453 void setNote( const QString &note ); 453 void setNote( const QString &note );
454 /** 454 /**
455 Return note. 455 Return note.
456 */ 456 */
457 QString note() const; 457 QString note() const;
458 /** 458 /**
459 Return translated label for note field. 459 Return translated label for note field.
460 */ 460 */
461 static QString noteLabel(); 461 static QString noteLabel();
462 462
463 /** 463 /**
464 Set product identifier. 464 Set product identifier.
465 */ 465 */
466 void setProductId( const QString &productId ); 466 void setProductId( const QString &productId );
467 /** 467 /**
468 Return product identifier. 468 Return product identifier.
469 */ 469 */
470 QString productId() const; 470 QString productId() const;
471 /** 471 /**
472 Return translated label for productId field. 472 Return translated label for productId field.
473 */ 473 */
474 static QString productIdLabel(); 474 static QString productIdLabel();
475 475
476 /** 476 /**
477 Set revision date. 477 Set revision date.
478 */ 478 */
479 void setRevision( const QDateTime &revision ); 479 void setRevision( const QDateTime &revision );
480 /** 480 /**
481 Return revision date. 481 Return revision date.
482 */ 482 */
483 QDateTime revision() const; 483 QDateTime revision() const;
484 /** 484 /**
485 Return translated label for revision field. 485 Return translated label for revision field.
486 */ 486 */
487 static QString revisionLabel(); 487 static QString revisionLabel();
488 488
489 /** 489 /**
490 Set sort string. 490 Set sort string.
491 */ 491 */
492 void setSortString( const QString &sortString ); 492 void setSortString( const QString &sortString );
493 /** 493 /**
494 Return sort string. 494 Return sort string.
495 */ 495 */
496 QString sortString() const; 496 QString sortString() const;
497 /** 497 /**
498 Return translated label for sortString field. 498 Return translated label for sortString field.
499 */ 499 */
500 static QString sortStringLabel(); 500 static QString sortStringLabel();
501 501
502 /** 502 /**
503 Set URL. 503 Set URL.
504 */ 504 */
505 void setUrl( const KURL &url ); 505 void setUrl( const KURL &url );
506 /** 506 /**
507 Return URL. 507 Return URL.
508 */ 508 */
509 KURL url() const; 509 KURL url() const;
510 /** 510 /**
511 Return translated label for url field. 511 Return translated label for url field.
512 */ 512 */
513 static QString urlLabel(); 513 static QString urlLabel();
514 514
515 /** 515 /**
516 Set security class. 516 Set security class.
517 */ 517 */
518 void setSecrecy( const Secrecy &secrecy ); 518 void setSecrecy( const Secrecy &secrecy );
519 /** 519 /**
520 Return security class. 520 Return security class.
521 */ 521 */
522 Secrecy secrecy() const; 522 Secrecy secrecy() const;
523 /** 523 /**
524 Return translated label for secrecy field. 524 Return translated label for secrecy field.
525 */ 525 */
526 static QString secrecyLabel(); 526 static QString secrecyLabel();
527 527
528 /** 528 /**
529 Set logo. 529 Set logo.
530 */ 530 */
531 void setLogo( const Picture &logo ); 531 void setLogo( const Picture &logo );
532 /** 532 /**
533 Return logo. 533 Return logo.
534 */ 534 */
535 Picture logo() const; 535 Picture logo() const;
536 /** 536 /**
537 Return translated label for logo field. 537 Return translated label for logo field.
538 */ 538 */
539 static QString logoLabel(); 539 static QString logoLabel();
540 540
541 /** 541 /**
542 Set photo. 542 Set photo.
543 */ 543 */
544 void setPhoto( const Picture &photo ); 544 void setPhoto( const Picture &photo );
545 /** 545 /**
546 Return photo. 546 Return photo.
547 */ 547 */
548 Picture photo() const; 548 Picture photo() const;
549 /** 549 /**
550 Return translated label for photo field. 550 Return translated label for photo field.
551 */ 551 */
552 static QString photoLabel(); 552 static QString photoLabel();
553 553
554 /** 554 /**
555 Set sound. 555 Set sound.
556 */ 556 */
557 void setSound( const Sound &sound ); 557 void setSound( const Sound &sound );
558 /** 558 /**
559 Return sound. 559 Return sound.
560 */ 560 */
561 Sound sound() const; 561 Sound sound() const;
562 /** 562 /**
563 Return translated label for sound field. 563 Return translated label for sound field.
564 */ 564 */
565 static QString soundLabel(); 565 static QString soundLabel();
566 566
567 /** 567 /**
568 Set agent. 568 Set agent.
569 */ 569 */
570 void setAgent( const Agent &agent ); 570 void setAgent( const Agent &agent );
571 /** 571 /**
572 Return agent. 572 Return agent.
573 */ 573 */
574 Agent agent() const; 574 Agent agent() const;
575 /** 575 /**
576 Return translated label for agent field. 576 Return translated label for agent field.
577 */ 577 */
578 static QString agentLabel(); 578 static QString agentLabel();
579 579
580 /** 580 /**
581 Set name fields by parsing the given string and trying to associate the 581 Set name fields by parsing the given string and trying to associate the
582 parts of the string with according fields. This function should probably 582 parts of the string with according fields. This function should probably
583 be a bit more clever. 583 be a bit more clever.
584 */ 584 */
585 void setNameFromString( const QString & ); 585 void setNameFromString( const QString & );
586 586
587 /** 587 /**
588 Return the name of the addressee. This is calculated from all the name 588 Return the name of the addressee. This is calculated from all the name
589 fields. 589 fields.
590 */ 590 */
591 QString realName() const; 591 QString realName() const;
592 592
593 /** 593 /**
594 Return the name that consists of all name parts. 594 Return the name that consists of all name parts.
595 */ 595 */
596 QString assembledName() const; 596 QString assembledName() const;
597 597
598 /** 598 /**
599 Return email address including real name. 599 Return email address including real name.
600 600
601 @param email Email address to be used to construct the full email string. 601 @param email Email address to be used to construct the full email string.
602 If this is QString::null the preferred email address is used. 602 If this is QString::null the preferred email address is used.
603 */ 603 */
604 QString fullEmail( const QString &email=QString::null ) const; 604 QString fullEmail( const QString &email=QString::null ) const;
605 605
606 /** 606 /**
607 Insert an email address. If the email address already exists in this 607 Insert an email address. If the email address already exists in this
608 addressee it is not duplicated. 608 addressee it is not duplicated.
609 609
610 @param email Email address 610 @param email Email address
611 @param preferred Set to true, if this is the preferred email address of 611 @param preferred Set to true, if this is the preferred email address of
612 the addressee. 612 the addressee.
613 */ 613 */
614 void insertEmail( const QString &email, bool preferred=false ); 614 void insertEmail( const QString &email, bool preferred=false );
615 615
616 /** 616 /**
617 Remove email address. If the email address doesn't exist, nothing happens. 617 Remove email address. If the email address doesn't exist, nothing happens.
618 */ 618 */
619 void removeEmail( const QString &email ); 619 void removeEmail( const QString &email );
620 620
621 /** 621 /**
622 Return preferred email address. This is the first email address or the 622 Return preferred email address. This is the first email address or the
623 last one added with @ref insertEmail() with a set preferred parameter. 623 last one added with @ref insertEmail() with a set preferred parameter.
624 */ 624 */
625 QString preferredEmail() const; 625 QString preferredEmail() const;
626 626
627 /** 627 /**
628 Return list of all email addresses. 628 Return list of all email addresses.
629 */ 629 */
630 QStringList emails() const; 630 QStringList emails() const;
631 631
632 /** 632 /**
633 Set the emails to @param. 633 Set the emails to @param.
634 The first email address gets the preferred one! 634 The first email address gets the preferred one!
635 @param list The list of email addresses. 635 @param list The list of email addresses.
636 */ 636 */
637 void setEmails( const QStringList& list); 637 void setEmails( const QStringList& list);
638 638
639 /** 639 /**
640 Insert a phone number. If a phone number with the same id already exists 640 Insert a phone number. If a phone number with the same id already exists
641 in this addressee it is not duplicated. 641 in this addressee it is not duplicated.
642 */ 642 */
643 void insertPhoneNumber( const PhoneNumber &phoneNumber ); 643 void insertPhoneNumber( const PhoneNumber &phoneNumber );
644 644
645 /** 645 /**
646 Remove phone number. If no phone number with the given id exists for this 646 Remove phone number. If no phone number with the given id exists for this
647 addresse nothing happens. 647 addresse nothing happens.
648 */ 648 */
649 void removePhoneNumber( const PhoneNumber &phoneNumber ); 649 void removePhoneNumber( const PhoneNumber &phoneNumber );
650 650
651 /** 651 /**
652 Return phone number, which matches the given type. 652 Return phone number, which matches the given type.
653 */ 653 */
654 PhoneNumber phoneNumber( int type ) const; 654 PhoneNumber phoneNumber( int type ) const;
655 655
656 bool matchPhoneNumber( QRegExp* searchExp ) const; 656 bool matchPhoneNumber( QRegExp* searchExp ) const;
657 bool matchAddress( QRegExp* searchExp ) const; 657 bool matchAddress( QRegExp* searchExp ) const;
658 658
659 /** 659 /**
660 Return list of all phone numbers. 660 Return list of all phone numbers.
661 */ 661 */
662 PhoneNumber::List phoneNumbers() const; 662 PhoneNumber::List phoneNumbers() const;
663 663
664 /** 664 /**
665 Return list of phone numbers with a special type. 665 Return list of phone numbers with a special type.
666 */ 666 */
667 PhoneNumber::List phoneNumbers( int type ) const; 667 PhoneNumber::List phoneNumbers( int type ) const;
668 668
669 /** 669 /**
670 Return phone number with the given id. 670 Return phone number with the given id.
671 */ 671 */
672 PhoneNumber findPhoneNumber( const QString &id ) const; 672 PhoneNumber findPhoneNumber( const QString &id ) const;
673 673
674 /** 674 /**
675 Insert a key. If a key with the same id already exists 675 Insert a key. If a key with the same id already exists
676 in this addressee it is not duplicated. 676 in this addressee it is not duplicated.
677 */ 677 */
678 void insertKey( const Key &key ); 678 void insertKey( const Key &key );
679 679
680 /** 680 /**
681 Remove a key. If no key with the given id exists for this 681 Remove a key. If no key with the given id exists for this
682 addresse nothing happens. 682 addresse nothing happens.
683 */ 683 */
684 void removeKey( const Key &key ); 684 void removeKey( const Key &key );
685 685
686 /** 686 /**
687 Return key, which matches the given type. 687 Return key, which matches the given type.
688 If @p type == Key::Custom you can specify a string 688 If @p type == Key::Custom you can specify a string
689 that should match. If you leave the string empty, the first 689 that should match. If you leave the string empty, the first
690 key with a custom value is returned. 690 key with a custom value is returned.
691 */ 691 */
692 Key key( int type, QString customTypeString = QString::null ) const; 692 Key key( int type, QString customTypeString = QString::null ) const;
693 693
694 /** 694 /**
695 Return list of all keys. 695 Return list of all keys.
696 */ 696 */
697 Key::List keys() const; 697 Key::List keys() const;
698 698
699 /** 699 /**
700 Set the list of keys 700 Set the list of keys
701 @param keys The keys to be set. 701 @param keys The keys to be set.
702 */ 702 */
703 void setKeys( const Key::List& keys); 703 void setKeys( const Key::List& keys);
704 704
705 /** 705 /**
706 Return list of keys with a special type. 706 Return list of keys with a special type.
707 If @p type == Key::Custom you can specify a string 707 If @p type == Key::Custom you can specify a string
708 that should match. If you leave the string empty, all custom 708 that should match. If you leave the string empty, all custom
709 keys will be returned. 709 keys will be returned.
710 */ 710 */
711 Key::List keys( int type, QString customTypeString = QString::null ) const; 711 Key::List keys( int type, QString customTypeString = QString::null ) const;
712 712
713 /** 713 /**
714 Return key with the given id. 714 Return key with the given id.
715 */ 715 */
716 Key findKey( const QString &id ) const; 716 Key findKey( const QString &id ) const;
717 717
718 /** 718 /**
719 Insert an address. If an address with the same id already exists 719 Insert an address. If an address with the same id already exists
720 in this addressee it is not duplicated. 720 in this addressee it is not duplicated.
721 */ 721 */
722 void insertAddress( const Address &address ); 722 void insertAddress( const Address &address );
723 723
724 /** 724 /**
725 Remove address. If no address with the given id exists for this 725 Remove address. If no address with the given id exists for this
726 addresse nothing happens. 726 addresse nothing happens.
727 */ 727 */
728 void removeAddress( const Address &address ); 728 void removeAddress( const Address &address );
729 729
730 /** 730 /**
731 Return address, which matches the given type. 731 Return address, which matches the given type.
732 */ 732 */
733 Address address( int type ) const; 733 Address address( int type ) const;
734 734
735 /** 735 /**
736 Return list of all addresses. 736 Return list of all addresses.
737 */ 737 */
738 Address::List addresses() const; 738 Address::List addresses() const;
739 739
740 /** 740 /**
741 Return list of addresses with a special type. 741 Return list of addresses with a special type.
742 */ 742 */
743 Address::List addresses( int type ) const; 743 Address::List addresses( int type ) const;
744 744
745 /** 745 /**
746 Return address with the given id. 746 Return address with the given id.
747 */ 747 */
748 Address findAddress( const QString &id ) const; 748 Address findAddress( const QString &id ) const;
749 749
750 /** 750 /**
751 Insert category. If the category already exists it is not duplicated. 751 Insert category. If the category already exists it is not duplicated.
752 */ 752 */
753 void insertCategory( const QString & ); 753 void insertCategory( const QString & );
754 754
755 /** 755 /**
756 Remove category. 756 Remove category.
757 */ 757 */
758 void removeCategory( const QString & ); 758 void removeCategory( const QString & );
759 759
760 /** 760 /**
761 Return, if addressee has the given category. 761 Return, if addressee has the given category.
762 */ 762 */
763 bool hasCategory( const QString & ) const; 763 bool hasCategory( const QString & ) const;
764 764
765 /** 765 /**
766 Set categories to given value. 766 Set categories to given value.
767 */ 767 */
768 void setCategories( const QStringList & ); 768 void setCategories( const QStringList & );
769 769
770 /** 770 /**
771 Return list of all set categories. 771 Return list of all set categories.
772 */ 772 */
773 QStringList categories() const; 773 QStringList categories() const;
774 774
775 /** 775 /**
776 Insert custom entry. The entry is identified by the name of the inserting 776 Insert custom entry. The entry is identified by the name of the inserting
777 application and a unique name. If an entry with the given app and name 777 application and a unique name. If an entry with the given app and name
778 already exists its value is replaced with the new given value. 778 already exists its value is replaced with the new given value.
779 */ 779 */
780 void insertCustom( const QString &app, const QString &name, 780 void insertCustom( const QString &app, const QString &name,
781 const QString &value ); 781 const QString &value );
782 782
783 /** 783 /**
784 Remove custom entry. 784 Remove custom entry.
785 */ 785 */
786 void removeCustom( const QString &app, const QString &name ); 786 void removeCustom( const QString &app, const QString &name );
787 787
788 /** 788 /**
789 Return value of custom entry, identified by app and entry name. 789 Return value of custom entry, identified by app and entry name.
790 */ 790 */
791 QString custom( const QString &app, const QString &name ) const; 791 QString custom( const QString &app, const QString &name ) const;
792 792
793 /** 793 /**
794 Set all custom entries. 794 Set all custom entries.
795 */ 795 */
796 void setCustoms( const QStringList & ); 796 void setCustoms( const QStringList & );
797 797
798 /** 798 /**
799 Return list of all custom entries. 799 Return list of all custom entries.
800 */ 800 */
801 QStringList customs() const; 801 QStringList customs() const;
802 802
803 /** 803 /**
804 Parse full email address. The result is given back in fullName and email. 804 Parse full email address. The result is given back in fullName and email.
805 */ 805 */
806 static void parseEmailAddress( const QString &rawEmail, QString &fullName, 806 static void parseEmailAddress( const QString &rawEmail, QString &fullName,
807 QString &email ); 807 QString &email );
808 808
809 /** 809 /**
810 Debug output. 810 Debug output.
811 */ 811 */
812 void dump() const; 812 void dump() const;
813 813
814 /** 814 /**
815 Returns string representation of the addressee. 815 Returns string representation of the addressee.
816 */ 816 */
817 QString asString() const; 817 QString asString() const;
818 818
819 /** 819 /**
820 Set resource where the addressee is from. 820 Set resource where the addressee is from.
821 */ 821 */
822 void setResource( Resource *resource ); 822 void setResource( Resource *resource );
823 823
824 /** 824 /**
825 Return pointer to resource. 825 Return pointer to resource.
826 */ 826 */
827 Resource *resource() const; 827 Resource *resource() const;
828 828
829 /** 829 /**
830 Return resourcelabel. 830 Return resourcelabel.
831 */ 831 */
832 //US 832 //US
833 static QString resourceLabel(); 833 static QString resourceLabel();
834 static QString categoryLabel(); 834 static QString categoryLabel();
835 /** 835 /**
836 Mark addressee as changed. 836 Mark addressee as changed.
837 */ 837 */
838 void setChanged( bool value ); 838 void setChanged( bool value );
839 839
840 /** 840 /**
841 Return whether the addressee is changed. 841 Return whether the addressee is changed.
842 */ 842 */
843 bool changed() const; 843 bool changed() const;
844 844
845 void setTagged( bool value ); 845 void setTagged( bool value );
846 bool tagged() const; 846 bool tagged() const;
847 847
848 private: 848 private:
849 Addressee copy(); 849 Addressee copy();
850 void detach(); 850 void detach();
851 851
852 struct AddresseeData; 852 struct AddresseeData;
853 mutable KSharedPtr<AddresseeData> mData; 853 mutable KSharedPtr<AddresseeData> mData;
854}; 854};
855 855
856QDataStream &operator<<( QDataStream &, const Addressee & ); 856QDataStream &operator<<( QDataStream &, const Addressee & );
857QDataStream &operator>>( QDataStream &, Addressee & ); 857QDataStream &operator>>( QDataStream &, Addressee & );
858 858
859} 859}
860 860
861#endif 861#endif