libzypp  17.23.5
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  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:
331 
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 
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 
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 
532  {
533  if (isInstalled()) return false;
534  return setTransact (true, causer);
535  }
536 
538  {
539  bit::BitField<FieldType> savBitfield = _bitfield;
540  bool ret = setToBeInstalled (causer);
541  _bitfield = savBitfield;
542  return ret;
543  }
544 
546  {
547  if (!isInstalled()) return false;
548  return setTransact (true, causer);
549  }
550 
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 
563  {
564  if (!setToBeUninstalled (SOLVER)) return false;
565  fieldValueAssign<TransactDetailField>(DUE_TO_OBSOLETE);
566  return true;
567  }
568 
570  {
571  if (!setToBeUninstalled (causer)) return false;
572  fieldValueAssign<TransactDetailField>(DUE_TO_UPGRADE);
573  return true;
574  }
575 
577  {
578  if (isInstalled()
579  || !setSoftTransact (true, SOLVER))
580  return false;
581 
582  fieldValueAssign<TransactDetailField>(SOFT_INSTALL);
583  return true;
584  }
585 
587  {
588  if (!isInstalled()
589  || !setSoftTransact (true, SOLVER))
590  return false;
591 
592  fieldValueAssign<TransactDetailField>(SOFT_REMOVE);
593  return true;
594  }
595 
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 
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 
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;
667 
668  private:
675 
678  template<class TField>
679  bool fieldValueIs( FieldType val_r ) const
680  { return _bitfield.isEqual<TField>( val_r ); }
681 
684  template<class TField>
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:
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  {
726  {
727  public:
729  : _status( 0 )
730  {}
731 
732  StatusBackup( ResStatus & status_r )
733  : _status( &status_r )
735  {}
736 
737  void replay()
738  { if ( _status ) _status->_bitfield = _bitfield; }
739 
740  private:
743  };
744  }
745 
747 } // namespace zypp
749 #endif // ZYPP_RESSTATUS_H
zypp::ResStatus::isBySolver
bool isBySolver() const
Definition: ResStatus.h:290
zypp::ResStatus::operator<<
friend std::ostream & operator<<(std::ostream &str, const ResStatus &obj)
Definition: ResStatus.cc:101
zypp::ResStatus::setUndetermined
bool setUndetermined()
Definition: ResStatus.h:622
zypp::ResStatus::setSuggested
void setSuggested(bool toVal_r=true)
Definition: ResStatus.h:203
zypp::ResStatus::isToBeInstalled
bool isToBeInstalled() const
Definition: ResStatus.h:253
zypp::ResStatus::isUnneeded
bool isUnneeded() const
Definition: ResStatus.h:191
zypp::ResStatus::UserLockQuery
UserLockQuery
Definition: ResStatus.h:147
zypp::ResStatus::setSoftUninstall
bool setSoftUninstall(bool flag)
Definition: ResStatus.h:617
zypp::ResStatus::isByApplHigh
bool isByApplHigh() const
Definition: ResStatus.h:296
zypp::ResStatus::operator!=
bool operator!=(const ResStatus &lhs, const ResStatus &rhs)
Definition: ResStatus.h:718
zypp::ResStatus::APPL_HIGH
Definition: ResStatus.h:110
zypp::ResStatus::INSTALLED
Definition: ResStatus.h:91
zypp::ResStatus::bitfield
BitFieldType bitfield() const
Debug helper returning the bitfield.
Definition: ResStatus.h:170
zypp::ResStatus::WeakValue
WeakValue
Definition: ResStatus.h:138
zypp::ResStatus::isNonRelevant
bool isNonRelevant() const
Definition: ResStatus.h:225
zypp::ResStatus::WeakField
bit::Range< FieldType, LicenceConfirmedField::end, 4 > WeakField
Definition: ResStatus.h:74
zypp::ResStatus::isInstalled
bool isInstalled() const
Definition: ResStatus.h:240
zypp::ResStatus::validate
ValidateValue validate() const
Definition: ResStatus.h:213
zypp::ResStatus::operator==
friend bool operator==(const ResStatus &lhs, const ResStatus &rhs)
zypp::ResStatus::fieldValueIs
bool fieldValueIs(FieldType val_r) const
Return whether the corresponding Field has value val_r.
Definition: ResStatus.h:679
zypp::ResStatus::setOrphaned
void setOrphaned(bool toVal_r=true)
Definition: ResStatus.h:206
Bit.h
zypp::ResStatus::SOLVER
Definition: ResStatus.h:108
zypp::ResStatus::getTransactValue
TransactValue getTransactValue() const
Definition: ResStatus.h:279
zypp::resstatus::StatusBackup::StatusBackup
StatusBackup()
Definition: ResStatus.h:728
zypp::bit::BitField::test
bool test(TInt rhs)
Test whether all bits of rhs are set.
Definition: Bit.h:253
zypp::ResStatus::ValidateValue
ValidateValue
Definition: ResStatus.h:93
zypp::ResStatus::UserLockQueryField
bit::Range< FieldType, WeakField::end, 1 > UserLockQueryField
Definition: ResStatus.h:75
zypp::ResStatus::toBeInstalled
static const ResStatus toBeInstalled
Definition: ResStatus.h:662
zypp::bit::BitField::value
TInt value() const
Return the value.
Definition: Bit.h:179
zypp::ResStatus::LicenceConfirmedValue
LicenceConfirmedValue
Definition: ResStatus.h:132
zypp::ResStatus::SATISFIED
Definition: ResStatus.h:97
zypp::ResStatus::StateValue
StateValue
Definition: ResStatus.h:88
zypp::ResStatus::EXPLICIT_INSTALL
Definition: ResStatus.h:121
zypp::ResStatus::EXPLICIT_REMOVE
Definition: ResStatus.h:126
zypp::ResStatus::isGreaterThan
bool isGreaterThan(FieldType val_r)
compare two values.
Definition: ResStatus.h:691
zypp::resstatus::StatusBackup::replay
void replay()
Definition: ResStatus.h:737
zypp::ResStatus::DUE_TO_OBSOLETE
Definition: ResStatus.h:128
zypp::ResStatus::TransactByValue
TransactByValue
Definition: ResStatus.h:106
zypp::ResStatus::USERLOCK_MATCH
Definition: ResStatus.h:150
zypp::ResStatus::maySetLock
bool maySetLock(bool to_r, TransactByValue causer_r)
Definition: ResStatus.h:420
zypp::ResStatus::isBroken
bool isBroken() const
Definition: ResStatus.h:222
zypp::ResStatus::setSoftLock
bool setSoftLock(TransactByValue causer_r)
Definition: ResStatus.h:473
zypp::ResStatus::isToBeUninstalledDueToObsolete
bool isToBeUninstalledDueToObsolete() const
Definition: ResStatus.h:315
zypp::ResStatus::resetTransact
bool resetTransact(TransactByValue causer_r)
Not the same as setTransact( false ).
Definition: ResStatus.h:485
zypp::ResStatus::_bitfield
BitFieldType _bitfield
Definition: ResStatus.h:700
zypp::ResStatus::validateValueAsString
std::string validateValueAsString() const
Definition: ResStatus.h:228
zypp::ResStatus::isRecommended
bool isRecommended() const
Definition: ResStatus.h:182
zypp::ResStatus::setLicenceConfirmed
void setLicenceConfirmed(bool toVal_r=true)
Definition: ResStatus.h:178
zypp::ResStatus::TransactValue
TransactValue
Definition: ResStatus.h:100
zypp::bit::BitField::isEqual
bool isEqual(TInt rhs) const
Test for equal value within a Range.
Definition: Bit.h:215
zypp::ResStatus::wasInstalled
bool wasInstalled() const
Definition: ResStatus.h:251
zypp::ResStatus::SOFT_INSTALL
Definition: ResStatus.h:122
zypp::ResStatus::staysUninstalled
bool staysUninstalled() const
Definition: ResStatus.h:256
zypp::ResStatus::NO_WEAK
Definition: ResStatus.h:140
zypp::ResStatus::TransactByField
bit::Range< FieldType, TransactField::end, 2 > TransactByField
Definition: ResStatus.h:71
zypp::ResStatus::setToBeUninstalledDueToUpgrade
bool setToBeUninstalledDueToUpgrade(TransactByValue causer)
Definition: ResStatus.h:569
zypp::ResStatus::isUserLockQueryMatch
bool isUserLockQueryMatch() const
Definition: ResStatus.h:336
zypp::ResStatus::isSoftUninstall
bool isSoftUninstall()
Definition: ResStatus.h:608
zypp::ResStatus::hasWeak
bool hasWeak() const
Definition: ResStatus.h:194
zypp::ResStatus::NONRELEVANT
Definition: ResStatus.h:98
zypp::ResStatus::wasUninstalled
bool wasUninstalled() const
Definition: ResStatus.h:259
zypp::ResStatus::maySetToBeInstalled
bool maySetToBeInstalled(TransactByValue causer)
Definition: ResStatus.h:537
zypp::ResStatus::toBeUninstalledDueToUpgrade
static const ResStatus toBeUninstalledDueToUpgrade
Definition: ResStatus.h:664
zypp::ResStatus::SUGGESTED
Definition: ResStatus.h:141
zypp::ResStatus::maySetTransact
bool maySetTransact(bool val_r, TransactByValue causer)
Definition: ResStatus.h:464
zypp::ResStatus::TRANSACT
Definition: ResStatus.h:104
zypp::ResStatus::KEEP_STATE
Definition: ResStatus.h:102
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::RECOMMENDED
Definition: ResStatus.h:142
zypp::ResStatus::DetailValue
DetailValue
Definition: ResStatus.h:114
zypp::ResStatus::toBeUninstalledDueToObsolete
static const ResStatus toBeUninstalledDueToObsolete
Definition: ResStatus.h:665
zypp::ResStatus::isLessThan
bool isLessThan(FieldType val_r)
Definition: ResStatus.h:695
zypp::bit::Range
Range of bits starting at bit _begin with length _size.
Definition: Bit.h:81
zypp::ResStatus::isSatisfied
bool isSatisfied() const
Definition: ResStatus.h:219
zypp::ResStatus::StateField
bit::Range< FieldType, 0, 1 > StateField
Definition: ResStatus.h:68
zypp::ResStatus::FieldType
uint16_t FieldType
Definition: ResStatus.h:65
zypp::ResStatus::InstallDetailValue
InstallDetailValue
Definition: ResStatus.h:119
zypp::resstatus::StatusBackup::StatusBackup
StatusBackup(ResStatus &status_r)
Definition: ResStatus.h:732
zypp::ResStatus::setBroken
bool setBroken()
Definition: ResStatus.h:634
zypp::ResStatus::setNonRelevant
bool setNonRelevant()
Definition: ResStatus.h:640
zypp::ResStatus::setTransactValue
bool setTransactValue(TransactValue newVal_r, TransactByValue causer_r)
Set TransactValue.
Definition: ResStatus.h:358
zypp::ResStatus::LicenceConfirmedField
bit::Range< FieldType, TransactDetailField::end, 1 > LicenceConfirmedField
Definition: ResStatus.h:73
zypp::ResStatus::TransactField
bit::Range< FieldType, ValidateField::end, 2 > TransactField
Definition: ResStatus.h:70
zypp::ResStatus::maySetTransactValue
bool maySetTransactValue(TransactValue newVal_r, TransactByValue causer_r)
Definition: ResStatus.h:375
zypp::ResStatus::isToBeInstalledNotSoft
bool isToBeInstalledNotSoft() const
Definition: ResStatus.h:324
zypp::ResStatus::RemoveDetailValue
RemoveDetailValue
Definition: ResStatus.h:124
zypp::ResStatus::ValidateField
bit::Range< FieldType, StateField::end, 2 > ValidateField
Definition: ResStatus.h:69
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::ResStatus::DUE_TO_UPGRADE
Definition: ResStatus.h:129
zypp::resstatus::StatusBackup::_status
ResStatus * _status
Definition: ResStatus.h:741
zypp::ResStatus::isOrphaned
bool isOrphaned() const
Definition: ResStatus.h:188
zypp::ResStatus::setLock
bool setLock(bool toLock_r, TransactByValue causer_r)
Apply a lock (prevent transaction).
Definition: ResStatus.h:388
zypp::ResStatus::~ResStatus
~ResStatus()
Dtor.
Definition: ResStatus.cc:50
zypp::ResStatus::isLicenceConfirmed
bool isLicenceConfirmed() const
Definition: ResStatus.h:175
zypp::ResStatus::setToBeUninstalled
bool setToBeUninstalled(TransactByValue causer)
Definition: ResStatus.h:545
zypp::ResStatus::isSuggested
bool isSuggested() const
Definition: ResStatus.h:185
zypp::ResStatus::maySetToBeUninstalledSoft
bool maySetToBeUninstalledSoft()
Definition: ResStatus.h:596
zypp::ResStatus::TransactDetailField
bit::Range< FieldType, TransactByField::end, 2 > TransactDetailField
Definition: ResStatus.h:72
zypp::ResStatus::setUserLockQueryMatch
void setUserLockQueryMatch(bool match_r)
Definition: ResStatus.h:339
zypp::ResStatus::setTransact
bool setTransact(bool toTansact_r, TransactByValue causer_r)
Toggle between TRANSACT and KEEP_STATE.
Definition: ResStatus.h:433
zypp::ResStatus::isByApplLow
bool isByApplLow() const
Definition: ResStatus.h:293
zypp::ResStatus::setRecommended
void setRecommended(bool toVal_r=true)
Definition: ResStatus.h:200
zypp::bit::RangeValue
A value with in a Range.
Definition: Bit.h:110
zypp::ResStatus::isByUser
bool isByUser() const
Definition: ResStatus.h:299
zypp::resstatus::StatusBackup
Definition: ResStatus.h:725
zypp::ResStatus::maySetSoftTransact
bool maySetSoftTransact(bool val_r, TransactByValue causer)
Definition: ResStatus.h:528
zypp::resstatus::StatusBackup::_bitfield
ResStatus::BitFieldType _bitfield
Definition: ResStatus.h:742
zypp::ResStatus::setStatus
bool setStatus(ResStatus newStatus_r)
Definition: ResStatus.h:646
zypp::ResStatus::isToBeInstalledSoft
bool isToBeInstalledSoft() const
Definition: ResStatus.h:321
zypp::ResStatus::isUndetermined
bool isUndetermined() const
Definition: ResStatus.h:216
zypp::ResStatus::maySetSoftTransact
bool maySetSoftTransact(bool val_r, TransactByValue causer, TransactByValue causerLimit_r)
Definition: ResStatus.h:519
zypp::ResStatus::ORPHANED
Definition: ResStatus.h:143
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:147
zypp::ResStatus::isUninstalled
bool isUninstalled() const
Definition: ResStatus.h:243
zypp::ResStatus::staysInstalled
bool staysInstalled() const
Definition: ResStatus.h:248
zypp::ResStatus::USER
Definition: ResStatus.h:111
zypp::ResStatus::isSoftLocked
bool isSoftLocked() const
Definition: ResStatus.h:270
zypp::ResStatus::offSystem
bool offSystem() const
True if would be off system after commit.
Definition: ResStatus.h:287
zypp::ResStatus::USERLOCK_NOMATCH
Definition: ResStatus.h:149
zypp::ResStatus::LOCKED
Definition: ResStatus.h:103
zypp::ResStatus
Status bitfield.
Definition: ResStatus.h:53
zypp::ResStatus::UNINSTALLED
Definition: ResStatus.h:90
zypp::ResStatus::isKept
bool isKept() const
Definition: ResStatus.h:273
zypp::ResStatus::isToBeUninstalled
bool isToBeUninstalled() const
Definition: ResStatus.h:261
zypp::ResStatus::APPL_LOW
Definition: ResStatus.h:109
zypp::ResStatus::onSystem
bool onSystem() const
True if would be on system after commit.
Definition: ResStatus.h:283
zypp::bit::BitField::assign
BitField & assign(TInt rhs)
Assign Range in rhs to this.
Definition: Bit.h:201
zypp::ResStatus::isLocked
bool isLocked() const
Definition: ResStatus.h:264
zypp::ResStatus::isToBeUninstalledSoft
bool isToBeUninstalledSoft() const
Definition: ResStatus.h:327
zypp::ResStatus::resetWeak
void resetWeak()
Definition: ResStatus.h:197
zypp::ResStatus::setUnneeded
void setUnneeded(bool toVal_r=true)
Definition: ResStatus.h:209
zypp::ResStatus::setToBeUninstalledSoft
bool setToBeUninstalledSoft()
Definition: ResStatus.h:586
zypp::ResStatus::UNDETERMINED
Definition: ResStatus.h:95
zypp::ResStatus::BROKEN
Definition: ResStatus.h:96
zypp::resstatus::UserLockQueryManip
Manipulator for ResStatus::UserLockQueryField.
Definition: PoolImpl.h:42
zypp::ResStatus::maySetToBeUninstalled
bool maySetToBeUninstalled(TransactByValue causer)
Definition: ResStatus.h:551
zypp::ResStatus::LICENCE_UNCONFIRMED
Definition: ResStatus.h:134
zypp::ResStatus::setSoftTransact
bool setSoftTransact(bool toTansact_r, TransactByValue causer_r)
Definition: ResStatus.h:516
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::toBeUninstalled
static const ResStatus toBeUninstalled
Definition: ResStatus.h:663
zypp::ResStatus::getTransactByValue
TransactByValue getTransactByValue() const
Definition: ResStatus.h:302
str
String related utilities and Regular expression matching.
zypp::ResStatus::setToBeInstalled
bool setToBeInstalled(TransactByValue causer)
Definition: ResStatus.h:531
zypp::ResStatus::LICENCE_CONFIRMED
Definition: ResStatus.h:135
zypp::ResStatus::fieldValueAssign
void fieldValueAssign(FieldType val_r)
Set the corresponding Field to value val_r.
Definition: ResStatus.h:685
zypp::ResStatus::setToBeInstalledSoft
bool setToBeInstalledSoft()
Definition: ResStatus.h:576
zypp::ResStatus::isUserLocked
bool isUserLocked() const
Definition: ResStatus.h:267
zypp::ResStatus::isToBeUninstalledDueToUpgrade
bool isToBeUninstalledDueToUpgrade() const
Definition: ResStatus.h:318
zypp::ResStatus::setToBeUninstalledDueToObsolete
bool setToBeUninstalledDueToObsolete()
Definition: ResStatus.h:562
zypp::ResStatus::ResStatus
ResStatus()
Default ctor.
Definition: ResStatus.cc:33
zypp::ResStatus::setTransactByValue
bool setTransactByValue(TransactByValue causer)
Definition: ResStatus.h:305
zypp::ResStatus::setSoftInstall
bool setSoftInstall(bool flag)
Definition: ResStatus.h:612
zypp::bit::BitField< FieldType >
zypp::bit::BitField::set
BitField & set(TInt rhs, bool doset_r)
Set or unset bits of rhs.
Definition: Bit.h:229
zypp::ResStatus::NO_DETAIL
Detail for no transact, i.e.
Definition: ResStatus.h:117
zypp::ResStatus::SOFT_REMOVE
Definition: ResStatus.h:127
zypp::ResStatus::UNNEEDED
Definition: ResStatus.h:144
zypp::ResStatus::transacts
bool transacts() const
Definition: ResStatus.h:276
zypp::ResStatus::isSoftInstall
bool isSoftInstall()
Definition: ResStatus.h:604
zypp::ResStatus::setSatisfied
bool setSatisfied()
Definition: ResStatus.h:628
zypp::ResStatus::BitFieldType
bit::BitField< FieldType > BitFieldType
Definition: ResStatus.h:66