1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (info@qt.nokia.com)
10 ** GNU Lesser General Public License Usage
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
31 **************************************************************************/
32 #ifndef S60PUBLISHEROVI_H
33 #define S60PUBLISHEROVI_H
35 #include <QtCore/QObject>
36 #include <QtGui/QColor>
42 namespace ProjectExplorer {
46 namespace Qt4ProjectManager {
47 class Qt4BuildConfiguration;
50 class Qt4SymbianTarget;
54 const char * const REJECTED_VENDOR_NAMES_VENDOR = "Vendor";
55 const char * const REJECTED_VENDOR_NAMES_VENDOR_EN = "Vendor-EN";
56 const char * const REJECTED_VENDOR_NAMES_NOKIA = "Nokia";
57 const char * const REJECTED_VENDOR_NAMES_EMPTY = "";
59 const char * const CERTIFIED_SIGNED_CAPABILITY_NETWORK_CONTROL = "NetworkControl";
60 const char * const CERTIFIED_SIGNED_CAPABILITY_MULTIMEDIA_DD = "MultimediaDD";
61 const char * const CERTIFIED_SIGNED_CAPABILITY_COMM_DD = "CommDD";
62 const char * const CERTIFIED_SIGNED_CAPABILITY_DISK_ADMIN = "DiskAdmin";
63 const char * const MANUFACTURER_APPROVED_CAPABILITY_ALL_FILES = "AllFiles";
64 const char * const MANUFACTURER_APPROVED_CAPABILITY_DRM = "DRM";
65 const char * const MANUFACTURER_APPROVED_CAPABILITY_TCB = "TCB";
68 class S60PublisherOvi : public QObject
74 // Protected UID range: 0x00000000 - 0x7FFFFFFF
75 // Unprotected UID range: 0x80000000 - 0xFFFFFFFF
77 // Specifically, there are two important unprotected UID ranges:
78 // UIDs from Symbian Signed: 0xA0000000 - 0xAFFFFFFF
79 // UIDs for test/development use: 0xE0000000 - 0xEFFFFFFF
81 // And one important protected range:
82 // UIDs from Ovi Sign: 0x20000000 to 0x2FFFFFFF
83 // Warning: Some of these UIDs are assigned by Symbiansigned.
84 // Apps with such UIDs cannot be signed by Ovi.
85 // It is currently impossible to say which UIDs have been assigned by whome.
87 AssignedRestrictedStart = 0x20000000,
88 AssignedRestrictedEnd = 0x2FFFFFFF,
89 SymbianSignedUnprotectedStart = 0xA0000000,
90 SymbianSignedUnprotectedEnd = 0xAFFFFFFF,
91 TestStart = 0xE0000000,
95 enum CapabilityLevel {
101 explicit S60PublisherOvi(QObject *parent = 0);
104 void setBuildConfiguration(Qt4BuildConfiguration *qt4bc);
106 void completeCreation();
108 QString globalVendorName() const;
109 QString localisedVendorNames() const;
110 bool isVendorNameValid(const QString &vendorName) const;
112 QString qtVersion() const;
114 QString uid3() const;
115 bool isUID3Valid(const QString &uid3) const;
116 bool isTestUID3(const QString &uid3) const;
117 bool isKnownSymbianSignedUID3(const QString &uid3) const;
119 QString capabilities() const;
120 bool isCapabilityOneOf(const QString &capability, CapabilityLevel level) const;
122 void updateProFile();
123 void updateProFile(const QString &var, const QString &values);
126 QString createdSisFileContainingFolder();
127 QString createdSisFilePath();
131 void setVendorName(const QString &vendorName);
132 void setLocalVendorNames(const QString &localVendorNames);
133 void setAppUid(const QString &appuid);
136 void progressReport(const QString& status, QColor c);
141 void runBuild(int result);
142 void runCreateSis(int result);
143 void endBuild(int result);
146 void runStep(int result, const QString& buildStep, const QString& command, QProcess* currProc, QProcess* prevProc);
149 QColor m_commandColor;
151 QColor m_normalColor;
153 QProcess* m_qmakeProc;
154 QProcess* m_buildProc;
155 QProcess* m_createSisProc;
157 Qt4BuildConfiguration * m_qt4bc;
158 const Qt4SymbianTarget * m_activeTargetOfProject;
159 Qt4Project * m_qt4project;
160 ProFileReader *m_reader;
161 QStringList m_rejectedVendorNames;
162 QStringList m_capabilitiesForCertifiedSigned;
163 QStringList m_capabilitesForManufacturerApproved;
164 QString m_vendorName;
165 QString m_localVendorNames;
168 bool m_finishedAndSuccessful;
171 } // namespace Internal
172 } // namespace Qt4ProjectManager
174 #endif // S60PUBLISHEROVI_H