这篇教程C++ G_DBUS_INTERFACE_SKELETON函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中G_DBUS_INTERFACE_SKELETON函数的典型用法代码示例。如果您正苦于以下问题:C++ G_DBUS_INTERFACE_SKELETON函数的具体用法?C++ G_DBUS_INTERFACE_SKELETON怎么用?C++ G_DBUS_INTERFACE_SKELETON使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了G_DBUS_INTERFACE_SKELETON函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: on_bus_acquiredstatic voidon_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data){ GError *error = NULL; g_debug ("Bus acquired, creating skeleton"); helper = flatpak_system_helper_skeleton_new (); g_object_set_data_full (G_OBJECT(helper), "track-alive", GINT_TO_POINTER(42), skeleton_died_cb); g_dbus_interface_skeleton_set_flags (G_DBUS_INTERFACE_SKELETON (helper), G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD); g_signal_connect (helper, "handle-deploy", G_CALLBACK (handle_deploy), NULL); g_signal_connect (helper, "handle-deploy-appstream", G_CALLBACK (handle_deploy_appstream), NULL); g_signal_connect (helper, "handle-uninstall", G_CALLBACK (handle_uninstall), NULL); g_signal_connect (helper, "handle-install-bundle", G_CALLBACK (handle_install_bundle), NULL); g_signal_connect (helper, "handle-configure-remote", G_CALLBACK (handle_configure_remote), NULL); g_signal_connect (helper, "g-authorize-method", G_CALLBACK (flatpak_authorize_method_handler), NULL); if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (helper), connection, "/org/freedesktop/Flatpak/SystemHelper", &error)) { g_warning ("error: %s/n", error->message); g_error_free (error); }}
开发者ID:anssih,项目名称:flatpak,代码行数:35,
示例2: hev_dbus_object_test_notify_value_handlerstatic void hev_dbus_object_test_notify_value_handler(GObject *obj, GParamSpec *pspec, gpointer user_data){ HevDBusInterfaceTest *self = HEV_DBUS_INTERFACE_TEST(user_data); HevDBusInterfaceTestPrivate *priv = HEV_DBUS_INTERFACE_TEST_GET_PRIVATE(self); GDBusConnection *connection = NULL; const gchar *object_path = NULL; GVariantBuilder *builder = NULL; GVariant *variant = NULL; gchar *p = NULL; g_debug("%s:%d[%s]", __FILE__, __LINE__, __FUNCTION__); connection = g_dbus_interface_skeleton_get_connection(G_DBUS_INTERFACE_SKELETON(self)); object_path = g_dbus_interface_skeleton_get_object_path(G_DBUS_INTERFACE_SKELETON(self)); builder = g_variant_builder_new(G_VARIANT_TYPE_VARDICT); g_object_get(obj, "value", &p, NULL); g_variant_builder_add(builder, "{sv}", "Value", g_variant_new_string(p)); variant = g_variant_builder_end(builder); g_variant_builder_unref(builder); variant = g_variant_new("(@a{sv})", variant); g_free(p); g_dbus_connection_emit_signal(connection, NULL, object_path, "org.freedesktop.DBus.Properties", "PropertiesChanged", variant, NULL); g_variant_unref(variant);}
开发者ID:heiher,项目名称:hev-dbus-test,代码行数:30,
示例3: update_ifacestatic gbooleanupdate_iface (StoragedObject *object, const gchar *uevent_action, StoragedObjectHasInterfaceFunc has_func, StoragedObjectConnectInterfaceFunc connect_func, StoragedObjectUpdateInterfaceFunc update_func, GType skeleton_type, gpointer _interface_pointer){ gboolean ret = FALSE; gboolean has; gboolean add; GDBusInterface **interface_pointer = _interface_pointer; g_return_val_if_fail (object != NULL, FALSE); g_return_val_if_fail (has_func != NULL, FALSE); g_return_val_if_fail (update_func != NULL, FALSE); g_return_val_if_fail (g_type_is_a (skeleton_type, G_TYPE_OBJECT), FALSE); g_return_val_if_fail (g_type_is_a (skeleton_type, G_TYPE_DBUS_INTERFACE), FALSE); g_return_val_if_fail (interface_pointer != NULL, FALSE); g_return_val_if_fail (*interface_pointer == NULL || G_IS_DBUS_INTERFACE (*interface_pointer), FALSE); add = FALSE; has = has_func (object); if (*interface_pointer == NULL) { if (has) { *interface_pointer = g_object_new (skeleton_type, NULL); if (connect_func != NULL) connect_func (object); add = TRUE; } } else { if (!has) { g_dbus_object_skeleton_remove_interface (G_DBUS_OBJECT_SKELETON (object), G_DBUS_INTERFACE_SKELETON (*interface_pointer)); g_object_unref (*interface_pointer); *interface_pointer = NULL; } } if (*interface_pointer != NULL) { if (update_func (object, uevent_action, G_DBUS_INTERFACE (*interface_pointer))) ret = TRUE; if (add) g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), G_DBUS_INTERFACE_SKELETON (*interface_pointer)); } return ret;}
开发者ID:frankzhao,项目名称:storaged,代码行数:56,
示例4: gcal_shell_search_provider_dbus_unexportvoidgcal_shell_search_provider_dbus_unexport (GcalShellSearchProvider *search_provider, GDBusConnection *connection, const gchar *object_path){ GcalShellSearchProviderPrivate *priv = GCAL_SHELL_SEARCH_PROVIDER (search_provider)->priv; if (g_dbus_interface_skeleton_has_connection (G_DBUS_INTERFACE_SKELETON (priv->skel), connection)) g_dbus_interface_skeleton_unexport_from_connection (G_DBUS_INTERFACE_SKELETON (priv->skel), connection);}
开发者ID:fanyui,项目名称:gnome-calendar,代码行数:10,
示例5: ensure_credentials_cbstatic voidensure_credentials_cb (GoaProvider *provider, GAsyncResult *res, gpointer user_data){ EnsureData *data = user_data; gint expires_in; GError *error; error= NULL; if (!goa_provider_ensure_credentials_finish (provider, &expires_in, res, &error)) { /* Set AttentionNeeded only if the error is an authorization error */ if (is_authorization_error (error)) { GoaAccount *account; account = goa_object_peek_account (data->object); if (!goa_account_get_attention_needed (account)) { goa_account_set_attention_needed (account, TRUE); g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (account)); g_message ("%s: Setting AttentionNeeded to TRUE because EnsureCredentials() failed with: %s (%s, %d)", g_dbus_object_get_object_path (G_DBUS_OBJECT (data->object)), error->message, g_quark_to_string (error->domain), error->code); } } g_dbus_method_invocation_return_gerror (data->invocation, error); g_error_free (error); } else { GoaAccount *account; account = goa_object_peek_account (data->object); /* Clear AttentionNeeded flag if set */ if (goa_account_get_attention_needed (account)) { goa_account_set_attention_needed (account, FALSE); g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (account)); g_message ("%s: Setting AttentionNeeded to FALSE because EnsureCredentials() succeded/n", g_dbus_object_get_object_path (G_DBUS_OBJECT (data->object))); } goa_account_complete_ensure_credentials (goa_object_peek_account (data->object), data->invocation, expires_in); } ensure_data_unref (data);}
开发者ID:abprime,项目名称:gnome-online-accounts,代码行数:48,
示例6: initable_initstatic gbooleaninitable_init (GInitable *initable, GCancellable *cancellable, GError **error){ MMManagerPrivate *priv = MM_MANAGER (initable)->priv; /* Create plugin manager */ priv->plugin_manager = mm_plugin_manager_new (error); if (!priv->plugin_manager) return FALSE; /* Export the manager interface */ if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (initable), priv->connection, MM_DBUS_PATH, error)) return FALSE; /* Export the Object Manager interface */ g_dbus_object_manager_server_set_connection (priv->object_manager, priv->connection); /* All good */ return TRUE;}
开发者ID:1Anastaska,项目名称:ModemManager,代码行数:26,
示例7: screenshot_initgbooleanscreenshot_init (GDBusConnection *bus, GError **error){ GDBusInterfaceSkeleton *helper; helper = G_DBUS_INTERFACE_SKELETON (xdp_impl_screenshot_skeleton_new ()); g_signal_connect (helper, "handle-screenshot", G_CALLBACK (handle_screenshot), NULL); if (!g_dbus_interface_skeleton_export (helper, bus, DESKTOP_PORTAL_OBJECT_PATH, error)) return FALSE; shell = org_gnome_shell_screenshot_proxy_new_sync (bus, G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, "org.gnome.Shell.Screenshot", "/org/gnome/Shell/Screenshot", NULL, error); if (shell == NULL) return FALSE; g_debug ("providing %s", g_dbus_interface_skeleton_get_info (helper)->name); return TRUE;}
开发者ID:amigadave,项目名称:xdg-desktop-portal-gtk,代码行数:29,
示例8: on_bus_acquiredstatic void on_bus_acquired(GDBusConnection *bus, const gchar *name, gpointer user_data){ LoginKitManager *interface; GError *error = NULL; interface = login_kit_manager_skeleton_new(); g_signal_connect(interface, "handle-unlock-session", G_CALLBACK(on_handle_unlock_session), NULL); g_signal_connect(interface, "handle-list-seats", G_CALLBACK(on_handle_list_seats), NULL); g_signal_connect(interface, "handle-activate-session-on-seat", G_CALLBACK(on_handle_activate_session_on_seat), NULL); signals_subscribe(interface); if (!g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(interface), bus, "/org/freedesktop/login1", &error)) { if (NULL != error) g_error_free(error); }}
开发者ID:zstyblik,项目名称:LoginKit,代码行数:31,
示例9: register_factorystatic gbooleanregister_factory (GdmLocalDisplayFactory *factory){ GError *error = NULL; error = NULL; factory->priv->connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); if (factory->priv->connection == NULL) { g_critical ("error getting system bus: %s", error->message); g_error_free (error); exit (1); } factory->priv->skeleton = GDM_DBUS_LOCAL_DISPLAY_FACTORY (gdm_dbus_local_display_factory_skeleton_new ()); g_signal_connect (factory->priv->skeleton, "handle-create-transient-display", G_CALLBACK (handle_create_transient_display), factory); if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (factory->priv->skeleton), factory->priv->connection, GDM_LOCAL_DISPLAY_FACTORY_DBUS_PATH, &error)) { g_critical ("error exporting LocalDisplayFactory object: %s", error->message); g_error_free (error); exit (1); } return TRUE;}
开发者ID:victoryang,项目名称:gdm,代码行数:31,
示例10: on_bus_acquiredstatic voidon_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data){ TcmmdDbus *self = user_data; GError *error = NULL; self->priv->connection = g_object_ref (connection); self->priv->iface = tcmmd_managed_connections_skeleton_new (); g_signal_connect (self->priv->iface, "handle-set-policy", G_CALLBACK (handle_set_policy_cb), self); g_signal_connect (self->priv->iface, "handle-set-fixed-policy", G_CALLBACK (handle_set_fixed_policy_cb), self); g_signal_connect (self->priv->iface, "handle-unset-policy", G_CALLBACK (handle_unset_policy_cb), self); if (!g_dbus_interface_skeleton_export ( G_DBUS_INTERFACE_SKELETON (self->priv->iface), self->priv->connection, "/org/tcmmd/ManagedConnections", &error)) { g_critical ("Failed to export iface: %s", error->message); g_clear_error (&error); }}
开发者ID:pwithnall,项目名称:tcmmd,代码行数:27,
示例11: _on_bus_acquired/** * @user_data: daemon itself */static void _on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data){ RatdbProxyEngine *skeleton; GError *error = NULL; RatdbDaemonPrivate *priv = RATDB_DAEMON (user_data)->priv; g_debug ("Bus acquired"); /* /org/ratdb/Interface */ skeleton = ratdb_proxy_engine_skeleton_new (); if (error) { g_error (_("Couldn't create a skeleton for clients: %s"), error->message); g_error_free (error); } g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (skeleton), connection, "/org/ratdb/Interface", &error); if (error) { g_error (_("Failed to export symbols: %s"), error->message); g_error_free (error); } /* handle functions */ RATDB_CONNECT_DBUS_IFACE (request, ratdb_dbus_handler, priv->client_list); RATDB_CONNECT_DBUS_IFACE (remove_client, ratdb_dbus_handler, user_data); RATDB_CONNECT_DBUS_IFACE (new_database, ratdb_dbus_handler, user_data); RATDB_CONNECT_DBUS_IFACE (new_table, ratdb_dbus_handler, user_data);}
开发者ID:ekd123,项目名称:ekode,代码行数:36,
示例12: gkd_secret_objects_register_collectionvoidgkd_secret_objects_register_collection (GkdSecretObjects *self, const gchar *collection_path){ GkdExportedCollection *skeleton; GError *error = NULL; skeleton = g_hash_table_lookup (self->collections_to_skeletons, collection_path); if (skeleton != NULL) { g_warning ("asked to register collection %s, but it's already registered", collection_path); return; } skeleton = gkd_secret_collection_skeleton_new (self); g_hash_table_insert (self->collections_to_skeletons, g_strdup (collection_path), skeleton); g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (skeleton), gkd_secret_service_get_connection (self->service), collection_path, &error); if (error != NULL) { g_warning ("could not register secret collection on session bus: %s", error->message); g_error_free (error); } g_signal_connect (skeleton, "handle-create-item", G_CALLBACK (collection_method_create_item), self); g_signal_connect (skeleton, "handle-delete", G_CALLBACK (collection_method_delete), self); g_signal_connect (skeleton, "handle-search-items", G_CALLBACK (collection_method_search_items), self); gkd_secret_objects_init_collection_items (self, collection_path);}
开发者ID:halfline,项目名称:gnome-keyring,代码行数:33,
示例13: machines_initstatic voidmachines_init (Machines *machines){ g_dbus_interface_skeleton_set_flags (G_DBUS_INTERFACE_SKELETON (machines), G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD); g_mutex_init (&machines->lock);}
开发者ID:BillTheBest,项目名称:cockpit,代码行数:7,
示例14: print_createGDBusInterfaceSkeleton *print_create (GDBusConnection *connection, const char *dbus_name, gpointer lockdown_proxy){ g_autoptr(GError) error = NULL; lockdown = lockdown_proxy; impl = xdp_impl_print_proxy_new_sync (connection, G_DBUS_PROXY_FLAGS_NONE, dbus_name, DESKTOP_PORTAL_OBJECT_PATH, NULL, &error); if (impl == NULL) { g_warning ("Failed to create print proxy: %s", error->message); return NULL; } g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (impl), G_MAXINT); print = g_object_new (print_get_type (), NULL); return G_DBUS_INTERFACE_SKELETON (print);}
开发者ID:grulja,项目名称:xdg-desktop-portal,代码行数:27,
示例15: gkd_secret_objects_register_itemstatic voidgkd_secret_objects_register_item (GkdSecretObjects *self, const gchar *item_path){ GkdExportedItem *skeleton; GError *error = NULL; skeleton = g_hash_table_lookup (self->items_to_skeletons, item_path); if (skeleton != NULL) { g_warning ("asked to register item %s, but it's already registered", item_path); return; } skeleton = gkd_secret_item_skeleton_new (self); g_hash_table_insert (self->items_to_skeletons, g_strdup (item_path), skeleton); g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (skeleton), gkd_secret_service_get_connection (self->service), item_path, &error); if (error != NULL) { g_warning ("could not register secret item on session bus: %s", error->message); g_error_free (error); } g_signal_connect (skeleton, "handle-delete", G_CALLBACK (item_method_delete), self); g_signal_connect (skeleton, "handle-get-secret", G_CALLBACK (item_method_get_secret), self); g_signal_connect (skeleton, "handle-set-secret", G_CALLBACK (item_method_set_secret), self);}
开发者ID:halfline,项目名称:gnome-keyring,代码行数:31,
示例16: gom_application_dbus_unregisterstatic voidgom_application_dbus_unregister (GApplication *application, GDBusConnection *connection, const gchar *object_path){ GomApplication *self = GOM_APPLICATION (application); if (self->skeleton != NULL) { if (g_dbus_interface_skeleton_has_connection (G_DBUS_INTERFACE_SKELETON (self->skeleton), connection)) g_dbus_interface_skeleton_unexport_from_connection (G_DBUS_INTERFACE_SKELETON (self->skeleton), connection); } G_APPLICATION_CLASS (gom_application_parent_class)->dbus_unregister (application, connection, object_path);}
开发者ID:GNOME,项目名称:gnome-online-miners,代码行数:16,
示例17: gom_application_dbus_registerstatic gbooleangom_application_dbus_register (GApplication *application, GDBusConnection *connection, const gchar *object_path, GError **error){ GomApplication *self = GOM_APPLICATION (application); gboolean retval = FALSE; if (!G_APPLICATION_CLASS (gom_application_parent_class)->dbus_register (application, connection, object_path, error)) goto out; if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->skeleton), connection, object_path, error)) goto out; retval = TRUE; out: return retval;}
开发者ID:GNOME,项目名称:gnome-online-miners,代码行数:26,
示例18: bus_acquiredvoid bus_acquired (GObject *object, GAsyncResult * res, gpointer user_data){ //g_debug("bus acquired"); GDBusConnection *bus; GError *error = NULL; bus = g_bus_get_finish (res, &error); if (!bus) { //g_warning ("unable to connect to the session bus: %s", error->message); g_error_free (error); return; } g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (autopilot_introspection), bus, AUTOPILOT_INTROSPECTION_OBJECT_PATH.c_str(), &error); if (error) { //g_warning ("unable to export autopilot introspection service on dbus: %s", error->message); g_error_free (error); return; } g_signal_connect (autopilot_introspection, "handle-get-state", G_CALLBACK(handle_get_state), NULL); g_signal_connect (autopilot_introspection, "handle-get-version", G_CALLBACK(handle_get_version), NULL); g_object_unref (bus);}
开发者ID:drahnr,项目名称:autopilot-gtk,代码行数:32,
示例19: file_chooser_createGDBusInterfaceSkeleton *file_chooser_create (GDBusConnection *connection, const char *dbus_name){ g_autoptr(GError) error = NULL; request_by_handle = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); impl = xdp_impl_file_chooser_proxy_new_sync (connection, G_DBUS_PROXY_FLAGS_NONE, dbus_name, "/org/freedesktop/portal/desktop", NULL, &error); if (impl == NULL) { g_warning ("Failed to create file chooser proxy: %s/n", error->message); return NULL; } set_proxy_use_threads (G_DBUS_PROXY (impl)); file_chooser = g_object_new (file_chooser_get_type (), NULL); g_signal_connect (impl, "open-file-response", (GCallback)handle_open_file_response, NULL); g_signal_connect (impl, "open-files-response", (GCallback)handle_open_files_response, NULL); g_signal_connect (impl, "save-file-response", (GCallback)handle_save_file_response, NULL); return G_DBUS_INTERFACE_SKELETON (file_chooser);}
开发者ID:smcv,项目名称:xdg-desktop-portal,代码行数:30,
示例20: synce_device_disposestatic voidsynce_device_dispose (GObject *obj){ SynceDevice *self = SYNCE_DEVICE (obj); SynceDevicePrivate *priv = SYNCE_DEVICE_GET_PRIVATE (self); if (priv->dispose_has_run) return; priv->dispose_has_run = TRUE;#if USE_GDBUS if (priv->interface) { g_dbus_interface_skeleton_unexport(G_DBUS_INTERFACE_SKELETON(priv->interface)); g_object_unref(priv->interface); }#endif g_io_stream_close(G_IO_STREAM(priv->conn), NULL, NULL); g_object_unref(priv->conn);#if HAVE_GUDEV g_object_unref(priv->gudev_client);#endif g_hash_table_destroy (priv->requests); if (G_OBJECT_CLASS (synce_device_parent_class)->dispose) G_OBJECT_CLASS (synce_device_parent_class)->dispose (obj);}
开发者ID:asmblur,项目名称:SynCE,代码行数:30,
示例21: synce_device_dbus_uninitvoidsynce_device_dbus_uninit(SynceDevice *self){ SynceDevicePrivate *priv = SYNCE_DEVICE_GET_PRIVATE (self); g_return_if_fail(priv->inited && !(priv->dispose_has_run));#if !USE_GDBUS GError *error = NULL; DBusGConnection *system_bus = NULL;#endif g_message ("%s: unregistering object path '%s'", G_STRFUNC, priv->obj_path);#if USE_GDBUS g_dbus_interface_skeleton_unexport(G_DBUS_INTERFACE_SKELETON(priv->interface)); g_object_unref(priv->interface); priv->interface = NULL;#else system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); if (system_bus == NULL) { g_critical("Failed to connect to system bus: %s", error->message); g_error_free(error); return; } dbus_g_connection_unregister_g_object(system_bus, G_OBJECT(self)); dbus_g_connection_unref(system_bus);#endif return;}
开发者ID:asmblur,项目名称:SynCE,代码行数:33,
示例22: on_bus_acquiredstatic voidon_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data){ XdpDbusContentPortal *helper; GError *error = NULL; helper = xdp_dbus_content_portal_skeleton_new (); g_signal_connect (helper, "handle-open", G_CALLBACK (handle_open), NULL); g_signal_connect (helper, "handle-create", G_CALLBACK (handle_create), NULL); xdp_connection_track_name_owners (connection); if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (helper), connection, "/org/freedesktop/portal/content", &error)) { g_warning ("error: %s/n", error->message); g_error_free (error); }}
开发者ID:alexlarsson,项目名称:xdg-content-chooser,代码行数:27,
示例23: on_bus_acquiredstatic voidon_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data){ XdpDbusDocuments *helper; GError *error = NULL; helper = xdp_dbus_documents_skeleton_new (); g_signal_connect_swapped (helper, "handle-get-mount-point", G_CALLBACK (handle_get_mount_point), NULL); g_signal_connect_swapped (helper, "handle-add", G_CALLBACK (handle_method), portal_add); g_signal_connect_swapped (helper, "handle-add-named", G_CALLBACK (handle_method), portal_add_named); g_signal_connect_swapped (helper, "handle-grant-permissions", G_CALLBACK (handle_method), portal_grant_permissions); g_signal_connect_swapped (helper, "handle-revoke-permissions", G_CALLBACK (handle_method), portal_revoke_permissions); g_signal_connect_swapped (helper, "handle-delete", G_CALLBACK (handle_method), portal_delete); xdg_app_connection_track_name_owners (connection); if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (helper), connection, "/org/freedesktop/portal/documents", &error)) { g_warning ("error: %s", error->message); g_error_free (error); }}
开发者ID:devcurmudgeon,项目名称:xdg-app,代码行数:28,
示例24: trash_createGDBusInterfaceSkeleton *trash_create (GDBusConnection *connection){ trash = g_object_new (trash_get_type (), NULL); return G_DBUS_INTERFACE_SKELETON (trash);}
开发者ID:grulja,项目名称:xdg-desktop-portal,代码行数:7,
示例25: bus_acquired_cb/** * bus_acquired_cb - handler to invoke when connected to the bus * of type bus_type or NULL. * * @connection: The GDBusConnection to a message bus * @bus_name : The name that is requested to be owned * @user_data : * * returns: * void * */static voidbus_acquired_cb(GDBusConnection *connection, const gchar *bus_name, gpointer user_data){ GError *pError = NULL; gchar *obj_path = user_data; INFO_LOG ("bus_acquired_cb ,Acquired session bus./n"); /** Second step: Try to get a connection to the given bus. */ pSkeleton = gdbus_mcuinfo_skeleton_new(); /** Third step: Attach to dbus signals. */ (void) g_signal_connect(pSkeleton, "handle-send-mcuinfo", G_CALLBACK(method_send_mcuinfo), NULL); /** Fourth step: Export interface skeleton. */ (void) g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(pSkeleton), connection, obj_path,//AUTOLINK_GDBUS_BUS_OBJECT_PATH, &pError); if(pError != NULL){ ERR_LOG ("bus_acquired_cb: Failed to export object. Reason: %s./n", pError->message); g_error_free(pError); g_main_loop_quit(mainloop); }}
开发者ID:vmwell-h,项目名称:dbus,代码行数:41,
示例26: nemo_dbus_manager_initstatic voidnemo_dbus_manager_init (NemoDBusManager *self){ GDBusConnection *connection; connection = g_application_get_dbus_connection (g_application_get_default ()); self->object_manager = g_dbus_object_manager_server_new ("/org/Nemo"); self->file_operations = nemo_dbus_file_operations_skeleton_new (); g_signal_connect (self->file_operations, "handle-copy-uris", G_CALLBACK (handle_copy_uris), self); g_signal_connect (self->file_operations, "handle-copy-file", G_CALLBACK (handle_copy_file), self); g_signal_connect (self->file_operations, "handle-empty-trash", G_CALLBACK (handle_empty_trash), self); g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->file_operations), connection, "/org/Nemo", NULL); g_dbus_object_manager_server_set_connection (self->object_manager, connection);}
开发者ID:Acidburn0zzz,项目名称:nemo,代码行数:28,
示例27: storaged_linux_block_bcache_initstatic voidstoraged_linux_block_bcache_init (StoragedLinuxBlockBcache *self){ g_dbus_interface_skeleton_set_flags (G_DBUS_INTERFACE_SKELETON (self), G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD);}
开发者ID:frankzhao,项目名称:storaged,代码行数:7,
示例28: manager_initstatic voidmanager_init (Manager *manager){ g_dbus_interface_skeleton_set_flags (G_DBUS_INTERFACE_SKELETON (manager), G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD); manager->cancellable = g_cancellable_new ();}
开发者ID:matthewgithub,项目名称:cockpit,代码行数:7,
示例29: bus_acquired_cbstatic void bus_acquired_cb(GDBusConnection *connection, const gchar *name, gpointer user_data){ GError *error = NULL; connman_agent_t *agent = user_data; agent->path = g_strdup(AGENT_DBUS_PATH); agent->interface = connman_interface_agent_skeleton_new(); g_signal_connect(agent->interface, "handle-request-input", G_CALLBACK(request_input_cb), agent); g_signal_connect(agent->interface, "handle-report-error", G_CALLBACK(report_error_cb), agent); error = NULL; if (!g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(agent->interface), connection, agent->path, &error)) { g_error("Could not export agent object: %s", error->message); g_error_free(error); } if (agent->registered_cb != NULL) { agent->registered_cb(agent->registered_data); } g_message("Agent successfully exported");}
开发者ID:morphis,项目名称:webos-connman-adapter,代码行数:25,
注:本文中的G_DBUS_INTERFACE_SKELETON函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ G_DBUS_OBJECT函数代码示例 C++ G_CHILD_ADD函数代码示例 |