You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
472 B
32 lines
472 B
2 years ago
|
#include "pep-server.h"
|
||
|
|
||
|
#include "dbus-c++/error.h"
|
||
|
|
||
|
#include <signal.h>
|
||
|
|
||
|
static const char *ASYNC_SERVER_NAME = "security.pep";
|
||
|
|
||
|
DBus::BusDispatcher dispatcher;
|
||
|
|
||
|
void niam(int sig)
|
||
|
{
|
||
|
dispatcher.leave();
|
||
|
}
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
signal(SIGTERM, niam);
|
||
|
signal(SIGINT, niam);
|
||
|
|
||
|
DBus::default_dispatcher = &dispatcher;
|
||
|
|
||
|
DBus::Connection conn = DBus::Connection::SessionBus();
|
||
|
conn.request_name(ASYNC_SERVER_NAME);
|
||
|
|
||
|
pEp::Server server(conn);
|
||
|
|
||
|
dispatcher.enter();
|
||
|
|
||
|
return 0;
|
||
|
}
|