[packagekit] Media Change Enums

Richard Hughes hughsient at gmail.com
Wed Apr 1 08:23:39 PDT 2009


On Wed, 2009-04-01 at 08:15 -0700, Daniel Nicoletti wrote:
> Hi, as discussed with Richard here
> are the proposed enums and signals to handle
> media change in backends the use media as a repo.
> 
> PK_ERROR_ENUM_MEDIA_CHANGE_REQUIRED

Looks good to me.

> and the new signal:
> 
>     void        (* media_change_required)        (PkClient    *client,
>                                                                  const gchar    *media_id,
>                                                                  PkMediaTypeEnum type);

You want to have type, then id, to make it match the other signals.
Maybe future proof this and have:

type (CD), media_id (volume label), media_text (Extras Disk 4)

In this way we can do clever things in the UI comparing the media_id to
the volume label (using DeviceKit-disks) in the session if the wrong
disk is inserted.

> PkMediaTypeEnum {
>               GENERIC_DISK,
>               CD,
>               DVD
> }

Not GENERIC_DISK, you want to use UNKNOWN. You also need to prefix the
define with PK_MEDIA_TYPE_ENUM_

> for aptcc i just need generic disk sice afaik we can't know which kind is it,
> but i think cd + dvd should also be important.

Right, and others can be added as required.

> The user sees the dialog and inserts the media, pessing ok,
> the transaction will be rescheduled and if the user inserted the wrong media
> it will loop again and again.. till the user can put the right media,
> so the _("insert %s labeled: %s", media_type, media_id) dialog
> should have a cancel button so if the user want to disable this kind of media
> he can cancel and disable the cdrom repo in gpk-repo or kpk-settings.

Sounds like a good plan. Are you going to code up a patch for the daemon
for this, or do you need a hand?

Richard.





More information about the PackageKit mailing list