~fboucault/qtcreator-plugin-ubuntu/newarch_arm64

« back to all changes in this revision

Viewing changes to src/ubuntu/device/container/containerdevicesignaloperation.h

  • Committer: Benjamin Zeller
  • Date: 2016-06-08 15:09:39 UTC
  • mfrom: (443.2.36 ubuntu)
  • Revision ID: benjamin.zeller@canonical.com-20160608150939-v4ffv2a9xy5lcr5s
LXD rewrite for building and running apps in LXD containers

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef UBUNTU_INTERNAL_CONTAINERDEVICESIGNALOPERATION_H
 
2
#define UBUNTU_INTERNAL_CONTAINERDEVICESIGNALOPERATION_H
 
3
 
 
4
#include "containerdevice.h"
 
5
 
 
6
#include <QProcess>
 
7
 
 
8
namespace Ubuntu {
 
9
namespace Internal {
 
10
 
 
11
class ContainerDeviceSignalOperation : public ProjectExplorer::DeviceProcessSignalOperation
 
12
{
 
13
    Q_OBJECT
 
14
public:
 
15
    ~ContainerDeviceSignalOperation();
 
16
    void killProcess(int pid);
 
17
    void killProcess(const QString &filePath);
 
18
    void interruptProcess(int pid);
 
19
    void interruptProcess(const QString &filePath);
 
20
 
 
21
private:
 
22
    void killProcessSilently(int pid);
 
23
    void interruptProcessSilently(int pid);
 
24
 
 
25
    void appendMsgCannotKill(int pid, const QString &why);
 
26
    void appendMsgCannotInterrupt(int pid, const QString &why);
 
27
 
 
28
protected:
 
29
    explicit ContainerDeviceSignalOperation(ContainerDevice::ConstPtr dev);
 
30
 
 
31
    friend class ContainerDevice;
 
32
 
 
33
    void sendSignal(int pid, int signal);
 
34
protected slots:
 
35
    void processFinished(int exitCode, QProcess::ExitStatus exitState);
 
36
    void processError(QProcess::ProcessError procErr);
 
37
 
 
38
private:
 
39
    ContainerDevice::ConstPtr m_dev;
 
40
};
 
41
 
 
42
} // namespace Internal
 
43
} // namespace Ubuntu
 
44
 
 
45
#endif // UBUNTU_INTERNAL_CONTAINERDEVICESIGNALOPERATION_H