libzypp  17.14.0
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 bit's 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  public:
229  // These two are IMMUTABLE!
230 
231  bool isInstalled() const
232  { return fieldValueIs<StateField>( INSTALLED ); }
233 
234  bool isUninstalled() const
235  { return fieldValueIs<StateField>( UNINSTALLED ); }
236 
237  public:
238 
239  bool staysInstalled() const
240  { return isInstalled() && !transacts(); }
241 
242  bool wasInstalled() const { return staysInstalled(); } //for old status
243 
244  bool isToBeInstalled() const
245  { return isUninstalled() && transacts(); }
246 
247  bool staysUninstalled() const
248  { return isUninstalled() && !transacts(); }
249 
250  bool wasUninstalled() const { return staysUninstalled(); } // for old status
251 
252  bool isToBeUninstalled() const
253  { return isInstalled() && transacts(); }
254 
255  bool isLocked() const
256  { return fieldValueIs<TransactField>( LOCKED ); }
257 
258  bool isUserLocked() const
259  { return isLocked() && isByUser(); }
260 
261  bool isSoftLocked() const
262  { return isKept() && ( isByApplLow() || isByUser() ); }
263 
264  bool isKept() const
265  { return fieldValueIs<TransactField>( KEEP_STATE ); }
266 
267  bool transacts() const
268  { return fieldValueIs<TransactField>( TRANSACT ); }
269 
272 
274  bool onSystem() const
275  { return( isInstalled() != transacts() ); }
276 
278  bool offSystem() const
279  { return ! onSystem(); }
280 
281  bool isBySolver() const
282  { return fieldValueIs<TransactByField>( SOLVER ); }
283 
284  bool isByApplLow() const
285  { return fieldValueIs<TransactByField>( APPL_LOW ); }
286 
287  bool isByApplHigh() const
288  { return fieldValueIs<TransactByField>( APPL_HIGH ); }
289 
290  bool isByUser() const
291  { return fieldValueIs<TransactByField>( USER ); }
292 
295 
297  {
298  if ( isLessThan<TransactByField>( causer ) ) {
299  fieldValueAssign<TransactByField>( causer );
300  return true;
301  } else {
302  return false;
303  }
304  }
305 
307  { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( DUE_TO_OBSOLETE ); }
308 
310  { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( DUE_TO_UPGRADE ); }
311 
312  bool isToBeInstalledSoft () const
313  { return isToBeInstalled() && fieldValueIs<TransactDetailField>( SOFT_INSTALL ); }
314 
316  { return isToBeInstalled() && !fieldValueIs<TransactDetailField>( SOFT_INSTALL ); }
317 
318  bool isToBeUninstalledSoft () const
319  { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( SOFT_REMOVE ); }
320 
321  private:
322 
326 
327  bool isUserLockQueryMatch() const
328  { return fieldValueIs<UserLockQueryField>( USERLOCK_MATCH ); }
329 
330  void setUserLockQueryMatch( bool match_r )
331  { fieldValueAssign<UserLockQueryField>( match_r ? USERLOCK_MATCH : USERLOCK_NOMATCH ); }
333 
334  public:
335 
336  //------------------------------------------------------------------------
337  // get/set functions, returnig \c true if requested status change
338  // was successfull (i.e. leading to the desired transaction).
339  // If a lower level (e.g.SOLVER) wants to transact, but it's
340  // already set by a higher level, \c true should be returned.
341  // Removing a higher levels transaction bit should fail.
342  //
343  // The may functions checks only, if the action would return true
344  // if it is called.
345 
349  bool setTransactValue( TransactValue newVal_r, TransactByValue causer_r )
350  {
351  switch ( newVal_r )
352  {
353  case KEEP_STATE:
354  return setTransact( false, causer_r );
355  break;
356  case LOCKED:
357  return setLock( true, causer_r );
358  break;
359  case TRANSACT:
360  return setTransact( true, causer_r );
361  break;
362  }
363  return false;
364  }
365 
367  {
368  bit::BitField<FieldType> savBitfield = _bitfield;
369  bool ret = setTransactValue( newVal_r, causer_r );
370  _bitfield = savBitfield;
371  return ret;
372  }
373 
379  bool setLock( bool toLock_r, TransactByValue causer_r )
380  {
381  if ( toLock_r == isLocked() )
382  {
383  // we're already in the desired state, but in case of
384  // LOCKED, remember a superior causer.
385  if ( isLocked() && isLessThan<TransactByField>( causer_r ) )
386  fieldValueAssign<TransactByField>( causer_r );
387  return true;
388  }
389  // Here: Lock status is to be changed:
390  if ( causer_r != USER && causer_r != APPL_HIGH )
391  return false;
392  if ( toLock_r ) {
393  // We're in unlocked state, which includes TRANSACT.
394  // Causer must be allowed to reset this. But from
395  // KEEP_STATE every causer is allowed to set the lock.
396  if ( ! setTransact( false, causer_r ) )
397  return false;
398  fieldValueAssign<TransactField>( LOCKED );
399  fieldValueAssign<TransactByField>( causer_r );
400  } else {
401  // To leave Locked state it needs a superior causer.
402  if ( isGreaterThan<TransactByField>( causer_r ) )
403  return false;
404  fieldValueAssign<TransactField>( KEEP_STATE );
405  fieldValueAssign<TransactByField>( SOLVER ); // reset to lowest causer
406  // in order to distinguish from keep_state_by_user
407  }
408  return true;
409  }
410 
411  bool maySetLock( bool to_r, TransactByValue causer_r )
412  {
413  bit::BitField<FieldType> savBitfield = _bitfield;
414  bool ret = setLock( to_r, causer_r );
415  _bitfield = savBitfield;
416  return ret;
417  }
418 
424  bool setTransact( bool toTansact_r, TransactByValue causer_r )
425  {
426  if ( toTansact_r == transacts() )
427  {
428  // we're already in the desired state, but in case of
429  // TRANSACT, remember a superior causer.
430  if ( transacts() && isLessThan<TransactByField>( causer_r ) )
431  fieldValueAssign<TransactByField>( causer_r );
432 
433  fieldValueAssign<TransactDetailField>( NO_DETAIL ); // Details has to be set again
434  return true;
435  }
436  // Here: transact status is to be changed:
437  if ( ! fieldValueIs<TransactField>( KEEP_STATE )
438  && isGreaterThan<TransactByField>( causer_r ) ) {
439  return false;
440  }
441 
442  if ( toTansact_r )
443  {
444  fieldValueAssign<TransactField>( TRANSACT );
445  }
446  else
447  {
448  fieldValueAssign<TransactField>( KEEP_STATE );
449  }
450  fieldValueAssign<TransactDetailField>( NO_DETAIL ); // Details has to be set again
451  fieldValueAssign<TransactByField>( causer_r );
452  return true;
453  }
454 
455  bool maySetTransact( bool val_r, TransactByValue causer )
456  {
457  bit::BitField<FieldType> savBitfield = _bitfield;
458  bool ret = setTransact (val_r, causer);
459  _bitfield = savBitfield;
460  return ret;
461  }
462 
464  bool setSoftLock( TransactByValue causer_r )
465  {
466  if ( ! setTransact( false, causer_r ) )
467  return false;
468  if ( fieldValueIs<TransactField>( KEEP_STATE )
469  && isLessThan<TransactByField>( causer_r ) )
470  fieldValueAssign<TransactByField>( causer_r );
471  return true;
472  }
473 
477  {
478  if ( ! setTransact( false, causer_r ) )
479  return false;
480  if ( fieldValueIs<TransactField>( KEEP_STATE ) )
481  fieldValueAssign<TransactByField>( SOLVER );
482  return true;
483  }
484 
494  bool setSoftTransact( bool toTansact_r, TransactByValue causer_r,
495  TransactByValue causerLimit_r )
496  {
497  if ( fieldValueIs<TransactField>( KEEP_STATE )
498  && toTansact_r != transacts()
499  && isGreaterThan<TransactByField>( causerLimit_r ) )
500  {
501  // any transact status change requires a superior causer.
502  return false;
503  }
504  return setTransact( toTansact_r, causer_r );
505  }
506 
507  bool setSoftTransact( bool toTansact_r, TransactByValue causer_r )
508  { return setSoftTransact( toTansact_r, causer_r, causer_r ); }
509 
510  bool maySetSoftTransact( bool val_r, TransactByValue causer,
511  TransactByValue causerLimit_r )
512  {
513  bit::BitField<FieldType> savBitfield = _bitfield;
514  bool ret = setSoftTransact( val_r, causer, causerLimit_r );
515  _bitfield = savBitfield;
516  return ret;
517  }
518 
519  bool maySetSoftTransact( bool val_r, TransactByValue causer )
520  { return maySetSoftTransact( val_r, causer, causer ); }
521 
523  {
524  if (isInstalled()) return false;
525  return setTransact (true, causer);
526  }
527 
529  {
530  bit::BitField<FieldType> savBitfield = _bitfield;
531  bool ret = setToBeInstalled (causer);
532  _bitfield = savBitfield;
533  return ret;
534  }
535 
537  {
538  if (!isInstalled()) return false;
539  return setTransact (true, causer);
540  }
541 
543  {
544  bit::BitField<FieldType> savBitfield = _bitfield;
545  bool ret = setToBeUninstalled (causer);
546  _bitfield = savBitfield;
547  return ret;
548  }
549 
550  //------------------------------------------------------------------------
551  // *** These are only for the Resolver ***
552 
554  {
555  if (!setToBeUninstalled (SOLVER)) return false;
556  fieldValueAssign<TransactDetailField>(DUE_TO_OBSOLETE);
557  return true;
558  }
559 
561  {
562  if (!setToBeUninstalled (causer)) return false;
563  fieldValueAssign<TransactDetailField>(DUE_TO_UPGRADE);
564  return true;
565  }
566 
568  {
569  if (isInstalled()
570  || !setSoftTransact (true, SOLVER))
571  return false;
572 
573  fieldValueAssign<TransactDetailField>(SOFT_INSTALL);
574  return true;
575  }
576 
578  {
579  if (!isInstalled()
580  || !setSoftTransact (true, SOLVER))
581  return false;
582 
583  fieldValueAssign<TransactDetailField>(SOFT_REMOVE);
584  return true;
585  }
586 
588  {
589  bit::BitField<FieldType> savBitfield = _bitfield;
590  bool ret = setToBeUninstalledSoft ();
591  _bitfield = savBitfield;
592  return ret;
593  }
594 
595  bool isSoftInstall () {
596  return fieldValueIs<TransactDetailField> (SOFT_INSTALL);
597  }
598 
599  bool isSoftUninstall () {
600  return fieldValueIs<TransactDetailField> (SOFT_REMOVE);
601  }
602 
603  bool setSoftInstall (bool flag) {
604  fieldValueAssign<TransactDetailField>(flag?SOFT_INSTALL:0);
605  return true;
606  }
607 
608  bool setSoftUninstall (bool flag) {
609  fieldValueAssign<TransactDetailField>(flag?SOFT_REMOVE:0);
610  return true;
611  }
612 
614  {
615  fieldValueAssign<ValidateField>(UNDETERMINED);
616  return true;
617  }
618 
619  bool setSatisfied ()
620  {
621  fieldValueAssign<ValidateField>(SATISFIED);
622  return true;
623  }
624 
625  bool setBroken ()
626  {
627  fieldValueAssign<ValidateField>(BROKEN);
628  return true;
629  }
630 
632  {
633  fieldValueAssign<ValidateField>(NONRELEVANT);
634  return true;
635  }
636 
637  bool setStatus( ResStatus newStatus_r )
638  {
639  // State field is immutable!
640  if ( _bitfield.value<StateField>() != newStatus_r._bitfield.value<StateField>() )
641  return false;
642  // Transaction state change allowed?
643  if ( ! setTransactValue( newStatus_r.getTransactValue(), newStatus_r.getTransactByValue() ) )
644  return false;
645 
646  // Ok, we take it all..
647  _bitfield = newStatus_r._bitfield;
648  return true;
649  }
650 
653  static const ResStatus toBeInstalled;
658 
659  private:
666 
669  template<class TField>
670  bool fieldValueIs( FieldType val_r ) const
671  { return _bitfield.isEqual<TField>( val_r ); }
672 
675  template<class TField>
677  { _bitfield.assign<TField>( val_r ); }
678 
681  template<class TField>
682  bool isGreaterThan( FieldType val_r )
683  { return _bitfield.value<TField>() > val_r; }
684 
685  template<class TField>
686  bool isLessThan( FieldType val_r )
687  { return _bitfield.value<TField>() < val_r; }
688 
689  private:
692  };
694 
696  std::ostream & operator<<( std::ostream & str, const ResStatus & obj );
697 
699  std::ostream & operator<<( std::ostream & str, ResStatus::TransactValue obj );
700 
702  std::ostream & operator<<( std::ostream & str, ResStatus::TransactByValue obj );
703 
705  inline bool operator==( const ResStatus & lhs, const ResStatus & rhs )
706  { return lhs._bitfield == rhs._bitfield; }
707 
709  inline bool operator!=( const ResStatus & lhs, const ResStatus & rhs )
710  { return ! (lhs == rhs); }
711 
713 
714  namespace resstatus
715  {
717  {
718  public:
720  : _status( 0 )
721  {}
722 
723  StatusBackup( ResStatus & status_r )
724  : _status( &status_r )
726  {}
727 
728  void replay()
729  { if ( _status ) _status->_bitfield = _bitfield; }
730 
731  private:
734  };
735  }
736 
738 } // namespace zypp
740 #endif // ZYPP_RESSTATUS_H
bool setSoftInstall(bool flag)
Definition: ResStatus.h:603
bool setTransactByValue(TransactByValue causer)
Definition: ResStatus.h:296
bool isUnneeded() const
Definition: ResStatus.h:191
StatusBackup(ResStatus &status_r)
Definition: ResStatus.h:723
bit::BitField< FieldType > BitFieldType
Definition: ResStatus.h:66
bool transacts() const
Definition: ResStatus.h:267
BitFieldType bitfield() const
Debug helper returning the bitfield.
Definition: ResStatus.h:170
bool setUndetermined()
Definition: ResStatus.h:613
friend std::ostream & operator<<(std::ostream &str, const ResStatus &obj)
Definition: ResStatus.cc:71
bool isByApplHigh() const
Definition: ResStatus.h:287
ResStatus::BitFieldType _bitfield
Definition: ResStatus.h:733
bool isToBeInstalled() const
Definition: ResStatus.h:244
bool setSoftUninstall(bool flag)
Definition: ResStatus.h:608
bool fieldValueIs(FieldType val_r) const
Return whether the corresponding Field has value val_r.
Definition: ResStatus.h:670
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:231
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:653
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:682
void setOrphaned(bool toVal_r=true)
Definition: ResStatus.h:206
bool isBroken() const
Definition: ResStatus.h:222
TransactValue getTransactValue() const
Definition: ResStatus.h:270
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:411
bool resetTransact(TransactByValue causer_r)
Not the same as setTransact( false ).
Definition: ResStatus.h:476
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:560
bool staysUninstalled() const
Definition: ResStatus.h:247
bool wasUninstalled() const
Definition: ResStatus.h:250
static const ResStatus toBeUninstalledDueToUpgrade
Definition: ResStatus.h:655
bool setSoftLock(TransactByValue causer_r)
Definition: ResStatus.h:464
bool maySetToBeInstalled(TransactByValue causer)
Definition: ResStatus.h:528
bool isToBeUninstalledDueToObsolete() const
Definition: ResStatus.h:306
BitFieldType _bitfield
Definition: ResStatus.h:691
bool isLessThan(FieldType val_r)
Definition: ResStatus.h:686
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r, TransactByValue causerLimit_r)
Soft toggle between TRANSACT and KEEP_STATE.
Definition: ResStatus.h:494
bool wasInstalled() const
Definition: ResStatus.h:242
bool isSoftUninstall()
Definition: ResStatus.h:599
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:147
bool hasWeak() const
Definition: ResStatus.h:194
bool isUserLockQueryMatch() const
Definition: ResStatus.h:327
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:349
bool maySetTransact(bool val_r, TransactByValue causer)
Definition: ResStatus.h:455
bool maySetTransactValue(TransactValue newVal_r, TransactByValue causer_r)
Definition: ResStatus.h:366
bit::Range< FieldType, TransactDetailField::end, 1 > LicenceConfirmedField
Definition: ResStatus.h:73
static const ResStatus toBeUninstalledDueToObsolete
Definition: ResStatus.h:656
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:625
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:379
bool setNonRelevant()
Definition: ResStatus.h:631
bool isToBeInstalledNotSoft() const
Definition: ResStatus.h:315
bool maySetToBeUninstalledSoft()
Definition: ResStatus.h:587
~ResStatus()
Dtor.
Definition: ResStatus.cc:50
bool setToBeUninstalled(TransactByValue causer)
Definition: ResStatus.h:536
bool setTransact(bool toTansact_r, TransactByValue causer_r)
Toggle between TRANSACT and KEEP_STATE.
Definition: ResStatus.h:424
void setUserLockQueryMatch(bool match_r)
Definition: ResStatus.h:330
bool isByUser() const
Definition: ResStatus.h:290
bool maySetSoftTransact(bool val_r, TransactByValue causer, TransactByValue causerLimit_r)
Definition: ResStatus.h:510
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:284
bool isToBeUninstalled() const
Definition: ResStatus.h:252
bool isLocked() const
Definition: ResStatus.h:255
bool isKept() const
Definition: ResStatus.h:264
bool isToBeUninstalledSoft() const
Definition: ResStatus.h:318
bool setStatus(ResStatus newStatus_r)
Definition: ResStatus.h:637
bool isToBeInstalledSoft() const
Definition: ResStatus.h:312
BitField & assign(TInt rhs)
Assign Range in rhs to this.
Definition: Bit.h:201
bool maySetSoftTransact(bool val_r, TransactByValue causer)
Definition: ResStatus.h:519
bool setToBeUninstalledSoft()
Definition: ResStatus.h:577
bool maySetToBeUninstalled(TransactByValue causer)
Definition: ResStatus.h:542
bool isUninstalled() const
Definition: ResStatus.h:234
bool isSoftLocked() const
Definition: ResStatus.h:261
bool setToBeInstalled(TransactByValue causer)
Definition: ResStatus.h:522
Status bitfield.
Definition: ResStatus.h:53
bool offSystem() const
True if would be off system after commit.
Definition: ResStatus.h:278
bool staysInstalled() const
Definition: ResStatus.h:239
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r)
Definition: ResStatus.h:507
bool isUserLocked() const
Definition: ResStatus.h:258
void fieldValueAssign(FieldType val_r)
Set the corresponding Field to value val_r.
Definition: ResStatus.h:676
void resetWeak()
Definition: ResStatus.h:197
bool setToBeInstalledSoft()
Definition: ResStatus.h:567
bool onSystem() const
True if would be on system after commit.
Definition: ResStatus.h:274
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:619
TransactByValue getTransactByValue() const
Definition: ResStatus.h:293
Range of bits starting at bit _begin with length _size.
Definition: Bit.h:81
static const ResStatus toBeUninstalled
Definition: ResStatus.h:654
bool setToBeUninstalledDueToObsolete()
Definition: ResStatus.h:553
bool isSoftInstall()
Definition: ResStatus.h:595
bool isBySolver() const
Definition: ResStatus.h:281
bool isToBeUninstalledDueToUpgrade() const
Definition: ResStatus.h:309
void setSuggested(bool toVal_r=true)
Definition: ResStatus.h:203
bool operator!=(const ResStatus &lhs, const ResStatus &rhs)
Definition: ResStatus.h:709
A value with in a Range.
Definition: Bit.h:110