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