[gnome-software/wip/kalev/codecs] PK session service: Add a new version of the Modify interface



commit 7b40e0c3b83b7d998b20254af0c0719949d2662a
Author: Kalev Lember <kalevlember gmail com>
Date:   Mon Feb 16 14:46:53 2015 +0100

    PK session service: Add a new version of the Modify interface
    
    The new org.freedesktop.PackageKit.Modify2 interface is equivalent with
    the older org.freedesktop.PackageKit.Modify, the only changes are the
    removal of the XID parameter in all methods and the addition of
    desktop_id and platform_data parameters.
    
    XXX: is there anything else we need to change in the interface? Now
    would be the time.

 src/Makefile.am                            |   11 +
 src/gs-application.c                       |   15 +-
 src/gs-dbus-helper.c                       |  220 ++++++++++++-
 src/org.freedesktop.PackageKit.Modify2.xml |  531 ++++++++++++++++++++++++++++
 4 files changed, 773 insertions(+), 4 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index f6bb6dc..899aa53 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,6 +91,7 @@ bin_PROGRAMS =                                                \
 
 gnome_software_SOURCES =                               \
        $(packagekit_built_sources)                     \
+       $(packagekit_modify2_built_sources)             \
        gs-cleanup.h                                    \
        gs-resources.c                                  \
        gs-resources.h                                  \
@@ -199,6 +200,14 @@ $(packagekit_built_sources): Makefile.am org.freedesktop.PackageKit.xml
                --generate-c-code gs-packagekit-generated       \
                $(srcdir)/org.freedesktop.PackageKit.xml
 
+packagekit_modify2_built_sources = gs-packagekit-modify2-generated.c gs-packagekit-modify2-generated.h
+$(packagekit_modify2_built_sources): Makefile.am org.freedesktop.PackageKit.Modify2.xml
+       $(AM_V_GEN) gdbus-codegen                                       \
+               --interface-prefix org.freedesktop.                     \
+               --c-namespace Gs                                        \
+               --generate-c-code gs-packagekit-modify2-generated       \
+               $(srcdir)/org.freedesktop.PackageKit.Modify2.xml
+
 gs-shell-search-provider-generated.h gs-shell-search-provider-generated.c: Makefile.am 
$(srcdir)/shell-search-provider-dbus-interfaces.xml
        $(AM_V_GEN) gdbus-codegen \
                --interface-prefix org.gnome. \
@@ -214,6 +223,7 @@ gs-resources.h: gnome-software.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) -
 
 BUILT_SOURCES =                                                \
        $(packagekit_built_sources)                     \
+       $(packagekit_modify2_built_sources)             \
        gs-shell-search-provider-generated.c            \
        gs-shell-search-provider-generated.h            \
        gs-resources.c                                  \
@@ -251,6 +261,7 @@ TESTS = gs-self-test
 EXTRA_DIST =                                           \
        shell-search-provider-dbus-interfaces.xml       \
        org.freedesktop.PackageKit.xml                  \
+       org.freedesktop.PackageKit.Modify2.xml          \
        gnome-software.gresource.xml                    \
        gnome-software.xml                              \
        gtk-style.css                                   \
diff --git a/src/gs-application.c b/src/gs-application.c
index c455193..207e001 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -30,6 +30,10 @@
 #include <gio/gdesktopappinfo.h>
 #include <packagekit-glib2/packagekit.h>
 
+#ifdef GDK_WINDOWING_X11
+#include <gtk/gtkx.h>
+#endif
+
 #include "gs-dbus-helper.h"
 #include "gs-box.h"
 #include "gs-cleanup.h"
@@ -451,9 +455,16 @@ install_resources_activated (GSimpleAction *action,
        GList *windows;
        GtkWindow *window = NULL;
        const gchar *mode;
+       const gchar *startup_id;
        gchar **resources;
 
-       g_variant_get (parameter, "(&s^as)", &mode, &resources);
+       g_variant_get (parameter, "(&s^as&s)", &mode, &resources, &startup_id);
+
+#ifdef GDK_WINDOWING_X11
+       if (startup_id != NULL && startup_id[0] != '\0')
+               gdk_x11_display_set_startup_notification_id (gdk_display_get_default (),
+                                                            startup_id);
+#endif
 
        windows = gtk_application_get_windows (GTK_APPLICATION (app));
        if (windows) {
@@ -477,7 +488,7 @@ static GActionEntry actions[] = {
        { "launch", launch_activated, "s", NULL, NULL },
        { "clear-offline-updates", clear_offline_updates, NULL, NULL, NULL },
        { "show-offline-update-error", show_offline_updates_error, NULL, NULL, NULL },
-       { "install-resources", install_resources_activated, "(sas)", NULL, NULL },
+       { "install-resources", install_resources_activated, "(sass)", NULL, NULL },
        { "nop", NULL, NULL, NULL }
 };
 
diff --git a/src/gs-dbus-helper.c b/src/gs-dbus-helper.c
index 89c4d14..1239bb5 100644
--- a/src/gs-dbus-helper.c
+++ b/src/gs-dbus-helper.c
@@ -30,6 +30,7 @@
 #include "gs-cleanup.h"
 #include "gs-dbus-helper.h"
 #include "gs-packagekit-generated.h"
+#include "gs-packagekit-modify2-generated.h"
 #include "gs-resources.h"
 #include "gs-shell-extras.h"
 
@@ -38,6 +39,7 @@ struct _GsDbusHelper {
        GCancellable            *cancellable;
        GDBusInterfaceSkeleton  *query_interface;
        GDBusInterfaceSkeleton  *modify_interface;
+       GDBusInterfaceSkeleton  *modify2_interface;
        PkTask                  *task;
        guint                    dbus_own_name_id;
 };
@@ -272,6 +274,21 @@ handle_query_is_installed (GsPackageKitQuery        *skeleton,
        return TRUE;
 }
 
+static gboolean
+is_show_confirm_search_set (const gchar *interaction)
+{
+       GsDbusHelperTask *dtask;
+       gboolean ret;
+
+       dtask = g_new0 (GsDbusHelperTask, 1);
+       dtask->show_confirm_search = TRUE;
+       gs_dbus_helper_task_set_interaction (dtask, interaction);
+       ret = dtask->show_confirm_search;
+       gs_dbus_helper_task_free (dtask);
+
+       return ret;
+}
+
 static void
 notify_search_resources (GsShellExtrasMode   mode,
                          const gchar        *desktop_id,
@@ -333,11 +350,38 @@ notify_search_resources (GsShellExtrasMode   mode,
        n = g_notification_new (title);
        g_notification_set_body (n, body);
        /* TRANSLATORS: this is a button that launches gnome-software */
-       g_notification_add_button_with_target (n, _("Find in Software"), "app.install-resources", "(s^as)", 
mode_string, resources);
-       g_notification_set_default_action_and_target (n, "app.install-resources", "(s^as)", mode_string, 
resources);
+       g_notification_add_button_with_target (n, _("Find in Software"), "app.install-resources", "(s^ass)", 
mode_string, resources, "");
+       g_notification_set_default_action_and_target (n, "app.install-resources", "(s^ass)", mode_string, 
resources, "");
        g_application_send_notification (g_application_get_default (), "install-resources", n);
 }
 
+static void
+install_resources (GsShellExtrasMode   mode,
+                   gchar             **resources,
+                   const gchar        *interaction,
+                   const gchar        *desktop_id,
+                   GVariant           *platform_data)
+{
+       GApplication *app;
+       const gchar *mode_string;
+       const gchar *startup_id = NULL;
+
+       if (is_show_confirm_search_set (interaction)) {
+               notify_search_resources (mode, desktop_id, resources);
+               return;
+       }
+
+       if (platform_data != NULL) {
+               g_variant_lookup (platform_data, "desktop-startup-id",
+                                 "&s", &startup_id);
+       }
+
+       app = g_application_get_default ();
+       mode_string = gs_shell_extras_mode_to_string (mode);
+       g_action_group_activate_action (G_ACTION_GROUP (app), "install-resources",
+                                       g_variant_new ("(s^ass)", mode_string, resources, startup_id));
+}
+
 static gboolean
 handle_modify_install_package_files (GsPackageKitModify                 *object,
                                      GDBusMethodInvocation      *invocation,
@@ -474,6 +518,150 @@ handle_modify_install_printer_drivers (GsPackageKitModify  *object,
        return TRUE;
 }
 
+static gboolean
+handle_modify2_install_package_files (GsPackageKitModify2       *object,
+                                      GDBusMethodInvocation     *invocation,
+                                      gchar                    **arg_files,
+                                      const gchar               *arg_interaction,
+                                      const gchar               *arg_desktop_id,
+                                      GVariant                  *arg_platform_data,
+                                      gpointer                   user_data)
+{
+       g_debug ("****** Modify2.InstallPackageFiles");
+
+       install_resources (GS_SHELL_EXTRAS_MODE_INSTALL_PACKAGE_FILES, arg_files, arg_interaction, 
arg_desktop_id, arg_platform_data);
+       gs_package_kit_modify2_complete_install_package_files (object, invocation);
+
+       return TRUE;
+}
+
+static gboolean
+handle_modify2_install_provide_files (GsPackageKitModify2       *object,
+                                      GDBusMethodInvocation     *invocation,
+                                      gchar                    **arg_files,
+                                      const gchar               *arg_interaction,
+                                      const gchar               *arg_desktop_id,
+                                      GVariant                  *arg_platform_data,
+                                      gpointer                   user_data)
+{
+       g_debug ("****** Modify2.InstallProvideFiles");
+
+       install_resources (GS_SHELL_EXTRAS_MODE_INSTALL_PROVIDE_FILES, arg_files, arg_interaction, 
arg_desktop_id, arg_platform_data);
+       gs_package_kit_modify2_complete_install_provide_files (object, invocation);
+
+       return TRUE;
+}
+
+static gboolean
+handle_modify2_install_package_names (GsPackageKitModify2       *object,
+                                      GDBusMethodInvocation     *invocation,
+                                      gchar                    **arg_package_names,
+                                      const gchar               *arg_interaction,
+                                      const gchar               *arg_desktop_id,
+                                      GVariant                  *arg_platform_data,
+                                      gpointer                   user_data)
+{
+       g_debug ("****** Modify2.InstallPackageNames");
+
+       install_resources (GS_SHELL_EXTRAS_MODE_INSTALL_PACKAGE_NAMES, arg_package_names, arg_interaction, 
arg_desktop_id, arg_platform_data);
+       gs_package_kit_modify2_complete_install_package_names (object, invocation);
+
+       return TRUE;
+}
+
+static gboolean
+handle_modify2_install_mime_types (GsPackageKitModify2  *object,
+                                   GDBusMethodInvocation *invocation,
+                                   gchar                **arg_mime_types,
+                                   const gchar          *arg_interaction,
+                                   const gchar          *arg_desktop_id,
+                                   GVariant             *arg_platform_data,
+                                   gpointer              user_data)
+{
+       g_debug ("****** Modify2.InstallMimeTypes");
+
+       install_resources (GS_SHELL_EXTRAS_MODE_INSTALL_MIME_TYPES, arg_mime_types, arg_interaction, 
arg_desktop_id, arg_platform_data);
+       gs_package_kit_modify2_complete_install_mime_types (object, invocation);
+
+       return TRUE;
+}
+
+static gboolean
+handle_modify2_install_fontconfig_resources (GsPackageKitModify2        *object,
+                                             GDBusMethodInvocation      *invocation,
+                                             gchar                     **arg_resources,
+                                             const gchar                *arg_interaction,
+                                             const gchar                *arg_desktop_id,
+                                             GVariant                   *arg_platform_data,
+                                             gpointer                    user_data)
+{
+       g_debug ("****** Modify2.InstallFontconfigResources");
+
+       install_resources (GS_SHELL_EXTRAS_MODE_INSTALL_FONTCONFIG_RESOURCES, arg_resources, arg_interaction, 
arg_desktop_id, arg_platform_data);
+       gs_package_kit_modify2_complete_install_fontconfig_resources (object, invocation);
+
+       return TRUE;
+}
+
+static gboolean
+handle_modify2_install_gstreamer_resources (GsPackageKitModify2                 *object,
+                                            GDBusMethodInvocation       *invocation,
+                                            gchar                      **arg_resources,
+                                            const gchar                         *arg_interaction,
+                                            const gchar                         *arg_desktop_id,
+                                            GVariant                    *arg_platform_data,
+                                            gpointer                     user_data)
+{
+       g_debug ("****** Modify2.InstallGStreamerResources");
+
+       install_resources (GS_SHELL_EXTRAS_MODE_INSTALL_GSTREAMER_RESOURCES, arg_resources, arg_interaction, 
arg_desktop_id, arg_platform_data);
+       gs_package_kit_modify2_complete_install_gstreamer_resources (object, invocation);
+
+       return TRUE;
+}
+
+static gboolean
+handle_modify2_install_resources (GsPackageKitModify2   *object,
+                                  GDBusMethodInvocation         *invocation,
+                                  const gchar           *arg_type,
+                                  gchar                        **arg_resources,
+                                  const gchar           *arg_interaction,
+                                  const gchar           *arg_desktop_id,
+                                  GVariant              *arg_platform_data,
+                                  gpointer               user_data)
+{
+       gboolean ret;
+
+       g_debug ("****** Modify2.InstallResources");
+
+       if (g_strcmp0 (arg_type, "plasma-service") == 0) {
+               install_resources (GS_SHELL_EXTRAS_MODE_INSTALL_PLASMA_RESOURCES, arg_resources, 
arg_interaction, arg_desktop_id, arg_platform_data);
+               ret = TRUE;
+       } else {
+               ret = FALSE;
+       }
+       gs_package_kit_modify2_complete_install_resources (object, invocation);
+
+       return ret;
+}
+
+static gboolean
+handle_modify2_install_printer_drivers (GsPackageKitModify2     *object,
+                                        GDBusMethodInvocation   *invocation,
+                                        gchar                  **arg_device_ids,
+                                        const gchar             *arg_interaction,
+                                        const gchar             *arg_desktop_id,
+                                        GVariant                *arg_platform_data,
+                                        gpointer                 user_data)
+{
+       g_debug ("****** Modify2.InstallPrinterDrivers");
+
+       install_resources (GS_SHELL_EXTRAS_MODE_INSTALL_PRINTER_DRIVERS, arg_device_ids, arg_interaction, 
arg_desktop_id, arg_platform_data);
+       gs_package_kit_modify2_complete_install_printer_drivers (object, invocation);
+
+       return TRUE;
+}
+
 static void
 gs_dbus_helper_name_acquired_cb (GDBusConnection *connection,
                                 const gchar *name,
@@ -550,6 +738,34 @@ bus_gotten_cb (GObject      *source_object,
                return;
        }
 
+       /* Modify2 interface */
+       dbus_helper->modify2_interface = G_DBUS_INTERFACE_SKELETON (gs_package_kit_modify2_skeleton_new ());
+
+       g_signal_connect (dbus_helper->modify2_interface, "handle-install-package-files",
+                         G_CALLBACK (handle_modify2_install_package_files), dbus_helper);
+       g_signal_connect (dbus_helper->modify2_interface, "handle-install-provide-files",
+                         G_CALLBACK (handle_modify2_install_provide_files), dbus_helper);
+       g_signal_connect (dbus_helper->modify2_interface, "handle-install-package-names",
+                         G_CALLBACK (handle_modify2_install_package_names), dbus_helper);
+       g_signal_connect (dbus_helper->modify2_interface, "handle-install-mime-types",
+                         G_CALLBACK (handle_modify2_install_mime_types), dbus_helper);
+       g_signal_connect (dbus_helper->modify2_interface, "handle-install-fontconfig-resources",
+                         G_CALLBACK (handle_modify2_install_fontconfig_resources), dbus_helper);
+       g_signal_connect (dbus_helper->modify2_interface, "handle-install-gstreamer-resources",
+                         G_CALLBACK (handle_modify2_install_gstreamer_resources), dbus_helper);
+       g_signal_connect (dbus_helper->modify2_interface, "handle-install-resources",
+                         G_CALLBACK (handle_modify2_install_resources), dbus_helper);
+       g_signal_connect (dbus_helper->modify2_interface, "handle-install-printer-drivers",
+                         G_CALLBACK (handle_modify2_install_printer_drivers), dbus_helper);
+
+       if (!g_dbus_interface_skeleton_export (dbus_helper->modify2_interface,
+                                              connection,
+                                              "/org/freedesktop/PackageKit",
+                                              &error)) {
+               g_warning ("Could not export dbus interface: %s", error->message);
+               return;
+       }
+
        dbus_helper->dbus_own_name_id = g_bus_own_name_on_connection (connection,
                                                                      "org.freedesktop.PackageKit",
                                                                      G_BUS_NAME_OWNER_FLAGS_NONE,
diff --git a/src/org.freedesktop.PackageKit.Modify2.xml b/src/org.freedesktop.PackageKit.Modify2.xml
new file mode 100644
index 0000000..f320750
--- /dev/null
+++ b/src/org.freedesktop.PackageKit.Modify2.xml
@@ -0,0 +1,531 @@
+<!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.Modify2">
+    <doc:doc>
+      <doc:description>
+        <doc:para>
+          The interface used for modifying the package database (version 2).
+        </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="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>
+      <arg type="s" name="desktop_id" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The desktop file ID of the calling application.
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="a{sv}" name="platform_data" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              Additional platform specific data, in the form of GVariant
+              dictionary mapping strings to variants. As the name indicates,
+              the platform data may vary depending on the operating system.
+              Currently recognized keys are:
+              <doc:tt>desktop-startup-id</doc:tt>: startup notification
+              identifier that is used to transfer focus to the software installer application
+            </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="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>
+      <arg type="s" name="desktop_id" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The desktop file ID of the calling application.
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="a{sv}" name="platform_data" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              Additional platform specific data, in the form of GVariant
+              dictionary mapping strings to variants. As the name indicates,
+              the platform data may vary depending on the operating system.
+              Currently recognized keys are:
+              <doc:tt>desktop-startup-id</doc:tt>: startup notification
+              identifier that is used to transfer focus to the software installer application
+            </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="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>
+      <arg type="s" name="desktop_id" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The desktop file ID of the calling application.
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="a{sv}" name="platform_data" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              Additional platform specific data, in the form of GVariant
+              dictionary mapping strings to variants. As the name indicates,
+              the platform data may vary depending on the operating system.
+              Currently recognized keys are:
+              <doc:tt>desktop-startup-id</doc:tt>: startup notification
+              identifier that is used to transfer focus to the software installer application
+            </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="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>
+      <arg type="s" name="desktop_id" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The desktop file ID of the calling application.
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="a{sv}" name="platform_data" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              Additional platform specific data, in the form of GVariant
+              dictionary mapping strings to variants. As the name indicates,
+              the platform data may vary depending on the operating system.
+              Currently recognized keys are:
+              <doc:tt>desktop-startup-id</doc:tt>: startup notification
+              identifier that is used to transfer focus to the software installer application
+            </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="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>
+      <arg type="s" name="desktop_id" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The desktop file ID of the calling application.
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="a{sv}" name="platform_data" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              Additional platform specific data, in the form of GVariant
+              dictionary mapping strings to variants. As the name indicates,
+              the platform data may vary depending on the operating system.
+              Currently recognized keys are:
+              <doc:tt>desktop-startup-id</doc:tt>: startup notification
+              identifier that is used to transfer focus to the software installer application
+            </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="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>
+      <arg type="s" name="desktop_id" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The desktop file ID of the calling application.
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="a{sv}" name="platform_data" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              Additional platform specific data, in the form of GVariant
+              dictionary mapping strings to variants. As the name indicates,
+              the platform data may vary depending on the operating system.
+              Currently recognized keys are:
+              <doc:tt>desktop-startup-id</doc:tt>: startup notification
+              identifier that is used to transfer focus to the software installer application
+            </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="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>
+      <arg type="s" name="desktop_id" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The desktop file ID of the calling application.
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="a{sv}" name="platform_data" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              Additional platform specific data, in the form of GVariant
+              dictionary mapping strings to variants. As the name indicates,
+              the platform data may vary depending on the operating system.
+              Currently recognized keys are:
+              <doc:tt>desktop-startup-id</doc:tt>: startup notification
+              identifier that is used to transfer focus to the software installer application
+            </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="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>
+      <arg type="s" name="desktop_id" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The desktop file ID of the calling application.
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="a{sv}" name="platform_data" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              Additional platform specific data, in the form of GVariant
+              dictionary mapping strings to variants. As the name indicates,
+              the platform data may vary depending on the operating system.
+              Currently recognized keys are:
+              <doc:tt>desktop-startup-id</doc:tt>: startup notification
+              identifier that is used to transfer focus to the software installer application
+            </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="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>
+      <arg type="s" name="desktop_id" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              The desktop file ID of the calling application.
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="a{sv}" name="platform_data" direction="in">
+        <doc:doc>
+          <doc:summary>
+            <doc:para>
+              Additional platform specific data, in the form of GVariant
+              dictionary mapping strings to variants. As the name indicates,
+              the platform data may vary depending on the operating system.
+              Currently recognized keys are:
+              <doc:tt>desktop-startup-id</doc:tt>: startup notification
+              identifier that is used to transfer focus to the software installer application
+            </doc:para>
+          </doc:summary>
+        </doc:doc>
+      </arg>
+    </method>
+  </interface>
+</node>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]