libzypp  17.31.31
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;
67  // Bit Ranges within FieldType defined by 1st bit and size:
76  // enlarge FieldType if more bits are needed. It's not yet
77  // checked by the compiler.
79  public:
80 
89  {
92  };
94  {
99  };
101  {
103  LOCKED = bit::RangeValue<TransactField,1>::value, // locked, must not transact
104  TRANSACT = bit::RangeValue<TransactField,2>::value // transact according to state
105  };
107  {
112  };
113 
115  {
118  };
120  {
123  };
125  {
130  };
131 
133  {
136  };
137 
138  enum WeakValue // Unlike the other fields those are BITS that may be or'ed!
139  {
145  };
146 
147  enum UserLockQuery // internal
148  {
151  };
153 
154  public:
155 
157  ResStatus();
158 
160  ResStatus( bool isInstalled_r );
161 
163  ~ResStatus();
164 
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:
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 
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 
304 
306  {
307  if ( isLessThan<TransactByField>( causer ) ) {
308  fieldValueAssign<TransactByField>( causer );
309  return true;
310  } else {
311  return false;
312  }
313  }
314 
316  { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( DUE_TO_OBSOLETE ); }
317 
319  { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( DUE_TO_UPGRADE ); }
320 
321  bool isToBeInstalledSoft () const
322  { return isToBeInstalled() && fieldValueIs<TransactDetailField>( SOFT_INSTALL ); }
323 
325  { return isToBeInstalled() && !fieldValueIs<TransactDetailField>( SOFT_INSTALL ); }
326 
327  bool isToBeUninstalledSoft () const
328  { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( SOFT_REMOVE ); }
329 
330  private:
334 
335  void setUserLockQueryMatch( bool match_r )
336  { fieldValueAssign<UserLockQueryField>( match_r ? USERLOCK_MATCH : USERLOCK_NOMATCH ); }
338  public:
339  bool isUserLockQueryMatch() const
340  { return fieldValueIs<UserLockQueryField>( USERLOCK_MATCH ); }
341 
342  public:
343 
344  //------------------------------------------------------------------------
345  // get/set functions, returning \c true if requested status change
346  // was successful (i.e. leading to the desired transaction).
347  // If a lower level (e.g.SOLVER) wants to transact, but it's
348  // already set by a higher level, \c true should be returned.
349  // Removing a higher levels transaction bit should fail.
350  //
351  // The may functions checks only, if the action would return true
352  // if it is called.
353 
357  bool setTransactValue( TransactValue newVal_r, TransactByValue causer_r )
358  {
359  switch ( newVal_r )
360  {
361  case KEEP_STATE:
362  return setTransact( false, causer_r );
363  break;
364  case LOCKED:
365  return setLock( true, causer_r );
366  break;
367  case TRANSACT:
368  return setTransact( true, causer_r );
369  break;
370  }
371  return false;
372  }
373 
375  {
376  bit::BitField<FieldType> savBitfield = _bitfield;
377  bool ret = setTransactValue( newVal_r, causer_r );
378  _bitfield = savBitfield;
379  return ret;
380  }
381 
387  bool setLock( bool toLock_r, TransactByValue causer_r )
388  {
389  if ( toLock_r == isLocked() )
390  {
391  // we're already in the desired state, but in case of
392  // LOCKED, remember a superior causer.
393  if ( isLocked() && isLessThan<TransactByField>( causer_r ) )
394  fieldValueAssign<TransactByField>( causer_r );
395  return true;
396  }
397  // Here: Lock status is to be changed:
398  if ( causer_r != USER && causer_r != APPL_HIGH )
399  return false;
400  if ( toLock_r ) {
401  // We're in unlocked state, which includes TRANSACT.
402  // Causer must be allowed to reset this. But from
403  // KEEP_STATE every causer is allowed to set the lock.
404  if ( ! setTransact( false, causer_r ) )
405  return false;
406  fieldValueAssign<TransactField>( LOCKED );
407  fieldValueAssign<TransactByField>( causer_r );
408  } else {
409  // To leave Locked state it needs a superior causer.
410  if ( isGreaterThan<TransactByField>( causer_r ) )
411  return false;
412  fieldValueAssign<TransactField>( KEEP_STATE );
413  fieldValueAssign<TransactByField>( SOLVER ); // reset to lowest causer
414  // in order to distinguish from keep_state_by_user
415  }
416  return true;
417  }
418 
419  bool maySetLock( bool to_r, TransactByValue causer_r )
420  {
421  bit::BitField<FieldType> savBitfield = _bitfield;
422  bool ret = setLock( to_r, causer_r );
423  _bitfield = savBitfield;
424  return ret;
425  }
426 
432  bool setTransact( bool toTansact_r, TransactByValue causer_r )
433  {
434  if ( toTansact_r == transacts() )
435  {
436  // we're already in the desired state, but in case of
437  // TRANSACT, remember a superior causer.
438  if ( transacts() && isLessThan<TransactByField>( causer_r ) )
439  fieldValueAssign<TransactByField>( causer_r );
440 
441  fieldValueAssign<TransactDetailField>( NO_DETAIL ); // Details has to be set again
442  return true;
443  }
444  // Here: transact status is to be changed:
445  if ( ! fieldValueIs<TransactField>( KEEP_STATE )
446  && isGreaterThan<TransactByField>( causer_r ) ) {
447  return false;
448  }
449 
450  if ( toTansact_r )
451  {
452  fieldValueAssign<TransactField>( TRANSACT );
453  }
454  else
455  {
456  fieldValueAssign<TransactField>( KEEP_STATE );
457  }
458  fieldValueAssign<TransactDetailField>( NO_DETAIL ); // Details has to be set again
459  fieldValueAssign<TransactByField>( causer_r );
460  return true;
461  }
462 
463  bool maySetTransact( bool val_r, TransactByValue causer )
464  {
465  bit::BitField<FieldType> savBitfield = _bitfield;
466  bool ret = setTransact (val_r, causer);
467  _bitfield = savBitfield;
468  return ret;
469  }
470 
472  bool setSoftLock( TransactByValue causer_r )
473  {
474  if ( ! setTransact( false, causer_r ) )
475  return false;
476  if ( fieldValueIs<TransactField>( KEEP_STATE )
477  && isLessThan<TransactByField>( causer_r ) )
478  fieldValueAssign<TransactByField>( causer_r );
479  return true;
480  }
481 
485  {
486  if ( ! setTransact( false, causer_r ) )
487  return false;
488  if ( fieldValueIs<TransactField>( KEEP_STATE ) )
489  fieldValueAssign<TransactByField>( SOLVER );
490  return true;
491  }
492 
502  bool setSoftTransact( bool toTansact_r, TransactByValue causer_r,
503  TransactByValue causerLimit_r )
504  {
505  if ( fieldValueIs<TransactField>( KEEP_STATE )
506  && toTansact_r != transacts()
507  && isGreaterThan<TransactByField>( causerLimit_r ) )
508  {
509  // any transact status change requires a superior causer.
510  return false;
511  }
512  return setTransact( toTansact_r, causer_r );
513  }
514 
515  bool setSoftTransact( bool toTansact_r, TransactByValue causer_r )
516  { return setSoftTransact( toTansact_r, causer_r, causer_r ); }
517 
518  bool maySetSoftTransact( bool val_r, TransactByValue causer,
519  TransactByValue causerLimit_r )
520  {
521  bit::BitField<FieldType> savBitfield = _bitfield;
522  bool ret = setSoftTransact( val_r, causer, causerLimit_r );
523  _bitfield = savBitfield;
524  return ret;
525  }
526 
527  bool maySetSoftTransact( bool val_r, TransactByValue causer )
528  { return maySetSoftTransact( val_r, causer, causer ); }
529 
531  {
532  if (isInstalled()) return false;
533  return setTransact (true, causer);
534  }
535 
537  {
538  bit::BitField<FieldType> savBitfield = _bitfield;
539  bool ret = setToBeInstalled (causer);
540  _bitfield = savBitfield;
541  return ret;
542  }
543 
545  {
546  if (!isInstalled()) return false;
547  return setTransact (true, causer);
548  }
549 
551  {
552  bit::BitField<FieldType> savBitfield = _bitfield;
553  bool ret = setToBeUninstalled (causer);
554  _bitfield = savBitfield;
555  return ret;
556  }
557 
558  //------------------------------------------------------------------------
559  // *** These are only for the Resolver ***
560 
562  {
563  if (!setToBeUninstalled (SOLVER)) return false;
564  fieldValueAssign<TransactDetailField>(DUE_TO_OBSOLETE);
565  return true;
566  }
567 
569  {
570  if (!setToBeUninstalled (causer)) return false;
571  fieldValueAssign<TransactDetailField>(DUE_TO_UPGRADE);
572  return true;
573  }
574 
576  {
577  if (isInstalled()
578  || !setSoftTransact (true, SOLVER))
579  return false;
580 
581  fieldValueAssign<TransactDetailField>(SOFT_INSTALL);
582  return true;
583  }
584 
586  {
587  if (!isInstalled()
588  || !setSoftTransact (true, SOLVER))
589  return false;
590 
591  fieldValueAssign<TransactDetailField>(SOFT_REMOVE);
592  return true;
593  }
594 
596  {
597  bit::BitField<FieldType> savBitfield = _bitfield;
598  bool ret = setToBeUninstalledSoft ();
599  _bitfield = savBitfield;
600  return ret;
601  }
602 
603  bool isSoftInstall () {
604  return fieldValueIs<TransactDetailField> (SOFT_INSTALL);
605  }
606 
607  bool isSoftUninstall () {
608  return fieldValueIs<TransactDetailField> (SOFT_REMOVE);
609  }
610 
611  bool setSoftInstall (bool flag) {
612  fieldValueAssign<TransactDetailField>(flag?SOFT_INSTALL:0);
613  return true;
614  }
615 
616  bool setSoftUninstall (bool flag) {
617  fieldValueAssign<TransactDetailField>(flag?SOFT_REMOVE:0);
618  return true;
619  }
620 
622  {
623  fieldValueAssign<ValidateField>(UNDETERMINED);
624  return true;
625  }
626 
627  bool setSatisfied ()
628  {
629  fieldValueAssign<ValidateField>(SATISFIED);
630  return true;
631  }
632 
633  bool setBroken ()
634  {
635  fieldValueAssign<ValidateField>(BROKEN);
636  return true;
637  }
638 
640  {
641  fieldValueAssign<ValidateField>(NONRELEVANT);
642  return true;
643  }
644 
645  bool setStatus( ResStatus newStatus_r )
646  {
647  // State field is immutable!
648  if ( _bitfield.value<StateField>() != newStatus_r._bitfield.value<StateField>() )
649  return false;
650  // Transaction state change allowed?
651  if ( ! setTransactValue( newStatus_r.getTransactValue(), newStatus_r.getTransactByValue() ) )
652  return false;
653 
654  // Ok, we take it all..
655  _bitfield = newStatus_r._bitfield;
656  return true;
657  }
658 
661  static const ResStatus toBeInstalled;
666 
667  private:
674 
677  template<class TField>
678  bool fieldValueIs( FieldType val_r ) const
679  { return _bitfield.isEqual<TField>( val_r ); }
680 
683  template<class TField>
685  { _bitfield.assign<TField>( val_r ); }
686 
689  template<class TField>
690  bool isGreaterThan( FieldType val_r )
691  { return _bitfield.value<TField>() > val_r; }
692 
693  template<class TField>
694  bool isLessThan( FieldType val_r )
695  { return _bitfield.value<TField>() < val_r; }
696 
697  private:
700  };
702 
704  std::ostream & operator<<( std::ostream & str, const ResStatus & obj );
705 
707  std::ostream & operator<<( std::ostream & str, ResStatus::TransactValue obj );
708 
710  std::ostream & operator<<( std::ostream & str, ResStatus::TransactByValue obj );
711 
713  inline bool operator==( const ResStatus & lhs, const ResStatus & rhs )
714  { return lhs._bitfield == rhs._bitfield; }
715 
717  inline bool operator!=( const ResStatus & lhs, const ResStatus & rhs )
718  { return ! (lhs == rhs); }
719 
721 
722  namespace resstatus
723  {
725  {
726  public:
728  : _status( 0 )
729  {}
730 
731  StatusBackup( ResStatus & status_r )
732  : _status( &status_r )
734  {}
735 
736  void replay()
737  { if ( _status ) _status->_bitfield = _bitfield; }
738 
739  private:
742  };
743  }
744 
746 } // namespace zypp
748 #endif // ZYPP_RESSTATUS_H
bool setSoftInstall(bool flag)
Definition: ResStatus.h:611
bool setTransactByValue(TransactByValue causer)
Definition: ResStatus.h:305
bool isUnneeded() const
Definition: ResStatus.h:191
StatusBackup(ResStatus &status_r)
Definition: ResStatus.h:731
bit::BitField< FieldType > BitFieldType
Definition: ResStatus.h:66
bool transacts() const
Definition: ResStatus.h:276
BitFieldType bitfield() const
Debug helper returning the bitfield.
Definition: ResStatus.h:170
bool setUndetermined()
Definition: ResStatus.h:621
friend std::ostream & operator<<(std::ostream &str, const ResStatus &obj)
Definition: ResStatus.cc:102
bool isByApplHigh() const
Definition: ResStatus.h:296
ResStatus::BitFieldType _bitfield
Definition: ResStatus.h:741
bool isToBeInstalled() const
Definition: ResStatus.h:253
bool setSoftUninstall(bool flag)
Definition: ResStatus.h:616
bool fieldValueIs(FieldType val_r) const
Return whether the corresponding Field has value val_r.
Definition: ResStatus.h:678
bool test(TInt rhs)
Test whether all bits of rhs are set.
Definition: Bit.h:253
bool isNonRelevant() const
Definition: ResStatus.h:225
bool isInstalled() const
Definition: ResStatus.h:240
TInt value() const
Return the value.
Definition: Bit.h:179
bit::Range< FieldType, LicenceConfirmedField::end, 4 > WeakField
Definition: ResStatus.h:74
static const ResStatus toBeInstalled
Definition: ResStatus.h:661
friend bool operator==(const ResStatus &lhs, const ResStatus &rhs)
ValidateValue validate() const
Definition: ResStatus.h:213
String related utilities and Regular expression matching.
bool isGreaterThan(FieldType val_r)
compare two values.
Definition: ResStatus.h:690
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
Definition: SerialNumber.cc:52
void setOrphaned(bool toVal_r=true)
Definition: ResStatus.h:206
bool isBroken() const
Definition: ResStatus.h:222
TransactValue getTransactValue() const
Definition: ResStatus.h:279
Detail for no transact, i.e.
Definition: ResStatus.h:117
bool isRecommended() const
Definition: ResStatus.h:182
Manipulator for ResStatus::UserLockQueryField.
Definition: PoolImpl.h:42
bool maySetLock(bool to_r, TransactByValue causer_r)
Definition: ResStatus.h:419
bool resetTransact(TransactByValue causer_r)
Not the same as setTransact( false ).
Definition: ResStatus.h:484
bit::Range< FieldType, WeakField::end, 1 > UserLockQueryField
Definition: ResStatus.h:75
void setLicenceConfirmed(bool toVal_r=true)
Definition: ResStatus.h:178
bool isEqual(TInt rhs) const
Test for equal value within a Range.
Definition: Bit.h:215
bool setToBeUninstalledDueToUpgrade(TransactByValue causer)
Definition: ResStatus.h:568
bool staysUninstalled() const
Definition: ResStatus.h:256
bool wasUninstalled() const
Definition: ResStatus.h:259
static const ResStatus toBeUninstalledDueToUpgrade
Definition: ResStatus.h:663
bool setSoftLock(TransactByValue causer_r)
Definition: ResStatus.h:472
bool maySetToBeInstalled(TransactByValue causer)
Definition: ResStatus.h:536
bool isToBeUninstalledDueToObsolete() const
Definition: ResStatus.h:315
std::string validateValueAsString() const
Definition: ResStatus.h:228
BitFieldType _bitfield
Definition: ResStatus.h:699
bool isLessThan(FieldType val_r)
Definition: ResStatus.h:694
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r, TransactByValue causerLimit_r)
Soft toggle between TRANSACT and KEEP_STATE.
Definition: ResStatus.h:502
bool wasInstalled() const
Definition: ResStatus.h:251
bool isSoftUninstall()
Definition: ResStatus.h:607
bool hasWeak() const
Definition: ResStatus.h:194
bool isUserLockQueryMatch() const
Definition: ResStatus.h:339
bit::Range< FieldType, TransactField::end, 2 > TransactByField
Definition: ResStatus.h:71
bit::Range< FieldType, ValidateField::end, 2 > TransactField
Definition: ResStatus.h:70
bool setTransactValue(TransactValue newVal_r, TransactByValue causer_r)
Set TransactValue.
Definition: ResStatus.h:357
bool maySetTransact(bool val_r, TransactByValue causer)
Definition: ResStatus.h:463
bool maySetTransactValue(TransactValue newVal_r, TransactByValue causer_r)
Definition: ResStatus.h:374
bit::Range< FieldType, TransactDetailField::end, 1 > LicenceConfirmedField
Definition: ResStatus.h:73
static const ResStatus toBeUninstalledDueToObsolete
Definition: ResStatus.h:664
bit::Range< FieldType, StateField::end, 2 > ValidateField
Definition: ResStatus.h:69
bit::Range< FieldType, 0, 1 > StateField
Definition: ResStatus.h:68
bool setBroken()
Definition: ResStatus.h:633
bool isSatisfied() const
Definition: ResStatus.h:219
uint16_t FieldType
Definition: ResStatus.h:65
bool isOrphaned() const
Definition: ResStatus.h:188
bool setLock(bool toLock_r, TransactByValue causer_r)
Apply a lock (prevent transaction).
Definition: ResStatus.h:387
bool setNonRelevant()
Definition: ResStatus.h:639
bool isToBeInstalledNotSoft() const
Definition: ResStatus.h:324
bool maySetToBeUninstalledSoft()
Definition: ResStatus.h:595
~ResStatus()
Dtor.
Definition: ResStatus.cc:50
bool setToBeUninstalled(TransactByValue causer)
Definition: ResStatus.h:544
bool setTransact(bool toTansact_r, TransactByValue causer_r)
Toggle between TRANSACT and KEEP_STATE.
Definition: ResStatus.h:432
void setUserLockQueryMatch(bool match_r)
Definition: ResStatus.h:335
bool isByUser() const
Definition: ResStatus.h:299
bool maySetSoftTransact(bool val_r, TransactByValue causer, TransactByValue causerLimit_r)
Definition: ResStatus.h:518
bool isLicenceConfirmed() const
Definition: ResStatus.h:175
bool isUndetermined() const
Definition: ResStatus.h:216
bit::Range< FieldType, TransactByField::end, 2 > TransactDetailField
Definition: ResStatus.h:72
void setRecommended(bool toVal_r=true)
Definition: ResStatus.h:200
bool isSuggested() const
Definition: ResStatus.h:185
bool isByApplLow() const
Definition: ResStatus.h:293
bool isToBeUninstalled() const
Definition: ResStatus.h:261
bool isLocked() const
Definition: ResStatus.h:264
bool isKept() const
Definition: ResStatus.h:273
bool isToBeUninstalledSoft() const
Definition: ResStatus.h:327
bool setStatus(ResStatus newStatus_r)
Definition: ResStatus.h:645
bool isToBeInstalledSoft() const
Definition: ResStatus.h:321
BitField & assign(TInt rhs)
Assign Range in rhs to this.
Definition: Bit.h:201
bool maySetSoftTransact(bool val_r, TransactByValue causer)
Definition: ResStatus.h:527
bool setToBeUninstalledSoft()
Definition: ResStatus.h:585
bool maySetToBeUninstalled(TransactByValue causer)
Definition: ResStatus.h:550
bool isUninstalled() const
Definition: ResStatus.h:243
bool isSoftLocked() const
Definition: ResStatus.h:270
bool setToBeInstalled(TransactByValue causer)
Definition: ResStatus.h:530
Status bitfield.
Definition: ResStatus.h:53
bool offSystem() const
True if would be off system after commit.
Definition: ResStatus.h:287
static ValidateValue stringToValidateValue(const std::string &str_r)
ValidateValue from string used in the history file.
Definition: ResStatus.cc:88
bool staysInstalled() const
Definition: ResStatus.h:248
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r)
Definition: ResStatus.h:515
bool isUserLocked() const
Definition: ResStatus.h:267
void fieldValueAssign(FieldType val_r)
Set the corresponding Field to value val_r.
Definition: ResStatus.h:684
void resetWeak()
Definition: ResStatus.h:197
bool setToBeInstalledSoft()
Definition: ResStatus.h:575
bool onSystem() const
True if would be on system after commit.
Definition: ResStatus.h:283
void setUnneeded(bool toVal_r=true)
Definition: ResStatus.h:209
BitField & set(TInt rhs, bool doset_r)
Set or unset bits of rhs.
Definition: Bit.h:229
ResStatus()
Default ctor.
Definition: ResStatus.cc:33
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
bool setSatisfied()
Definition: ResStatus.h:627
TransactByValue getTransactByValue() const
Definition: ResStatus.h:302
Range of bits starting at bit _begin with length _size.
Definition: Bit.h:81
static const ResStatus toBeUninstalled
Definition: ResStatus.h:662
bool setToBeUninstalledDueToObsolete()
Definition: ResStatus.h:561
bool isSoftInstall()
Definition: ResStatus.h:603
bool isBySolver() const
Definition: ResStatus.h:290
bool isToBeUninstalledDueToUpgrade() const
Definition: ResStatus.h:318
void setSuggested(bool toVal_r=true)
Definition: ResStatus.h:203
bool operator!=(const ResStatus &lhs, const ResStatus &rhs)
Definition: ResStatus.h:717
A value with in a Range.
Definition: Bit.h:110