blob: a4dff0b3f72e1b835565a1459558436ae5b34ce0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include <dbus/dbus.h>
#include <stdio.h>
#include "watch.h"
int
main (int argc,
char **argv)
{
DBusConnection *connection;
DBusError error;
DBusMessage *message;
dbus_error_init (&error);
connection = dbus_bus_get (DBUS_BUS_ACTIVATION, &error);
if (connection == NULL)
{
fprintf (stderr, "Failed to open connection to activating message bus: %s\n",
error.message);
dbus_error_free (&error);
return 1;
}
setup_connection (connection);
do_mainloop ();
dbus_connection_unref (connection);
return 0;
}
|