| 78 | |
| 79 | #if !defined(_WIN32) |
| 80 | static GDBusProxy * |
| 81 | ghb_get_dbus_proxy(GBusType type, const gchar *name, const gchar *path, const gchar *interface) |
| 82 | { |
| 83 | GDBusConnection *conn; |
| 84 | GDBusProxy *proxy; |
| 85 | GError *error = NULL; |
| 86 | |
| 87 | ghb_log_func(); |
| 88 | conn = g_bus_get_sync(type, NULL, &error); |
| 89 | if (conn == NULL) |
| 90 | { |
| 91 | if (error != NULL) |
| 92 | { |
| 93 | g_warning("DBUS cannot connect: %s", error->message); |
| 94 | g_error_free(error); |
| 95 | } |
| 96 | return NULL; |
| 97 | } |
| 98 | |
| 99 | proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE, NULL, |
| 100 | name, path, interface, NULL, NULL); |
| 101 | if (proxy == NULL) |
| 102 | g_warning("Could not get DBUS proxy: %s", name); |
| 103 | |
| 104 | g_object_unref(conn); |
| 105 | return proxy; |
| 106 | } |
| 107 | #endif |
| 108 | |
| 109 | static gboolean |
no outgoing calls
no test coverage detected