[packagekit] Problem running example from FAQ

Dorian Perkins dperkins at google.com
Tue Aug 5 14:39:50 PDT 2008


I guess I should have mentioned, the problem is that I am not sure how to
correctly link in the <dbus/dbus-glib.h> library.

Any help is appreciated.

Thanks.

Dorian

On Tue, Aug 5, 2008 at 2:33 PM, Dorian Perkins <dperkins at google.com> wrote:

> 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/77907ee6/attachment-0003.htm>


More information about the PackageKit mailing list