12 #ifndef ZYPP_RESSTATUS_H
13 #define ZYPP_RESSTATUS_H
25 class UserLockQueryManip;
195 {
return fieldValueAssign<WeakField>(
NO_WEAK ); }
217 {
return fieldValueIs<ValidateField>(
SATISFIED ); }
220 {
return fieldValueIs<ValidateField>(
BROKEN ); }
223 {
return fieldValueIs<ValidateField>(
NONRELEVANT ); }
229 {
return fieldValueIs<StateField>(
INSTALLED ); }
232 {
return fieldValueIs<StateField>(
UNINSTALLED ); }
253 {
return fieldValueIs<TransactField>(
LOCKED ); }
262 {
return fieldValueIs<TransactField>(
KEEP_STATE ); }
265 {
return fieldValueIs<TransactField>(
TRANSACT ); }
279 {
return fieldValueIs<TransactByField>(
SOLVER ); }
282 {
return fieldValueIs<TransactByField>(
APPL_LOW ); }
285 {
return fieldValueIs<TransactByField>(
APPL_HIGH ); }
288 {
return fieldValueIs<TransactByField>(
USER ); }
295 if ( isLessThan<TransactByField>( causer ) ) {
296 fieldValueAssign<TransactByField>( causer );
354 return setLock(
true, causer_r );
382 if (
isLocked() && isLessThan<TransactByField>( causer_r ) )
383 fieldValueAssign<TransactByField>( causer_r );
395 fieldValueAssign<TransactField>(
LOCKED );
396 fieldValueAssign<TransactByField>( causer_r );
399 if ( isGreaterThan<TransactByField>( causer_r ) )
401 fieldValueAssign<TransactField>(
KEEP_STATE );
402 fieldValueAssign<TransactByField>(
SOLVER );
411 bool ret =
setLock( to_r, causer_r );
427 if (
transacts() && isLessThan<TransactByField>( causer_r ) )
428 fieldValueAssign<TransactByField>( causer_r );
430 fieldValueAssign<TransactDetailField>(
NO_DETAIL );
434 if ( ! fieldValueIs<TransactField>(
KEEP_STATE )
435 && isGreaterThan<TransactByField>( causer_r ) ) {
441 fieldValueAssign<TransactField>(
TRANSACT );
445 fieldValueAssign<TransactField>(
KEEP_STATE );
447 fieldValueAssign<TransactDetailField>(
NO_DETAIL );
448 fieldValueAssign<TransactByField>( causer_r );
465 if ( fieldValueIs<TransactField>(
KEEP_STATE )
466 && isLessThan<TransactByField>( causer_r ) )
467 fieldValueAssign<TransactByField>( causer_r );
477 if ( fieldValueIs<TransactField>(
KEEP_STATE ) )
478 fieldValueAssign<TransactByField>(
SOLVER );
494 if ( fieldValueIs<TransactField>(
KEEP_STATE )
496 && isGreaterThan<TransactByField>( causerLimit_r ) )
580 fieldValueAssign<TransactDetailField>(
SOFT_REMOVE);
593 return fieldValueIs<TransactDetailField> (
SOFT_INSTALL);
597 return fieldValueIs<TransactDetailField> (
SOFT_REMOVE);
601 fieldValueAssign<TransactDetailField>(flag?
SOFT_INSTALL:0);
606 fieldValueAssign<TransactDetailField>(flag?
SOFT_REMOVE:0);
618 fieldValueAssign<ValidateField>(
SATISFIED);
624 fieldValueAssign<ValidateField>(
BROKEN);
666 template<
class _Field>
672 template<
class _Field>
678 template<
class _Field>
682 template<
class _Field>
707 {
return ! (lhs == rhs); }
737 #endif // ZYPP_RESSTATUS_H
bool setSoftInstall(bool flag)
bool setTransactByValue(TransactByValue causer)
StatusBackup(ResStatus &status_r)
_IntT value() const
Return the value.
bit::BitField< FieldType > BitFieldType
bool staysUninstalled() const
friend std::ostream & operator<<(std::ostream &str, const ResStatus &obj)
TransactValue getTransactValue() const
bool isToBeUninstalledDueToUpgrade() const
ResStatus::BitFieldType _bitfield
bool isToBeUninstalled() const
bool setSoftUninstall(bool flag)
bool isNonRelevant() const
bool isToBeInstalledSoft() const
bit::Range< FieldType, LicenceConfirmedField::end, 4 > WeakField
bool isToBeUninstalledSoft() const
static const ResStatus toBeInstalled
bool wasUninstalled() const
friend bool operator==(const ResStatus &lhs, const ResStatus &rhs)
bool isUninstalled() const
bool isGreaterThan(FieldType val_r)
compare two values.
void setOrphaned(bool toVal_r=true)
Detail for no transact, i.e.
ValidateValue validate() const
Manipulator for ResStatus::UserLockQueryField.
bool maySetLock(bool to_r, TransactByValue causer_r)
bool resetTransact(TransactByValue causer_r)
Not the same as setTransact( false ).
bit::Range< FieldType, WeakField::end, 1 > UserLockQueryField
void setLicenceConfirmed(bool toVal_r=true)
bool setToBeUninstalledDueToUpgrade(TransactByValue causer)
bool onSystem() const
True if would be on system after commit.
static const ResStatus toBeUninstalledDueToUpgrade
bool setSoftLock(TransactByValue causer_r)
bool maySetToBeInstalled(TransactByValue causer)
bool isLessThan(FieldType val_r)
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r, TransactByValue causerLimit_r)
Soft toggle between TRANSACT and KEEP_STATE.
BitField & assign(_IntT rhs)
Assign Range in rhs to this.
BitField & set(_IntT rhs, bool doset_r)
Set or unset bits of rhs.
BitFieldType bitfield() const
Debug helper returning the bitfield.
std::ostream & operator<<(std::ostream &str, const Exception &obj)
bit::Range< FieldType, TransactField::end, 2 > TransactByField
bit::Range< FieldType, ValidateField::end, 2 > TransactField
bool setTransactValue(TransactValue newVal_r, TransactByValue causer_r)
Set TransactValue.
bool maySetTransact(bool val_r, TransactByValue causer)
bool maySetTransactValue(TransactValue newVal_r, TransactByValue causer_r)
bit::Range< FieldType, TransactDetailField::end, 1 > LicenceConfirmedField
static const ResStatus toBeUninstalledDueToObsolete
bit::Range< FieldType, StateField::end, 2 > ValidateField
bit::Range< FieldType, 0, 1 > StateField
bool isUserLocked() const
bool setLock(bool toLock_r, TransactByValue causer_r)
Apply a lock (prevent transaction).
bool isByApplHigh() const
bool maySetToBeUninstalledSoft()
bool isLicenceConfirmed() const
bool setToBeUninstalled(TransactByValue causer)
bool setTransact(bool toTansact_r, TransactByValue causer_r)
Toggle between TRANSACT and KEEP_STATE.
bool isUndetermined() const
void setUserLockQueryMatch(bool match_r)
bool maySetSoftTransact(bool val_r, TransactByValue causer, TransactByValue causerLimit_r)
bit::Range< FieldType, TransactByField::end, 2 > TransactDetailField
void setRecommended(bool toVal_r=true)
bool fieldValueIs(FieldType val_r) const
Return whether the corresponding Field has value val_r.
bool isToBeInstalled() const
bool setStatus(ResStatus newStatus_r)
bool wasInstalled() const
bool maySetSoftTransact(bool val_r, TransactByValue causer)
bool setToBeUninstalledSoft()
bool maySetToBeUninstalled(TransactByValue causer)
bool isToBeUninstalledDueToObsolete() const
bool setToBeInstalled(TransactByValue causer)
bool isEqual(_IntT rhs) const
Test for equal value within a Range.
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r)
bool isSoftLocked() const
void fieldValueAssign(FieldType val_r)
Set the corresponding Field to value val_r.
bool setToBeInstalledSoft()
void setUnneeded(bool toVal_r=true)
bool isToBeInstalledNotSoft() const
Range of bits starting at bit _begin with length _size.
static const ResStatus toBeUninstalled
bool setToBeUninstalledDueToObsolete()
bool offSystem() const
True if would be off system after commit.
bool isUserLockQueryMatch() const
TransactByValue getTransactByValue() const
bool staysInstalled() const
bool isRecommended() const
bool test(_IntT rhs)
Test whether all bits of rhs are set.
void setSuggested(bool toVal_r=true)
bool operator!=(const ResStatus &lhs, const ResStatus &rhs)