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