maemokeydeployer.h 2.12 KB
Newer Older
hjk's avatar
hjk committed
1
/**************************************************************************
2
**
hjk's avatar
hjk committed
3
** This file is part of Qt Creator
4
**
hjk's avatar
hjk committed
5
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
6
**
hjk's avatar
hjk committed
7
** Contact: Nokia Corporation (info@qt.nokia.com)
8
9
**
** GNU Lesser General Public License Usage
hjk's avatar
hjk committed
10
11
12
13
14
15
16
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17
18
**
** In addition, as a special exception, Nokia gives you certain additional
hjk's avatar
hjk committed
19
** rights. These rights are described in the Nokia Qt LGPL Exception
20
21
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
hjk's avatar
hjk committed
22
23
24
25
26
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
27
** If you have questions regarding the use of this file, please contact
Tobias Hunger's avatar
Tobias Hunger committed
28
** Nokia at info@qt.nokia.com.
29
**
hjk's avatar
hjk committed
30
31
**************************************************************************/

32
33
34
35
36
37
#ifndef MAEMOKEYDEPLOYER_H
#define MAEMOKEYDEPLOYER_H

#include <QtCore/QObject>
#include <QtCore/QSharedPointer>

38
namespace Utils {
39
class SshConnectionParameters;
40
41
42
class SshRemoteProcessRunner;
}

43
namespace RemoteLinux {
44
45
46
47
48
49
50
51
52
namespace Internal {

class MaemoKeyDeployer : public QObject
{
    Q_OBJECT
public:
    explicit MaemoKeyDeployer(QObject *parent = 0);
    ~MaemoKeyDeployer();

53
    void deployPublicKey(const Utils::SshConnectionParameters &sshParams,
54
55
56
57
58
59
60
61
62
63
64
65
66
67
        const QString &keyFilePath);
    void stopDeployment();

signals:
    void error(const QString &errorMsg);
    void finishedSuccessfully();

private slots:
    void handleConnectionFailure();
    void handleKeyUploadFinished(int exitStatus);

private:
    void cleanup();

68
    QSharedPointer<Utils::SshRemoteProcessRunner> m_deployProcess;
69
70
71
};

} // namespace Internal
72
} // namespace RemoteLinux
73
74

#endif // MAEMOKEYDEPLOYER_H