| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2015 The Qt Company Ltd. |
| 4 | ** Contact: http://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the QtVersit module of the Qt Toolkit. |
| 7 | ** |
| 8 | ** $QT_BEGIN_LICENSE:LGPL21$ |
| 9 | ** Commercial License Usage |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in |
| 11 | ** accordance with the commercial license agreement provided with the |
| 12 | ** Software or, alternatively, in accordance with the terms contained in |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms |
| 14 | ** and conditions see http://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at http://www.qt.io/contact-us. |
| 16 | ** |
| 17 | ** GNU Lesser General Public License Usage |
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
| 19 | ** General Public License version 2.1 or version 3 as published by the Free |
| 20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and |
| 21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the |
| 22 | ** following information to ensure the GNU Lesser General Public License |
| 23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and |
| 24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
| 25 | ** |
| 26 | ** As a special exception, The Qt Company gives you certain additional |
| 27 | ** rights. These rights are described in The Qt Company LGPL Exception |
| 28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
| 29 | ** |
| 30 | ** $QT_END_LICENSE$ |
| 31 | ** |
| 32 | ****************************************************************************/ |
| 33 | |
| 34 | #ifndef QVERSITCONTACTSDEFS_P_H |
| 35 | #define QVERSITCONTACTSDEFS_P_H |
| 36 | |
| 37 | // |
| 38 | // W A R N I N G |
| 39 | // ------------- |
| 40 | // |
| 41 | // This file is not part of the Qt API. It exists purely as an |
| 42 | // implementation detail. This header file may change from version to |
| 43 | // version without notice, or even be removed. |
| 44 | // |
| 45 | // We mean it. |
| 46 | // |
| 47 | |
| 48 | #include <QtContacts/qcontactdetails.h> |
| 49 | |
| 50 | #include <QtVersit/private/qversitdefs_p.h> |
| 51 | |
| 52 | QTCONTACTS_USE_NAMESPACE |
| 53 | |
| 54 | QT_BEGIN_NAMESPACE_VERSIT |
| 55 | |
| 56 | //! [Property name mappings] |
| 57 | // Mappings from versit property names to Qt contact details |
| 58 | // For the case that there are multiple property names corresponding to the same detail, put the |
| 59 | // primary one first and it will be the one used when exporting. |
| 60 | const VersitContactDetailMapping versitContactDetailMappings[] = { |
| 61 | {.versitPropertyName: "ADR" , .detailType: QContactAddress::Type, |
| 62 | .detailField: -1}, |
| 63 | {.versitPropertyName: "BDAY" , .detailType: QContactBirthday::Type, |
| 64 | .detailField: QContactBirthday::FieldBirthday}, |
| 65 | {.versitPropertyName: "CATEGORIES" , .detailType: QContactTag::Type, |
| 66 | .detailField: QContactTag::FieldTag}, |
| 67 | {.versitPropertyName: "FN" , .detailType: QContactDisplayLabel::Type, |
| 68 | .detailField: QContactDisplayLabel::FieldLabel}, |
| 69 | {.versitPropertyName: "GEO" , .detailType: QContactGeoLocation::Type, |
| 70 | .detailField: -1}, |
| 71 | {.versitPropertyName: "EMAIL" , .detailType: QContactEmailAddress::Type, |
| 72 | .detailField: QContactEmailAddress::FieldEmailAddress}, |
| 73 | {.versitPropertyName: "IMPP" , .detailType: QContactOnlineAccount::Type, |
| 74 | .detailField: -1}, |
| 75 | {.versitPropertyName: "LOGO" , .detailType: QContactOrganization::Type, |
| 76 | .detailField: QContactOrganization::FieldLogoUrl}, |
| 77 | {.versitPropertyName: "N" , .detailType: QContactName::Type, |
| 78 | .detailField: -1}, |
| 79 | {.versitPropertyName: "NICKNAME" , .detailType: QContactNickname::Type, |
| 80 | .detailField: QContactNickname::FieldNickname}, |
| 81 | {.versitPropertyName: "NOTE" , .detailType: QContactNote::Type, |
| 82 | .detailField: QContactNote::FieldNote}, |
| 83 | {.versitPropertyName: "PHOTO" , .detailType: QContactAvatar::Type, |
| 84 | .detailField: -1}, |
| 85 | {.versitPropertyName: "ORG" , .detailType: QContactOrganization::Type, |
| 86 | .detailField: QContactOrganization::FieldName}, |
| 87 | {.versitPropertyName: "REV" , .detailType: QContactTimestamp::Type, |
| 88 | .detailField: -1}, |
| 89 | {.versitPropertyName: "ROLE" , .detailType: QContactOrganization::Type, |
| 90 | .detailField: QContactOrganization::FieldRole}, |
| 91 | {.versitPropertyName: "SOUND" , .detailType: QContactRingtone::Type, |
| 92 | .detailField: QContactRingtone::FieldAudioRingtoneUrl}, |
| 93 | {.versitPropertyName: "TEL" , .detailType: QContactPhoneNumber::Type, |
| 94 | .detailField: QContactPhoneNumber::FieldNumber}, |
| 95 | {.versitPropertyName: "TITLE" , .detailType: QContactOrganization::Type, |
| 96 | .detailField: QContactOrganization::FieldTitle}, |
| 97 | {.versitPropertyName: "UID" , .detailType: QContactGuid::Type, |
| 98 | .detailField: QContactGuid::FieldGuid}, |
| 99 | {.versitPropertyName: "URL" , .detailType: QContactUrl::Type, |
| 100 | .detailField: QContactUrl::FieldUrl}, |
| 101 | {.versitPropertyName: "X-ABUID" , .detailType: QContactGuid::Type, |
| 102 | .detailField: QContactGuid::FieldGuid}, |
| 103 | {.versitPropertyName: "X-AIM" , .detailType: QContactOnlineAccount::Type, |
| 104 | .detailField: -1}, |
| 105 | {.versitPropertyName: "X-ANNIVERSARY" , .detailType: QContactAnniversary::Type, |
| 106 | .detailField: -1}, |
| 107 | {.versitPropertyName: "X-ASSISTANT" , .detailType: QContactOrganization::Type, |
| 108 | .detailField: QContactOrganization::FieldAssistantName}, |
| 109 | {.versitPropertyName: "X-ASSISTANT-TEL" , .detailType: QContactPhoneNumber::Type, |
| 110 | .detailField: QContactPhoneNumber::SubTypeAssistant}, |
| 111 | {.versitPropertyName: "X-CHILDREN" , .detailType: QContactFamily::Type, |
| 112 | .detailField: QContactFamily::FieldChildren}, |
| 113 | {.versitPropertyName: "X-EPOCSECONDNAME" ,.detailType: QContactNickname::Type, |
| 114 | .detailField: QContactNickname::FieldNickname}, |
| 115 | {.versitPropertyName: "X-EVOLUTION-SPOUSE" , .detailType: QContactFamily::Type, |
| 116 | .detailField: QContactFamily::FieldSpouse}, |
| 117 | {.versitPropertyName: "X-EVOLUTION-ANNIVERSARY" , .detailType: QContactAnniversary::Type, |
| 118 | .detailField: -1}, |
| 119 | {.versitPropertyName: "X-GADUGADU" , .detailType: QContactOnlineAccount::Type, |
| 120 | .detailField: -1}, |
| 121 | {.versitPropertyName: "X-GENDER" , .detailType: QContactGender::Type, |
| 122 | .detailField: QContactGender::FieldGender}, |
| 123 | {.versitPropertyName: "X-ICQ" , .detailType: QContactOnlineAccount::Type, |
| 124 | .detailField: -1}, |
| 125 | {.versitPropertyName: "X-IMPP" , .detailType: QContactOnlineAccount::Type, |
| 126 | .detailField: -1}, |
| 127 | {.versitPropertyName: "X-JABBER" , .detailType: QContactOnlineAccount::Type, |
| 128 | .detailField: -1}, |
| 129 | {.versitPropertyName: "X-KADDRESSBOOK-X-SPOUSENAME" , .detailType: QContactFamily::Type, |
| 130 | .detailField: QContactFamily::FieldSpouse}, |
| 131 | {.versitPropertyName: "X-KADDRESSBOOK-X-ANNIVERSARY" , .detailType: QContactAnniversary::Type, |
| 132 | .detailField: -1}, |
| 133 | {.versitPropertyName: "X-KADDRESSBOOK-X-IMADDRESS" , .detailType: QContactOnlineAccount::Type, |
| 134 | .detailField: -1}, |
| 135 | {.versitPropertyName: "X-MS-CARDPICTURE" , .detailType: QContactAvatar::Type, |
| 136 | .detailField: -1}, |
| 137 | {.versitPropertyName: "X-MS-IMADDRESS" , .detailType: QContactOnlineAccount::Type, |
| 138 | .detailField: -1}, |
| 139 | {.versitPropertyName: "X-MSN" , .detailType: QContactOnlineAccount::Type, |
| 140 | .detailField: -1}, |
| 141 | {.versitPropertyName: "X-NICKNAME" , .detailType: QContactNickname::Type, |
| 142 | .detailField: QContactNickname::FieldNickname}, |
| 143 | {.versitPropertyName: "X-QQ" , .detailType: QContactOnlineAccount::Type, |
| 144 | .detailField: -1}, |
| 145 | {.versitPropertyName: "X-QTPROJECT-EXTENDED-DETAIL" , .detailType: QContactExtendedDetail::Type, |
| 146 | .detailField: -1}, |
| 147 | {.versitPropertyName: "X-QTPROJECT-FAVORITE" , .detailType: QContactFavorite::Type, |
| 148 | .detailField: -1}, |
| 149 | {.versitPropertyName: "X-QTPROJECT-VERSION" , .detailType: QContactVersion::Type, |
| 150 | .detailField: -1}, |
| 151 | {.versitPropertyName: "X-SIP" , .detailType: QContactOnlineAccount::Type, |
| 152 | .detailField: -1}, |
| 153 | {.versitPropertyName: "X-SKYPE" , .detailType: QContactOnlineAccount::Type, |
| 154 | .detailField: -1}, |
| 155 | {.versitPropertyName: "X-SKYPE-USERNAME" , .detailType: QContactOnlineAccount::Type, |
| 156 | .detailField: -1}, |
| 157 | {.versitPropertyName: "X-SPOUSE" , .detailType: QContactFamily::Type, |
| 158 | .detailField: QContactFamily::FieldSpouse}, |
| 159 | {.versitPropertyName: "X-YAHOO" , .detailType: QContactOnlineAccount::Type, |
| 160 | .detailField: -1} |
| 161 | }; |
| 162 | //! [Property name mappings] |
| 163 | |
| 164 | // Mappings from versit TYPE parameters to Qt contact detail contexts |
| 165 | const VersitContextMapping versitContextMappings[] = { |
| 166 | {.versitString: "HOME" , .contactContext: QContactDetail::ContextHome}, |
| 167 | {.versitString: "WORK" , .contactContext: QContactDetail::ContextWork}, |
| 168 | {.versitString: "OTHER" , .contactContext: QContactDetail::ContextOther} |
| 169 | }; |
| 170 | |
| 171 | //! [Property type parameter mappings] |
| 172 | // Mappings from versit TYPE parameters to Qt contact detail subtypes |
| 173 | const VersitSubTypeMapping versitSubTypeMappings[] = { |
| 174 | {.versitString: "DOM" , .detailType: QContactDetail::TypeAddress, .contactSubType: QContactAddress::SubTypeDomestic}, |
| 175 | {.versitString: "INTL" , .detailType: QContactDetail::TypeAddress, .contactSubType: QContactAddress::SubTypeInternational}, |
| 176 | {.versitString: "POSTAL" , .detailType: QContactDetail::TypeAddress, .contactSubType: QContactAddress::SubTypePostal}, |
| 177 | {.versitString: "PARCEL" , .detailType: QContactDetail::TypeAddress, .contactSubType: QContactAddress::SubTypeParcel}, |
| 178 | {.versitString: "VOICE" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypeVoice}, |
| 179 | {.versitString: "CELL" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypeMobile}, |
| 180 | {.versitString: "MODEM" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypeModem}, |
| 181 | {.versitString: "CAR" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypeCar}, |
| 182 | {.versitString: "VIDEO" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypeVideo}, |
| 183 | {.versitString: "FAX" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypeFax}, |
| 184 | {.versitString: "BBS" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypeBulletinBoardSystem}, |
| 185 | {.versitString: "PAGER" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypePager}, |
| 186 | {.versitString: "ISDN" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypeIsdn}, |
| 187 | {.versitString: "VOICE" , .detailType: QContactDetail::TypePhoneNumber, .contactSubType: QContactPhoneNumber::SubTypeLandline}, |
| 188 | {.versitString: "SWIS" , .detailType: QContactDetail::TypeOnlineAccount, .contactSubType: QContactOnlineAccount::SubTypeVideoShare}, |
| 189 | {.versitString: "VOIP" , .detailType: QContactDetail::TypeOnlineAccount, .contactSubType: QContactOnlineAccount::SubTypeSipVoip} |
| 190 | }; |
| 191 | //! [Property type parameter mappings] |
| 192 | |
| 193 | QT_END_NAMESPACE_VERSIT |
| 194 | |
| 195 | #endif // QVERSITCONTACTSDEFS_P_H |
| 196 | |