[gnome-software] Initial port of the PackageKit session interface to gnome-software
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Initial port of the PackageKit session interface to gnome-software
- Date: Thu, 19 Dec 2013 09:30:59 +0000 (UTC)
commit a68fa979d5a5e6f5048a5ada5db2b30629d03807
Author: Richard Hughes <richard hughsie com>
Date: Thu Dec 19 09:25:57 2013 +0000
Initial port of the PackageKit session interface to gnome-software
Until we implement all the methods, use the org.freedesktop.PackageKit2 name.
src/Makefile.am | 2 +
src/gnome-software.gresource.xml | 1 +
src/gs-application.c | 4 +
src/gs-dbus-helper.c | 293 +++++++++++++++++++++
src/gs-dbus-helper.h | 46 ++++
src/org.freedesktop.PackageKit.xml | 506 ++++++++++++++++++++++++++++++++++++
6 files changed, 852 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index fa4014f..4ec30c5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,6 +91,8 @@ gnome_software_SOURCES = \
gnome_software_service_SOURCES = \
gs-resources.c \
gs-resources.h \
+ gs-dbus-helper.c \
+ gs-dbus-helper.h \
gs-utils.c \
gs-utils.h \
gs-app.c \
diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
index 278ba0e..15dfc50 100644
--- a/src/gnome-software.gresource.xml
+++ b/src/gnome-software.gresource.xml
@@ -11,6 +11,7 @@
<file preprocess="xml-stripblanks">app-folder-dialog.ui</file>
<file preprocess="xml-stripblanks">screenshot-image.ui</file>
<file preprocess="xml-stripblanks">gs-star-widget.ui</file>
+ <file preprocess="xml-stripblanks">org.freedesktop.PackageKit.xml</file>
<file>gtk-style.css</file>
<file>gtk-style-hc.css</file>
<file preprocess="to-pixdata">shadow.png</file>
diff --git a/src/gs-application.c b/src/gs-application.c
index 200946d..d68080c 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -29,6 +29,7 @@
#include <gtk/gtk.h>
#include <gio/gdesktopappinfo.h>
+#include "gs-dbus-helper.h"
#include "gs-box.h"
#include "gs-shell.h"
#include "gs-update-monitor.h"
@@ -50,6 +51,7 @@ struct _GsApplication {
GsShell *shell;
GsUpdateMonitor *update_monitor;
GsProxySettings *proxy_settings;
+ GsDbusHelper *dbus_helper;
GsShellSearchProvider *search_provider;
GNetworkMonitor *network_monitor;
};
@@ -423,6 +425,7 @@ gs_application_startup (GApplication *application)
application);
GS_APPLICATION (application)->proxy_settings = gs_proxy_settings_new ();
+ GS_APPLICATION (application)->dbus_helper = gs_dbus_helper_new ();
gs_application_monitor_updates (GS_APPLICATION (application));
gs_application_provide_search (GS_APPLICATION (application));
gs_application_monitor_network (GS_APPLICATION (application));
@@ -450,6 +453,7 @@ gs_application_finalize (GObject *object)
g_clear_object (&app->profile);
g_clear_object (&app->search_provider);
g_clear_object (&app->network_monitor);
+ g_clear_object (&app->dbus_helper);
G_OBJECT_CLASS (gs_application_parent_class)->finalize (object);
}
diff --git a/src/gs-dbus-helper.c b/src/gs-dbus-helper.c
new file mode 100644
index 0000000..1ddcdf7
--- /dev/null
+++ b/src/gs-dbus-helper.c
@@ -0,0 +1,293 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2013 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+
+#include <gio/gio.h>
+#include <gtk/gtk.h>
+#include <packagekit-glib2/packagekit.h>
+
+#include "gs-dbus-helper.h"
+#include "gs-resources.h"
+
+struct _GsDbusHelper {
+ GObject parent;
+ GCancellable *cancellable;
+ GDBusNodeInfo *introspection;
+ PkTask *task;
+ guint owner_id;
+};
+
+struct _GsDbusHelperClass {
+ GObjectClass parent_class;
+};
+
+G_DEFINE_TYPE (GsDbusHelper, gs_dbus_helper, G_TYPE_OBJECT)
+
+typedef struct {
+ GDBusMethodInvocation *invocation;
+} GsDbusHelperTask;
+
+/**
+ * gs_dbus_helper_task_free:
+ **/
+static void
+gs_dbus_helper_task_free (GsDbusHelperTask *dtask)
+{
+ g_free (dtask);
+}
+
+/**
+ * gs_dbus_helper_progress_cb:
+ **/
+static void
+gs_dbus_helper_progress_cb (PkProgress *progress, PkProgressType type, gpointer data)
+{
+}
+
+/**
+ * gs_dbus_helper_is_installed_resolve_cb:
+ **/
+static void
+gs_dbus_helper_is_installed_resolve_cb (GObject *source, GAsyncResult *res, gpointer data)
+{
+ GError *error = NULL;
+ GPtrArray *array = NULL;
+ GsDbusHelperTask *dtask = (GsDbusHelperTask *) data;
+ PkClient *client = PK_CLIENT (source);
+ PkError *error_code = NULL;
+ PkResults *results = NULL;
+
+ /* get the results */
+ results = pk_client_generic_finish (client, res, &error);
+ if (results == NULL) {
+ g_dbus_method_invocation_return_error (dtask->invocation,
+ G_IO_ERROR,
+ G_IO_ERROR_INVALID_ARGUMENT,
+ "failed to resolve: %s",
+ error->message);
+ g_error_free (error);
+ goto out;
+ }
+
+ /* check error code */
+ error_code = pk_results_get_error_code (results);
+ if (error_code != NULL) {
+ g_dbus_method_invocation_return_error (dtask->invocation,
+ G_IO_ERROR,
+ G_IO_ERROR_INVALID_ARGUMENT,
+ "failed to resolve: %s",
+ pk_error_get_details (error_code));
+ goto out;
+ }
+
+ /* get results */
+ array = pk_results_get_package_array (results);
+ g_dbus_method_invocation_return_value (dtask->invocation,
+ g_variant_new ("(b)", array->len > 0));
+out:
+ gs_dbus_helper_task_free (dtask);
+ if (error_code != NULL)
+ g_object_unref (error_code);
+ if (array != NULL)
+ g_ptr_array_unref (array);
+ if (results != NULL)
+ g_object_unref (results);
+}
+
+static void
+gs_dbus_helper_handle_method_call_query (GsDbusHelper *dbus_helper,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation)
+{
+ gchar **package_names;
+ const gchar *package_name;
+ const gchar *interaction;
+ GsDbusHelperTask *dtask;
+
+ if (g_strcmp0 (method_name, "IsInstalled") == 0) {
+ g_variant_get (parameters, "(&s&s)",
+ &package_name, &interaction);
+ package_names = g_strsplit (package_name, "|", 1);
+ dtask = g_new0 (GsDbusHelperTask, 1);
+ dtask->invocation = invocation;
+ pk_client_resolve_async (PK_CLIENT (dbus_helper->task),
+ pk_bitfield_value (PK_FILTER_ENUM_INSTALLED),
+ package_names, NULL,
+ gs_dbus_helper_progress_cb, dtask,
+ gs_dbus_helper_is_installed_resolve_cb, dtask);
+ g_strfreev (package_names);
+ } else {
+ g_dbus_method_invocation_return_error (invocation,
+ G_IO_ERROR,
+ G_IO_ERROR_INVALID_ARGUMENT,
+ "method %s not implemented "
+ "by gnome-software",
+ method_name);
+ }
+}
+
+static void
+gs_dbus_helper_handle_method_call_modify (GsDbusHelper *dbus_helper,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_error (invocation,
+ G_IO_ERROR,
+ G_IO_ERROR_INVALID_ARGUMENT,
+ "method %s not implemented by gnome-software",
+ method_name);
+}
+
+static void
+gs_dbus_helper_handle_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation,
+ gpointer user_data)
+{
+ GsDbusHelper *dbus_helper = GS_DBUS_HELPER (user_data);
+ if (g_strcmp0 (interface_name, "org.freedesktop.PackageKit.Query") == 0) {
+ gs_dbus_helper_handle_method_call_query (dbus_helper,
+ method_name,
+ parameters,
+ invocation);
+ } else if (g_strcmp0 (interface_name, "org.freedesktop.PackageKit.Modify") == 0) {
+ gs_dbus_helper_handle_method_call_modify (dbus_helper,
+ method_name,
+ parameters,
+ invocation);
+ } else {
+ g_dbus_method_invocation_return_error (invocation,
+ G_IO_ERROR,
+ G_IO_ERROR_FAILED_HANDLED,
+ "Interface not handled");
+ }
+}
+
+static const GDBusInterfaceVTable interface_vtable =
+{
+ gs_dbus_helper_handle_method_call,
+ NULL,
+ NULL
+};
+
+static void
+gs_dbus_helper_bus_acquired_cb (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ guint id;
+ guint i;
+ GsDbusHelper *dbus_helper = GS_DBUS_HELPER (user_data);
+
+ for (i = 0; dbus_helper->introspection->interfaces[i] != NULL; i++) {
+ id = g_dbus_connection_register_object (connection,
+ "/org/freedesktop/PackageKit",
+ dbus_helper->introspection->interfaces[i],
+ &interface_vtable,
+ dbus_helper, /* user_data */
+ NULL, /* user_data_free_func */
+ NULL); /* GError** */
+ g_assert (id > 0);
+ }
+}
+
+static void
+gs_dbus_helper_name_acquired_cb (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ g_debug ("acquired session service");
+}
+
+static void
+gs_dbus_helper_name_lost_cb (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ g_warning ("lost session service");
+}
+
+static void
+gs_dbus_helper_init (GsDbusHelper *dbus_helper)
+{
+ GBytes *data;
+ const gchar *xml;
+
+ dbus_helper->task = pk_task_new ();
+ dbus_helper->cancellable = g_cancellable_new ();
+
+ /* load introspection */
+ data = g_resource_lookup_data (gs_get_resource (),
+ "/org/gnome/software/org.freedesktop.PackageKit.xml",
+ G_RESOURCE_LOOKUP_FLAGS_NONE,
+ NULL);
+ xml = g_bytes_get_data (data, NULL);
+ dbus_helper->introspection = g_dbus_node_info_new_for_xml (xml, NULL);
+ g_assert (dbus_helper->introspection != NULL);
+ g_bytes_unref (data);
+
+ /* own session daemon */
+ dbus_helper->owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
+ "org.freedesktop.PackageKit2",
+ G_BUS_NAME_OWNER_FLAGS_NONE,
+ gs_dbus_helper_bus_acquired_cb,
+ gs_dbus_helper_name_acquired_cb,
+ gs_dbus_helper_name_lost_cb,
+ dbus_helper,
+ NULL);
+}
+
+static void
+gs_dbus_helper_finalize (GObject *object)
+{
+ GsDbusHelper *dbus_helper = GS_DBUS_HELPER (object);
+
+ g_cancellable_cancel (dbus_helper->cancellable);
+ g_bus_unown_name (dbus_helper->owner_id);
+
+ g_dbus_node_info_unref (dbus_helper->introspection);
+ g_clear_object (&dbus_helper->cancellable);
+ g_clear_object (&dbus_helper->task);
+
+ G_OBJECT_CLASS (gs_dbus_helper_parent_class)->finalize (object);
+}
+
+static void
+gs_dbus_helper_class_init (GsDbusHelperClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = gs_dbus_helper_finalize;
+}
+
+GsDbusHelper *
+gs_dbus_helper_new (void)
+{
+ return GS_DBUS_HELPER (g_object_new (GS_TYPE_DBUS_HELPER, NULL));
+}
+
+/* vim: set noexpandtab: */
diff --git a/src/gs-dbus-helper.h b/src/gs-dbus-helper.h
new file mode 100644
index 0000000..d38ca68
--- /dev/null
+++ b/src/gs-dbus-helper.h
@@ -0,0 +1,46 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2013 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __GS_DBUS_HELPER_H
+#define __GS_DBUS_HELPER_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GS_TYPE_DBUS_HELPER (gs_dbus_helper_get_type ())
+#define GS_DBUS_HELPER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GS_TYPE_DBUS_HELPER, GsDbusHelper))
+#define GS_DBUS_HELPER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GS_TYPE_DBUS_HELPER,
GsDbusHelperClass))
+#define GS_IS_DBUS_HELPER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GS_TYPE_DBUS_HELPER))
+#define GS_IS_DBUS_HELPER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GS_TYPE_DBUS_HELPER))
+#define GS_DBUS_HELPER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GS_TYPE_DBUS_HELPER,
GsDbusHelperClass))
+
+typedef struct _GsDbusHelper GsDbusHelper;
+typedef struct _GsDbusHelperClass GsDbusHelperClass;
+
+GType gs_dbus_helper_get_type (void);
+GsDbusHelper *gs_dbus_helper_new (void);
+
+G_END_DECLS
+
+#endif /* __GS_DBUS_HELPER_H */
+
+/* vim: set noexpandtab: */
diff --git a/src/org.freedesktop.PackageKit.xml b/src/org.freedesktop.PackageKit.xml
new file mode 100644
index 0000000..38be726
--- /dev/null
+++ b/src/org.freedesktop.PackageKit.xml
@@ -0,0 +1,506 @@
+<!DOCTYPE node PUBLIC
+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" [
+ <!ENTITY ERROR_GENERAL "org.freedesktop.PackageKit.Denied">
+]>
+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+
+ <interface name="org.freedesktop.PackageKit.Query">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ The interface used for quering the package database.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+
+ <!--*****************************************************************************************-->
+ <method name="IsInstalled">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Finds out if the package is installed.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="s" name="package_name" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ A package name, e.g. <doc:tt>hal-info</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An optional interaction mode, e.g.
+ <doc:tt>timeout=10</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="b" name="installed" direction="out">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ If the package is installed.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <!--*****************************************************************************************-->
+ <method name="SearchFile">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Finds the package name for an installed or available file
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="s" name="file_name" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ A package name, e.g. <doc:tt>/usr/share/help/gimp/index.html</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An optional interaction mode, e.g.
+ <doc:tt>timeout=10</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="b" name="installed" direction="out">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ If the package is installed.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="package_name" direction="out">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The package name of the file, e.g. <doc:tt>hal-info</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+ </interface>
+
+ <!-- ######################################################################################### -->
+ <interface name="org.freedesktop.PackageKit.Modify">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ The interface used for modifying the package database.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+
+ <!--*****************************************************************************************-->
+ <method name="InstallPackageFiles">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Installs local package files or service packs.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="u" name="xid" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The X window handle ID, used for focus stealing prevention and setting modality.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="as" name="files" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An array of file names.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An interaction mode that specifies which UI elements should be shown
+ or hidden different from the user default, e.g.
+ <doc:tt>hide-confirm-search,hide-confirm-deps,hide-confirm-install,show-progress</doc:tt>.
+ The show options are:
+
<doc:tt>show-confirm-search,show-confirm-deps,show-confirm-install,show-progress,show-finished,show-warning</doc:tt>.
+ The hide options are:
+
<doc:tt>hide-confirm-search,hide-confirm-deps,hide-confirm-install,hide-progress,hide-finished,hide-warning</doc:tt>.
+ Convenience options such as:
+ <doc:tt>never</doc:tt>, <doc:tt>defaults</doc:tt> or <doc:tt>always</doc:tt>.
+ are also available.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <!--*****************************************************************************************-->
+ <method name="InstallProvideFiles">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Installs packages to provide files.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="u" name="xid" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The X window handle ID, used for focus stealing prevention and setting modality.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="as" name="files" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An array of file names.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An optional interaction mode, e.g.
+
<doc:tt>show-confirm-search,show-confirm-deps,show-confirm-install,show-progress,show-finished,show-warning</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <!--*****************************************************************************************-->
+ <method name="InstallPackageNames">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Installs packages from a configured software source.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="u" name="xid" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The X window handle ID, used for focus stealing prevention and setting modality.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="as" name="packages" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An array of package names.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An optional interaction mode, e.g.
+
<doc:tt>show-confirm-search,show-confirm-deps,show-confirm-install,show-progress,show-finished,show-warning</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <!--*****************************************************************************************-->
+ <method name="InstallMimeTypes">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Installs mimetype handlers from a configured software source.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="u" name="xid" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The X window handle ID, used for focus stealing prevention and setting modality.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="as" name="mime_types" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An array of mime types, e.g. <doc:tt>text/plain</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An optional interaction mode, e.g.
+
<doc:tt>show-confirm-search,show-confirm-deps,show-confirm-install,show-progress,show-finished,show-warning</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <!--*****************************************************************************************-->
+ <method name="InstallFontconfigResources">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Installs fontconfig resources (usually fonts) from a configured software source.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="u" name="xid" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The X window handle ID, used for focus stealing prevention and setting modality.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="as" name="resources" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An array of font descriptors from fontconfig, e.g. <doc:tt>:lang=mn</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An optional interaction mode, e.g.
+
<doc:tt>show-confirm-search,show-confirm-deps,show-confirm-install,show-progress,show-finished,show-warning</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <!--*****************************************************************************************-->
+ <method name="InstallGStreamerResources">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Installs GStreamer fontconfig resources (usually codecs) from a configured software source.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="u" name="xid" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The X window handle ID, used for focus stealing prevention and setting modality.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="as" name="resources" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An array of codecs descriptors from <doc:tt>pk-gstreamer-install</doc:tt>, e.g.
+ <doc:tt>Advanced Streaming Format (ASF) demuxer|decoder-video/x-ms-asf</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An optional interaction mode, e.g.
+
<doc:tt>show-confirm-search,show-confirm-deps,show-confirm-install,show-progress,show-finished,show-warning</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <!--*****************************************************************************************-->
+ <method name="InstallResources">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Installs resources of a given type from a configured software source.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="u" name="xid" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The X window handle ID, used for focus stealing prevention and setting modality.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="type" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The type of resource to request, e.g. <doc:tt>plasma-service</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="as" name="resources" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An array of resource descriptors
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An optional interaction mode, e.g.
+
<doc:tt>show-confirm-search,show-confirm-deps,show-confirm-install,show-progress,show-finished,show-warning</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <!--*****************************************************************************************-->
+ <method name="RemovePackageByFiles">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Removes packages that provide the given local files.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="u" name="xid" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The X window handle ID, used for focus stealing prevention and setting modality.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="as" name="files" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An array of file names.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An interaction mode that specifies which UI elements should be shown
+ or hidden different from the user default, e.g.
+ <doc:tt>hide-confirm-search,hide-confirm-deps,hide-confirm-install,show-progress</doc:tt>.
+ The show options are:
+
<doc:tt>show-confirm-search,show-confirm-deps,show-confirm-install,show-progress,show-finished,show-warning</doc:tt>.
+ The hide options are:
+
<doc:tt>hide-confirm-search,hide-confirm-deps,hide-confirm-install,hide-progress,hide-finished,hide-warning</doc:tt>.
+ Convenience options such as:
+ <doc:tt>never</doc:tt>, <doc:tt>defaults</doc:tt> or <doc:tt>always</doc:tt>.
+ are also available.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <method name="InstallPrinterDrivers">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Installs printer drivers from a configured software source.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg type="u" name="xid" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ The X window handle ID, used for focus stealing prevention and setting modality.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="as" name="resources" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An array of printer model descriptors in IEEE 1284
+ Device ID format,
+ e.g. <doc:tt>MFG:Hewlett-Packard;MDL:HP LaserJet
+ 6MP;</doc:tt>.
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="interaction" direction="in">
+ <doc:doc>
+ <doc:summary>
+ <doc:para>
+ An optional interaction mode, e.g.
+
<doc:tt>show-confirm-search,show-confirm-deps,show-confirm-install,show-progress,show-finished,show-warning</doc:tt>
+ </doc:para>
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+ </interface>
+</node>
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]