[packagekit] Adding properties to the transaction interface

Richard Hughes hughsient at gmail.com
Tue Sep 1 04:23:26 PDT 2009


I've just merged a commit[1] that adds properties to each transaction
object, such as role, status, allow-cancel etc. The old methods to get
this state (GetRole, GetStatus, GetAllowCancel, etc) are now
deprecated, but are not going to be removed any time soon (perhaps for
0.6.0 in a few months time).

So, why is the interface switching to properties rather than a method
for each one:

* Clients that want to "coldplug" the state to watch the transaction
needed to perform 3-4 synchronous methods before they could show any
UI
* The only reason they were not properties before is I didn't know how
to expose properties in dbus-glib when I prototyped PackageKit over
two years ago
* We do not need the overhead of a method, this data is public and
will not be protected by PolicyKit

So, the benefits of switching to properties are that we can coldplug
in one DBus call (GetAll on the .Properties interface) and than there
will be a metric shedload less method code when we remove the old
methods. It'll be a better interface, and easier to debug and use in
python.

So what does this mean for end-user applications:

* Change nothing.

So what does this mean for backends:

* Change nothing.

So what does this mean for bindings (packagekit-sharp,
packagekit-glib, packagekit-qt)?:

* Sometime in the next 6 months you should switch to using properties,
not the helper methods.

Questions, concerns, welcome.

Thanks,

Richard.

[1] 5fe7c78de4ee5ab084295e598ea05d9a10dee083



More information about the PackageKit mailing list