libzypp: zypp/ResStatus.h Source File

libzypp 17.38.14

ResStatus.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_RESSTATUS_H
13#define ZYPP_RESSTATUS_H
14
15#include <inttypes.h>
16#include <iosfwd>
17#include <zypp/Bit.h>
18#include <zypp-core/Globals.h>
19
21namespace zypp
22{
23
24 namespace resstatus
25 {
26 struct UserLockQueryManip;
27 class StatusBackup;
28 }
29
31 //
32 // CLASS NAME : ResStatus
33 //
54 class ZYPP_API ResStatus
55 {
56 friend std::ostream & operator<<( std::ostream & str, const ResStatus & obj );
57 friend bool operator==( const ResStatus & lhs, const ResStatus & rhs );
58
59 public:
66 using FieldType = uint16_t;
67 using BitFieldType = bit::BitField<FieldType>;
68 // Bit Ranges within FieldType defined by 1st bit and size:
69 using StateField = bit::Range<FieldType, 0 , 1>;
70 using ValidateField = bit::Range<FieldType, StateField::end , 2>;
71 using TransactField = bit::Range<FieldType, ValidateField::end , 2>;
72 using TransactByField = bit::Range<FieldType, TransactField::end , 2>;
73 using TransactDetailField = bit::Range<FieldType, TransactByField::end , 2>;
74 using LicenceConfirmedField = bit::Range<FieldType, TransactDetailField::end , 1>;
75 using WeakField = bit::Range<FieldType, LicenceConfirmedField::end, 4>;
76 using UserLockQueryField = bit::Range<FieldType, WeakField::end , 1>; // internal
77 // enlarge FieldType if more bits are needed. It's not yet
78 // checked by the compiler.
80 public:
81
89 enum StateValue
90 {
91 UNINSTALLED = bit::RangeValue<StateField,0>::value,
92 INSTALLED = bit::RangeValue<StateField,1>::value
93 };
94 enum ValidateValue
95 {
96 UNDETERMINED = bit::RangeValue<ValidateField,0>::value,
97 BROKEN = bit::RangeValue<ValidateField,1>::value,
98 SATISFIED = bit::RangeValue<ValidateField,2>::value,
99 NONRELEVANT = bit::RangeValue<ValidateField,3>::value
100 };
101 enum TransactValue
102 {
103 KEEP_STATE = bit::RangeValue<TransactField,0>::value,
104 LOCKED = bit::RangeValue<TransactField,1>::value, // locked, must not transact
105 TRANSACT = bit::RangeValue<TransactField,2>::value // transact according to state
106 };
107 enum TransactByValue
108 {
109 SOLVER = bit::RangeValue<TransactByField,0>::value,
110 APPL_LOW = bit::RangeValue<TransactByField,1>::value,
111 APPL_HIGH = bit::RangeValue<TransactByField,2>::value,
112 USER = bit::RangeValue<TransactByField,3>::value
113 };
114
115 enum DetailValue
116 {
118 NO_DETAIL = bit::RangeValue<TransactDetailField,0>::value,
119 };
120 enum InstallDetailValue
121 {
122 EXPLICIT_INSTALL = bit::RangeValue<TransactDetailField,0>::value,
123 SOFT_INSTALL = bit::RangeValue<TransactDetailField,1>::value
124 };
125 enum RemoveDetailValue
126 {
127 EXPLICIT_REMOVE = bit::RangeValue<TransactDetailField,0>::value,
128 SOFT_REMOVE = bit::RangeValue<TransactDetailField,1>::value,
129 DUE_TO_OBSOLETE = bit::RangeValue<TransactDetailField,2>::value,
130 DUE_TO_UPGRADE = bit::RangeValue<TransactDetailField,3>::value
131 };
132
133 enum LicenceConfirmedValue
134 {
135 LICENCE_UNCONFIRMED = bit::RangeValue<LicenceConfirmedField,0>::value,
136 LICENCE_CONFIRMED = bit::RangeValue<LicenceConfirmedField,1>::value
137 };
138
139 enum WeakValue // Unlike the other fields those are BITS that may be or'ed!
140 {
141 NO_WEAK = bit::RangeValue<WeakField,0>::value,
142 SUGGESTED = bit::RangeValue<WeakField,1<<0>::value,
143 RECOMMENDED = bit::RangeValue<WeakField,1<<1>::value,
144 ORPHANED = bit::RangeValue<WeakField,1<<2>::value,
145 UNNEEDED = bit::RangeValue<WeakField,1<<3>::value
146 };
147
148 enum UserLockQuery // internal
149 {
150 USERLOCK_NOMATCH = bit::RangeValue<UserLockQueryField,0>::value,
151 USERLOCK_MATCH = bit::RangeValue<UserLockQueryField,1>::value
152 };
153
154
155 public:
156
158 ResStatus();
159
161 ResStatus( bool isInstalled_r );
162
164 ~ResStatus();
165
166 ResStatus(const ResStatus &) = default;
167 ResStatus(ResStatus &&) noexcept = default;
168 ResStatus &operator=(const ResStatus &) = default;
169 ResStatus &operator=(ResStatus &&) noexcept = default;
170
176 BitFieldType bitfield() const
177 { return _bitfield; }
178
179 public:
180
181 bool isLicenceConfirmed() const
182 { return fieldValueIs<LicenceConfirmedField>( LICENCE_CONFIRMED ); }
183
184 void setLicenceConfirmed( bool toVal_r = true )
185 { fieldValueAssign<LicenceConfirmedField>( toVal_r ? LICENCE_CONFIRMED : LICENCE_UNCONFIRMED ); }
186
187 public:
188 bool isRecommended() const
189 { return _bitfield.test( RECOMMENDED ); }
190
191 bool isSuggested() const
192 { return _bitfield.test( SUGGESTED ); }
193
194 bool isOrphaned() const
195 { return _bitfield.test( ORPHANED ); }
196
197 bool isUnneeded() const
198 { return _bitfield.test( UNNEEDED ); }
199
200 bool hasWeak() const
201 { return ! fieldValueIs<WeakField>( NO_WEAK ); }
202
203 void resetWeak()
204 { return fieldValueAssign<WeakField>( NO_WEAK ); }
205
206 void setRecommended( bool toVal_r = true )
207 { _bitfield.set( RECOMMENDED, toVal_r ); }
208
209 void setSuggested( bool toVal_r = true )
210 { _bitfield.set( SUGGESTED, toVal_r ); }
211
212 void setOrphaned( bool toVal_r = true )
213 { _bitfield.set( ORPHANED, toVal_r ); }
214
215 void setUnneeded( bool toVal_r = true )
216 { _bitfield.set( UNNEEDED, toVal_r ); }
217
218 public:
219 ValidateValue validate() const
220 { return (ValidateValue)_bitfield.value<ValidateField>(); }
221
222 bool isUndetermined() const
223 { return fieldValueIs<ValidateField>( UNDETERMINED ); }
224
225 bool isSatisfied() const
226 { return fieldValueIs<ValidateField>( SATISFIED ); }
227
228 bool isBroken() const
229 { return fieldValueIs<ValidateField>( BROKEN ); }
230
231 bool isNonRelevant() const
232 { return fieldValueIs<ValidateField>( NONRELEVANT ); }
233
234 std::string validateValueAsString() const
235 { return validateValueAsString( validate() ); }
236
238 static std::string validateValueAsString( ValidateValue val_r );
239
241 static ValidateValue stringToValidateValue( const std::string & str_r );
242
243 public:
244 // These two are IMMUTABLE!
245
246 bool isInstalled() const
247 { return fieldValueIs<StateField>( INSTALLED ); }
248
249 bool isUninstalled() const
250 { return fieldValueIs<StateField>( UNINSTALLED ); }
251
252 public:
253
254 bool staysInstalled() const
255 { return isInstalled() && !transacts(); }
256
257 bool wasInstalled() const { return staysInstalled(); } //for old status
258
259 bool isToBeInstalled() const
260 { return isUninstalled() && transacts(); }
261
262 bool staysUninstalled() const
263 { return isUninstalled() && !transacts(); }
264
265 bool wasUninstalled() const { return staysUninstalled(); } // for old status
266
267 bool isToBeUninstalled() const
268 { return isInstalled() && transacts(); }
269
270 bool isLocked() const
271 { return fieldValueIs<TransactField>( LOCKED ); }
272
273 bool isUserLocked() const
274 { return isLocked() && isByUser(); }
275
276 bool isSoftLocked() const
277 { return isKept() && ( isByApplLow() || isByUser() ); }
278
279 bool isKept() const
280 { return fieldValueIs<TransactField>( KEEP_STATE ); }
281
282 bool transacts() const
283 { return fieldValueIs<TransactField>( TRANSACT ); }
284
285 TransactValue getTransactValue() const
286 { return (TransactValue)_bitfield.value<TransactField>(); }
287
289 bool onSystem() const
290 { return( isInstalled() != transacts() ); }
291
293 bool offSystem() const
294 { return ! onSystem(); }
295
296 bool isBySolver() const
297 { return fieldValueIs<TransactByField>( SOLVER ); }
298
299 bool isByApplLow() const
300 { return fieldValueIs<TransactByField>( APPL_LOW ); }
301
302 bool isByApplHigh() const
303 { return fieldValueIs<TransactByField>( APPL_HIGH ); }
304
305 bool isByUser() const
306 { return fieldValueIs<TransactByField>( USER ); }
307
308 TransactByValue getTransactByValue() const
309 { return (TransactByValue)_bitfield.value<TransactByField>(); }
310
311 bool setTransactByValue(TransactByValue causer)
312 {
313 if ( isLessThan<TransactByField>( causer ) ) {
314 fieldValueAssign<TransactByField>( causer );
315 return true;
316 } else {
317 return false;
318 }
319 }
320
321 bool isToBeUninstalledDueToObsolete () const
322 { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( DUE_TO_OBSOLETE ); }
323
324 bool isToBeUninstalledDueToUpgrade() const
325 { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( DUE_TO_UPGRADE ); }
326
327 bool isToBeInstalledSoft () const
328 { return isToBeInstalled() && fieldValueIs<TransactDetailField>( SOFT_INSTALL ); }
329
330 bool isToBeInstalledNotSoft () const
331 { return isToBeInstalled() && !fieldValueIs<TransactDetailField>( SOFT_INSTALL ); }
332
333 bool isToBeUninstalledSoft () const
334 { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( SOFT_REMOVE ); }
335
336 private:
339 friend struct resstatus::UserLockQueryManip;
340
341 void setUserLockQueryMatch( bool match_r )
342 { fieldValueAssign<UserLockQueryField>( match_r ? USERLOCK_MATCH : USERLOCK_NOMATCH ); }
343
344 public:
345 bool isUserLockQueryMatch() const
346 { return fieldValueIs<UserLockQueryField>( USERLOCK_MATCH ); }
347
348 public:
349
350 //------------------------------------------------------------------------
351 // get/set functions, returning \c true if requested status change
352 // was successful (i.e. leading to the desired transaction).
353 // If a lower level (e.g.SOLVER) wants to transact, but it's
354 // already set by a higher level, \c true should be returned.
355 // Removing a higher levels transaction bit should fail.
356 //
357 // The may functions checks only, if the action would return true
358 // if it is called.
359
363 bool setTransactValue( TransactValue newVal_r, TransactByValue causer_r )
364 {
365 switch ( newVal_r )
366 {
367 case KEEP_STATE:
368 return setTransact( false, causer_r );
369 break;
370 case LOCKED:
371 return setLock( true, causer_r );
372 break;
373 case TRANSACT:
374 return setTransact( true, causer_r );
375 break;
376 }
377 return false;
378 }
379
380 bool maySetTransactValue( TransactValue newVal_r, TransactByValue causer_r )
381 {
382 bit::BitField<FieldType> savBitfield = _bitfield;
383 bool ret = setTransactValue( newVal_r, causer_r );
384 _bitfield = savBitfield;
385 return ret;
386 }
387
393 bool setLock( bool toLock_r, TransactByValue causer_r )
394 {
395 if ( toLock_r == isLocked() )
396 {
397 // we're already in the desired state, but in case of
398 // LOCKED, remember a superior causer.
399 if ( isLocked() && isLessThan<TransactByField>( causer_r ) )
400 fieldValueAssign<TransactByField>( causer_r );
401 return true;
402 }
403 // Here: Lock status is to be changed:
404 if ( causer_r != USER && causer_r != APPL_HIGH )
405 return false;
406 if ( toLock_r ) {
407 // We're in unlocked state, which includes TRANSACT.
408 // Causer must be allowed to reset this. But from
409 // KEEP_STATE every causer is allowed to set the lock.
410 if ( ! setTransact( false, causer_r ) )
411 return false;
412 fieldValueAssign<TransactField>( LOCKED );
413 fieldValueAssign<TransactByField>( causer_r );
414 } else {
415 // To leave Locked state it needs a superior causer.
416 if ( isGreaterThan<TransactByField>( causer_r ) )
417 return false;
418 fieldValueAssign<TransactField>( KEEP_STATE );
419 fieldValueAssign<TransactByField>( SOLVER ); // reset to lowest causer
420 // in order to distinguish from keep_state_by_user
421 }
422 return true;
423 }
424
425 bool maySetLock( bool to_r, TransactByValue causer_r )
426 {
427 bit::BitField<FieldType> savBitfield = _bitfield;
428 bool ret = setLock( to_r, causer_r );
429 _bitfield = savBitfield;
430 return ret;
431 }
432
438 bool setTransact( bool toTansact_r, TransactByValue causer_r )
439 {
440 if ( toTansact_r == transacts() )
441 {
442 // we're already in the desired state, but in case of
443 // TRANSACT, remember a superior causer.
444 if ( transacts() && isLessThan<TransactByField>( causer_r ) )
445 fieldValueAssign<TransactByField>( causer_r );
446
447 fieldValueAssign<TransactDetailField>( NO_DETAIL ); // Details has to be set again
448 return true;
449 }
450 // Here: transact status is to be changed:
451 if ( ! fieldValueIs<TransactField>( KEEP_STATE )
452 && isGreaterThan<TransactByField>( causer_r ) ) {
453 return false;
454 }
455
456 if ( toTansact_r )
457 {
458 fieldValueAssign<TransactField>( TRANSACT );
459 }
460 else
461 {
462 fieldValueAssign<TransactField>( KEEP_STATE );
463 }
464 fieldValueAssign<TransactDetailField>( NO_DETAIL ); // Details has to be set again
465 fieldValueAssign<TransactByField>( causer_r );
466 return true;
467 }
468
469 bool maySetTransact( bool val_r, TransactByValue causer )
470 {
471 bit::BitField<FieldType> savBitfield = _bitfield;
472 bool ret = setTransact (val_r, causer);
473 _bitfield = savBitfield;
474 return ret;
475 }
476
478 bool setSoftLock( TransactByValue causer_r )
479 {
480 if ( ! setTransact( false, causer_r ) )
481 return false;
482 if ( fieldValueIs<TransactField>( KEEP_STATE )
483 && isLessThan<TransactByField>( causer_r ) )
484 fieldValueAssign<TransactByField>( causer_r );
485 return true;
486 }
487
490 bool resetTransact( TransactByValue causer_r )
491 {
492 if ( ! setTransact( false, causer_r ) )
493 return false;
494 if ( fieldValueIs<TransactField>( KEEP_STATE ) )
495 fieldValueAssign<TransactByField>( SOLVER );
496 return true;
497 }
498
508 bool setSoftTransact( bool toTansact_r, TransactByValue causer_r,
509 TransactByValue causerLimit_r )
510 {
511 if ( fieldValueIs<TransactField>( KEEP_STATE )
512 && toTansact_r != transacts()
513 && isGreaterThan<TransactByField>( causerLimit_r ) )
514 {
515 // any transact status change requires a superior causer.
516 return false;
517 }
518 return setTransact( toTansact_r, causer_r );
519 }
520
521 bool setSoftTransact( bool toTansact_r, TransactByValue causer_r )
522 { return setSoftTransact( toTansact_r, causer_r, causer_r ); }
523
524 bool maySetSoftTransact( bool val_r, TransactByValue causer,
525 TransactByValue causerLimit_r )
526 {
527 bit::BitField<FieldType> savBitfield = _bitfield;
528 bool ret = setSoftTransact( val_r, causer, causerLimit_r );
529 _bitfield = savBitfield;
530 return ret;
531 }
532
533 bool maySetSoftTransact( bool val_r, TransactByValue causer )
534 { return maySetSoftTransact( val_r, causer, causer ); }
535
536 bool setToBeInstalled (TransactByValue causer)
537 {
538 if (isInstalled()) return false;
539 return setTransact (true, causer);
540 }
541
542 bool maySetToBeInstalled (TransactByValue causer)
543 {
544 bit::BitField<FieldType> savBitfield = _bitfield;
545 bool ret = setToBeInstalled (causer);
546 _bitfield = savBitfield;
547 return ret;
548 }
549
550 bool setToBeUninstalled (TransactByValue causer)
551 {
552 if (!isInstalled()) return false;
553 return setTransact (true, causer);
554 }
555
556 bool maySetToBeUninstalled (TransactByValue causer)
557 {
558 bit::BitField<FieldType> savBitfield = _bitfield;
559 bool ret = setToBeUninstalled (causer);
560 _bitfield = savBitfield;
561 return ret;
562 }
563
564 //------------------------------------------------------------------------
565 // *** These are only for the Resolver ***
566
567 bool setToBeUninstalledDueToObsolete ( )
568 {
569 if (!setToBeUninstalled (SOLVER)) return false;
570 fieldValueAssign<TransactDetailField>(DUE_TO_OBSOLETE);
571 return true;
572 }
573
574 bool setToBeUninstalledDueToUpgrade ( TransactByValue causer )
575 {
576 if (!setToBeUninstalled (causer)) return false;
577 fieldValueAssign<TransactDetailField>(DUE_TO_UPGRADE);
578 return true;
579 }
580
581 bool setToBeInstalledSoft ( )
582 {
583 if (isInstalled()
584 || !setSoftTransact (true, SOLVER))
585 return false;
586
587 fieldValueAssign<TransactDetailField>(SOFT_INSTALL);
588 return true;
589 }
590
591 bool setToBeUninstalledSoft ( )
592 {
593 if (!isInstalled()
594 || !setSoftTransact (true, SOLVER))
595 return false;
596
597 fieldValueAssign<TransactDetailField>(SOFT_REMOVE);
598 return true;
599 }
600
601 bool maySetToBeUninstalledSoft ()
602 {
603 bit::BitField<FieldType> savBitfield = _bitfield;
604 bool ret = setToBeUninstalledSoft ();
605 _bitfield = savBitfield;
606 return ret;
607 }
608
609 bool isSoftInstall () {
610 return fieldValueIs<TransactDetailField> (SOFT_INSTALL);
611 }
612
613 bool isSoftUninstall () {
614 return fieldValueIs<TransactDetailField> (SOFT_REMOVE);
615 }
616
617 bool setSoftInstall (bool flag) {
618 fieldValueAssign<TransactDetailField>(flag?SOFT_INSTALL:0);
619 return true;
620 }
621
622 bool setSoftUninstall (bool flag) {
623 fieldValueAssign<TransactDetailField>(flag?SOFT_REMOVE:0);
624 return true;
625 }
626
627 bool setUndetermined ()
628 {
629 fieldValueAssign<ValidateField>(UNDETERMINED);
630 return true;
631 }
632
633 bool setSatisfied ()
634 {
635 fieldValueAssign<ValidateField>(SATISFIED);
636 return true;
637 }
638
639 bool setBroken ()
640 {
641 fieldValueAssign<ValidateField>(BROKEN);
642 return true;
643 }
644
645 bool setNonRelevant ()
646 {
647 fieldValueAssign<ValidateField>(NONRELEVANT);
648 return true;
649 }
650
651 bool setStatus( const ResStatus& newStatus_r )
652 {
653 // State field is immutable!
654 if ( _bitfield.value<StateField>() != newStatus_r._bitfield.value<StateField>() )
655 return false;
656 // Transaction state change allowed?
657 if ( ! setTransactValue( newStatus_r.getTransactValue(), newStatus_r.getTransactByValue() ) )
658 return false;
659
660 // Ok, we take it all..
661 _bitfield = newStatus_r._bitfield;
662 return true;
663 }
664
667 static const ResStatus toBeInstalled;
668 static const ResStatus toBeUninstalled;
669 static const ResStatus toBeUninstalledDueToUpgrade;
670 static const ResStatus toBeUninstalledDueToObsolete;
672
673 private:
675 ResStatus( StateValue s,
676 ValidateValue v = UNDETERMINED,
677 TransactValue t = KEEP_STATE,
678 InstallDetailValue i = EXPLICIT_INSTALL,
679 RemoveDetailValue r = EXPLICIT_REMOVE );
680
683 template<class TField>
684 bool fieldValueIs( FieldType val_r ) const
685 { return _bitfield.isEqual<TField>( val_r ); }
686
689 template<class TField>
690 void fieldValueAssign( FieldType val_r )
691 { _bitfield.assign<TField>( val_r ); }
692
695 template<class TField>
696 bool isGreaterThan( FieldType val_r )
697 { return _bitfield.value<TField>() > val_r; }
698
699 template<class TField>
700 bool isLessThan( FieldType val_r )
701 { return _bitfield.value<TField>() < val_r; }
702
703 private:
704 friend class resstatus::StatusBackup;
705 BitFieldType _bitfield;
706 };
707
708
710 std::ostream & operator<<( std::ostream & str, const ResStatus & obj ) ZYPP_API;
711
713 std::ostream & operator<<( std::ostream & str, ResStatus::TransactValue obj ) ZYPP_API;
714
716 std::ostream & operator<<( std::ostream & str, ResStatus::TransactByValue obj ) ZYPP_API;
717
719 inline bool operator==( const ResStatus & lhs, const ResStatus & rhs )
720 { return lhs._bitfield == rhs._bitfield; }
721
723 inline bool operator!=( const ResStatus & lhs, const ResStatus & rhs )
724 { return ! (lhs == rhs); }
725
727
728 namespace resstatus
729 {
730 class StatusBackup
731 {
732 public:
733 StatusBackup()
734 : _status( 0 )
735 {}
736
737 StatusBackup( ResStatus & status_r )
738 : _status( &status_r )
739 , _bitfield( _status->_bitfield )
740 {}
741
742 void replay()
743 { if ( _status ) _status->_bitfield = _bitfield; }
744
745 private:
746 ResStatus * _status;
747 ResStatus::BitFieldType _bitfield;
748 };
749 }
750
752} // namespace zypp
754#endif // ZYPP_RESSTATUS_H
Bit.h
Globals.h
Provides API related macros.
zypp::ResStatus
Status bitfield.
Definition ResStatus.h:55
zypp::ResStatus::staysUninstalled
bool staysUninstalled() const
Definition ResStatus.h:262
zypp::ResStatus::isLessThan
bool isLessThan(FieldType val_r)
Definition ResStatus.h:700
zypp::ResStatus::isLicenceConfirmed
bool isLicenceConfirmed() const
Definition ResStatus.h:181
zypp::ResStatus::isSoftLocked
bool isSoftLocked() const
Definition ResStatus.h:276
zypp::ResStatus::_bitfield
BitFieldType _bitfield
Definition ResStatus.h:705
zypp::ResStatus::DetailValue
DetailValue
Definition ResStatus.h:116
zypp::ResStatus::NO_DETAIL
@ NO_DETAIL
Detail for no transact, i.e.
Definition ResStatus.h:118
zypp::ResStatus::toBeInstalled
static const ResStatus toBeInstalled
Definition ResStatus.h:667
zypp::ResStatus::validate
ValidateValue validate() const
Definition ResStatus.h:219
zypp::ResStatus::setNonRelevant
bool setNonRelevant()
Definition ResStatus.h:645
zypp::ResStatus::setUserLockQueryMatch
void setUserLockQueryMatch(bool match_r)
Definition ResStatus.h:341
zypp::ResStatus::isGreaterThan
bool isGreaterThan(FieldType val_r)
compare two values.
Definition ResStatus.h:696
zypp::ResStatus::UserLockQueryField
bit::Range< FieldType, WeakField::end, 1 > UserLockQueryField
Definition ResStatus.h:76
zypp::ResStatus::isToBeInstalledSoft
bool isToBeInstalledSoft() const
Definition ResStatus.h:327
zypp::ResStatus::TransactByField
bit::Range< FieldType, TransactField::end, 2 > TransactByField
Definition ResStatus.h:72
zypp::ResStatus::onSystem
bool onSystem() const
True if would be on system after commit.
Definition ResStatus.h:289
zypp::ResStatus::setToBeUninstalled
bool setToBeUninstalled(TransactByValue causer)
Definition ResStatus.h:550
zypp::ResStatus::setToBeUninstalledDueToObsolete
bool setToBeUninstalledDueToObsolete()
Definition ResStatus.h:567
zypp::ResStatus::toBeUninstalledDueToObsolete
static const ResStatus toBeUninstalledDueToObsolete
Definition ResStatus.h:670
zypp::ResStatus::isSuggested
bool isSuggested() const
Definition ResStatus.h:191
zypp::ResStatus::WeakField
bit::Range< FieldType, LicenceConfirmedField::end, 4 > WeakField
Definition ResStatus.h:75
zypp::ResStatus::setLicenceConfirmed
void setLicenceConfirmed(bool toVal_r=true)
Definition ResStatus.h:184
zypp::ResStatus::setSoftInstall
bool setSoftInstall(bool flag)
Definition ResStatus.h:617
zypp::ResStatus::setRecommended
void setRecommended(bool toVal_r=true)
Definition ResStatus.h:206
zypp::ResStatus::isByApplLow
bool isByApplLow() const
Definition ResStatus.h:299
zypp::ResStatus::maySetSoftTransact
bool maySetSoftTransact(bool val_r, TransactByValue causer)
Definition ResStatus.h:533
zypp::ResStatus::maySetTransactValue
bool maySetTransactValue(TransactValue newVal_r, TransactByValue causer_r)
Definition ResStatus.h:380
zypp::ResStatus::setTransactValue
bool setTransactValue(TransactValue newVal_r, TransactByValue causer_r)
Set TransactValue.
Definition ResStatus.h:363
zypp::ResStatus::isUndetermined
bool isUndetermined() const
Definition ResStatus.h:222
zypp::ResStatus::fieldValueIs
bool fieldValueIs(FieldType val_r) const
Return whether the corresponding Field has value val_r.
Definition ResStatus.h:684
zypp::ResStatus::setSatisfied
bool setSatisfied()
Definition ResStatus.h:633
zypp::ResStatus::operator<<
friend std::ostream & operator<<(std::ostream &str, const ResStatus &obj)
relates: ResStatus Stream output
Definition ResStatus.cc:102
zypp::ResStatus::isSoftUninstall
bool isSoftUninstall()
Definition ResStatus.h:613
zypp::ResStatus::setUndetermined
bool setUndetermined()
Definition ResStatus.h:627
zypp::ResStatus::LicenceConfirmedValue
LicenceConfirmedValue
Definition ResStatus.h:134
zypp::ResStatus::LICENCE_CONFIRMED
@ LICENCE_CONFIRMED
Definition ResStatus.h:136
zypp::ResStatus::LICENCE_UNCONFIRMED
@ LICENCE_UNCONFIRMED
Definition ResStatus.h:135
zypp::ResStatus::setTransact
bool setTransact(bool toTansact_r, TransactByValue causer_r)
Toggle between TRANSACT and KEEP_STATE.
Definition ResStatus.h:438
zypp::ResStatus::isToBeInstalled
bool isToBeInstalled() const
Definition ResStatus.h:259
zypp::ResStatus::isBroken
bool isBroken() const
Definition ResStatus.h:228
zypp::ResStatus::offSystem
bool offSystem() const
True if would be off system after commit.
Definition ResStatus.h:293
zypp::ResStatus::isByApplHigh
bool isByApplHigh() const
Definition ResStatus.h:302
zypp::ResStatus::setOrphaned
void setOrphaned(bool toVal_r=true)
Definition ResStatus.h:212
zypp::ResStatus::isNonRelevant
bool isNonRelevant() const
Definition ResStatus.h:231
zypp::ResStatus::setToBeInstalled
bool setToBeInstalled(TransactByValue causer)
Definition ResStatus.h:536
zypp::ResStatus::setStatus
bool setStatus(const ResStatus &newStatus_r)
Definition ResStatus.h:651
zypp::ResStatus::setBroken
bool setBroken()
Definition ResStatus.h:639
zypp::ResStatus::setUnneeded
void setUnneeded(bool toVal_r=true)
Definition ResStatus.h:215
zypp::ResStatus::TransactField
bit::Range< FieldType, ValidateField::end, 2 > TransactField
Definition ResStatus.h:71
zypp::ResStatus::isLocked
bool isLocked() const
Definition ResStatus.h:270
zypp::ResStatus::isUserLockQueryMatch
bool isUserLockQueryMatch() const
Definition ResStatus.h:345
zypp::ResStatus::resetWeak
void resetWeak()
Definition ResStatus.h:203
zypp::ResStatus::ResStatus
ResStatus(ResStatus &&) noexcept=default
zypp::ResStatus::ValidateValue
ValidateValue
Definition ResStatus.h:95
zypp::ResStatus::NONRELEVANT
@ NONRELEVANT
Definition ResStatus.h:99
zypp::ResStatus::SATISFIED
@ SATISFIED
Definition ResStatus.h:98
zypp::ResStatus::UNDETERMINED
@ UNDETERMINED
Definition ResStatus.h:96
zypp::ResStatus::BROKEN
@ BROKEN
Definition ResStatus.h:97
zypp::ResStatus::wasInstalled
bool wasInstalled() const
Definition ResStatus.h:257
zypp::ResStatus::setToBeUninstalledSoft
bool setToBeUninstalledSoft()
Definition ResStatus.h:591
zypp::ResStatus::maySetToBeUninstalled
bool maySetToBeUninstalled(TransactByValue causer)
Definition ResStatus.h:556
zypp::ResStatus::isKept
bool isKept() const
Definition ResStatus.h:279
zypp::ResStatus::setSoftLock
bool setSoftLock(TransactByValue causer_r)
Definition ResStatus.h:478
zypp::ResStatus::setLock
bool setLock(bool toLock_r, TransactByValue causer_r)
Apply a lock (prevent transaction).
Definition ResStatus.h:393
zypp::ResStatus::getTransactValue
TransactValue getTransactValue() const
Definition ResStatus.h:285
zypp::ResStatus::staysInstalled
bool staysInstalled() const
Definition ResStatus.h:254
zypp::ResStatus::toBeUninstalledDueToUpgrade
static const ResStatus toBeUninstalledDueToUpgrade
Definition ResStatus.h:669
zypp::ResStatus::StateField
bit::Range< FieldType, 0, 1 > StateField
Definition ResStatus.h:69
zypp::ResStatus::InstallDetailValue
InstallDetailValue
Definition ResStatus.h:121
zypp::ResStatus::EXPLICIT_INSTALL
@ EXPLICIT_INSTALL
Definition ResStatus.h:122
zypp::ResStatus::SOFT_INSTALL
@ SOFT_INSTALL
Definition ResStatus.h:123
zypp::ResStatus::TransactByValue
TransactByValue
Definition ResStatus.h:108
zypp::ResStatus::APPL_LOW
@ APPL_LOW
Definition ResStatus.h:110
zypp::ResStatus::SOLVER
@ SOLVER
Definition ResStatus.h:109
zypp::ResStatus::USER
@ USER
Definition ResStatus.h:112
zypp::ResStatus::APPL_HIGH
@ APPL_HIGH
Definition ResStatus.h:111
zypp::ResStatus::maySetToBeInstalled
bool maySetToBeInstalled(TransactByValue causer)
Definition ResStatus.h:542
zypp::ResStatus::isToBeUninstalledDueToObsolete
bool isToBeUninstalledDueToObsolete() const
Definition ResStatus.h:321
zypp::ResStatus::setSoftTransact
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r, TransactByValue causerLimit_r)
Soft toggle between TRANSACT and KEEP_STATE.
Definition ResStatus.h:508
zypp::ResStatus::isSoftInstall
bool isSoftInstall()
Definition ResStatus.h:609
zypp::ResStatus::isByUser
bool isByUser() const
Definition ResStatus.h:305
zypp::ResStatus::setSoftTransact
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r)
Definition ResStatus.h:521
zypp::ResStatus::setToBeInstalledSoft
bool setToBeInstalledSoft()
Definition ResStatus.h:581
zypp::ResStatus::LicenceConfirmedField
bit::Range< FieldType, TransactDetailField::end, 1 > LicenceConfirmedField
Definition ResStatus.h:74
zypp::ResStatus::toBeUninstalled
static const ResStatus toBeUninstalled
Definition ResStatus.h:668
zypp::ResStatus::transacts
bool transacts() const
Definition ResStatus.h:282
zypp::ResStatus::isUserLocked
bool isUserLocked() const
Definition ResStatus.h:273
zypp::ResStatus::wasUninstalled
bool wasUninstalled() const
Definition ResStatus.h:265
zypp::ResStatus::ResStatus
ResStatus()
Default ctor.
Definition ResStatus.cc:33
zypp::ResStatus::WeakValue
WeakValue
Definition ResStatus.h:140
zypp::ResStatus::RECOMMENDED
@ RECOMMENDED
Definition ResStatus.h:143
zypp::ResStatus::NO_WEAK
@ NO_WEAK
Definition ResStatus.h:141
zypp::ResStatus::UNNEEDED
@ UNNEEDED
Definition ResStatus.h:145
zypp::ResStatus::ORPHANED
@ ORPHANED
Definition ResStatus.h:144
zypp::ResStatus::SUGGESTED
@ SUGGESTED
Definition ResStatus.h:142
zypp::ResStatus::BitFieldType
bit::BitField< FieldType > BitFieldType
Definition ResStatus.h:67
zypp::ResStatus::TransactDetailField
bit::Range< FieldType, TransactByField::end, 2 > TransactDetailField
Definition ResStatus.h:73
zypp::ResStatus::maySetToBeUninstalledSoft
bool maySetToBeUninstalledSoft()
Definition ResStatus.h:601
zypp::ResStatus::isRecommended
bool isRecommended() const
Definition ResStatus.h:188
zypp::ResStatus::bitfield
BitFieldType bitfield() const
Debug helper returning the bitfield.
Definition ResStatus.h:176
zypp::ResStatus::isInstalled
bool isInstalled() const
Definition ResStatus.h:246
zypp::ResStatus::maySetTransact
bool maySetTransact(bool val_r, TransactByValue causer)
Definition ResStatus.h:469
zypp::ResStatus::isOrphaned
bool isOrphaned() const
Definition ResStatus.h:194
zypp::ResStatus::isToBeUninstalled
bool isToBeUninstalled() const
Definition ResStatus.h:267
zypp::ResStatus::validateValueAsString
std::string validateValueAsString() const
Definition ResStatus.h:234
zypp::ResStatus::isToBeUninstalledDueToUpgrade
bool isToBeUninstalledDueToUpgrade() const
Definition ResStatus.h:324
zypp::ResStatus::getTransactByValue
TransactByValue getTransactByValue() const
Definition ResStatus.h:308
zypp::ResStatus::ResStatus
ResStatus(const ResStatus &)=default
zypp::ResStatus::FieldType
uint16_t FieldType
Definition ResStatus.h:66
zypp::ResStatus::StateValue
StateValue
Definition ResStatus.h:90
zypp::ResStatus::UNINSTALLED
@ UNINSTALLED
Definition ResStatus.h:91
zypp::ResStatus::INSTALLED
@ INSTALLED
Definition ResStatus.h:92
zypp::ResStatus::resetTransact
bool resetTransact(TransactByValue causer_r)
Not the same as setTransact( false ).
Definition ResStatus.h:490
zypp::ResStatus::RemoveDetailValue
RemoveDetailValue
Definition ResStatus.h:126
zypp::ResStatus::DUE_TO_UPGRADE
@ DUE_TO_UPGRADE
Definition ResStatus.h:130
zypp::ResStatus::DUE_TO_OBSOLETE
@ DUE_TO_OBSOLETE
Definition ResStatus.h:129
zypp::ResStatus::SOFT_REMOVE
@ SOFT_REMOVE
Definition ResStatus.h:128
zypp::ResStatus::EXPLICIT_REMOVE
@ EXPLICIT_REMOVE
Definition ResStatus.h:127
zypp::ResStatus::isSatisfied
bool isSatisfied() const
Definition ResStatus.h:225
zypp::ResStatus::setSuggested
void setSuggested(bool toVal_r=true)
Definition ResStatus.h:209
zypp::ResStatus::setSoftUninstall
bool setSoftUninstall(bool flag)
Definition ResStatus.h:622
zypp::ResStatus::maySetSoftTransact
bool maySetSoftTransact(bool val_r, TransactByValue causer, TransactByValue causerLimit_r)
Definition ResStatus.h:524
zypp::ResStatus::UserLockQuery
UserLockQuery
Definition ResStatus.h:149
zypp::ResStatus::USERLOCK_MATCH
@ USERLOCK_MATCH
Definition ResStatus.h:151
zypp::ResStatus::USERLOCK_NOMATCH
@ USERLOCK_NOMATCH
Definition ResStatus.h:150
zypp::ResStatus::ValidateField
bit::Range< FieldType, StateField::end, 2 > ValidateField
Definition ResStatus.h:70
zypp::ResStatus::setTransactByValue
bool setTransactByValue(TransactByValue causer)
Definition ResStatus.h:311
zypp::ResStatus::isBySolver
bool isBySolver() const
Definition ResStatus.h:296
zypp::ResStatus::isUnneeded
bool isUnneeded() const
Definition ResStatus.h:197
zypp::ResStatus::maySetLock
bool maySetLock(bool to_r, TransactByValue causer_r)
Definition ResStatus.h:425
zypp::ResStatus::hasWeak
bool hasWeak() const
Definition ResStatus.h:200
zypp::ResStatus::isToBeInstalledNotSoft
bool isToBeInstalledNotSoft() const
Definition ResStatus.h:330
zypp::ResStatus::fieldValueAssign
void fieldValueAssign(FieldType val_r)
Set the corresponding Field to value val_r.
Definition ResStatus.h:690
zypp::ResStatus::setToBeUninstalledDueToUpgrade
bool setToBeUninstalledDueToUpgrade(TransactByValue causer)
Definition ResStatus.h:574
zypp::ResStatus::TransactValue
TransactValue
Definition ResStatus.h:102
zypp::ResStatus::LOCKED
@ LOCKED
Definition ResStatus.h:104
zypp::ResStatus::TRANSACT
@ TRANSACT
Definition ResStatus.h:105
zypp::ResStatus::KEEP_STATE
@ KEEP_STATE
Definition ResStatus.h:103
zypp::ResStatus::isToBeUninstalledSoft
bool isToBeUninstalledSoft() const
Definition ResStatus.h:333
zypp::ResStatus::isUninstalled
bool isUninstalled() const
Definition ResStatus.h:249
zypp::ResStatus::operator==
friend bool operator==(const ResStatus &lhs, const ResStatus &rhs)
relates: ResStatus
Definition ResStatus.h:719
zypp::bit::BitField
An integral type used as BitField.
Definition Bit.h:160
zypp::bit::BitField::value
TInt value() const
Return the value.
Definition Bit.h:179
zypp::resstatus::StatusBackup
Definition ResStatus.h:731
zypp::resstatus::StatusBackup::replay
void replay()
Definition ResStatus.h:742
zypp::resstatus::StatusBackup::StatusBackup
StatusBackup(ResStatus &status_r)
Definition ResStatus.h:737
zypp::resstatus::StatusBackup::_bitfield
ResStatus::BitFieldType _bitfield
Definition ResStatus.h:747
zypp::resstatus::StatusBackup::_status
ResStatus * _status
Definition ResStatus.h:746
zypp::resstatus::StatusBackup::StatusBackup
StatusBackup()
Definition ResStatus.h:733
str
String related utilities and Regular expression matching.
zypp::resstatus
Definition PoolImpl.h:37
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::operator!=
bool operator!=(const Capability &lhs, const Capability &rhs)
relates: Capability
Definition Capability.h:313
zypp::ZYPP_API
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Definition Arch.h:173
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
Definition Capabilities.cc:65
zypp::bit::RangeValue
A value with in a Range.
Definition Bit.h:111
zypp::bit::RangeValue::value
static const IntT value
Definition Bit.h:115
zypp::bit::Range
Range of bits starting at bit _begin with length _size.
Definition Bit.h:82
zypp::resstatus::UserLockQueryManip
Manipulator for ResStatus::UserLockQueryField.
Definition PoolImpl.h:44