-rw-r--r-- | kabc/addressee.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h index 8baa888..4cafa86 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h | |||
@@ -1,311 +1,315 @@ | |||
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 setOriginalExternalUID( const QString &id ); | 117 | void setOriginalExternalUID( const QString &id ); |
118 | QString originalExternalUID() const; | 118 | QString originalExternalUID() const; |
119 | void mergeContact( const Addressee& ad ); | 119 | void mergeContact( const Addressee& ad ); |
120 | void simplifyEmails(); | ||
121 | void simplifyPhoneNumbers(); | ||
122 | void simplifyPhoneNumberTypes(); | ||
123 | |||
120 | /** | 124 | /** |
121 | Set unique identifier. | 125 | Set unique identifier. |
122 | */ | 126 | */ |
123 | void setUid( const QString &uid ); | 127 | void setUid( const QString &uid ); |
124 | /** | 128 | /** |
125 | Return unique identifier. | 129 | Return unique identifier. |
126 | */ | 130 | */ |
127 | QString uid() const; | 131 | QString uid() const; |
128 | /** | 132 | /** |
129 | Return translated label for uid field. | 133 | Return translated label for uid field. |
130 | */ | 134 | */ |
131 | static QString uidLabel(); | 135 | static QString uidLabel(); |
132 | 136 | ||
133 | /** | 137 | /** |
134 | Set name. | 138 | Set name. |
135 | */ | 139 | */ |
136 | void setName( const QString &name ); | 140 | void setName( const QString &name ); |
137 | /** | 141 | /** |
138 | Return name. | 142 | Return name. |
139 | */ | 143 | */ |
140 | QString name() const; | 144 | QString name() const; |
141 | /** | 145 | /** |
142 | Return translated label for name field. | 146 | Return translated label for name field. |
143 | */ | 147 | */ |
144 | static QString nameLabel(); | 148 | static QString nameLabel(); |
145 | 149 | ||
146 | /** | 150 | /** |
147 | Set formatted name. | 151 | Set formatted name. |
148 | */ | 152 | */ |
149 | void setFormattedName( const QString &formattedName ); | 153 | void setFormattedName( const QString &formattedName ); |
150 | /** | 154 | /** |
151 | Return formatted name. | 155 | Return formatted name. |
152 | */ | 156 | */ |
153 | QString formattedName() const; | 157 | QString formattedName() const; |
154 | /** | 158 | /** |
155 | Return translated label for formattedName field. | 159 | Return translated label for formattedName field. |
156 | */ | 160 | */ |
157 | static QString formattedNameLabel(); | 161 | static QString formattedNameLabel(); |
158 | 162 | ||
159 | /** | 163 | /** |
160 | Set family name. | 164 | Set family name. |
161 | */ | 165 | */ |
162 | void setFamilyName( const QString &familyName ); | 166 | void setFamilyName( const QString &familyName ); |
163 | /** | 167 | /** |
164 | Return family name. | 168 | Return family name. |
165 | */ | 169 | */ |
166 | QString familyName() const; | 170 | QString familyName() const; |
167 | /** | 171 | /** |
168 | Return translated label for familyName field. | 172 | Return translated label for familyName field. |
169 | */ | 173 | */ |
170 | static QString familyNameLabel(); | 174 | static QString familyNameLabel(); |
171 | 175 | ||
172 | /** | 176 | /** |
173 | Set given name. | 177 | Set given name. |
174 | */ | 178 | */ |
175 | void setGivenName( const QString &givenName ); | 179 | void setGivenName( const QString &givenName ); |
176 | /** | 180 | /** |
177 | Return given name. | 181 | Return given name. |
178 | */ | 182 | */ |
179 | QString givenName() const; | 183 | QString givenName() const; |
180 | /** | 184 | /** |
181 | Return translated label for givenName field. | 185 | Return translated label for givenName field. |
182 | */ | 186 | */ |
183 | static QString givenNameLabel(); | 187 | static QString givenNameLabel(); |
184 | 188 | ||
185 | /** | 189 | /** |
186 | Set additional names. | 190 | Set additional names. |
187 | */ | 191 | */ |
188 | void setAdditionalName( const QString &additionalName ); | 192 | void setAdditionalName( const QString &additionalName ); |
189 | /** | 193 | /** |
190 | Return additional names. | 194 | Return additional names. |
191 | */ | 195 | */ |
192 | QString additionalName() const; | 196 | QString additionalName() const; |
193 | /** | 197 | /** |
194 | Return translated label for additionalName field. | 198 | Return translated label for additionalName field. |
195 | */ | 199 | */ |
196 | static QString additionalNameLabel(); | 200 | static QString additionalNameLabel(); |
197 | 201 | ||
198 | /** | 202 | /** |
199 | Set honorific prefixes. | 203 | Set honorific prefixes. |
200 | */ | 204 | */ |
201 | void setPrefix( const QString &prefix ); | 205 | void setPrefix( const QString &prefix ); |
202 | /** | 206 | /** |
203 | Return honorific prefixes. | 207 | Return honorific prefixes. |
204 | */ | 208 | */ |
205 | QString prefix() const; | 209 | QString prefix() const; |
206 | /** | 210 | /** |
207 | Return translated label for prefix field. | 211 | Return translated label for prefix field. |
208 | */ | 212 | */ |
209 | static QString prefixLabel(); | 213 | static QString prefixLabel(); |
210 | 214 | ||
211 | /** | 215 | /** |
212 | Set honorific suffixes. | 216 | Set honorific suffixes. |
213 | */ | 217 | */ |
214 | void setSuffix( const QString &suffix ); | 218 | void setSuffix( const QString &suffix ); |
215 | /** | 219 | /** |
216 | Return honorific suffixes. | 220 | Return honorific suffixes. |
217 | */ | 221 | */ |
218 | QString suffix() const; | 222 | QString suffix() const; |
219 | /** | 223 | /** |
220 | Return translated label for suffix field. | 224 | Return translated label for suffix field. |
221 | */ | 225 | */ |
222 | static QString suffixLabel(); | 226 | static QString suffixLabel(); |
223 | 227 | ||
224 | /** | 228 | /** |
225 | Set nick name. | 229 | Set nick name. |
226 | */ | 230 | */ |
227 | void setNickName( const QString &nickName ); | 231 | void setNickName( const QString &nickName ); |
228 | /** | 232 | /** |
229 | Return nick name. | 233 | Return nick name. |
230 | */ | 234 | */ |
231 | QString nickName() const; | 235 | QString nickName() const; |
232 | /** | 236 | /** |
233 | Return translated label for nickName field. | 237 | Return translated label for nickName field. |
234 | */ | 238 | */ |
235 | static QString nickNameLabel(); | 239 | static QString nickNameLabel(); |
236 | 240 | ||
237 | /** | 241 | /** |
238 | Set birthday. | 242 | Set birthday. |
239 | */ | 243 | */ |
240 | void setBirthday( const QDateTime &birthday ); | 244 | void setBirthday( const QDateTime &birthday ); |
241 | /** | 245 | /** |
242 | Return birthday. | 246 | Return birthday. |
243 | */ | 247 | */ |
244 | QDateTime birthday() const; | 248 | QDateTime birthday() const; |
245 | /** | 249 | /** |
246 | Return translated label for birthday field. | 250 | Return translated label for birthday field. |
247 | */ | 251 | */ |
248 | static QString birthdayLabel(); | 252 | static QString birthdayLabel(); |
249 | 253 | ||
250 | /** | 254 | /** |
251 | Return translated label for homeAddressStreet field. | 255 | Return translated label for homeAddressStreet field. |
252 | */ | 256 | */ |
253 | static QString homeAddressStreetLabel(); | 257 | static QString homeAddressStreetLabel(); |
254 | 258 | ||
255 | /** | 259 | /** |
256 | Return translated label for homeAddressLocality field. | 260 | Return translated label for homeAddressLocality field. |
257 | */ | 261 | */ |
258 | static QString homeAddressLocalityLabel(); | 262 | static QString homeAddressLocalityLabel(); |
259 | 263 | ||
260 | /** | 264 | /** |
261 | Return translated label for homeAddressRegion field. | 265 | Return translated label for homeAddressRegion field. |
262 | */ | 266 | */ |
263 | static QString homeAddressRegionLabel(); | 267 | static QString homeAddressRegionLabel(); |
264 | 268 | ||
265 | /** | 269 | /** |
266 | Return translated label for homeAddressPostalCode field. | 270 | Return translated label for homeAddressPostalCode field. |
267 | */ | 271 | */ |
268 | static QString homeAddressPostalCodeLabel(); | 272 | static QString homeAddressPostalCodeLabel(); |
269 | 273 | ||
270 | /** | 274 | /** |
271 | Return translated label for homeAddressCountry field. | 275 | Return translated label for homeAddressCountry field. |
272 | */ | 276 | */ |
273 | static QString homeAddressCountryLabel(); | 277 | static QString homeAddressCountryLabel(); |
274 | 278 | ||
275 | /** | 279 | /** |
276 | Return translated label for homeAddressLabel field. | 280 | Return translated label for homeAddressLabel field. |
277 | */ | 281 | */ |
278 | static QString homeAddressLabelLabel(); | 282 | static QString homeAddressLabelLabel(); |
279 | 283 | ||
280 | /** | 284 | /** |
281 | Return translated label for businessAddressStreet field. | 285 | Return translated label for businessAddressStreet field. |
282 | */ | 286 | */ |
283 | static QString businessAddressStreetLabel(); | 287 | static QString businessAddressStreetLabel(); |
284 | 288 | ||
285 | /** | 289 | /** |
286 | Return translated label for businessAddressLocality field. | 290 | Return translated label for businessAddressLocality field. |
287 | */ | 291 | */ |
288 | static QString businessAddressLocalityLabel(); | 292 | static QString businessAddressLocalityLabel(); |
289 | 293 | ||
290 | /** | 294 | /** |
291 | Return translated label for businessAddressRegion field. | 295 | Return translated label for businessAddressRegion field. |
292 | */ | 296 | */ |
293 | static QString businessAddressRegionLabel(); | 297 | static QString businessAddressRegionLabel(); |
294 | 298 | ||
295 | /** | 299 | /** |
296 | Return translated label for businessAddressPostalCode field. | 300 | Return translated label for businessAddressPostalCode field. |
297 | */ | 301 | */ |
298 | static QString businessAddressPostalCodeLabel(); | 302 | static QString businessAddressPostalCodeLabel(); |
299 | 303 | ||
300 | /** | 304 | /** |
301 | Return translated label for businessAddressCountry field. | 305 | Return translated label for businessAddressCountry field. |
302 | */ | 306 | */ |
303 | static QString businessAddressCountryLabel(); | 307 | static QString businessAddressCountryLabel(); |
304 | 308 | ||
305 | /** | 309 | /** |
306 | Return translated label for businessAddressLabel field. | 310 | Return translated label for businessAddressLabel field. |
307 | */ | 311 | */ |
308 | static QString businessAddressLabelLabel(); | 312 | static QString businessAddressLabelLabel(); |
309 | 313 | ||
310 | /** | 314 | /** |
311 | Return translated label for homePhone field. | 315 | Return translated label for homePhone field. |