GDesktopAppInfo: rewrite content type code
[platform/upstream/glib.git] / gio / tests / gdbus-example-unix-fd-client.c
index 6a66431..e3ab015 100644 (file)
@@ -1,16 +1,3 @@
-/*
- * Copyright © 2010 Red Hat, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2 of the licence or (at
- * your option) any later version.
- *
- * See the included COPYING file for more information.
- *
- * Author: David Zeuthen <davidz@redhat.com>
- */
-
 #include <string.h>
 #include <stdlib.h>
 
@@ -20,6 +7,7 @@
 #include <time.h>
 
 #include <gio/gio.h>
+#include <gio/gunixfdlist.h>
 
 /* see gdbus-example-server.c for the server implementation */
 static gint
@@ -42,6 +30,7 @@ get_server_stdout (GDBusConnection  *connection,
                                                         "GimmeStdout");
   method_reply_message = g_dbus_connection_send_message_with_reply_sync (connection,
                                                                          method_call_message,
+                                                                         G_DBUS_SEND_MESSAGE_FLAGS_NONE,
                                                                          -1,
                                                                          NULL, /* out_serial */
                                                                          NULL, /* cancellable */
@@ -49,7 +38,7 @@ get_server_stdout (GDBusConnection  *connection,
   if (method_reply_message == NULL)
       goto out;
 
-  if (g_dbus_message_get_type (method_reply_message) == G_DBUS_MESSAGE_TYPE_ERROR)
+  if (g_dbus_message_get_message_type (method_reply_message) == G_DBUS_MESSAGE_TYPE_ERROR)
     {
       g_dbus_message_to_gerror (method_reply_message, error);
       goto out;
@@ -127,8 +116,6 @@ main (int argc, char *argv[])
   guint watcher_id;
   GMainLoop *loop;
 
-  g_type_init ();
-
   watcher_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
                                  "org.gtk.GDBus.TestServer",
                                  G_BUS_NAME_WATCHER_FLAGS_NONE,