WIP: main

This commit is contained in:
driftingsun 2020-12-26 15:03:51 +03:00
parent f25f34565a
commit 15730b470e
52 changed files with 2438 additions and 208 deletions

View file

@ -0,0 +1,24 @@
#include "defines.h"
#include "localserver.h"
#include "systemservice.h"
SystemService::SystemService(int argc, char **argv)
: QtService<QCoreApplication>(argc, argv, SERVICE_NAME)
{
setServiceDescription("Service for AmneziaVPN");
}
void SystemService::start()
{
QCoreApplication* app = application();
m_localServer = new LocalServer(SERVICE_NAME);
if (!m_localServer->isRunning()) {
app->quit();
}
}
void SystemService::stop()
{
delete m_localServer;
}