2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2009-11-27 16:40:07 +01:00
|
|
|
**
|
2013-01-28 17:12:19 +01:00
|
|
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2011-02-17 17:53:52 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2009-11-27 16:40:07 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2009-11-27 16:40:07 +01:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, 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.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2009-11-27 16:40:07 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2012-07-27 13:31:13 +02:00
|
|
|
|
2011-05-31 12:47:53 +02:00
|
|
|
#ifndef LINUXDEVICECONFIGURATION_H
|
|
|
|
|
#define LINUXDEVICECONFIGURATION_H
|
2009-11-27 16:40:07 +01:00
|
|
|
|
2011-05-31 12:47:53 +02:00
|
|
|
#include "remotelinux_export.h"
|
2009-11-27 16:40:07 +01:00
|
|
|
|
2012-03-06 12:31:42 +01:00
|
|
|
#include <projectexplorer/devicesupport/idevice.h>
|
2009-11-27 16:40:07 +01:00
|
|
|
|
2012-04-06 18:28:16 +02:00
|
|
|
#include <QCoreApplication>
|
|
|
|
|
|
2012-05-18 10:49:35 +02:00
|
|
|
namespace QSsh { class SshConnectionParameters; }
|
|
|
|
|
namespace Utils { class PortList; }
|
2011-05-31 12:47:53 +02:00
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
namespace RemoteLinux {
|
2012-07-27 13:31:13 +02:00
|
|
|
namespace Internal { class LinuxDevicePrivate; }
|
2009-11-27 16:40:07 +01:00
|
|
|
|
2012-08-01 16:26:27 +02:00
|
|
|
class REMOTELINUX_EXPORT LinuxDeviceProcessSupport : public ProjectExplorer::DeviceProcessSupport
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString killProcessByPidCommandLine(int pid) const;
|
|
|
|
|
QString killProcessByNameCommandLine(const QString &filePath) const;
|
|
|
|
|
};
|
|
|
|
|
|
2012-07-27 13:31:13 +02:00
|
|
|
class REMOTELINUX_EXPORT LinuxDevice : public ProjectExplorer::IDevice
|
2009-11-27 16:40:07 +01:00
|
|
|
{
|
2012-07-27 13:31:13 +02:00
|
|
|
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::LinuxDevice)
|
2012-07-26 23:29:00 +02:00
|
|
|
|
2009-11-27 16:40:07 +01:00
|
|
|
public:
|
2012-07-27 13:31:13 +02:00
|
|
|
typedef QSharedPointer<LinuxDevice> Ptr;
|
|
|
|
|
typedef QSharedPointer<const LinuxDevice> ConstPtr;
|
2011-06-09 17:17:01 +02:00
|
|
|
|
2012-03-02 18:09:59 +01:00
|
|
|
static Ptr create();
|
2012-05-16 10:46:21 +02:00
|
|
|
static Ptr create(const QString &name, Core::Id type, MachineType machineType,
|
2012-04-25 09:54:31 +02:00
|
|
|
Origin origin = ManuallyAdded, Core::Id id = Core::Id());
|
2012-03-06 12:31:42 +01:00
|
|
|
|
2012-04-06 18:28:16 +02:00
|
|
|
QString displayType() const;
|
|
|
|
|
ProjectExplorer::IDeviceWidget *createWidget();
|
2012-05-01 19:07:55 +02:00
|
|
|
QList<Core::Id> actionIds() const;
|
|
|
|
|
QString displayNameForActionId(Core::Id actionId) const;
|
2012-05-05 11:03:10 +02:00
|
|
|
void executeAction(Core::Id actionId, QWidget *parent) const;
|
2012-03-06 12:31:42 +01:00
|
|
|
ProjectExplorer::IDevice::Ptr clone() const;
|
2012-04-02 15:33:49 +02:00
|
|
|
|
2012-08-01 16:26:27 +02:00
|
|
|
ProjectExplorer::DeviceProcessSupport::Ptr processSupport() const;
|
|
|
|
|
ProjectExplorer::PortsGatheringMethod::Ptr portsGatheringMethod() const;
|
2012-08-03 09:56:39 +02:00
|
|
|
bool canCreateProcessModel() const { return true; }
|
2012-08-02 14:45:27 +02:00
|
|
|
ProjectExplorer::DeviceProcessList *createProcessListModel(QObject *parent) const;
|
2012-07-26 17:41:52 +02:00
|
|
|
|
2012-04-02 15:33:49 +02:00
|
|
|
protected:
|
2012-07-27 13:31:13 +02:00
|
|
|
LinuxDevice() {}
|
|
|
|
|
LinuxDevice(const QString &name, Core::Id type,
|
2012-07-25 17:10:20 +02:00
|
|
|
MachineType machineType, Origin origin, Core::Id id);
|
2012-07-27 13:31:13 +02:00
|
|
|
LinuxDevice(const LinuxDevice &other);
|
2011-01-13 13:49:23 +01:00
|
|
|
|
2012-04-02 15:33:49 +02:00
|
|
|
private:
|
2012-07-27 13:31:13 +02:00
|
|
|
LinuxDevice &operator=(const LinuxDevice &);
|
2009-12-23 10:53:57 +01:00
|
|
|
};
|
|
|
|
|
|
2011-05-25 11:23:25 +02:00
|
|
|
} // namespace RemoteLinux
|
2009-11-27 16:40:07 +01:00
|
|
|
|
2011-05-31 12:47:53 +02:00
|
|
|
#endif // LINUXDEVICECONFIGURATION_H
|