[packagekit] Problem running example from FAQ

Dorian Perkins dperkins at google.com
Tue Aug 5 14:33:21 PDT 2008


Hello All,

I am trying to run the following example from the PackageKit FAQ and I
cannot get it to compile. What compilation flags should I be using? Are
there any extra libraries (not standard with PackageKit) that I may need?
Thanks.

"

#include <dbus/dbus-glib.h>

DBusGConnection *connection;
DBusGProxy *proxy;
GError *error = NULL;
gboolean ret;

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");
/* execute sync method */
ret = dbus_g_proxy_call (proxy, "InstallPackageName", &error,
                         G_TYPE_STRING, "openoffice-clipart",
                         G_TYPE_INVALID, G_TYPE_INVALID);
if (!ret) {
        g_warning ("failed: %s", error->message);
        g_error_free (error);
}

"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20080805/a6f660ab/attachment-0003.htm>


More information about the PackageKit mailing list