libzypp  17.38.17
PoolInstallState.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
21 #ifndef ZYPP_MISC_POOLINSTALLSTATE_H
22 #define ZYPP_MISC_POOLINSTALLSTATE_H
23 
24 #include <zypp-core/Globals.h>
25 #include <zypp-core/base/Flags.h>
26 #include <zypp/PoolItem.h>
27 
28 namespace zypp {
29  namespace ui { class Selectable; }
30 }
31 
33 namespace zypp::misc
34 {
35 
58  enum class PoolInstallState
59  {
60  NotInstalled = 0,
61  AutoInstalled = (1 << 0),
62  UserInstalled = (1 << 1),
63  OtherVersionInstalled = (1 << 2),
64  Satisfied = (1 << 3),
66  Broken = (1 << 4),
67  Locked = (1 << 5),
68  Retracted = (1 << 6),
69  };
70  ZYPP_DECLARE_FLAGS_AND_OPERATORS( PoolInstallStateFlags, PoolInstallState );
71 
77  ZYPP_API PoolInstallStateFlags poolInstallState( const PoolItem & pi );
78 
86  ZYPP_API PoolInstallStateFlags poolInstallState( const ui::Selectable & sel );
87 
89 } // namespace zypp::misc
91 
92 #endif // ZYPP_MISC_POOLINSTALLSTATE_H
Collects PoolItems of same kind and name.
Definition: Selectable.h:52
Not installed (base/default state)
Explicitly installed by the user.
Retracted (PTF / blacklisted)
PoolInstallState
Install-state flags for a pool item or selectable.
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Definition: Arch.h:173
Installed as a dependency (auto)
Provides API related macros.
ZYPP_DECLARE_FLAGS_AND_OPERATORS(LoadSystemFlags, LoadSystemFlag)
relates: LoadSystemFlag Type-safe way of storing OR-combinations.
PoolInstallStateFlags poolInstallState(const PoolItem &pi)
Compute install-state flags for a PoolItem.
Pseudo-installed and requirements are not met.
Combining sat::Solvable and ResStatus.
Definition: PoolItem.h:50
Always combined with AutoInstalled or UserInstalled.
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
Installed, but no identical candidate available.
Locked — solver will not change this item.