Draft: libkcups/kcm: Adapt printer model to new libkcups apis
- Adapt printer model for new libkcups apis and signal/slot pattern for adding devices
- Add discovered role, but don't include discovered devices until a later MR
- There are no UI/UX changes
Currently the printer model creates the request to get printers via and IPP request, which then creates a printer object and populates the printer list. The request then notifies the client that the list is there. Then, the client copies that list from the request, and finally deletes the request.
This refactor uses the new KCupsRequest::getDestination/::getPrinterAttributesNotify to get available printer devices and device attributes. Instead of populating/updating an internal list, the callback notifies the client (model) for each device and the client (model) takes care of updating for the device.
Part of: #17
Depends-on: !215
Definitions for CUPS device queues
Temporary queues are basically discovered devices that are not configured (yet) to be permanent. Most applicatons will find these queues when a user chooses a printer device; hence, it is not required to configure a temp queue as permanent unless job queue management or media settings changes are needed.
Permanent queues are simply the locally configured printers which then allow access to the Media Settings (configuration) and the Printer Job Queue as they exist today (legacy apps).
Printer Groups (CUPS classes) remain as before and are defined based on permanently configured printers.
Testing
The KCM and Plasmoid should display only permanent printer queues/classes, with no discovered devices shown. Printer updates should propagate as expected to the KCM and/or the Plasmoid. There should be no functional or visual differences with the kcm or plasmoid.