static void indicator_workrave_create_dbus(IndicatorWorkrave *self) { IndicatorWorkravePrivate *priv = INDICATOR_WORKRAVE_GET_PRIVATE(self); GSettings *settings = g_settings_new("org.workrave.gui"); gboolean autostart = g_settings_get_boolean(settings, "autostart"); g_object_unref(settings); GDBusProxyFlags flags = autostart ? : G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START; priv->workrave_ui_proxy_cancel = g_cancellable_new(); g_dbus_proxy_new_for_bus(G_BUS_TYPE_SESSION, flags, NULL, WORKRAVE_INDICATOR_SERVICE_NAME, WORKRAVE_INDICATOR_SERVICE_OBJ, WORKRAVE_INDICATOR_SERVICE_IFACE, priv->workrave_ui_proxy_cancel, on_dbus_ui_ready, self); priv->workrave_core_proxy_cancel = g_cancellable_new(); g_dbus_proxy_new_for_bus(G_BUS_TYPE_SESSION, flags, NULL, WORKRAVE_INDICATOR_CORE_NAME, WORKRAVE_INDICATOR_CORE_OBJ, WORKRAVE_INDICATOR_CORE_IFACE, priv->workrave_core_proxy_cancel, on_dbus_core_ready, self); }
static void add_location (CcPrivacyPanel *self) { CcPrivacyPanelPrivate *priv = self->priv; GtkWidget *w; GtkWidget *dialog; priv->location_label = gtk_label_new (""); update_location_label (self); add_row (self, _("Location Services"), "location_dialog", priv->location_label); dialog = priv->location_dialog; g_signal_connect (dialog, "delete-event", G_CALLBACK (gtk_widget_hide_on_delete), NULL); w = GTK_WIDGET (gtk_builder_get_object (priv->builder, "location_services_switch")); g_settings_bind (priv->location_settings, LOCATION_ENABLED, w, "active", G_SETTINGS_BIND_DEFAULT); priv->location_app_switches = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.GeoClue2", "/org/freedesktop/GeoClue2/Manager", "org.freedesktop.GeoClue2.Manager", priv->cancellable, on_gclue_manager_ready, self); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.impl.portal.PermissionStore", "/org/freedesktop/impl/portal/PermissionStore", "org.freedesktop.impl.portal.PermissionStore", priv->cancellable, on_perm_store_ready, self); }
static void impl_activate (PeasActivatable *plugin) { TotemImStatusPlugin *pi = TOTEM_IM_STATUS_PLUGIN (plugin); TotemObject *totem; pi->priv->cancellable = g_cancellable_new (); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, NULL, "org.gnome.SessionManager", "/org/gnome/SessionManager/Presence", "org.gnome.SessionManager.Presence", pi->priv->cancellable, (GAsyncReadyCallback) got_proxy_cb, pi); g_object_get (plugin, "object", &totem, NULL); pi->priv->handler_id_fullscreen = g_signal_connect (G_OBJECT (totem), "notify::fullscreen", G_CALLBACK (property_notify_cb), pi); pi->priv->handler_id_playing = g_signal_connect (G_OBJECT (totem), "notify::playing", G_CALLBACK (property_notify_cb), pi); g_object_unref (totem); }
static void device_proxy_new_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GUPnPNetworkManager *manager; GDBusProxy *device_proxy; NMDevice *nm_device = NULL; NMDeviceType type; GVariant *value; GError *error; error = NULL; device_proxy = g_dbus_proxy_new_for_bus_finish (res, &error); if (G_UNLIKELY (error != NULL)) { if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) g_message ("Failed to create D-Bus proxy: %s", error->message); g_error_free (error); goto done; } manager = GUPNP_NETWORK_MANAGER (user_data); value = g_dbus_proxy_get_cached_property (device_proxy, "DeviceType"); if (G_UNLIKELY (value == NULL)) { goto done; } if (G_UNLIKELY (!g_variant_is_of_type (value, G_VARIANT_TYPE_UINT32))) { g_variant_unref (value); goto done; } type = g_variant_get_uint32 (value); g_variant_unref (value); nm_device = nm_device_new (manager, device_proxy); if (type == NM_DEVICE_TYPE_WIFI) { const char *path; path = g_dbus_proxy_get_object_path (nm_device->proxy); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, DBUS_SERVICE_NM, path, WIFI_INTERFACE, manager->priv->cancellable, wifi_proxy_new_cb, nm_device_ref (nm_device)); } else use_new_device (manager, nm_device); done: g_clear_pointer (&nm_device, (GDestroyNotify) nm_device_unref); g_clear_object (&device_proxy); }
/* Ideally this should live in PackageKit (fdo #45741) */ void empathy_pkg_kit_install_packages_async ( guint xid, const gchar **packages, const gchar *options, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { InstallCtx *ctx; GSimpleAsyncResult *result; result = g_simple_async_result_new (NULL, callback, user_data, empathy_pkg_kit_install_packages_async); ctx = install_ctx_new (xid, packages, options != NULL ? options : "", result, cancellable); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.PackageKit", "/org/freedesktop/PackageKit", "org.freedesktop.PackageKit.Modify", NULL, pkg_kit_proxy_new_cb, ctx); g_object_unref (result); }
static void on_get_client_ready (GObject *source_object, GAsyncResult *res, gpointer user_data) { GDBusProxy *manager = G_DBUS_PROXY (source_object); GVariant *results; const char *client_path; GError *error = NULL; results = g_dbus_proxy_call_finish (manager, res, &error); if (results == NULL) { g_critical ("Failed to connect to GeoClue2 service: %s", error->message); exit (-2); } g_assert (g_variant_n_children (results) > 0); g_variant_get_child (results, 0, "&o", &client_path); g_print ("Client object: %s\n", client_path); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.GeoClue2", client_path, "org.freedesktop.GeoClue2.Client", NULL, on_client_proxy_ready, manager); g_variant_unref (results); }
static void on_client_registered (GObject *source_object, GAsyncResult *res, gpointer user_data) { GVariant *variant; GError *error = NULL; gchar *object_path = NULL; variant = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), res, &error); if (error != NULL) { g_warning ("Unable to register client: %s", error->message); g_error_free (error); } else { g_variant_get (variant, "(o)", &object_path); g_debug ("Registered client at path %s", object_path); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, 0, NULL, GNOME_SESSION_DBUS_NAME, object_path, GNOME_SESSION_CLIENT_PRIVATE_DBUS_INTERFACE, NULL, got_client_proxy, manager); g_free (object_path); g_variant_unref (variant); } }
DBusScreenSaverInterface::DBusScreenSaverInterface() : proxyDBusDaemon(0), proxyScreenSaver(0), screenSaver(0), dbusDaemon {"org.freedesktop.DBus", "org.freedesktop.DBus", "/", "org.freedesktop.DBus.GetNameOwner"}, gnomeScreenSaver {"org.gnome.ScreenSaver", "org.gnome.ScreenSaver", "/", "org.gnome.ScreenSaver.SimulateUserActivity"}, kdeScreenSaver {"org.freedesktop.ScreenSaver", "org.freedesktop.ScreenSaver", "/ScreenSaver", "org.freedesktop.ScreenSaver.SimulateUserActivity"} { g_dbus_proxy_new_for_bus(G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL, // GDBusInterfaceInfo* dbusDaemon.bus_name, dbusDaemon.object_path, dbusDaemon.interface_name, NULL, // GCancellable* &wrapper<DBusScreenSaverInterface, &DBusScreenSaverInterface::finishProxyDBusDaemonNew>, this); }
static void _fcitx_client_create_ic(FcitxClient *self) { if (self->priv->cancellable) { g_cancellable_cancel (self->priv->cancellable); g_object_unref (self->priv->cancellable); self->priv->cancellable = NULL; } if (self->priv->improxy) { g_object_unref(self->priv->improxy); self->priv->improxy = NULL; } if (self->priv->icproxy) { g_object_unref(self->priv->icproxy); self->priv->icproxy = NULL; } self->priv->cancellable = g_cancellable_new (); g_dbus_proxy_new_for_bus( G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, _fcitx_client_get_interface_info(), self->priv->servicename, FCITX_IM_DBUS_PATH, FCITX_IM_DBUS_INTERFACE, self->priv->cancellable, _fcitx_client_create_ic_phase1_finished, self ); };
/** * cd_profile_connect: * @profile: a #CdProfile instance. * @cancellable: a #GCancellable, or %NULL * @callback: the function to run on completion * @user_data: the data to pass to @callback * * Connects to the object and fills up initial properties. * * Since: 0.1.8 **/ void cd_profile_connect (CdProfile *profile, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { CdProfilePrivate *priv = GET_PRIVATE (profile); GTask *task = NULL; g_return_if_fail (CD_IS_PROFILE (profile)); g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable)); task = g_task_new (profile, cancellable, callback, user_data); /* already connected */ if (priv->proxy != NULL) { g_task_return_boolean (task, TRUE); return; } g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, COLORD_DBUS_SERVICE, priv->object_path, COLORD_DBUS_INTERFACE_PROFILE, cancellable, cd_profile_connect_cb, task); }
static void name_appeared_cb (GDBusConnection *connection, const gchar *name, const gchar *name_owner, TotemMediaPlayerKeysPlugin *pi) { GCancellable *cancellable; cancellable = g_cancellable_new (); pi->priv->cancellable_init = cancellable; g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, NULL, "org.gnome.SettingsDaemon", "/org/gnome/SettingsDaemon/MediaKeys", "org.gnome.SettingsDaemon.MediaKeys", cancellable, (GAsyncReadyCallback) got_proxy_cb, g_object_ref (pi)); /* GDBus keeps a reference throughout the async call */ g_object_unref (cancellable); }
static void interface_add (NMSupplicantInterface *self, gboolean is_wireless) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); /* Can only start the interface from INIT state */ g_return_if_fail (priv->state == NM_SUPPLICANT_INTERFACE_STATE_INIT); nm_log_dbg (LOGD_SUPPLICANT, "(%s): adding interface to supplicant", priv->dev); priv->is_wireless = is_wireless; /* Move to starting to prevent double-calls of interface_add() */ set_state (self, NM_SUPPLICANT_INTERFACE_STATE_STARTING); g_warn_if_fail (priv->init_cancellable == NULL); g_clear_object (&priv->init_cancellable); priv->init_cancellable = g_cancellable_new (); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, NULL, WPAS_DBUS_SERVICE, WPAS_DBUS_PATH, WPAS_DBUS_INTERFACE, priv->init_cancellable, (GAsyncReadyCallback) on_wpas_proxy_acquired, self); }
static void on_client_signal (GDBusProxy *client, gchar *sender_name, gchar *signal_name, GVariant *parameters, gpointer user_data) { char *location_path; if (g_strcmp0 (signal_name, "LocationUpdated") != 0) return; g_assert (g_variant_n_children (parameters) > 1); g_variant_get_child (parameters, 1, "&o", &location_path); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.GeoClue2", location_path, "org.freedesktop.GeoClue2.Location", NULL, on_location_proxy_ready, user_data); g_object_unref (client); }
static void indicator_workrave_init(IndicatorWorkrave *self) { self->priv = INDICATOR_WORKRAVE_GET_PRIVATE(self); IndicatorWorkravePrivate *priv = INDICATOR_WORKRAVE_GET_PRIVATE(self); priv->label = NULL; priv->image = NULL; // self->priv->sm = NULL; priv->menu = NULL; priv->workrave_proxy = NULL; priv->workrave_proxy_cancel = NULL; priv->owner_id = 0; priv->watch_id = 0; priv->alive = FALSE; priv->timer = 0; priv->timerbox = NULL; priv->update_count = 0; // self->priv->sm = indicator_service_manager_new_version(WORKRAVE_INDICATOR_SERVICE_NAME, WORKRAVE_INDICATOR_SERVICE_VERSION); priv->menu = dbusmenu_gtkmenu_new(WORKRAVE_INDICATOR_MENU_NAME, WORKRAVE_INDICATOR_MENU_OBJ); priv->timerbox = g_object_new(WORKRAVE_TYPE_TIMERBOX, NULL); priv->workrave_proxy_cancel = g_cancellable_new(); g_dbus_proxy_new_for_bus(G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, WORKRAVE_INDICATOR_SERVICE_NAME, WORKRAVE_INDICATOR_SERVICE_OBJ, WORKRAVE_INDICATOR_SERVICE_IFACE, priv->workrave_proxy_cancel, on_dbus_ready, self); }
static void on_wifi_device_activated (NMDevice *nm_device) { GVariant *value; const char *ap_path; value = g_dbus_proxy_get_cached_property (nm_device->wifi_proxy, "ActiveAccessPoint"); if (G_UNLIKELY (value == NULL)) return; if (G_UNLIKELY (!g_variant_is_of_type (value, G_VARIANT_TYPE_OBJECT_PATH))) { g_variant_unref (value); return; } ap_path = g_variant_get_string (value, NULL); if (G_UNLIKELY (ap_path == NULL)) create_context_for_device (nm_device); else { g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, DBUS_SERVICE_NM, ap_path, AP_INTERFACE, nm_device->manager->priv->cancellable, ap_proxy_new_cb, nm_device); } g_variant_unref (value); }
static void got_session_path_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GVariant *result; GError *error = NULL; GnomeSettingsSession *session = GNOME_SETTINGS_SESSION (user_data); result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), res, &error); if (result == NULL) { g_warning ("Failed to get session for pid: %s", error->message); g_error_free (error); return; } g_variant_get (result, "(o)", &session->priv->session_id); g_debug ("ConsoleKit session ID: %s", session->priv->session_id); /* connect to session */ g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL, CONSOLEKIT_NAME, session->priv->session_id, CONSOLEKIT_SESSION_INTERFACE, session->priv->cancellable, got_session_proxy_cb, session); g_variant_unref (result); }
static void get_next_discover_info (struct DiscoverData *data) { g_clear_object (&(data->cur_proxy)); if (g_variant_iter_next (data->object_paths, "&o", &(data->cur_path))) { g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, 0, NULL, "org.freedesktop.realmd", data->cur_path, "org.freedesktop.realmd.Realm", NULL, on_proxy_ready_for_discover_info, data); } else { cockpit_realms_complete_discover (COCKPIT_REALMS (data->realms), data->invocation, data->name? data->name : "", g_variant_builder_end (&(data->all_details))); g_variant_iter_free (data->object_paths); g_free (data); } }
static void on_manager_signal (GDBusProxy *proxy, char *sender_name, char *signal_name, GVariant *parameters, gpointer user_data) { GUPnPNetworkManager *manager; manager = GUPNP_NETWORK_MANAGER (user_data); if (g_strcmp0 (signal_name, "DeviceAdded") == 0) { char *device_path = NULL; g_variant_get_child (parameters, 0, "o", &device_path); if (G_UNLIKELY (device_path == NULL)) return; g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, DBUS_SERVICE_NM, device_path, DEVICE_INTERFACE, manager->priv->cancellable, device_proxy_new_cb, manager); g_free (device_path); } else if (g_strcmp0 (signal_name, "DeviceRemoved") == 0) { GList *device_node; NMDevice *nm_device; GUPnPNetworkManagerPrivate *priv; char *device_path = NULL; g_variant_get_child (parameters, 0, "o", &device_path); if (G_UNLIKELY (device_path == NULL)) return; priv = manager->priv; device_node = g_list_find_custom ( priv->nm_devices, device_path, (GCompareFunc) compare_device_path); if (G_UNLIKELY (device_node == NULL)) { g_free (device_path); return; } nm_device = (NMDevice *) device_node->data; priv->nm_devices = g_list_remove (priv->nm_devices, nm_device); nm_device_free (nm_device); g_free (device_path); } }
static void manager_constructed (GObject *object) { Manager *manager = MANAGER (object); GError *error = NULL; gs_unref_object GFile *etc_os_release = g_file_new_for_path ("/etc/os-release"); gs_free gchar *hostname; manager->etc_os_release_monitor = g_file_monitor (etc_os_release, G_FILE_MONITOR_NONE, NULL, &error); if (!manager->etc_os_release_monitor) { g_warning ("Error monitoring /etc/os-release: %s", error->message); g_error_free (error); } else { g_signal_connect (manager->etc_os_release_monitor, "changed", G_CALLBACK (on_etc_os_release_changed), manager); reread_os_release (manager); } hostname = g_malloc0 (HOST_NAME_MAX + 1); gethostname (hostname, HOST_NAME_MAX); hostname[HOST_NAME_MAX] = '\0'; cockpit_manager_set_hostname (COCKPIT_MANAGER (manager), hostname); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, NULL, /* GDBusInterfaceInfo* */ "org.freedesktop.hostname1", "/org/freedesktop/hostname1", "org.freedesktop.hostname1", manager->cancellable, on_hostname_proxy_ready, g_object_ref (manager)); update_dmi (manager); error = NULL; gs_unref_object GFile *f = g_file_new_for_path ("/run/systemd/shutdown/scheduled"); manager->systemd_shutdown_schedule_monitor = g_file_monitor_file (f, 0, NULL, &error); if (error) { g_warning ("Can't watch: %s", error->message); g_error_free (error); } else { g_signal_connect (manager->systemd_shutdown_schedule_monitor, "changed", G_CALLBACK (on_systemd_shutdown_scheduled_changed), manager); } if (G_OBJECT_CLASS (manager_parent_class)->constructed != NULL) G_OBJECT_CLASS (manager_parent_class)->constructed (object); }
static void screensaver_init_dbus (ScreenSaver * screensaver) { g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL, GS_SERVICE, GS_PATH, GS_INTERFACE, NULL, screensaver_dbus_proxy_new_cb, screensaver); }
nsresult uGlobalMenuService::Init() { nsresult rv = uWidgetAtoms::RegisterAtoms(); if (NS_FAILED(rv)) { NS_WARNING("Failed to register atoms"); return rv; } mCancellable = g_cancellable_new(); g_dbus_proxy_new_for_bus(G_BUS_TYPE_SESSION, static_cast<GDBusProxyFlags>( G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS | G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START), NULL, "com.canonical.AppMenu.Registrar", "/com/canonical/AppMenu/Registrar", "com.canonical.AppMenu.Registrar", mCancellable, ProxyCreatedCallback, NULL); mWMListener = new Listener(); rv = mWMListener->Init(); if (NS_FAILED(rv)) { NS_WARNING("Failed to initialize window mediator listener"); return rv; } // Bootstrapped addons may initialize the stylesheet service before our // extension chrome is registered. To workaround this, we manually register // our UA stylesheet if it isn't already registered // see https://launchpad.net/bugs/1017247 nsCOMPtr<nsIStyleSheetService> sss = do_GetService("@mozilla.org/content/style-sheet-service;1"); if (!sss) { NS_WARNING("No style sheet service"); return NS_OK; } nsCOMPtr<nsIURI> uri; rv = NS_NewURI(getter_AddRefs(uri), NS_LITERAL_CSTRING("chrome://globalmenu/content/ua-overrides.css")); if (NS_SUCCEEDED(rv) && uri) { bool registered; sss->SheetRegistered(uri, nsIStyleSheetService::AGENT_SHEET, ®istered); if (!registered) { sss->LoadAndRegisterSheet(uri, nsIStyleSheetService::AGENT_SHEET); } } return NS_OK; }
static void cm_service_add (GUPnPConnmanManager *manager, GVariant *dict, gchar *path, guint port) { CMServiceState new_state; CMService *cm_service; GVariant *eth; gchar *iface; gchar *name; gchar *state; iface = NULL; name = NULL; g_variant_lookup (dict, "Name", "s", &name); eth = g_variant_lookup_value (dict, "Ethernet", G_VARIANT_TYPE_VARDICT); if (eth != NULL) { g_variant_lookup (eth, "Interface", "s", &iface); g_variant_unref (eth); } new_state = CM_SERVICE_STATE_INACTIVE; if (g_variant_lookup (dict, "State", "&s", &state) != FALSE) if ((g_strcmp0 (state, "online") == 0) || (g_strcmp0 (state, "ready") == 0)) new_state = CM_SERVICE_STATE_ACTIVE; cm_service = cm_service_new (manager, NULL); cm_service->name = name; cm_service->iface = iface; cm_service->port = port; cm_service->current = new_state; g_hash_table_insert (manager->priv->cm_services, g_strdup (path), cm_service); cm_service->cancellable = g_cancellable_new (); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, NULL, CM_DBUS_CONNMAN_NAME, path, CM_DBUS_SERVICE_INTERFACE, cm_service->cancellable, service_proxy_new_cb, manager); }
static void setup_network_monitor (VinoUpnp *upnp) { g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, NULL, NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, NULL, proxy_created, g_object_ref (upnp)); }
static void empathy_webcredentials_monitor_init (EmpathyWebcredentialsMonitor *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, EMPATHY_TYPE_WEBCREDENTIALS_MONITOR, EmpathyWebcredentialsMonitorPriv); self->priv->failures = g_ptr_array_new_with_free_func (g_object_unref); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, WEBCRED_BUS_NAME, WEBCRED_PATH, WEBCRED_IFACE, NULL, proxy_new_cb, tp_weak_ref_new (self, NULL, NULL)); }
static void nm_sleep_monitor_init (NMSleepMonitor *self) { self->inhibit_fd = -1; g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL, SUSPEND_DBUS_NAME, SUSPEND_DBUS_PATH, SUSPEND_DBUS_INTERFACE, NULL, (GAsyncReadyCallback) on_proxy_acquired, self); }
static void connman_appeared_cb(GDBusConnection *conn, const gchar *name, const gchar *name_owner, gpointer user_data) { struct ofono_wan_data *od = user_data; g_message("connman dbus service available"); g_dbus_proxy_new_for_bus(G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL, "net.connman", "/", "net.connman.Manager", NULL, (GAsyncReadyCallback) connman_manager_proxy_connect_cb, od); }
void csd_ldsm_show_empty_trash (void) { /* prepare the Nemo proxy object */ g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.Nemo", "/org/Nemo", "org.Nemo.FileOperations", NULL, nemo_proxy_ready_cb, NULL); }
static void update_service (Services *services, const gchar *object_path) { g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, 0, NULL, "org.freedesktop.systemd1", object_path, "org.freedesktop.systemd1.Unit", NULL, on_unit_proxy_ready, services); }
static void name_appeared_cb(GDBusConnection *connection, const gchar *name, const gchar *name_owner, con_gnome_media_keys *gmk) { g_dbus_proxy_new_for_bus(G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, NULL, "org.gnome.SettingsDaemon", "/org/gnome/SettingsDaemon/MediaKeys", "org.gnome.SettingsDaemon.MediaKeys", NULL, (GAsyncReadyCallback) got_proxy_cb, gmk); }
static void nm_supplicant_manager_init (NMSupplicantManager *self) { NMSupplicantManagerPrivate *priv = NM_SUPPLICANT_MANAGER_GET_PRIVATE (self); priv->cancellable = g_cancellable_new (); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, WPAS_DBUS_SERVICE, WPAS_DBUS_PATH, WPAS_DBUS_INTERFACE, priv->cancellable, (GAsyncReadyCallback) on_proxy_acquired, self); }