-rw-r--r-- | kabc/vcard/Enum.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kabc/vcard/Enum.cpp b/kabc/vcard/Enum.cpp index cc48b5a..036324c 100644 --- a/kabc/vcard/Enum.cpp +++ b/kabc/vcard/Enum.cpp | |||
@@ -1,56 +1,56 @@ | |||
1 | /* | 1 | /* |
2 | libvcard - vCard parsing library for vCard version 3.0 | 2 | libvcard - vCard parsing library for vCard version 3.0 |
3 | 3 | ||
4 | Copyright (C) 1998 Rik Hemsley rik@kde.org | 4 | Copyright (C) 1998 Rik Hemsley rik@kde.org |
5 | 5 | ||
6 | Permission is hereby granted, free of charge, to any person obtaining a copy | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy |
7 | of this software and associated documentation files (the "Software"), to | 7 | of this software and associated documentation files (the "Software"), to |
8 | deal in the Software without restriction, including without limitation the | 8 | deal in the Software without restriction, including without limitation the |
9 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | 9 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
10 | sell copies of the Software, and to permit persons to whom the Software is | 10 | sell copies of the Software, and to permit persons to whom the Software is |
11 | furnished to do so, subject to the following conditions: | 11 | furnished to do so, subject to the following conditions: |
12 | 12 | ||
13 | The above copyright notice and this permission notice shall be included in | 13 | The above copyright notice and this permission notice shall be included in |
14 | all copies or substantial portions of the Software. | 14 | all copies or substantial portions of the Software. |
15 | 15 | ||
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
19 | AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | 19 | AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
20 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | 20 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qcstring.h> | 24 | #include <q3cstring.h> |
25 | #include <ctype.h> | 25 | #include <ctype.h> |
26 | 26 | ||
27 | #include <VCardEnum.h> | 27 | #include <VCardEnum.h> |
28 | 28 | ||
29 | using namespace VCARD; | 29 | using namespace VCARD; |
30 | 30 | ||
31 | // There are 31 possible types, not including extensions. | 31 | // There are 31 possible types, not including extensions. |
32 | const QCString | 32 | const Q3CString |
33 | VCARD::paramNames [] = | 33 | VCARD::paramNames [] = |
34 | { | 34 | { |
35 | "NAME", | 35 | "NAME", |
36 | "PROFILE", | 36 | "PROFILE", |
37 | "SOURCE", | 37 | "SOURCE", |
38 | "FN", | 38 | "FN", |
39 | "N", | 39 | "N", |
40 | "NICKNAME", | 40 | "NICKNAME", |
41 | "PHOTO", | 41 | "PHOTO", |
42 | "BDAY", | 42 | "BDAY", |
43 | "ADR", | 43 | "ADR", |
44 | "LABEL", | 44 | "LABEL", |
45 | "TEL", | 45 | "TEL", |
46 | "EMAIL", | 46 | "EMAIL", |
47 | "MAILER", | 47 | "MAILER", |
48 | "TZ", | 48 | "TZ", |
49 | "GEO", | 49 | "GEO", |
50 | "TITLE", | 50 | "TITLE", |
51 | "ROLE", | 51 | "ROLE", |
52 | "LOGO", | 52 | "LOGO", |
53 | "AGENT", | 53 | "AGENT", |
54 | "ORG", | 54 | "ORG", |
55 | "CATEGORIES", | 55 | "CATEGORIES", |
56 | "NOTE", | 56 | "NOTE", |
@@ -201,57 +201,57 @@ VCARD::EntityTypeToValueType(EntityType e) | |||
201 | case EntityNickname: t = ValueTextList;break; | 201 | case EntityNickname: t = ValueTextList;break; |
202 | //---------------------------------------------------------------// | 202 | //---------------------------------------------------------------// |
203 | case EntityLabel: | 203 | case EntityLabel: |
204 | case EntityExtension: | 204 | case EntityExtension: |
205 | case EntityEmail: | 205 | case EntityEmail: |
206 | case EntityTitle: | 206 | case EntityTitle: |
207 | case EntityRole: | 207 | case EntityRole: |
208 | case EntityFullName: | 208 | case EntityFullName: |
209 | case EntityMailer: | 209 | case EntityMailer: |
210 | case EntityProductID: | 210 | case EntityProductID: |
211 | case EntityName: | 211 | case EntityName: |
212 | case EntitySortString: | 212 | case EntitySortString: |
213 | case EntityVersion: | 213 | case EntityVersion: |
214 | case EntityProfile: | 214 | case EntityProfile: |
215 | case EntityUID: | 215 | case EntityUID: |
216 | case EntityNote: | 216 | case EntityNote: |
217 | default: t = ValueText; break; | 217 | default: t = ValueText; break; |
218 | //---------------------------------------------------------------// | 218 | //---------------------------------------------------------------// |
219 | 219 | ||
220 | } | 220 | } |
221 | 221 | ||
222 | return t; | 222 | return t; |
223 | } | 223 | } |
224 | 224 | ||
225 | QCString | 225 | Q3CString |
226 | VCARD::EntityTypeToParamName(EntityType e) | 226 | VCARD::EntityTypeToParamName(EntityType e) |
227 | { | 227 | { |
228 | if ( e > EntityUnknown ) e = EntityUnknown; | 228 | if ( e > EntityUnknown ) e = EntityUnknown; |
229 | return paramNames[ int( e ) ]; | 229 | return paramNames[ int( e ) ]; |
230 | } | 230 | } |
231 | 231 | ||
232 | EntityType | 232 | EntityType |
233 | VCARD::EntityNameToEntityType(const QCString & s) | 233 | VCARD::EntityNameToEntityType(const Q3CString & s) |
234 | { | 234 | { |
235 | if (s.isEmpty()) return EntityUnknown; | 235 | if (s.isEmpty()) return EntityUnknown; |
236 | 236 | ||
237 | EntityType t(EntityUnknown); | 237 | EntityType t(EntityUnknown); |
238 | 238 | ||
239 | switch (s[0]) { | 239 | switch (s[0]) { |
240 | 240 | ||
241 | case 'A': | 241 | case 'A': |
242 | if (s == "ADR") | 242 | if (s == "ADR") |
243 | t = EntityAddress; | 243 | t = EntityAddress; |
244 | else if (s == "AGENT") | 244 | else if (s == "AGENT") |
245 | t = EntityAgent; | 245 | t = EntityAgent; |
246 | break; | 246 | break; |
247 | 247 | ||
248 | case 'B': | 248 | case 'B': |
249 | if (s == "BDAY") | 249 | if (s == "BDAY") |
250 | t = EntityBirthday; | 250 | t = EntityBirthday; |
251 | break; | 251 | break; |
252 | 252 | ||
253 | case 'C': | 253 | case 'C': |
254 | if (s == "CATEGORIES") | 254 | if (s == "CATEGORIES") |
255 | t = EntityCategories; | 255 | t = EntityCategories; |
256 | else if (s == "CLASS") | 256 | else if (s == "CLASS") |
257 | t = EntityClass; | 257 | t = EntityClass; |