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