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 QVERSITDEFS_P_H
35#define QVERSITDEFS_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/qcontactdetail.h>
49
50#include <QtVersit/qversitglobal.h>
51
52QTCONTACTS_USE_NAMESPACE
53
54QT_BEGIN_NAMESPACE_VERSIT
55
56// Mapping between a string in versit specifications and Qt contacts
57struct VersitContextMapping {
58 const char* versitString;
59 const int contactContext;
60};
61
62// Mapping between a string in versit specifications and Qt contacts
63struct VersitSubTypeMapping {
64 const char* versitString;
65 const QContactDetail::DetailType detailType;
66 const int contactSubType;
67};
68
69struct VersitFileExtensionMapping {
70 const char *mimeType;
71 const char *extension;
72};
73
74// Mapping between a string in versit specifications and Qt contact details
75struct VersitContactDetailMapping {
76 const char* versitPropertyName;
77 const QContactDetail::DetailType detailType;
78 const int detailField;
79};
80
81//! [File extension mappings]
82// Mappings from mime types to file extensions
83const VersitFileExtensionMapping versitFileExtensionMappings[] = {
84 {.mimeType: "application/octet-stream", .extension: "obj"},
85 {.mimeType: "audio/x-pn-realaudio", .extension: "ra"},
86 {.mimeType: "application/xml", .extension: "wsdl"},
87 {.mimeType: "application/octet-stream", .extension: "dll"},
88 {.mimeType: "image/x-cmu-raster", .extension: "ras"},
89 {.mimeType: "application/x-pn-realaudio", .extension: "ram"},
90 {.mimeType: "application/x-bcpio", .extension: "bcpio"},
91 {.mimeType: "application/x-sh", .extension: "sh"},
92 {.mimeType: "video/mpeg", .extension: "m1v"},
93 {.mimeType: "image/x-xwindowdump", .extension: "xwd"},
94 {.mimeType: "video/x-msvideo", .extension: "avi"},
95 {.mimeType: "image/x-ms-bmp", .extension: "bmp"},
96 {.mimeType: "application/x-shar", .extension: "shar"},
97 {.mimeType: "application/x-javascript", .extension: "js"},
98 {.mimeType: "application/x-wais-source", .extension: "src"},
99 {.mimeType: "application/x-dvi", .extension: "dvi"},
100 {.mimeType: "audio/x-aiff", .extension: "aif"},
101 {.mimeType: "text/plain", .extension: "ksh"},
102 {.mimeType: "application/msword", .extension: "dot"},
103 {.mimeType: "message/rfc822", .extension: "mht"},
104 {.mimeType: "application/x-pkcs12", .extension: "p12"},
105 {.mimeType: "text/css", .extension: "css"},
106 {.mimeType: "application/x-csh", .extension: "csh"},
107 {.mimeType: "application/vnd.ms-powerpoint", .extension: "pwz"},
108 {.mimeType: "application/pdf", .extension: "pdf"},
109 {.mimeType: "application/x-netcdf", .extension: "cdf"},
110 {.mimeType: "text/plain", .extension: "pl"},
111 {.mimeType: "text/plain", .extension: "c"},
112 {.mimeType: "image/jpeg", .extension: "jpe"},
113 {.mimeType: "image/jpeg", .extension: "jpg"},
114 {.mimeType: "text/x-python", .extension: "py"},
115 {.mimeType: "text/xml", .extension: "xml"},
116 {.mimeType: "image/jpeg", .extension: "jpeg"},
117 {.mimeType: "application/postscript", .extension: "ps"},
118 {.mimeType: "application/x-gtar", .extension: "gtar"},
119 {.mimeType: "image/x-xpixmap", .extension: "xpm"},
120 {.mimeType: "application/x-hdf", .extension: "hdf"},
121 {.mimeType: "message/rfc822", .extension: "nws"},
122 {.mimeType: "text/tab-separated-values", .extension: "tsv"},
123 {.mimeType: "application/xml", .extension: "xpdl"},
124 {.mimeType: "application/pkcs7-mime", .extension: "p7c"},
125 {.mimeType: "application/postscript", .extension: "eps"},
126 {.mimeType: "image/ief", .extension: "ief"},
127 {.mimeType: "application/octet-stream", .extension: "so"},
128 {.mimeType: "application/vnd.ms-excel", .extension: "xlb"},
129 {.mimeType: "image/x-portable-bitmap", .extension: "pbm"},
130 {.mimeType: "application/x-texinfo", .extension: "texinfo"},
131 {.mimeType: "application/vnd.ms-excel", .extension: "xls"},
132 {.mimeType: "application/x-tex", .extension: "tex"},
133 {.mimeType: "text/richtext", .extension: "rtx"},
134 {.mimeType: "text/html", .extension: "html"},
135 {.mimeType: "audio/x-aiff", .extension: "aiff"},
136 {.mimeType: "audio/x-aiff", .extension: "aifc"},
137 {.mimeType: "application/octet-stream", .extension: "exe"},
138 {.mimeType: "text/x-sgml", .extension: "sgm"},
139 {.mimeType: "image/tiff", .extension: "tif"},
140 {.mimeType: "video/mpeg", .extension: "mpeg"},
141 {.mimeType: "application/x-ustar", .extension: "ustar"},
142 {.mimeType: "image/gif", .extension: "gif"},
143 {.mimeType: "application/vnd.ms-powerpoint", .extension: "ppt"},
144 {.mimeType: "application/vnd.ms-powerpoint", .extension: "pps"},
145 {.mimeType: "text/x-sgml", .extension: "sgml"},
146 {.mimeType: "image/x-portable-pixmap", .extension: "ppm"},
147 {.mimeType: "application/x-latex", .extension: "latex"},
148 {.mimeType: "text/plain", .extension: "bat"},
149 {.mimeType: "video/quicktime", .extension: "mov"},
150 {.mimeType: "application/vnd.ms-powerpoint", .extension: "ppa"},
151 {.mimeType: "application/x-troff", .extension: "tr"},
152 {.mimeType: "application/xml", .extension: "rdf"},
153 {.mimeType: "application/xml", .extension: "xsl"},
154 {.mimeType: "message/rfc822", .extension: "eml"},
155 {.mimeType: "application/x-netcdf", .extension: "nc"},
156 {.mimeType: "application/x-sv4cpio", .extension: "sv4cpio"},
157 {.mimeType: "application/octet-stream", .extension: "bin"},
158 {.mimeType: "text/plain", .extension: "h"},
159 {.mimeType: "application/x-tcl", .extension: "tcl"},
160 {.mimeType: "application/msword", .extension: "wiz"},
161 {.mimeType: "application/octet-stream", .extension: "o"},
162 {.mimeType: "application/octet-stream", .extension: "a"},
163 {.mimeType: "application/postscript", .extension: "ai"},
164 {.mimeType: "audio/x-wav", .extension: "wav"},
165 {.mimeType: "text/x-vcard", .extension: "vcf"},
166 {.mimeType: "image/x-xbitmap", .extension: "xbm"},
167 {.mimeType: "text/plain", .extension: "txt"},
168 {.mimeType: "audio/basic", .extension: "au"},
169 {.mimeType: "application/x-troff", .extension: "t"},
170 {.mimeType: "image/tiff", .extension: "tiff"},
171 {.mimeType: "application/x-texinfo", .extension: "texi"},
172 {.mimeType: "application/oda", .extension: "oda"},
173 {.mimeType: "application/x-troff-ms", .extension: "ms"},
174 {.mimeType: "image/x-rgb", .extension: "rgb"},
175 {.mimeType: "application/x-troff-me", .extension: "me"},
176 {.mimeType: "application/x-sv4crc", .extension: "sv4crc"},
177 {.mimeType: "video/quicktime", .extension: "qt"},
178 {.mimeType: "video/mpeg", .extension: "mpa"},
179 {.mimeType: "video/mpeg", .extension: "mpg"},
180 {.mimeType: "video/mpeg", .extension: "mpe"},
181 {.mimeType: "application/msword", .extension: "doc"},
182 {.mimeType: "image/x-portable-graymap", .extension: "pgm"},
183 {.mimeType: "application/vnd.ms-powerpoint", .extension: "pot"},
184 {.mimeType: "application/x-mif", .extension: "mif"},
185 {.mimeType: "application/x-troff", .extension: "roff"},
186 {.mimeType: "text/html", .extension: "htm"},
187 {.mimeType: "application/x-troff-man", .extension: "man"},
188 {.mimeType: "text/x-setext", .extension: "etx"},
189 {.mimeType: "application/zip", .extension: "zip"},
190 {.mimeType: "video/x-sgi-movie", .extension: "movie"},
191 {.mimeType: "application/x-python-code", .extension: "pyc"},
192 {.mimeType: "image/png", .extension: "png"},
193 {.mimeType: "application/x-pkcs12", .extension: "pfx"},
194 {.mimeType: "message/rfc822", .extension: "mhtml"},
195 {.mimeType: "application/x-tar", .extension: "tar"},
196 {.mimeType: "image/x-portable-anymap", .extension: "pnm"},
197 {.mimeType: "application/x-python-code", .extension: "pyo"},
198 {.mimeType: "audio/basic", .extension: "snd"},
199 {.mimeType: "application/x-cpio", .extension: "cpio"},
200 {.mimeType: "application/x-shockwave-flash", .extension: "swf"},
201 {.mimeType: "audio/mpeg", .extension: "mp3"},
202 {.mimeType: "audio/mpeg", .extension: "mp2"}
203};
204//! [File extension mappings]
205
206QT_END_NAMESPACE_VERSIT
207
208#endif // QVERSITDEFS_P_H
209

source code of qtpim/src/versit/qversitdefs_p.h