~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/plugins/qnx/blackberrysigningutils.h

  • Committer: Timo Jyrinki
  • Date: 2013-11-15 12:25:23 UTC
  • mfrom: (1.1.28)
  • Revision ID: timo.jyrinki@canonical.com-20131115122523-i2kyamsu4gs2mu1m
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
**
 
3
** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
 
4
**
 
5
** Contact: BlackBerry (qt@blackberry.com)
 
6
** Contact: KDAB (info@kdab.com)
 
7
**
 
8
** This file is part of Qt Creator.
 
9
**
 
10
** Commercial License Usage
 
11
** Licensees holding valid commercial Qt licenses may use this file in
 
12
** accordance with the commercial license agreement provided with the
 
13
** Software or, alternatively, in accordance with the terms contained in
 
14
** a written agreement between you and Digia.  For licensing terms and
 
15
** conditions see http://qt.digia.com/licensing.  For further information
 
16
** use the contact form at http://qt.digia.com/contact-us.
 
17
**
 
18
** GNU Lesser General Public License Usage
 
19
** Alternatively, this file may be used under the terms of the GNU Lesser
 
20
** General Public License version 2.1 as published by the Free Software
 
21
** Foundation and appearing in the file LICENSE.LGPL included in the
 
22
** packaging of this file.  Please review the following information to
 
23
** ensure the GNU Lesser General Public License version 2.1 requirements
 
24
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 
25
**
 
26
** In addition, as a special exception, Digia gives you certain additional
 
27
** rights.  These rights are described in the Digia Qt LGPL Exception
 
28
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 
29
**
 
30
****************************************************************************/
 
31
 
 
32
#ifndef QNX_INTERNAL_BLACKBERRYSIGNINGUTILS_H
 
33
#define QNX_INTERNAL_BLACKBERRYSIGNINGUTILS_H
 
34
 
 
35
#include <QtGlobal>
 
36
#include <QObject>
 
37
 
 
38
QT_BEGIN_NAMESPACE
 
39
class QString;
 
40
QT_END_NAMESPACE
 
41
 
 
42
namespace Qnx {
 
43
namespace Internal {
 
44
 
 
45
class BlackBerryCertificate;
 
46
 
 
47
class BlackBerrySigningUtils : public QObject
 
48
{
 
49
    Q_OBJECT
 
50
 
 
51
public:
 
52
    static BlackBerrySigningUtils &instance();
 
53
 
 
54
    bool hasRegisteredKeys();
 
55
    bool hasLegacyKeys();
 
56
    bool hasDefaultCertificate();
 
57
 
 
58
    QString cskPassword();
 
59
    QString certificatePassword();
 
60
 
 
61
    const BlackBerryCertificate *defaultCertificate() const;
 
62
 
 
63
    void openDefaultCertificate();
 
64
    void setDefaultCertificate(BlackBerryCertificate *certificate);
 
65
    void clearCskPassword();
 
66
    void clearCertificatePassword();
 
67
    void deleteDefaultCertificate();
 
68
 
 
69
signals:
 
70
    void defaultCertificateLoaded(int status);
 
71
 
 
72
private slots:
 
73
    void certificateLoaded(int status);
 
74
 
 
75
private:
 
76
    Q_DISABLE_COPY(BlackBerrySigningUtils)
 
77
 
 
78
    BlackBerrySigningUtils(QObject *parent = 0);
 
79
 
 
80
    QString promptPassword(const QString &message) const;
 
81
 
 
82
    BlackBerryCertificate *m_defaultCertificate;
 
83
 
 
84
    QString m_cskPassword;
 
85
    QString m_certificatePassword;
 
86
};
 
87
 
 
88
} // namespace Internal
 
89
} // namespace Qnx
 
90
 
 
91
#endif // QNX_INTERNAL_BLACKBERRYSIGNINGUTILS_H