Files
amnezia-client/ipc/ipcserverprocess.h

56 lines
1.4 KiB
C
Raw Permalink Normal View History

2021-02-02 01:47:40 +03:00
#ifndef IPCSERVERPROCESS_H
#define IPCSERVERPROCESS_H
#include "ipc.h"
2021-02-02 01:47:40 +03:00
#include <QObject>
2021-09-15 08:03:28 -07:00
#ifndef Q_OS_IOS
#include "rep_ipc_process_interface_source.h"
2021-02-02 01:47:40 +03:00
class IpcServerProcess : public IpcProcessInterfaceSource
{
Q_OBJECT
public:
explicit IpcServerProcess(QObject *parent = nullptr);
2021-06-01 18:18:09 +03:00
virtual ~IpcServerProcess();
2021-02-02 01:47:40 +03:00
void start() override;
void terminate() override;
void kill() override;
2021-02-02 01:47:40 +03:00
void close() override;
void setArguments(const QStringList &arguments) override;
void setInputChannelMode(QProcess::InputChannelMode mode) override;
void setNativeArguments(const QString &arguments) override;
void setProcessChannelMode(QProcess::ProcessChannelMode mode) override;
2022-08-10 22:15:00 +03:00
void setProgram(int programId) override;
2021-02-02 01:47:40 +03:00
void setWorkingDirectory(const QString &dir) override;
2021-06-12 11:59:36 +03:00
QByteArray readAll() override;
2021-02-02 01:47:40 +03:00
QByteArray readAllStandardError() override;
QByteArray readAllStandardOutput() override;
bool waitForStarted() override;
bool waitForStarted(int msecs) override;
bool waitForFinished() override;
bool waitForFinished(int msecs) override;
2021-02-02 01:47:40 +03:00
signals:
private:
amnezia::PermittedProcess m_program = amnezia::PermittedProcess::Invalid;
2021-02-02 01:47:40 +03:00
QSharedPointer<QProcess> m_process;
};
2021-09-15 08:03:28 -07:00
#else
class IpcServerProcess : public QObject
{
Q_OBJECT
public:
explicit IpcServerProcess(QObject *parent = nullptr);
};
#endif
2021-02-02 01:47:40 +03:00
#endif // IPCSERVERPROCESS_H