aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/linuxdevice.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2012-08-01 16:26:27 +0200
committerhjk <qthjk@ovi.com>2012-08-02 10:36:04 +0200
commit753c62d75e73b101e485decebcf2f33d28b8f87e (patch)
treeabf34e205130db9fcd66d7fb2b66606dfd8bf6dd /src/plugins/remotelinux/linuxdevice.h
parentac8150624a5dcd1e681e6373e812201cd0725d33 (diff)
Device support: Introduce IDevice helper classes.
These are for configuration of process and ports gathering activities, respectively. This couples related functionality more tightly, while keeping the number of IDevice methods at a reasonable level. For ports gathering, the patch also adds the ability to configure both the command and the parsing function; the latter used to be hardcoded in the PortsGatherer class. Change-Id: I1b8940397a51efa7ddc05dd15cf861777d118c1a Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/remotelinux/linuxdevice.h')
-rw-r--r--src/plugins/remotelinux/linuxdevice.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/remotelinux/linuxdevice.h b/src/plugins/remotelinux/linuxdevice.h
index 3d4a5f7329..60a05c85b8 100644
--- a/src/plugins/remotelinux/linuxdevice.h
+++ b/src/plugins/remotelinux/linuxdevice.h
@@ -43,6 +43,15 @@ namespace Utils { class PortList; }
namespace RemoteLinux {
namespace Internal { class LinuxDevicePrivate; }
+class REMOTELINUX_EXPORT LinuxDeviceProcessSupport : public ProjectExplorer::DeviceProcessSupport
+{
+public:
+ QString listProcessesCommandLine() const;
+ QList<ProjectExplorer::DeviceProcess> buildProcessList(const QString &listProcessesReply) const;
+ QString killProcessByPidCommandLine(int pid) const;
+ QString killProcessByNameCommandLine(const QString &filePath) const;
+};
+
class REMOTELINUX_EXPORT LinuxDevice : public ProjectExplorer::IDevice
{
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::LinuxDevice)
@@ -62,9 +71,8 @@ public:
void executeAction(Core::Id actionId, QWidget *parent) const;
ProjectExplorer::IDevice::Ptr clone() const;
- QString listProcessesCommandLine() const;
- QString killProcessCommandLine(const ProjectExplorer::DeviceProcess &process) const;
- QList<ProjectExplorer::DeviceProcess> buildProcessList(const QString &listProcessesReply) const;
+ ProjectExplorer::DeviceProcessSupport::Ptr processSupport() const;
+ ProjectExplorer::PortsGatheringMethod::Ptr portsGatheringMethod() const;
protected:
LinuxDevice() {}