30 lines
741 B
C++
30 lines
741 B
C++
#ifndef OLLIE_RUNNER_H
|
|
#define OLLIE_RUNNER_H
|
|
|
|
#include <KRunner/AbstractRunner>
|
|
#include <KRunner/RunnerContext>
|
|
#include <KRunner/QueryMatch>
|
|
#include <QProcess>
|
|
|
|
namespace RunnerNS = KRunner;
|
|
|
|
class OllieRunner : public RunnerNS::AbstractRunner
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
OllieRunner(QObject *parent, const KPluginMetaData &data);
|
|
|
|
void match(RunnerNS::RunnerContext &context) override;
|
|
void run(const RunnerNS::RunnerContext &context, const RunnerNS::QueryMatch &match) override;
|
|
|
|
private:
|
|
QByteArray run9p(const QStringList &args);
|
|
void write9p(const QString &path, const QByteArray &data);
|
|
QString serverAddr();
|
|
QStringList listSessions();
|
|
void killSession(const QString &id);
|
|
};
|
|
|
|
#endif // OLLIE_RUNNER_H
|