static gboolean fake_network_monitor_initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { FakeNetworkMonitor *self = FAKE_NETWORK_MONITOR (initable); if (self->proxy != NULL) return TRUE; self->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL, "net.connman", "/", "net.connman.Manager", cancellable, error); if (self->proxy == NULL) return FALSE; tp_g_signal_connect_object (self->proxy, "g-signal", G_CALLBACK (fake_network_monitor_dbus_signal_cb), self, 0); g_dbus_proxy_call (self->proxy, "GetProperties", NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, fake_network_monitor_get_properties_cb, tp_weak_ref_new (self, NULL, NULL)); return TRUE; }
static void empathy_app_plugin_widget_constructed (GObject *object) { EmpathyAppPluginWidget *self = EMPATHY_APP_PLUGIN_WIDGET (object); void (*chain_up) (GObject *) = ((GObjectClass *) empathy_app_plugin_widget_parent_class)->constructed; GtkWidget *top; TpAccountManager *manager; if (chain_up != NULL) chain_up (object); g_assert (AG_IS_ACCOUNT (self->priv->account)); /* Top bar */ top = create_top_bar (self); gtk_widget_show (top); gtk_box_pack_start (GTK_BOX (self), top, FALSE, FALSE, 0); /* Prepare tp's account manager to find the TpAccount corresponding to our * AgAccount */ manager = tp_account_manager_dup (); tp_proxy_prepare_async (manager, NULL, manager_prepared_cb, tp_weak_ref_new (self, NULL, NULL)); g_object_unref (manager); }
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)); }