#include <Selectable.h>
Classes | |
struct | Impl |
Selectable implementation. More... | |
Public Types | |
typedef intrusive_ptr< Selectable > | Ptr |
typedef intrusive_ptr< const Selectable > | constPtr |
typedef SelectableTraits::available_iterator | available_iterator |
Iterates over ResObject::constPtr. | |
typedef SelectableTraits::available_size_type | available_size_type |
typedef SelectableTraits::installed_iterator | installed_iterator |
typedef SelectableTraits::installed_size_type | installed_size_type |
typedef SelectableTraits::picklist_iterator | picklist_iterator |
typedef SelectableTraits::picklist_size_type | picklist_size_type |
typedef shared_ptr< Impl > | Impl_Ptr |
Public Member Functions | |
IdString | ident () const |
The identifier. | |
ResObject::Kind | kind () const |
The ResObjects kind. | |
const std::string & | name () const |
The ResObjects name. | |
PoolItem | installedObj () const |
The last Installed object. | |
PoolItem | candidateObj () const |
The 'best' or 'most interesting' among all available objects. | |
PoolItem | candidateObjFrom (Repository repo_r) const |
The best candidate provided by a specific Repository, if there is one. | |
PoolItem | updateCandidateObj () const |
The best candidate for update, if there is one. | |
PoolItem | highestAvailableVersionObj () const |
Simply the highest available version, ignoring priorities and policies. | |
bool | identicalAvailable (const PoolItem &rhs) const |
True if rhs is installed and one with the same content is available. | |
bool | identicalInstalled (const PoolItem &rhs) const |
True if rhs has the same content as an installed one. | |
bool | identicalInstalledCandidate () const |
True if the candidateObj is installed (same content). | |
bool | identicalInstalledUpdateCandidate () const |
True if the updateCandidateObj is installed (same content). | |
template<class _Res > | |
ResTraits< _Res >::constPtrType | installedAsKind () const |
Return the installedObj resolvable casted to a specific kind. | |
template<class _Res > | |
ResTraits< _Res >::constPtrType | candidateAsKind () const |
Return the candidateObj resolvable casted to a specific kind. | |
PoolItem | setCandidate (const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER) |
Set a candidate (out of available objects). | |
PoolItem | setCandidate (ResObject::constPtr newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER) |
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. | |
PoolItem | theObj () const |
An object you could use as pars pro toto. | |
bool | isUnmaintained () const |
True if this package has no replacement from the available repositories. | |
Selectable (Impl_Ptr pimpl_r) | |
Default ctor. | |
Available objects iterators. | |
Oredered according to solver policy.
'Best' first. | |
bool | availableEmpty () const |
available_size_type | availableSize () const |
available_iterator | availableBegin () const |
available_iterator | availableEnd () const |
Installed objects iterators. | |
Ordered by install time.
Latest first. | |
bool | installedEmpty () const |
installed_size_type | installedSize () const |
installed_iterator | installedBegin () const |
installed_iterator | installedEnd () const |
picklist iterators. | |
This is basically the available items list prepended by those installed items, that are nolonger identicalAvailable. | |
bool | picklistEmpty () const |
picklist_size_type | picklistSize () const |
picklist_iterator | picklistBegin () const |
picklist_iterator | picklistEnd () const |
Query for objects within this Selectable. | |
bool | hasObject () const |
True if either installed or candidate object is present. | |
bool | hasInstalledObj () const |
True if installed object is present. | |
bool | hasCandidateObj () const |
True if candidate object is present. | |
bool | hasBothObjects () const |
True if installed and candidate object is present. | |
bool | hasInstalledObjOnly () const |
True if installed object is present but no candidate. | |
bool | hasCandidateObjOnly () const |
True if candidate object is present but no installed. | |
Multiversion install. | |
Using pickInstall or pickDelete with non-multiversionInstall items is possible, but additional constraints will apply.
E.g. selecting one item for install will deselect any other. | |
bool | multiversionInstall () const |
Whether different versions of this package can be installed at the same time. | |
bool | pickInstall (const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true) |
Select a specific available item for installation. | |
bool | pickNoInstall (const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER) |
Deselect a specific available item from installation. | |
bool | pickDelete (const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true) |
Select a specific installed item for deletion. | |
bool | pickNoDelete (const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER) |
Deselect a specific installed item from deletion. | |
Status | pickStatus (const PoolItem &pi_r) const |
Compute the ui::Status for an individual PoolItem. | |
bool | setPickStatus (const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER) |
Assign a new status to a specific item. | |
Classification of available patches (pseudo installed items). | |
A patch is either not relevant , satisfied or broken .The same applies to other pseudo installed kinds.
| |
bool | isUndetermined () const |
Returns true for packages, because packages are not classified by the solver. | |
bool | isRelevant () const |
Returns true if the patch is relevant which means that at least one package of the patch is installed. | |
bool | isSatisfied () const |
Whether a relevant patchs requirements are met. | |
bool | isBroken () const |
Whether a relevant patchs requirements are broken. | |
bool | isNeeded () const |
This includes unlocked broken patches, as well as those already selected to be installed. | |
bool | isUnwanted () const |
Broken (needed) but locked patches. | |
Special inteface for Y2UI. | |
| |
Status | status () const |
Return the current Status. | |
bool | setStatus (Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER) |
Try to set a new Status. | |
ResStatus::TransactByValue | modifiedBy () const |
Return who caused the modification. | |
bool | hasLicenceConfirmed () const |
Return value of LicenceConfirmed bit. | |
void | setLicenceConfirmed (bool val_r=true) |
Set LicenceConfirmed bit. | |
Static Public Member Functions | |
Static ctor substitues picking the item from the pool. | |
Selectable::Ptr item; item = Selectable::get( "amarok ); // package amamrok item = Selectable::get( ResKind::patch, "amarok ); // patch amamrok item = Selectable::get( IdString( "patch:amarok" ); // patch amamrok | |
static Ptr | get (const pool::ByIdent &ident_r) |
Get the Selctable. | |
static Ptr | get (IdString ident_r) |
Get the Selctable by it's sat-identifyer . | |
static Ptr | get (ResKind kind_r, const std::string &name_r) |
Get the Selctable by kind and name . | |
static Ptr | get (const std::string &name_r) |
Get the Package Selctable by name . | |
static Ptr | get (const sat::Solvable &solv_r) |
Get the Selctable containing a specific sat::Solvable. | |
static Ptr | get (const ResObject::constPtr &resolvable_r) |
Get the Selctable containing a specific ResObject. | |
static Ptr | get (const PoolItem &pi_r) |
Get the Selctable containing a specific PoolItem. | |
Private Member Functions | |
~Selectable () | |
Dtor. | |
Private Attributes | |
RW_pointer< Impl > | _pimpl |
Pointer to implementation. | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const Selectable &obj) |
std::ostream & | dumpOn (std::ostream &str, const Selectable &obj) |
Query and maip objects fate in case of commit. | |
enum | Fate { TO_DELETE = -1, UNMODIFIED = 0, TO_INSTALL = 1 } |
Fate | fate () const |
bool | unmodified () const |
True if neither to delete or to install. | |
bool | locked () const |
True if locked (subclass of unmodified). | |
bool | toModify () const |
True if either to delete or to install. | |
bool | toDelete () const |
True if to delete. | |
bool | toInstall () const |
True if to install. | |
bool | onSystem () const |
True if would be on system after commit. | |
bool | offSystem () const |
True if would be off system after commit. | |
bool | setFate (Fate fate_r, ResStatus::TransactByValue causer_r=ResStatus::USER) |
bool | setToInstall (ResStatus::TransactByValue causer_r=ResStatus::USER) |
Set the item to be installed (new- or re-install). | |
bool | setInstalled (ResStatus::TransactByValue causer_r=ResStatus::USER) |
Take care the item gets installed if it is not. | |
bool | setUpToDate (ResStatus::TransactByValue causer_r=ResStatus::USER) |
Take care the item gets installed if it is not, or is older. | |
bool | setToDelete (ResStatus::TransactByValue causer_r=ResStatus::USER) |
Set the item to be deleted (must be installed). | |
bool | setDeleted (ResStatus::TransactByValue causer_r=ResStatus::USER) |
Take care the item gets deleted if it is installed. | |
bool | unset (ResStatus::TransactByValue causer_r=ResStatus::USER) |
Set the item to stay unmodified. |
Selectable is a status wrapper. The ui::Status is calculated from (and transated to) PoolItems individual ResStatus values.
Available objects are sorted according the solver policies, 'best' packages first (e.g. by repository priority, then Arch, then Edition).
Installed objects are sorted according the installation date, newer install time first.
Definition at line 51 of file Selectable.h.
typedef intrusive_ptr<Selectable> zypp::ui::Selectable::Ptr |
Definition at line 57 of file Selectable.h.
typedef intrusive_ptr<const Selectable> zypp::ui::Selectable::constPtr |
Definition at line 58 of file Selectable.h.
Definition at line 62 of file Selectable.h.
Definition at line 64 of file Selectable.h.
Definition at line 65 of file Selectable.h.
Definition at line 67 of file Selectable.h.
Definition at line 68 of file Selectable.h.
typedef shared_ptr<Impl> zypp::ui::Selectable::Impl_Ptr |
Definition at line 486 of file Selectable.h.
zypp::ui::Selectable::Selectable | ( | Impl_Ptr | pimpl_r | ) |
zypp::ui::Selectable::~Selectable | ( | ) | [private] |
Selectable::Ptr zypp::ui::Selectable::get | ( | const pool::ByIdent & | ident_r | ) | [static] |
Get the Selctable.
Definition at line 28 of file Selectable.cc.
References zypp::ResPool::instance(), zypp::ResPoolProxy::lookup(), and zypp::ResPool::proxy().
Referenced by zypp::solver::detail::InstallOrder::rdfsvisit(), and zypp::solver::detail::SATResolver::setLocks().
static Ptr zypp::ui::Selectable::get | ( | const std::string & | name_r | ) | [inline, static] |
Get the Package
Selctable by name
.
Definition at line 92 of file Selectable.h.
References zypp::ResKind::package.
static Ptr zypp::ui::Selectable::get | ( | const sat::Solvable & | solv_r | ) | [inline, static] |
static Ptr zypp::ui::Selectable::get | ( | const ResObject::constPtr & | resolvable_r | ) | [inline, static] |
IdString zypp::ui::Selectable::ident | ( | ) | const |
The identifier.
This is the solvables name, except for packages and source packes, prefixed by it's kind.
Definition at line 55 of file Selectable.cc.
References _pimpl.
ResObject::Kind zypp::ui::Selectable::kind | ( | ) | const |
const std::string & zypp::ui::Selectable::name | ( | ) | const |
PoolItem zypp::ui::Selectable::installedObj | ( | ) | const |
The last Installed object.
Definition at line 70 of file Selectable.cc.
References _pimpl.
Referenced by setUpToDate().
PoolItem zypp::ui::Selectable::candidateObj | ( | ) | const |
The 'best' or 'most interesting' among all available objects.
One that is, or is likely to be, chosen for installation, unless it violated any solver policy (see updateCandidateObj).
Definition at line 73 of file Selectable.cc.
References _pimpl.
Referenced by candidateAsKind(), hasBothObjects(), hasCandidateObj(), hasCandidateObjOnly(), hasInstalledObjOnly(), hasObject(), identicalInstalledCandidate(), installedAsKind(), and setUpToDate().
PoolItem zypp::ui::Selectable::candidateObjFrom | ( | Repository | repo_r | ) | const |
The best candidate provided by a specific Repository, if there is one.
In contrary to candidateObj, this may return no item even if there are available objects. This simply means the Repository does not provide this object.
Definition at line 76 of file Selectable.cc.
References _pimpl.
PoolItem zypp::ui::Selectable::updateCandidateObj | ( | ) | const |
The best candidate for update, if there is one.
In contrary to candidateObj, this may return no item even if there are available objects. This simply means the best object is already installed, and all available objects violate at least one update policy.
Definition at line 79 of file Selectable.cc.
References _pimpl.
Referenced by identicalInstalledUpdateCandidate().
PoolItem zypp::ui::Selectable::highestAvailableVersionObj | ( | ) | const |
Simply the highest available version, ignoring priorities and policies.
It's doubtful whether solely looking at the version makes a good candidate, but apps ask for it. Beware that different vendors may use different (uncomparable) version schemata.
Definition at line 82 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::identicalAvailable | ( | const PoolItem & | rhs | ) | const |
True
if rhs is installed and one with the same content is available.
Basically the same name, edition, arch, vendor and buildtime.
Definition at line 85 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::identicalInstalled | ( | const PoolItem & | rhs | ) | const |
True
if rhs has the same content as an installed one.
Basically the same name, edition, arch, vendor and buildtime.
Definition at line 88 of file Selectable.cc.
References _pimpl.
Referenced by identicalInstalledCandidate(), identicalInstalledUpdateCandidate(), and setOnSystem().
bool zypp::ui::Selectable::identicalInstalledCandidate | ( | ) | const [inline] |
True
if the candidateObj is installed (same content).
Definition at line 168 of file Selectable.h.
References candidateObj(), and identicalInstalled().
bool zypp::ui::Selectable::identicalInstalledUpdateCandidate | ( | ) | const [inline] |
True
if the updateCandidateObj is installed (same content).
Definition at line 174 of file Selectable.h.
References identicalInstalled(), and updateCandidateObj().
ResTraits<_Res>::constPtrType zypp::ui::Selectable::installedAsKind | ( | ) | const [inline] |
Return the installedObj resolvable casted to a specific kind.
Selectable mySelectable; Package::constPtr p( mySelectable.installedAsKind<Package>() );
Definition at line 185 of file Selectable.h.
References candidateObj().
ResTraits<_Res>::constPtrType zypp::ui::Selectable::candidateAsKind | ( | ) | const [inline] |
Return the candidateObj resolvable casted to a specific kind.
Selectable mySelectable; Package::constPtr p( mySelectable.candidateAsKind<Package>() );
Definition at line 195 of file Selectable.h.
References candidateObj().
PoolItem zypp::ui::Selectable::setCandidate | ( | const PoolItem & | newCandidate_r, | |
ResStatus::TransactByValue | causer_r = ResStatus::USER | |||
) |
Set a candidate (out of available objects).
ResStatus::USER
the operation may also fail if there are insufficient permissions to change a transacting candidate. Definition at line 91 of file Selectable.cc.
References _pimpl.
Referenced by setOnSystem().
PoolItem zypp::ui::Selectable::setCandidate | ( | ResObject::constPtr | newCandidate_r, | |
ResStatus::TransactByValue | causer_r = ResStatus::USER | |||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 94 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::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.
If the specified candidate is not already installed (identicalInstalled), and the causer_r has sufficient permisssion, then newCandidate_r is set as the new candidate (setCandidate) and selected for installation.
True
if newCandidate_r is already installed or sucessfully selected for installation. Definition at line 97 of file Selectable.cc.
References identicalInstalled(), setCandidate(), setFate(), TO_INSTALL, and UNMODIFIED.
PoolItem zypp::ui::Selectable::theObj | ( | ) | const |
An object you could use as pars pro toto.
Definition at line 104 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::availableEmpty | ( | ) | const |
Selectable::available_size_type zypp::ui::Selectable::availableSize | ( | ) | const |
Selectable::available_iterator zypp::ui::Selectable::availableBegin | ( | ) | const |
Selectable::available_iterator zypp::ui::Selectable::availableEnd | ( | ) | const |
bool zypp::ui::Selectable::installedEmpty | ( | ) | const |
Definition at line 123 of file Selectable.cc.
References _pimpl.
Referenced by hasBothObjects(), hasCandidateObjOnly(), hasInstalledObj(), hasInstalledObjOnly(), and hasObject().
Selectable::installed_size_type zypp::ui::Selectable::installedSize | ( | ) | const |
Selectable::installed_iterator zypp::ui::Selectable::installedBegin | ( | ) | const |
Selectable::installed_iterator zypp::ui::Selectable::installedEnd | ( | ) | const |
bool zypp::ui::Selectable::picklistEmpty | ( | ) | const |
Selectable::picklist_size_type zypp::ui::Selectable::picklistSize | ( | ) | const |
Selectable::picklist_iterator zypp::ui::Selectable::picklistBegin | ( | ) | const |
Selectable::picklist_iterator zypp::ui::Selectable::picklistEnd | ( | ) | const |
bool zypp::ui::Selectable::hasObject | ( | ) | const [inline] |
True if either installed or candidate object is present.
Definition at line 269 of file Selectable.h.
References candidateObj(), and installedEmpty().
bool zypp::ui::Selectable::hasInstalledObj | ( | ) | const [inline] |
True if installed object is present.
Definition at line 273 of file Selectable.h.
References installedEmpty().
Referenced by onSystem(), setDeleted(), setFate(), setInstalled(), and setUpToDate().
bool zypp::ui::Selectable::hasCandidateObj | ( | ) | const [inline] |
True if candidate object is present.
Definition at line 277 of file Selectable.h.
References candidateObj().
Referenced by onSystem().
bool zypp::ui::Selectable::hasBothObjects | ( | ) | const [inline] |
True if installed and candidate object is present.
Definition at line 281 of file Selectable.h.
References candidateObj(), and installedEmpty().
bool zypp::ui::Selectable::hasInstalledObjOnly | ( | ) | const [inline] |
True if installed object is present but no candidate.
Definition at line 285 of file Selectable.h.
References candidateObj(), and installedEmpty().
bool zypp::ui::Selectable::hasCandidateObjOnly | ( | ) | const [inline] |
True if candidate object is present but no installed.
Definition at line 289 of file Selectable.h.
References candidateObj(), and installedEmpty().
bool zypp::ui::Selectable::isUnmaintained | ( | ) | const |
True if this package has no replacement from the available repositories.
Definition at line 151 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::multiversionInstall | ( | ) | const |
Whether different versions of this package can be installed at the same time.
Per default false
.
Definition at line 154 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::pickInstall | ( | const PoolItem & | pi_r, | |
ResStatus::TransactByValue | causer_r = ResStatus::USER , |
|||
bool | yesno_r = true | |||
) |
Select a specific available item for installation.
Definition at line 157 of file Selectable.cc.
References _pimpl.
Referenced by pickNoInstall().
bool zypp::ui::Selectable::pickNoInstall | ( | const PoolItem & | pi_r, | |
ResStatus::TransactByValue | causer_r = ResStatus::USER | |||
) | [inline] |
Deselect a specific available item from installation.
Definition at line 317 of file Selectable.h.
References pickInstall().
bool zypp::ui::Selectable::pickDelete | ( | const PoolItem & | pi_r, | |
ResStatus::TransactByValue | causer_r = ResStatus::USER , |
|||
bool | yesno_r = true | |||
) |
Select a specific installed item for deletion.
Definition at line 160 of file Selectable.cc.
References _pimpl.
Referenced by pickNoDelete().
bool zypp::ui::Selectable::pickNoDelete | ( | const PoolItem & | pi_r, | |
ResStatus::TransactByValue | causer_r = ResStatus::USER | |||
) | [inline] |
Deselect a specific installed item from deletion.
Definition at line 326 of file Selectable.h.
References pickDelete().
Compute the ui::Status for an individual PoolItem.
This just takes into account the item and any identical installed (or available) one.
Assume there are 3 identical 'foo-1.1 (vendor A)' items, one 'foo-2.1 (vendor A)' and one ''foo-1.1 (vendor B)': installed: . foo-1.1 (vendor A) -> S_KeepInstalled available: foo-2.1 (vendor A) (repo 1) -> S_NoInst . foo-1.1 (vendor A) (repo 1) -> S_KeepInstalled . foo-1.1 (vendor A) (repo 2) -> S_KeepInstalled foo-1.1 (vendor B) (repo 3) -> S_NoInst After 'foo-1.1 (vendor A) (repo 1)' was selected to be installed: installed: . foo-1.1 (vendor A) -> S_Update available: foo-2.1 (vendor A) (repo 1) -> S_NoInst I foo-1.1 (vendor A) (repo 1) -> S_Update . foo-1.1 (vendor A) (repo 2) -> S_KeepInstalled foo-1.1 (vendor B) (repo 3) -> S_NoInst
Definition at line 163 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::setPickStatus | ( | const PoolItem & | pi_r, | |
Status | state_r, | |||
ResStatus::TransactByValue | causer_r = ResStatus::USER | |||
) |
Assign a new status to a specific item.
Definition at line 166 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::isUndetermined | ( | ) | const |
Returns true for packages, because packages are not classified by the solver.
Definition at line 171 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::isRelevant | ( | ) | const |
Returns true if the patch is relevant which means that at least one package of the patch is installed.
Definition at line 174 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::isSatisfied | ( | ) | const |
Whether a relevant patchs requirements are met.
Definition at line 177 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::isBroken | ( | ) | const |
Whether a relevant patchs requirements are broken.
Definition at line 180 of file Selectable.cc.
References _pimpl.
Referenced by isNeeded(), and isUnwanted().
bool zypp::ui::Selectable::isNeeded | ( | ) | const |
This includes unlocked
broken patches, as well as those already selected to be installed.
This is because already selected patches will be classified as satisfied
. Locked
but broken patches will be classified as isUnwanted.
Definition at line 183 of file Selectable.cc.
References fate(), isBroken(), locked(), and TO_INSTALL.
bool zypp::ui::Selectable::isUnwanted | ( | ) | const |
Broken (needed) but locked patches.
Definition at line 188 of file Selectable.cc.
References isBroken(), and locked().
Selectable::Fate zypp::ui::Selectable::fate | ( | ) | const |
Definition at line 203 of file Selectable.cc.
References zypp::ui::S_AutoDel, zypp::ui::S_AutoInstall, zypp::ui::S_AutoUpdate, zypp::ui::S_Del, zypp::ui::S_Install, zypp::ui::S_KeepInstalled, zypp::ui::S_NoInst, zypp::ui::S_Protected, zypp::ui::S_Taboo, zypp::ui::S_Update, status(), TO_DELETE, TO_INSTALL, and UNMODIFIED.
Referenced by isNeeded(), toDelete(), toInstall(), toModify(), and unmodified().
bool zypp::ui::Selectable::unmodified | ( | ) | const [inline] |
True if neither to delete or to install.
Definition at line 404 of file Selectable.h.
References fate(), and UNMODIFIED.
bool zypp::ui::Selectable::locked | ( | ) | const [inline] |
True if locked (subclass of unmodified).
Definition at line 408 of file Selectable.h.
References zypp::ui::S_Protected, zypp::ui::S_Taboo, and status().
Referenced by isNeeded(), and isUnwanted().
bool zypp::ui::Selectable::toModify | ( | ) | const [inline] |
True if either to delete or to install.
Definition at line 412 of file Selectable.h.
References fate(), and UNMODIFIED.
bool zypp::ui::Selectable::toDelete | ( | ) | const [inline] |
True if to delete.
Definition at line 416 of file Selectable.h.
References fate(), and TO_DELETE.
Referenced by onSystem().
bool zypp::ui::Selectable::toInstall | ( | ) | const [inline] |
True if to install.
Definition at line 420 of file Selectable.h.
References fate(), and TO_INSTALL.
Referenced by onSystem().
bool zypp::ui::Selectable::onSystem | ( | ) | const [inline] |
True if would be on system after commit.
Definition at line 424 of file Selectable.h.
References hasCandidateObj(), hasInstalledObj(), toDelete(), and toInstall().
Referenced by offSystem().
bool zypp::ui::Selectable::offSystem | ( | ) | const [inline] |
True if would be off system after commit.
Definition at line 429 of file Selectable.h.
References onSystem().
bool zypp::ui::Selectable::setFate | ( | Fate | fate_r, | |
ResStatus::TransactByValue | causer_r = ResStatus::USER | |||
) |
Definition at line 227 of file Selectable.cc.
References hasInstalledObj(), zypp::ui::S_Del, zypp::ui::S_Install, zypp::ui::S_KeepInstalled, zypp::ui::S_NoInst, zypp::ui::S_Protected, zypp::ui::S_Taboo, zypp::ui::S_Update, setStatus(), status(), TO_DELETE, TO_INSTALL, and UNMODIFIED.
Referenced by setOnSystem(), setToDelete(), setToInstall(), and unset().
bool zypp::ui::Selectable::setToInstall | ( | ResStatus::TransactByValue | causer_r = ResStatus::USER |
) | [inline] |
Set the item to be installed (new- or re-install).
Definition at line 436 of file Selectable.h.
References setFate(), and TO_INSTALL.
bool zypp::ui::Selectable::setInstalled | ( | ResStatus::TransactByValue | causer_r = ResStatus::USER |
) |
Take care the item gets installed if it is not.
Definition at line 254 of file Selectable.cc.
References hasInstalledObj(), zypp::ui::S_Install, and setStatus().
bool zypp::ui::Selectable::setUpToDate | ( | ResStatus::TransactByValue | causer_r = ResStatus::USER |
) |
Take care the item gets installed if it is not, or is older.
Definition at line 259 of file Selectable.cc.
References candidateObj(), hasInstalledObj(), installedObj(), zypp::ui::S_Install, zypp::ui::S_Update, and setStatus().
bool zypp::ui::Selectable::setToDelete | ( | ResStatus::TransactByValue | causer_r = ResStatus::USER |
) | [inline] |
bool zypp::ui::Selectable::setDeleted | ( | ResStatus::TransactByValue | causer_r = ResStatus::USER |
) |
Take care the item gets deleted if it is installed.
Definition at line 272 of file Selectable.cc.
References hasInstalledObj(), zypp::ui::S_Del, and setStatus().
bool zypp::ui::Selectable::unset | ( | ResStatus::TransactByValue | causer_r = ResStatus::USER |
) | [inline] |
Set the item to stay unmodified.
Definition at line 453 of file Selectable.h.
References setFate(), and UNMODIFIED.
Status zypp::ui::Selectable::status | ( | ) | const |
bool zypp::ui::Selectable::setStatus | ( | Status | state_r, | |
ResStatus::TransactByValue | causer_r = ResStatus::USER | |||
) |
Try to set a new Status.
Returns false
if the transitions is not allowed.
Definition at line 67 of file Selectable.cc.
References _pimpl.
Referenced by setDeleted(), setFate(), setInstalled(), and setUpToDate().
ResStatus::TransactByValue zypp::ui::Selectable::modifiedBy | ( | ) | const |
Return who caused the modification.
Definition at line 193 of file Selectable.cc.
References _pimpl.
bool zypp::ui::Selectable::hasLicenceConfirmed | ( | ) | const |
Return value of LicenceConfirmed bit.
Definition at line 196 of file Selectable.cc.
References _pimpl.
void zypp::ui::Selectable::setLicenceConfirmed | ( | bool | val_r = true |
) |
std::ostream & operator<< | ( | std::ostream & | str, | |
const Selectable & | obj | |||
) | [friend] |
Stream output
Definition at line 282 of file Selectable.cc.
std::ostream & dumpOn | ( | std::ostream & | str, | |
const Selectable & | obj | |||
) | [friend] |
More verbose stream output
Definition at line 285 of file Selectable.cc.
RW_pointer<Impl> zypp::ui::Selectable::_pimpl [private] |
Pointer to implementation.
Definition at line 495 of file Selectable.h.
Referenced by availableBegin(), availableEmpty(), availableEnd(), availableSize(), candidateObj(), candidateObjFrom(), zypp::ui::dumpOn(), hasLicenceConfirmed(), highestAvailableVersionObj(), ident(), identicalAvailable(), identicalInstalled(), installedBegin(), installedEmpty(), installedEnd(), installedObj(), installedSize(), isBroken(), isRelevant(), isSatisfied(), isUndetermined(), isUnmaintained(), kind(), modifiedBy(), multiversionInstall(), name(), zypp::ui::operator<<(), pickDelete(), pickInstall(), picklistBegin(), picklistEmpty(), picklistEnd(), picklistSize(), pickStatus(), setCandidate(), setLicenceConfirmed(), setPickStatus(), setStatus(), status(), theObj(), and updateCandidateObj().