12 #ifndef ZYPP_UI_SELECTABLE_H
13 #define ZYPP_UI_SELECTABLE_H
57 typedef intrusive_ptr<Selectable>
Ptr;
58 typedef intrusive_ptr<const Selectable>
constPtr;
88 static Ptr get(
ResKind kind_r,
const std::string & name_r )
92 static Ptr get(
const std::string & name_r )
101 {
return resolvable_r ?
get( resolvable_r->satSolvable() ) :
Ptr(); }
105 {
return get( pi_r.satSolvable() ); }
120 const std::string &
name()
const;
372 {
return pickDelete( pi_r, causer_r,
false ); }
582 #endif // ZYPP_UI_SELECTABLE_H
Selectable_Ptr operator()(const PoolItem &pi_r) const
available_iterator availableEnd() const
PoolItem updateCandidateObj() const
The best candidate for update, if there is one.
PickList::const_iterator picklist_iterator
A Solvable object within the sat Pool.
IdString ident() const
The identifier.
installed_iterator installedEnd() const
Status
UI status Status values calculated by Selectable.
intrusive_ptr< const TRes > constPtrType
bool isSatisfied() const
Whether a relevant patchs requirements are met.
picklist_iterator picklistBegin() const
bool identicalAvailable(const PoolItem &rhs) const
True if rhs is installed and one with the same content is available.
ResStatus::TransactByValue modifiedBy() const
Return who caused the modification.
static const ResKind package
Collects PoolItems of same kind and name.
bool isUnwanted() const
Broken (needed) but locked patches.
PoolItem installedObj() const
The last Installed object.
PoolItem setCandidate(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Set a candidate (out of available objects).
bool hasRetractedInstalled() const
True if this Selectable contains an installed retracted item.
intrusive_ptr< Selectable > Ptr
SelectableTraits::installed_iterator installed_iterator
bool hasInstalledObjOnly() const
True if installed object is present but no candidate.
bool hasObject() const
True if either installed or candidate object is present.
Status status() const
Return the current Status.
PoolItem identicalAvailableObj(const PoolItem &rhs) const
Return an available Object with the same content as rhs.
bool hasPtf() const
True if this Selectable contains available ptf items.
Access to the sat-pools string space.
bool hasLicenceConfirmed() const
Return value of LicenceConfirmed bit.
bool setToInstall(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to be installed (new- or re-install).
bool onSystem() const
True if would be on system after commit.
bool identIsAutoInstalled() const
Whether this ident is flagged as AutoInstalled.
bool hasInstalledObj() const
True if installed object is present.
TraitsType::constPtrType constPtr
bool unmodified() const
True if neither to delete or to install.
Selectable_Ptr operator()(const sat::Solvable &solv_r) const
PoolItem theObj() const
An object you could use as pars pro toto.
Iterable< installed_iterator > installed() const
available_size_type availableSize() const
bool pickNoInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Deselect a specific available item from installation.
bool hasRetracted() const
True if this Selectable contains available retracted items.
PoolItem identicalInstalledObj(const PoolItem &rhs) const
an installed Object with the same content as rhs.
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Try to set a new Status.
bool isUnmaintained() const
True if this package has no replacement from the available repositories.
bool hasBothObjects() const
True if installed and candidate object is present.
bool isBroken() const
Whether a relevant patchs requirements are broken.
void setLicenceConfirmed(bool val_r=true)
Set LicenceConfirmed bit.
bool setOnSystem(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Arrange the specified candidate (out of available objects) to be on system after commit.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
bool setInstalled(ResStatus::TransactByValue causer_r=ResStatus::USER)
Take care the item gets installed if it is not.
bool identicalInstalled(const PoolItem &rhs) const
True if rhs has the same content as an installed one.
bool locked() const
True if locked (subclass of unmodified).
bool hasBlacklisted() const
True if this Selectable contains available blacklisted items (retracted,ptf,...). ...
bool toModify() const
True if either to delete or to install.
bool isUndetermined() const
Returns true for packages, because packages are not classified by the solver.
bool hasPtfInstalled() const
True if this Selectable contains an installed ptf item.
bool toInstall() const
True if to install.
bool picklistEmpty() const
available_iterator availableBegin() const
bool isNeeded() const
This includes unlocked broken patches, as well as those already selected to be installed.
PoolItem candidateObjFrom(Repository repo_r) const
The best candidate provided by a specific Repository, if there is one.
bool setToDelete(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to be deleted (must be installed).
std::ostream & operator<<(std::ostream &str, const Selectable &obj)
Iterable< available_iterator > available() const
std::ostream & dumpOn(std::ostream &str, const Selectable &obj)
installed_size_type installedSize() const
bool isRelevant() const
Returns true if the patch is relevant which means that at least one package of the patch is installed...
Status pickStatus(const PoolItem &pi_r) const
Compute the ui::Status for an individual PoolItem.
friend std::ostream & operator<<(std::ostream &str, const Selectable &obj)
bool setDeleted(ResStatus::TransactByValue causer_r=ResStatus::USER)
Take care the item gets deleted if it is installed.
bool multiversionInstall() const
Whether at least one of the available packages has multiversionInstall set.
shared_ptr< Impl > Impl_Ptr
bool availableEmpty() const
Base class for reference counted objects.
SelectableTraits::available_iterator available_iterator
Iterates over ResObject::constPtr.
bool setPickStatus(const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Assign a new status to a specific item.
bool installedEmpty() const
intrusive_ptr< const Selectable > constPtr
PoolItem candidateObj() const
The 'best' or 'most interesting' among all available objects.
picklist_size_type picklistSize() const
PoolItem highestAvailableVersionObj() const
Simply the highest available version, ignoring priorities and policies.
bool hasLocks() const
True if it includes locked items (don't mix this with the locked status).
bool hasBlacklistedInstalled() const
True if this Selectable contains an installed blacklisted item (retracted,ptf,...).
bool hasCandidateObjOnly() const
True if candidate object is present but no installed.
Selectable implementation.
PickList::size_type picklist_size_type
ResKind kind() const
The ResObjects kind.
bool offSystem() const
True if would be off system after commit.
bool unset(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to stay unmodified.
Iterable< picklist_iterator > picklist() const
bool identicalInstalledUpdateCandidate() const
True if the updateCandidateObj is installed (same content).
DEFINE_PTR_TYPE(Selectable)
AvailableItemSet::iterator installed_iterator
bool pickInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
Select a specific available item for installation.
Solvable satSolvable() const
Return the corresponding sat::Solvable.
Selectable(Impl_Ptr pimpl_r)
Default ctor.
bool toDelete() const
True if to delete.
bool setUpToDate(ResStatus::TransactByValue causer_r=ResStatus::USER)
Take care the item gets installed if it is not, or is older.
AvailableItemSet::size_type installed_size_type
SelectableTraits::picklist_iterator picklist_iterator
Selectable_Ptr result_type
Combining sat::Solvable and ResStatus.
bool setFate(Fate fate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
ResTraits< TRes >::constPtrType candidateAsKind() const
Return the candidateObj resolvable casted to a specific kind.
bool hasCandidateObj() const
True if candidate object is present.
picklist_iterator picklistEnd() const
const std::string & name() const
The ResObjects name.
bool identicalInstalledCandidate() const
True if the candidateObj is installed (same content).
SelectableTraits::picklist_size_type picklist_size_type
friend std::ostream & dumpOn(std::ostream &str, const Selectable &obj)
bool pickNoDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Deselect a specific installed item from deletion.
Solvable to Selectable transform functor.
bool pickDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
Select a specific installed item for deletion.
SelectableTraits::installed_size_type installed_size_type
Main filter selecting PoolItems by name and kind.
RW_pointer< Impl > _pimpl
Pointer to implementation.
AvailableItemSet::size_type available_size_type
AvailableItemSet::iterator available_iterator
SelectableTraits::available_size_type available_size_type
installed_iterator installedBegin() const
ResTraits< TRes >::constPtrType installedAsKind() const
Return the installedObj resolvable casted to a specific kind.