libzypp: zypp/ResStatus.h Source File

libzypp 17.25.10

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