forked from ciphrex/mSIGNA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommandserver.h
48 lines (35 loc) · 862 Bytes
/
commandserver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
///////////////////////////////////////////////////////////////////////////////
//
// mSIGNA
//
// commandserver.h
//
// Copyright (c) 2013 Eric Lombrozo
//
// All Rights Reserved.
#pragma once
#include <QObject>
#include <vector>
class QLocalServer;
class CommandServer : public QObject
{
Q_OBJECT
public:
CommandServer(QObject* parent);
~CommandServer();
bool start();
bool stop();
bool processArgs(int argc, char* argv[]);
void uiReady();
signals:
void gotUrl(const QUrl& url);
void gotFile(const QString& fileName);
void gotCommand(const QString& command, const std::vector<QString>& args);
private slots:
void handleConnection();
private:
void emitCommand(const QString& command, const std::vector<QString>& args);
QLocalServer* server;
QString command;
std::vector<QString> args;
};