|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 |
|
43 #ifndef QVERSITCONTACTSDEFS_P_H |
|
44 #define QVERSITCONTACTSDEFS_P_H |
|
45 |
|
46 // |
|
47 // W A R N I N G |
|
48 // ------------- |
|
49 // |
|
50 // This file is not part of the Qt API. It exists purely as an |
|
51 // implementation detail. This header file may change from version to |
|
52 // version without notice, or even be removed. |
|
53 // |
|
54 // We mean it. |
|
55 // |
|
56 |
|
57 #include "qtcontacts.h" |
|
58 #include "qversitdefs_p.h" |
|
59 |
|
60 QTM_BEGIN_NAMESPACE |
|
61 |
|
62 //! [Property name mappings] |
|
63 // Mappings from versit property names to Qt contact details |
|
64 const VersitDetailMapping versitContactDetailMappings[] = { |
|
65 {"ADR", QContactAddress::DefinitionName.latin1(), |
|
66 ""}, |
|
67 {"BDAY", QContactBirthday::DefinitionName.latin1(), |
|
68 QContactBirthday::FieldBirthday.latin1()}, |
|
69 {"CATEGORIES", QContactTag::DefinitionName.latin1(), |
|
70 QContactTag::FieldTag.latin1()}, |
|
71 {"FN", QContactDisplayLabel::DefinitionName.latin1(), |
|
72 ""}, |
|
73 {"GEO", QContactGeoLocation::DefinitionName.latin1(), |
|
74 ""}, |
|
75 {"EMAIL", QContactEmailAddress::DefinitionName.latin1(), |
|
76 QContactEmailAddress::FieldEmailAddress.latin1()}, |
|
77 {"IMPP", QContactOnlineAccount::DefinitionName.latin1(), |
|
78 QContactOnlineAccount::SubTypeImpp.latin1()}, |
|
79 {"LOGO", QContactOrganization::DefinitionName.latin1(), |
|
80 QContactOrganization::FieldLogoUrl.latin1()}, |
|
81 {"N", QContactName::DefinitionName.latin1(), |
|
82 ""}, |
|
83 {"NICKNAME", QContactNickname::DefinitionName.latin1(), |
|
84 QContactNickname::FieldNickname.latin1()}, |
|
85 {"NOTE", QContactNote::DefinitionName.latin1(), |
|
86 QContactNote::FieldNote.latin1()}, |
|
87 {"ORG", QContactOrganization::DefinitionName.latin1(), |
|
88 QContactOrganization::FieldName.latin1()}, |
|
89 {"PHOTO", QContactThumbnail::DefinitionName.latin1(), |
|
90 ""}, |
|
91 {"REV", QContactTimestamp::DefinitionName.latin1(), |
|
92 ""}, |
|
93 {"ROLE", QContactOrganization::DefinitionName.latin1(), |
|
94 QContactOrganization::FieldRole.latin1()}, |
|
95 {"SOUND", QContactRingtone::DefinitionName.latin1(), |
|
96 QContactRingtone::FieldAudioRingtoneUrl.latin1()}, |
|
97 {"TEL", QContactPhoneNumber::DefinitionName.latin1(), |
|
98 QContactPhoneNumber::FieldNumber.latin1()}, |
|
99 {"TITLE", QContactOrganization::DefinitionName.latin1(), |
|
100 QContactOrganization::FieldTitle.latin1()}, |
|
101 {"UID", QContactGuid::DefinitionName.latin1(), |
|
102 QContactGuid::FieldGuid.latin1()}, |
|
103 {"URL", QContactUrl::DefinitionName.latin1(), |
|
104 QContactUrl::FieldUrl.latin1()}, |
|
105 {"X-ANNIVERSARY", QContactAnniversary::DefinitionName.latin1(), |
|
106 ""}, |
|
107 {"X-ASSISTANT", QContactOrganization::DefinitionName.latin1(), |
|
108 QContactOrganization::FieldAssistantName.latin1()}, |
|
109 {"X-ASSISTANT-TEL", QContactPhoneNumber::DefinitionName.latin1(), |
|
110 QContactPhoneNumber::SubTypeAssistant.latin1()}, |
|
111 {"X-CHILDREN", QContactFamily::DefinitionName.latin1(), |
|
112 QContactFamily::FieldChildren.latin1()}, |
|
113 {"X-EPOCSECONDNAME",QContactNickname::DefinitionName.latin1(), |
|
114 QContactNickname::FieldNickname.latin1()}, |
|
115 {"X-GENDER", QContactGender::DefinitionName.latin1(), |
|
116 QContactGender::FieldGender.latin1()}, |
|
117 {"X-IMPP", QContactOnlineAccount::DefinitionName.latin1(), |
|
118 QContactOnlineAccount::SubTypeImpp.latin1()}, |
|
119 {"X-JABBER", QContactOnlineAccount::DefinitionName.latin1(), |
|
120 QContactOnlineAccount::SubTypeImpp.latin1()}, |
|
121 {"X-NICKNAME", QContactNickname::DefinitionName.latin1(), |
|
122 QContactNickname::FieldNickname.latin1()}, |
|
123 {"X-SIP", QContactOnlineAccount::DefinitionName.latin1(), |
|
124 ""}, |
|
125 {"X-SPOUSE", QContactFamily::DefinitionName.latin1(), |
|
126 QContactFamily::FieldSpouse.latin1()} |
|
127 }; |
|
128 //! [Property name mappings] |
|
129 |
|
130 // Mappings from versit TYPE parameters to Qt contact detail contexts |
|
131 const VersitMapping versitContextMappings[] = { |
|
132 {"HOME", QContactDetail::ContextHome.latin1()}, |
|
133 {"WORK", QContactDetail::ContextWork.latin1()}, |
|
134 }; |
|
135 |
|
136 //! [Property type parameter mappings] |
|
137 // Mappings from versit TYPE parameters to Qt contact detail subtypes |
|
138 const VersitMapping versitSubTypeMappings[] = { |
|
139 {"DOM", QContactAddress::SubTypeDomestic.latin1()}, |
|
140 {"INTL", QContactAddress::SubTypeInternational.latin1()}, |
|
141 {"POSTAL", QContactAddress::SubTypePostal.latin1()}, |
|
142 {"PARCEL", QContactAddress::SubTypeParcel.latin1()}, |
|
143 {"VOICE", QContactPhoneNumber::SubTypeVoice.latin1()}, |
|
144 {"CELL", QContactPhoneNumber::SubTypeMobile.latin1()}, |
|
145 {"MODEM", QContactPhoneNumber::SubTypeModem.latin1()}, |
|
146 {"CAR", QContactPhoneNumber::SubTypeCar.latin1()}, |
|
147 {"VIDEO", QContactPhoneNumber::SubTypeVideo.latin1()}, |
|
148 {"FAX", QContactPhoneNumber::SubTypeFax.latin1()}, |
|
149 {"BBS", QContactPhoneNumber::SubTypeBulletinBoardSystem.latin1()}, |
|
150 {"PAGER", QContactPhoneNumber::SubTypePager.latin1()}, |
|
151 {"SWIS", QContactOnlineAccount::SubTypeVideoShare.latin1()}, |
|
152 {"VOIP", QContactOnlineAccount::SubTypeSipVoip.latin1()} |
|
153 }; |
|
154 //! [Property type parameter mappings] |
|
155 |
|
156 QTM_END_NAMESPACE |
|
157 |
|
158 #endif // QVERSITCONTACTSDEFS_P_H |