[packagekit] [RFC] Move common python spawning functions to pk-python-backend.[hc]

Richard Hughes hughsient at gmail.com
Tue Oct 23 07:15:16 PDT 2007


On Tue, 2007-10-23 at 10:04 -0400, James Bowes wrote:
> +/**
> + * pk_python_backend_get_groups:
> + */
> +void
> +pk_python_backend_get_groups (PkBackend *backend, PkEnumList *elist)
> +{
> +       g_return_if_fail (backend != NULL);
> +       pk_enum_list_append_multiple (elist,
> +                                     PK_GROUP_ENUM_ACCESSIBILITY,
> +                                     PK_GROUP_ENUM_GAMES,
> +                                     PK_GROUP_ENUM_SYSTEM,
> +                                     -1);
> +}
> +
> +/**
> + * pk_python_backend_get_filters:
> + */
> +void
> +pk_python_backend_get_filters (PkBackend *backend, PkEnumList *elist)
> +{
> +       g_return_if_fail (backend != NULL);
> +       pk_enum_list_append_multiple (elist,
> +                                     /*PK_FILTER_ENUM_GUI,*/
> +                                     PK_FILTER_ENUM_INSTALLED,
> +                                     PK_FILTER_ENUM_DEVELOPMENT,
> +                                     -1);
> +}

This is wrong. This has to stay in the backend files as it's backend
specific - it's the way the daemon asks the backend what it supports.

I would also much prefer pk_backend_python_*() and pk-backend-python.*
as it makes it easier to grep for backend stuff - sorry - I know this
will be a pain.

The concept of the patchset is great, just a few little details ;-)

Thanks,

Richard.




More information about the PackageKit mailing list