Opened 4 years ago

Last modified 4 years ago

#13112 assigned bug

BPackageKit's BContext needs to be more user friendly

Reported by: kallisti5 Owned by: nobody
Priority: high Milestone: Unscheduled
Component: Kits/Package Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


BPackageKit has a huge number of set-up requirements that may not be relevant in a lot of use cases.

For example, to refresh the repositories, I need to create a BContext which is made up of a custom DecisionProvider class and a JobStateListener class.

To have BDecisionProvider simply accept all changes, I have to write a silly class as follows:

class DummyDescision : public BDecisionProvider {
            bool             YesNoDescisionNeeded(const BString& description,
                               const BString& question, const BString& yes,
                               const BString& no, const BString& defChoice)
                                   { return true; }

JobStateListener is even worse:

Ideally I should be able to construct a BDescisionProvider and a BJobStateListener with sane defaults (accept all changes, etc)

Why are these API's so infinitely complex?

Change History (1)

comment:1 by bonefish, 4 years ago

Owner: changed from bonefish to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.