1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
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
16 ** 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 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights. These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
32 **************************************************************************/
34 #ifndef S60CERTIFICATEINFO_H
35 #define S60CERTIFICATEINFO_H
37 #include <QtCore/QObject>
38 #include <QtCore/QStringList>
39 #include <QtCore/QtGlobal>
41 namespace Qt4ProjectManager {
44 class S60SymbianCertificate;
46 class S60CertificateInfo : public QObject
51 enum CertificateState {
60 PowerMgmt = 1 << (31-2),
61 MultimediaDD = 1 << (31-3),
62 ReadDeviceData = 1 << (31-4),
63 WriteDeviceData = 1 << (31-5),
65 TrustedUI = 1 << (31-7),
66 ProtServ = 1 << (31-8),
67 DiskAdmin = 1 << (31-9),
68 NetworkControl = 1 << (31-10),
69 AllFiles = 1 << (31-11),
70 SwEvent = 1 << (31-12),
71 NetworkServices = 1 << (31-13),
72 LocalServices = 1 << (31-14),
73 ReadUserData = 1 << (31-15),
74 WriteUserData = 1 << (31-16),
75 Location = 1 << (31-17),
76 SurroundingsDD = 1 << (31-18),
77 UserEnvironment = 1 << (31-19),
82 enum S60CapabilitySet {
83 UserCapabilities = LocalServices|Location|NetworkServices|ReadUserData
84 |UserEnvironment|WriteUserData,
85 SystemCapabilities = PowerMgmt|ProtServ|ReadDeviceData|SurroundingsDD
86 |SwEvent|TrustedUI|WriteDeviceData,
87 RestrictedCapabilities = CommDD|DiskAdmin|NetworkControl|MultimediaDD,
88 ManufacturerCapabilities = AllFiles|DRM|TCB
91 explicit S60CertificateInfo(const QString &filePath, QObject* parent = 0);
92 ~S60CertificateInfo();
94 CertificateState validateCertificate();
95 QStringList devicesSupported() const;
96 quint32 capabilitiesSupported() const;
97 QString toHtml(bool keepShort = true);
98 QString errorString() const;
99 bool isDeveloperCertificate() const;
101 bool compareCapabilities(const QStringList &givenCaps, QStringList &unsupportedCaps) const;
104 S60SymbianCertificate *m_certificate;
106 QString m_errorString;
107 QStringList m_imeiList;
108 quint32 m_capabilities;
111 } // namespace Internal
112 } // namespace Qt4ProjectExplorer
114 #endif // S60CERTIFICATEINFO_H