Files
pod7/DBusPOD7Workers.cpp

38 lines
658 B
C++
Raw Normal View History

2017-12-17 17:31:49 +01:00
/*
* File: DBusPOD7Workers.cpp
2022-11-19 16:11:59 +01:00
* Author: Saleem Edah-Tally - nmset@yandex.com
2017-12-17 17:31:49 +01:00
* License : GPL V2
*
* Created on 10 décembre 2017, 14:12
*/
#include "DBusPOD7Workers.h"
#include <signal.h>
#include <thread>
using namespace std;
DBusPOD7Adaptor::DBusPOD7Adaptor(DBus::Connection &connection)
: DBus::ObjectAdaptor(connection, "/pedal/event")
{
thread t(Entry);
t.detach();
}
DBusPOD7Adaptor::~DBusPOD7Adaptor()
{
DBus::default_dispatcher->leave();
}
void DBusPOD7Adaptor::Quit()
{
// Handled in main.cpp
raise(SIGTERM);
}
int DBusPOD7Adaptor::Entry()
{
DBus::default_dispatcher->enter(); // IS BLOCKING
return 0;
}