diff options
author | Richard Hughes <richard@hughsie.com> | 2009-06-04 16:57:32 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2009-06-04 16:57:32 +0100 |
commit | d0245e1fcabdabf3d875fb3445771253d04a2333 (patch) | |
tree | 5ce42d4e6e2e1e91def9b7a7634386425b456bed /docs | |
parent | 3243fb85063b8fca79a0bc677f3fc81f1f467c26 (diff) |
Fix up the session example to not use depricated (and now removed) API
Diffstat (limited to 'docs')
-rw-r--r-- | docs/html/files/session.c | 10 | ||||
-rw-r--r-- | docs/html/pk-faq.html | 7 |
2 files changed, 9 insertions, 8 deletions
diff --git a/docs/html/files/session.c b/docs/html/files/session.c index a445ba181..850c17c75 100644 --- a/docs/html/files/session.c +++ b/docs/html/files/session.c @@ -11,7 +11,7 @@ main (int argc, char *argv[]) GError *error = NULL; gboolean ret; guint32 xid = 0; - guint32 timestamp = 0; + const gchar *packages[] = {"openoffice-clipart", "openoffice-clipart-extras", NULL}; /* init the types system */ g_type_init (); @@ -23,13 +23,13 @@ main (int argc, char *argv[]) proxy = dbus_g_proxy_new_for_name (connection, "org.freedesktop.PackageKit", "/org/freedesktop/PackageKit", - "org.freedesktop.PackageKit"); + "org.freedesktop.PackageKit.Modify"); /* execute sync method */ - ret = dbus_g_proxy_call (proxy, "InstallPackageName", &error, + ret = dbus_g_proxy_call (proxy, "InstallPackageNames", &error, G_TYPE_UINT, xid, /* window xid, 0 for none */ - G_TYPE_UINT, timestamp, /* action timestamp,, 0 for unknown */ - G_TYPE_STRING, "openoffice-clipart", + G_TYPE_STRV, packages, + G_TYPE_STRING, "show-confirm-search,hide-finished", G_TYPE_INVALID, G_TYPE_INVALID); if (!ret) { g_warning ("failed: %s", error->message); diff --git a/docs/html/pk-faq.html b/docs/html/pk-faq.html index 4d5f43db4..7e29eb6d0 100644 --- a/docs/html/pk-faq.html +++ b/docs/html/pk-faq.html @@ -330,10 +330,11 @@ connection = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); proxy = dbus_g_proxy_new_for_name (connection, "org.freedesktop.PackageKit", "/org/freedesktop/PackageKit", - "org.freedesktop.PackageKit"); + "org.freedesktop.PackageKit.Modify"); /* execute sync method */ -ret = dbus_g_proxy_call (proxy, "InstallPackageName", &error, - G_TYPE_STRING, "openoffice-clipart", +ret = dbus_g_proxy_call (proxy, "InstallPackageNames", &error, + G_TYPE_STRV, {"openoffice-clipart", NULL}, + G_TYPE_STRING, "", G_TYPE_INVALID, G_TYPE_INVALID); if (!ret) { g_warning ("failed: %s", error->message); |