summaryrefslogtreecommitdiffstats
path: root/test/glib/test-service-glib.c
blob: cad6f168768fe33a28d9b480102f50b4ce6205c3 (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
31
32
33
34
35
/* -*- mode: C; c-file-style: "gnu" -*- */
#include <dbus/dbus-glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static GMainLoop *loop;

int
main (int argc, char **argv)
{
  DBusGConnection *connection;
  GError *error;
  
  g_type_init ();
  
  loop = g_main_loop_new (NULL, FALSE);

  error = NULL;
  connection = dbus_g_bus_get (DBUS_BUS_STARTER,
                               &error);
  if (connection == NULL)
    {
      g_printerr ("Failed to open connection to bus: %s\n",
                  error->message);
      g_error_free (error);
      exit (1);
    }

  
  
  g_print ("Successfully completed %s\n", argv[0]);
  
  return 0;
}