diff options
author | Christian Kandeler <christian.kandeler@nokia.com> | 2012-08-01 16:26:27 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-08-02 10:36:04 +0200 |
commit | 753c62d75e73b101e485decebcf2f33d28b8f87e (patch) | |
tree | abf34e205130db9fcd66d7fb2b66606dfd8bf6dd /src/plugins/remotelinux/linuxdevice.h | |
parent | ac8150624a5dcd1e681e6373e812201cd0725d33 (diff) | |
download | qt-creator-753c62d75e73b101e485decebcf2f33d28b8f87e.tar.gz |
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.h | 14 |
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() {} |