Files
amnezia-client/service/server/localserver.h
T

60 lines
1.1 KiB
C++
Raw Normal View History

2020-12-26 15:03:51 +03:00
#ifndef LOCALSERVER_H
#define LOCALSERVER_H
#include <QObject>
2021-01-26 15:01:15 +03:00
#include <QPointer>
2020-12-26 15:03:51 +03:00
#include <QProcess>
2021-01-26 15:01:15 +03:00
#include <QSharedPointer>
2020-12-26 15:03:51 +03:00
#include <QStringList>
#include <QVector>
2021-02-02 01:47:40 +03:00
#include "ipcserver.h"
2020-12-26 15:03:51 +03:00
#include "../../client/daemon/daemonlocalserver.h"
#include "../../client/mozilla/networkwatcher.h"
2023-09-17 17:06:24 -04:00
#ifdef Q_OS_WIN
#include "windows/daemon/windowsdaemon.h"
#endif
2023-09-17 17:06:24 -04:00
#ifdef Q_OS_LINUX
#include "linux/daemon/linuxdaemon.h"
#endif
2023-07-15 14:19:48 -07:00
#ifdef Q_OS_MAC
#include "macos/daemon/macosdaemon.h"
2023-07-15 14:19:48 -07:00
#endif
2020-12-26 15:03:51 +03:00
class QLocalServer;
class QLocalSocket;
class QProcess;
class LocalServer : public QObject
{
Q_OBJECT
public:
2020-12-26 23:17:20 +03:00
explicit LocalServer(QObject* parent = nullptr);
2020-12-26 15:03:51 +03:00
~LocalServer();
2021-01-26 15:01:15 +03:00
QSharedPointer<QLocalServer> m_server;
2021-02-02 01:47:40 +03:00
IpcServer m_ipcServer;
QRemoteObjectHost m_serverNode;
2021-02-03 15:42:36 +03:00
bool m_isRemotingEnabled = false;
NetworkWatcher m_networkWatcher;
2023-09-17 17:06:24 -04:00
#ifdef Q_OS_LINUX
DaemonLocalServer server{qApp};
LinuxDaemon daemon;
#endif
#ifdef Q_OS_WIN
DaemonLocalServer server{qApp};
WindowsDaemon daemon;
#endif
2023-07-15 14:19:48 -07:00
#ifdef Q_OS_MAC
DaemonLocalServer server{qApp};
MacOSDaemon daemon;
2023-07-15 14:19:48 -07:00
#endif
2020-12-26 15:03:51 +03:00
};
#endif // LOCALSERVER_H