libzypp  17.38.7
autoinstalledcomponent.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 ----------------------------------------------------------------------/
9 *
10 * This file contains private API, this might break at any time between releases.
11 * You have been warned!
12 *
13 */
14 #ifndef ZYPP_NG_SAT_COMPONENTS_AUTOINSTALLEDCOMPONENT_H_INCLUDED
15 #define ZYPP_NG_SAT_COMPONENTS_AUTOINSTALLEDCOMPONENT_H_INCLUDED
16 
17 #include "poolcomponents.h"
18 #include <zypp/ng/sat/queue.h>
19 #include <zypp/ng/idstring.h>
20 
21 namespace zyppng::sat {
22 
30  public:
31  AutoInstalledComponent() = default;
32 
34  const StringQueue & autoInstalled() const { return _autoinstalled; }
35 
37  void setAutoInstalled( StringQueue autoInstalled_r ) { _autoinstalled = std::move(autoInstalled_r); }
38 
39  bool isOnSystemByUser( IdString ident_r ) const { return !_autoinstalled.contains( ident_r.id() ); }
40  bool isOnSystemByAuto( IdString ident_r ) const { return _autoinstalled.contains( ident_r.id() ); }
42 
43  void onRepoRemoved( Pool & pool, detail::RepoIdType id ) override;
44  void onReset( Pool & pool ) override;
45 
46  private:
48  };
49 
50 } // namespace zyppng::sat
51 
52 #endif
Component managing the list of autoinstalled solvables.
IdType id() const
Expert backdoor.
Definition: IdString.h:144
Access to the sat-pools string space.
Definition: IdString.h:51
Orchestrator for a libsolv pool instance.
Definition: pool.h:36
void onRepoRemoved(Pool &pool, detail::RepoIdType id) override
bool isOnSystemByAuto(IdString ident_r) const
bool isOnSystemByUser(IdString ident_r) const
Interface for components that run BEFORE the whatprovides index is built.
This file contains private API, this might break at any time between releases.
Definition: capabilities.h:22
Libsolv Id queue wrapper.
Definition: queue.h:36
const StringQueue & autoInstalled() const
Get ident list of all autoinstalled solvables.
void setAutoInstalled(StringQueue autoInstalled_r)
Set ident list of all autoinstalled solvables.
bool contains(value_type val_r) const
Return whether the Queue contais at lest one element with value val_r.
Definition: queue.h:59
zypp::sat::detail::RepoIdType RepoIdType
Definition: poolconstants.h:45