12#ifndef ZYPP_RESSTATUS_H
13#define ZYPP_RESSTATUS_H
25 struct UserLockQueryManip;
195 {
return ! fieldValueIs<WeakField>(
NO_WEAK ); }
198 {
return fieldValueAssign<WeakField>(
NO_WEAK ); }
220 {
return fieldValueIs<ValidateField>(
SATISFIED ); }
223 {
return fieldValueIs<ValidateField>(
BROKEN ); }
226 {
return fieldValueIs<ValidateField>(
NONRELEVANT ); }
241 {
return fieldValueIs<StateField>(
INSTALLED ); }
244 {
return fieldValueIs<StateField>(
UNINSTALLED ); }
265 {
return fieldValueIs<TransactField>(
LOCKED ); }
274 {
return fieldValueIs<TransactField>(
KEEP_STATE ); }
277 {
return fieldValueIs<TransactField>(
TRANSACT ); }
291 {
return fieldValueIs<TransactByField>(
SOLVER ); }
294 {
return fieldValueIs<TransactByField>(
APPL_LOW ); }
297 {
return fieldValueIs<TransactByField>(
APPL_HIGH ); }
300 {
return fieldValueIs<TransactByField>(
USER ); }
307 if ( isLessThan<TransactByField>( causer ) ) {
308 fieldValueAssign<TransactByField>( causer );
365 return setLock(
true, causer_r );
393 if (
isLocked() && isLessThan<TransactByField>( causer_r ) )
394 fieldValueAssign<TransactByField>( causer_r );
406 fieldValueAssign<TransactField>(
LOCKED );
407 fieldValueAssign<TransactByField>( causer_r );
410 if ( isGreaterThan<TransactByField>( causer_r ) )
412 fieldValueAssign<TransactField>(
KEEP_STATE );
413 fieldValueAssign<TransactByField>(
SOLVER );
422 bool ret =
setLock( to_r, causer_r );
438 if (
transacts() && isLessThan<TransactByField>( causer_r ) )
439 fieldValueAssign<TransactByField>( causer_r );
441 fieldValueAssign<TransactDetailField>(
NO_DETAIL );
445 if ( ! fieldValueIs<TransactField>(
KEEP_STATE )
446 && isGreaterThan<TransactByField>( causer_r ) ) {
452 fieldValueAssign<TransactField>(
TRANSACT );
456 fieldValueAssign<TransactField>(
KEEP_STATE );
458 fieldValueAssign<TransactDetailField>(
NO_DETAIL );
459 fieldValueAssign<TransactByField>( causer_r );
476 if ( fieldValueIs<TransactField>(
KEEP_STATE )
477 && isLessThan<TransactByField>( causer_r ) )
478 fieldValueAssign<TransactByField>( causer_r );
488 if ( fieldValueIs<TransactField>(
KEEP_STATE ) )
489 fieldValueAssign<TransactByField>(
SOLVER );
505 if ( fieldValueIs<TransactField>(
KEEP_STATE )
507 && isGreaterThan<TransactByField>( causerLimit_r ) )
591 fieldValueAssign<TransactDetailField>(
SOFT_REMOVE);
604 return fieldValueIs<TransactDetailField> (
SOFT_INSTALL);
608 return fieldValueIs<TransactDetailField> (
SOFT_REMOVE);
612 fieldValueAssign<TransactDetailField>(flag?
SOFT_INSTALL:0);
617 fieldValueAssign<TransactDetailField>(flag?
SOFT_REMOVE:0);
629 fieldValueAssign<ValidateField>(
SATISFIED);
635 fieldValueAssign<ValidateField>(
BROKEN);
677 template<
class TField>
683 template<
class TField>
689 template<
class TField>
693 template<
class TField>
718 {
return ! (lhs == rhs); }
bool staysUninstalled() const
bool isLessThan(FieldType val_r)
bool isLicenceConfirmed() const
bool isSoftLocked() const
@ NO_DETAIL
Detail for no transact, i.e.
static const ResStatus toBeInstalled
ValidateValue validate() const
void setUserLockQueryMatch(bool match_r)
bool isGreaterThan(FieldType val_r)
compare two values.
bool isToBeInstalledSoft() const
bit::Range< FieldType, StateField::end, 2 > ValidateField
bool onSystem() const
True if would be on system after commit.
bit::BitField< FieldType > BitFieldType
bool setToBeUninstalled(TransactByValue causer)
bool setToBeUninstalledDueToObsolete()
static const ResStatus toBeUninstalledDueToObsolete
void setLicenceConfirmed(bool toVal_r=true)
bool setSoftInstall(bool flag)
void setRecommended(bool toVal_r=true)
bool maySetSoftTransact(bool val_r, TransactByValue causer)
static ValidateValue stringToValidateValue(const std::string &str_r)
ValidateValue from string used in the history file.
bool maySetTransactValue(TransactValue newVal_r, TransactByValue causer_r)
bool setTransactValue(TransactValue newVal_r, TransactByValue causer_r)
Set TransactValue.
bool isUndetermined() const
bool fieldValueIs(FieldType val_r) const
Return whether the corresponding Field has value val_r.
friend std::ostream & operator<<(std::ostream &str, const ResStatus &obj)
bit::Range< FieldType, TransactDetailField::end, 1 > LicenceConfirmedField
bool setTransact(bool toTansact_r, TransactByValue causer_r)
Toggle between TRANSACT and KEEP_STATE.
bool isToBeInstalled() const
bit::Range< FieldType, LicenceConfirmedField::end, 4 > WeakField
bool offSystem() const
True if would be off system after commit.
bool isByApplHigh() const
void setOrphaned(bool toVal_r=true)
bool isNonRelevant() const
bool setToBeInstalled(TransactByValue causer)
void setUnneeded(bool toVal_r=true)
bool isUserLockQueryMatch() const
bool setStatus(ResStatus newStatus_r)
bool wasInstalled() const
bool setToBeUninstalledSoft()
bool maySetToBeUninstalled(TransactByValue causer)
bool setSoftLock(TransactByValue causer_r)
bool setLock(bool toLock_r, TransactByValue causer_r)
Apply a lock (prevent transaction).
TransactValue getTransactValue() const
bool staysInstalled() const
static const ResStatus toBeUninstalledDueToUpgrade
bool maySetToBeInstalled(TransactByValue causer)
bool isToBeUninstalledDueToObsolete() const
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r, TransactByValue causerLimit_r)
Soft toggle between TRANSACT and KEEP_STATE.
bit::Range< FieldType, TransactByField::end, 2 > TransactDetailField
bit::Range< FieldType, TransactField::end, 2 > TransactByField
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r)
bool setToBeInstalledSoft()
static const ResStatus toBeUninstalled
bit::Range< FieldType, WeakField::end, 1 > UserLockQueryField
bool isUserLocked() const
bool wasUninstalled() const
bit::Range< FieldType, ValidateField::end, 2 > TransactField
bool maySetToBeUninstalledSoft()
bool isRecommended() const
BitFieldType bitfield() const
Debug helper returning the bitfield.
bool maySetTransact(bool val_r, TransactByValue causer)
bool operator!=(const ResStatus &lhs, const ResStatus &rhs)
bool isToBeUninstalled() const
std::string validateValueAsString() const
bool isToBeUninstalledDueToUpgrade() const
TransactByValue getTransactByValue() const
bit::Range< FieldType, 0, 1 > StateField
bool resetTransact(TransactByValue causer_r)
Not the same as setTransact( false ).
void setSuggested(bool toVal_r=true)
bool setSoftUninstall(bool flag)
bool maySetSoftTransact(bool val_r, TransactByValue causer, TransactByValue causerLimit_r)
bool setTransactByValue(TransactByValue causer)
bool maySetLock(bool to_r, TransactByValue causer_r)
bool isToBeInstalledNotSoft() const
void fieldValueAssign(FieldType val_r)
Set the corresponding Field to value val_r.
bool setToBeUninstalledDueToUpgrade(TransactByValue causer)
bool isToBeUninstalledSoft() const
bool isUninstalled() const
friend bool operator==(const ResStatus &lhs, const ResStatus &rhs)
An integral type used as BitField.
bool test(TInt rhs)
Test whether all bits of rhs are set.
BitField & set(TInt rhs, bool doset_r)
Set or unset bits of rhs.
BitField & assign(TInt rhs)
Assign Range in rhs to this.
TInt value() const
Return the value.
bool isEqual(TInt rhs) const
Test for equal value within a Range.
StatusBackup(ResStatus &status_r)
ResStatus::BitFieldType _bitfield
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
Range of bits starting at bit _begin with length _size.
Manipulator for ResStatus::UserLockQueryField.