DBus interface in order to connect DBus applications to the p≡p engine.
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.

31 lines
472 B

  1. #include "pep-server.h"
  2. #include "dbus-c++/error.h"
  3. #include <signal.h>
  4. static const char *ASYNC_SERVER_NAME = "security.pep";
  5. DBus::BusDispatcher dispatcher;
  6. void niam(int sig)
  7. {
  8. dispatcher.leave();
  9. }
  10. int main()
  11. {
  12. signal(SIGTERM, niam);
  13. signal(SIGINT, niam);
  14. DBus::default_dispatcher = &dispatcher;
  15. DBus::Connection conn = DBus::Connection::SessionBus();
  16. conn.request_name(ASYNC_SERVER_NAME);
  17. pEp::Server server(conn);
  18. dispatcher.enter();
  19. return 0;
  20. }