maemosshrunner.h 2.43 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

#ifndef MAEMOSSHRUNNER_H
#define MAEMOSSHRUNNER_H

35
#include "maemomountspecification.h"
36

37
38
39
#include <remotelinux/remotelinuxapplicationrunner.h>

namespace Madde {
40
namespace Internal {
41
class MaemoRemoteMounter;
42
class MaemoRunConfiguration;
43

44
class MaemoSshRunner : public RemoteLinux::AbstractRemoteLinuxApplicationRunner
45
46
47
{
    Q_OBJECT
public:
48
    MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig);
49
50
51
    ~MaemoSshRunner();

signals:
52
    void mountDebugOutput(const QString &output);
53
54

private slots:
55
56
57
    void handleMounted();
    void handleUnmounted();
    void handleMounterError(const QString &errorMsg);
58
59

private:
60
    enum MountState { InactiveMountState, InitialUnmounting, Mounting, Mounted, PostRunUnmounting };
61

62
    bool canRun(QString &whyNot) const;
63
    void doDeviceSetup();
64
65
    void doAdditionalInitialCleanup();
    void doAdditionalInitializations();
66
    void doPostRunCleanup();
67
    void doAdditionalConnectionErrorHandling();
68

69
70
    void mount();
    void unmount();
71

72
    MaemoRemoteMounter * const m_mounter;
73
    QList<MaemoMountSpecification> m_mountSpecs;
74
    MountState m_mountState;
75
    int m_qtId;
76
77
78
};

} // namespace Internal
79
} // namespace Madde
80
81

#endif // MAEMOSSHRUNNER_H