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