{ _pimpl->setLicenceConfirmed( val_r ); }
+ Selectable::Fate Selectable::fate() const
+ {
+ switch ( status() ) {
+ case S_Update:
+ case S_Install:
+ case S_AutoUpdate:
+ case S_AutoInstall:
+ return TO_INSTALL;
+ break;
+
+ case S_Del:
+ case S_AutoDel:
+ return TO_DELETE;
+ break;
+
+ case S_Protected:
+ case S_Taboo:
+ case S_KeepInstalled:
+ case S_NoInst:
+ break;
+ }
+ return UNMODIFIED;
+ };
+
+
/******************************************************************
**
** FUNCTION NAME : operator<<
{ return ! installedObj() && candidateObj(); }
//@}
+ public:
+ /** \name Query objects fate in case of commit.
+ */
+ //@{
+ enum Fate {
+ TO_DELETE = -1,
+ UNMODIFIED = 0,
+ TO_INSTALL = 1
+ };
+ /** */
+ Fate fate() const;
+
+ /** True if either to delete or to install */
+ bool unmodified() const
+ { return fate() == UNMODIFIED; }
+
+ /** True if either to delete or to install */
+ bool toModify() const
+ { return fate() != UNMODIFIED; }
+
+ /** True if to delete */
+ bool toDelete() const
+ { return fate() == TO_DELETE; }
+
+ /** True if to install */
+ bool toInstall() const
+ { return fate() == TO_INSTALL; }
+ //@}
+
public:
/** \name Special inteface for Y2UI.
* \note This interface acts on \ref ResStatus::USER level.