58 using Ptr = intrusive_ptr<Selectable>;
59 using constPtr = intrusive_ptr<const Selectable>;
89 static Ptr get(
ResKind kind_r,
const std::string & name_r )
93 static Ptr get(
const std::string & name_r )
102 {
return resolvable_r ? get( resolvable_r->satSolvable() ) :
Ptr(); }
121 const std::string & name()
const;
150 PoolItem updateCandidateObj()
const;
158 PoolItem highestAvailableVersionObj()
const;
161 bool identIsAutoInstalled()
const;
167 bool identicalAvailable(
const PoolItem & rhs )
const;
173 bool identicalInstalled(
const PoolItem & rhs )
const;
178 bool identicalInstalledCandidate()
const
179 {
return identicalInstalled( candidateObj() ); }
184 bool identicalInstalledUpdateCandidate()
const
185 {
return identicalInstalled( updateCandidateObj() ); }
191 PoolItem identicalAvailableObj(
const PoolItem & rhs )
const;
197 PoolItem identicalInstalledObj(
const PoolItem & rhs )
const;
206 typename ResTraits<TRes>::constPtrType installedAsKind()
const
207 {
return asKind<TRes>( candidateObj() ); }
216 typename ResTraits<TRes>::constPtrType candidateAsKind()
const
217 {
return asKind<TRes>( candidateObj() ); }
227 PoolItem setCandidate(
const PoolItem & newCandidate_r, ResStatus::TransactByValue causer_r = ResStatus::USER );
229 PoolItem setCandidate(
const ResObject::constPtr& newCandidate_r, ResStatus::TransactByValue causer_r = ResStatus::USER );
237 bool setOnSystem(
const PoolItem & newCandidate_r, ResStatus::TransactByValue causer_r = ResStatus::USER );
244 PoolItem theObj()
const;
250 std::vector<std::string> supersededBy()
const;
258 bool availableEmpty()
const;
259 available_size_type availableSize()
const;
263 {
return makeIterable( availableBegin(), availableEnd() ); }
272 bool installedEmpty()
const;
273 installed_size_type installedSize()
const;
277 {
return makeIterable( installedBegin(), installedEnd() ); }
287 bool picklistEmpty()
const;
288 picklist_size_type picklistSize()
const;
292 {
return makeIterable( picklistBegin(), picklistEnd() ); }
314 bool hasObject()
const
315 {
return (! installedEmpty()) || candidateObj(); }
318 bool hasInstalledObj()
const
319 {
return ! installedEmpty(); }
322 bool hasCandidateObj()
const
323 {
return bool(candidateObj()); }
326 bool hasBothObjects()
const
327 {
return (! installedEmpty()) && candidateObj(); }
330 bool hasInstalledObjOnly()
const
331 {
return (! installedEmpty()) && ! candidateObj(); }
334 bool hasCandidateObjOnly()
const
335 {
return ( installedEmpty() ) && candidateObj(); }
339 bool hasBlacklisted()
const;
342 bool hasBlacklistedInstalled()
const;
345 bool hasRetracted()
const;
348 bool hasRetractedInstalled()
const;
354 bool hasPtfInstalled()
const;
361 bool isUnmaintained()
const;
374 bool multiversionInstall()
const;
383 {
return pickInstall( pi_r, causer_r,
false ); }
392 {
return pickDelete( pi_r, causer_r,
false ); }
417 Status pickStatus(
const PoolItem & pi_r )
const;
420 bool setPickStatus(
const PoolItem & pi_r, Status state_r, ResStatus::TransactByValue causer_r = ResStatus::USER );
432 bool isUndetermined()
const;
437 bool isRelevant()
const;
440 bool isSatisfied()
const;
443 bool isBroken()
const;
450 bool isNeeded()
const;
453 bool isUnwanted()
const;
469 bool unmodified()
const
470 {
return fate() == UNMODIFIED; }
479 {
Status st( status() );
return( st == S_Protected || st == S_Taboo ); }
486 bool hasLocks()
const;
489 bool toModify()
const
490 {
return fate() != UNMODIFIED; }
493 bool toDelete()
const
494 {
return fate() == TO_DELETE; }
497 bool toInstall()
const
498 {
return fate() == TO_INSTALL; }
501 bool onSystem()
const
502 {
return( ( hasInstalledObj() && !toDelete() )
503 ||( hasCandidateObj() && toInstall() ) ); }
506 bool offSystem()
const
507 {
return ! onSystem(); }
514 {
return setFate( TO_INSTALL, causer_r ); }
524 {
return setFate( TO_DELETE, causer_r ); }
531 {
return setFate( UNMODIFIED, causer_r ); }
555 bool hasLicenceConfirmed()
const;
558 void setLicenceConfirmed(
bool val_r =
true );
564 using Impl_Ptr = shared_ptr<Impl>;