#include <PMSelectable.h>
Inheritance diagram for PMSelectable:
Public Types | |
typedef std::list< PMObjectPtr > | PMObjectList |
typedef bool(PMSelectable::* | Test_method )() const |
typedef bool(* | Test_fnc )(const constPMSelectablePtr &sel_r) |
enum | UI_Status { S_Protected, S_Taboo, S_Del, S_Update, S_Install, S_AutoDel, S_AutoUpdate, S_AutoInstall, S_KeepInstalled, S_NoInst } |
enum | Fate { TO_DELETE = -1, UNMODIFIED = 0, TO_INSTALL = 1 } |
Public Member Functions | |
const PkgName & | name () const |
PMObjectPtr | installedObj () const |
PMObjectPtr | candidateObj () const |
unsigned | availableObjs () const |
PMObjectList::const_iterator | av_begin () const |
PMObjectList::const_iterator | av_end () const |
PMObjectList::const_reverse_iterator | av_rbegin () const |
PMObjectList::const_reverse_iterator | av_rend () const |
PMObjectPtr | theObject () const |
PMObjectPtr | autoCandidate () const |
PMObjectPtr | userCandidate () const |
PMObjectPtr | bestCandidate () const |
bool | setUserCandidate (const PMObjectPtr &obj_r) |
bool | clrUserCandidate () |
bool | set_status (const UI_Status state_r) |
bool | test_set_status (const UI_Status state_r) |
UI_Status | status () const |
bool | providesSources () const |
bool | set_source_install (const bool install_r) |
bool | source_install () const |
Fate | fate () const |
void | setNothingSelected () |
bool | downgrade_condition () const |
bool | has_object () const |
bool | has_installed () const |
bool | has_candidate () const |
bool | has_both_objects () const |
bool | has_installed_only () const |
bool | has_candidate_only () const |
bool | to_modify () const |
bool | to_delete () const |
bool | to_install () const |
bool | by_user () const |
bool | by_appl () const |
bool | by_auto () const |
bool | is_taboo () const |
bool | user_unset () |
bool | user_set_delete () |
bool | user_set_install () |
bool | user_set_taboo () |
bool | user_clr_taboo () |
bool | appl_unset () |
bool | appl_set_delete () |
bool | appl_force_install () |
bool | appl_set_install () |
bool | auto_unset () |
bool | auto_set_delete () |
bool | auto_force_install () |
bool | auto_set_install () |
bool | is_onSystem () const |
bool | is_offSystem () const |
bool | user_set_onSystem () |
bool | user_set_offSystem () |
bool | appl_set_onSystem () |
bool | appl_set_offSystem () |
bool | auto_set_onSystem () |
bool | auto_set_offSystem () |
virtual std::ostream & | dumpOn (std::ostream &str) const |
std::ostream & | dumpStateOn (std::ostream &str) const |
Static Public Member Functions | |
bool | test (const constPMSelectablePtr &sel_r, Test_method fnc_r) |
Protected Member Functions | |
PMSelectable () | |
PMSelectable (const PkgName &name_r) | |
virtual | ~PMSelectable () |
Private Types | |
typedef bool(* | ClistCompare )(const PMObjectPtr &lhs, const PMObjectPtr &rhs) |
Private Member Functions | |
REP_BODY (PMSelectable) | |
void | _mgr_attach (PMManager *mgr_r) |
void | _mgr_detach () |
void | _attach_obj (PMObjectPtr &obj_r) |
void | _detach_obj (PMObjectPtr &obj_r) |
void | setInstalledObj (PMObjectPtr obj_r) |
void | delInstalledObj () |
void | clistAdd (PMObjectPtr obj_r) |
void | clistDel (PMObjectPtr obj_r) |
void | clistSort () |
void | clistClearAll () |
void | clearAll () |
bool | isEmpty () const |
void | check () const |
PMObjectList::iterator | clistLookup (PMObjectPtr obj_r) |
void | chooseCandidateObj () |
void | clearCandidateObj () |
bool | intern_set_status (const UI_Status state_r, const bool doit) |
bool | do_set_onSystem (bool(PMSelectable::*fnc_unset)(), bool(PMSelectable::*fnc_install)()) |
bool | do_set_offSystem (bool(PMSelectable::*fnc_unset)(), bool(PMSelectable::*fnc_delete)()) |
Static Private Member Functions | |
bool | setCandidateOrder (PM::CandidateOrder neworder_r) |
bool | clistAVS (const PMObjectPtr &lhs, const PMObjectPtr &rhs) |
bool | clistASV (const PMObjectPtr &lhs, const PMObjectPtr &rhs) |
bool | clistIsBetter (const PMObjectPtr &lhs, const PMObjectPtr &rhs) |
Private Attributes | |
PMManager * | _manager |
SelState | _state |
PkgName | _name |
PMObjectPtr | _installedObj |
PMObjectPtr | _candidateObj |
PMObjectPtr | _userCandidateObj |
PMObjectList | _candidateList |
Static Private Attributes | |
ClistCompare | _clistCompare = DEAFAULT_CLISTCOMPARE |
Friends | |
std::ostream & | operator<< (std::ostream &str, UI_Status obj) |
|
|
|
|
|
General test function |
|
Test method like 'by_user()' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Application request to install the candidate object. Fails if no candidate object is present, or user requested delete or taboo. Does not check for downgrade_condition. Do not use it without need. |
|
Application request to delete the installed object. Fails if no installed object is present, or user requested install or taboo. |
|
Application request to install the candidate object. Fails if no candidate object is present, or user requested delete or taboo. Fails if downgrade_condition is true. |
|
do_set_offSystem requested by appl. |
|
do_set_onSystem requested by appl. |
|
Application request to clear state (neither delete nor install). Fails if user requested modification. |
|
Auto request to install the candidate object. Fails if no candidate object is present, or user/appl requested delete or taboo. Does not check for downgrade_condition. Do not use it without need. |
|
Auto request to delete the installed object. Fails if no installed object is present, or user/appl requested install or taboo. |
|
Auto request to install the candidate object. Fails if no candidate object is present, or user/appl requested delete or taboo. Fails if downgrade_condition is true. |
|
do_set_offSystem requested by auto. |
|
do_set_onSystem requested by auto. |
|
Auto request to clear state (neither delete nor install). Fails if user/appl requested modification. |
|
Best among the availableObjs(). May be NULL, if no available is better than the installed. |
|
Iterator for the list of available Objects. |
|
Iterator for the list of available Objects. |
|
Iterator for the list of available Objects. |
|
Iterator for the list of available Objects. |
|
Number of Objects with this name availavle on any enabled InstSrc. If the list is not empty, one among these might be choosen as candidate for an installation. |
|
userCandidate() if not NULL. Otherwise autoCandidate(). |
|
True if modification was requested by application |
|
True if modification was auto requested |
|
True if modification was requested by user |
|
The one among all available Objects with this name (from any enabled InstSrc), That could be actually installed. Might be NULL, if no available Object is appropriate. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Unset the userCandidate(). |
|
|
|
Request to adjust state so that the object won't be present on the targetSystem after install. Function pointers passed denote the modification level (user/appl/auto). In other words: If the object is installed, set to delete. If it's not installed, unset it. If it already is_offSystem leave it as it is. |
|
Request to adjust state so that the object will be present on the targetSystem after install. Function pointers passed denote the modification level (user/appl/auto). In other words: If the object is set to delete, unset it (kepp the installed one). If it's not installed, set to install. If it already is_onSystem leave it as it is. |
|
Downgrade condition. Returns true, iff both objects are present, and installation of candidateObj would just replace or downgrade the installedObj. (except both packages are SuSE and the candidate has newer buildtime) Always false for non package objects! |
|
Used by ostream::operator<< to print some debug lines Reimplemented from CountedRep. |
|
print some debug lines |
|
|
|
True if installed and candidate object is present |
|
True if candidate object is present |
|
True if candidate object is present but no installed. |
|
True if installed object is present |
|
True if installed object is present but no candidate. |
|
True if either installed or candidate object is present |
|
If not NULL, the Object actually installed on the target system. Otherwise no Object with this name is currently installed on the target system. |
|
Test or trigger status change according to doit. |
|
Return true if the object won't be present on the targetSystem after install. In other words: The object either is installed, but selected to delete, or is not installed and not selected to install. |
|
Return true if the object will be present on the targetSystem after install. In other words: The object either is installed, but not selected to delete, or is not installed but selected to install. |
|
True if no modification allowed by user. |
|
|
|
The common name of all Objects managed by this Selectable. |
|
True if candidate object provides sources to install |
|
|
|
Set whether to install available sources. |
|
If possible, trigger action according to state_r. |
|
|
|
|
|
Set to neither install nor delete (keeps taboo) |
|
Set the userCandidate(). |
|
True if available sources would be installed. |
|
Return the current ui_status (no flags returned) |
|
Evaluates a Test_method |
|
Test whether set_status(state_r) would succseed.. |
|
UI likes to have one among the Objects refered to here, whichs data are shown per default. Returns installedObj(). If not available candidateObj(). If not available one out of availableObjs(). |
|
True if to delete |
|
True if to install |
|
True if either to delete or to install |
|
Clear taboo flag. |
|
User request to delete the installed object. Fails if no installed object is present (clears taboo). |
|
User request to install the candidate object. Fails if no candidate object is present (clears taboo). |
|
do_set_offSystem requested by user. |
|
do_set_onSystem requested by user. |
|
No modification allowed by user. |
|
User request to clear state (neither delete nor install). (keeps taboo) |
|
One among the availableObjs() explicitly requested by user. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|