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