libzypp: zypp/ng/sat/components/autoinstalledcomponent.h Source File

libzypp 17.38.6

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
21namespace zyppng::sat {
22
29 class AutoInstalledComponent : public IPoolComponent {
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:
47 StringQueue _autoinstalled;
48 };
49
50} // namespace zyppng::sat
51
52#endif
zypp::IdString
Access to the sat-pools string space.
Definition IdString.h:55
zypp::IdString::id
IdType id() const
Expert backdoor.
Definition IdString.h:144
zyppng::sat::AutoInstalledComponent::autoInstalled
const StringQueue & autoInstalled() const
Get ident list of all autoinstalled solvables.
Definition autoinstalledcomponent.h:34
zyppng::sat::AutoInstalledComponent::onRepoRemoved
void onRepoRemoved(Pool &pool, detail::RepoIdType id) override
Definition autoinstalledcomponent.cc:14
zyppng::sat::AutoInstalledComponent::isOnSystemByAuto
bool isOnSystemByAuto(IdString ident_r) const
Definition autoinstalledcomponent.h:40
zyppng::sat::AutoInstalledComponent::_autoinstalled
StringQueue _autoinstalled
Definition autoinstalledcomponent.h:47
zyppng::sat::AutoInstalledComponent::AutoInstalledComponent
AutoInstalledComponent()=default
zyppng::sat::AutoInstalledComponent::setAutoInstalled
void setAutoInstalled(StringQueue autoInstalled_r)
Set ident list of all autoinstalled solvables.
Definition autoinstalledcomponent.h:37
zyppng::sat::AutoInstalledComponent::onReset
void onReset(Pool &pool) override
Definition autoinstalledcomponent.cc:20
zyppng::sat::AutoInstalledComponent::isOnSystemByUser
bool isOnSystemByUser(IdString ident_r) const
Definition autoinstalledcomponent.h:39
zyppng::sat::IPoolComponent
Interface for components that run BEFORE the whatprovides index is built.
Definition poolcomponents.h:91
zyppng::sat::Pool
Orchestrator for a libsolv pool instance.
Definition pool.h:37
zypp::pool
Definition ByIdent.h:24
zyppng::sat::detail::RepoIdType
zypp::sat::detail::RepoIdType RepoIdType
Definition poolconstants.h:45
zyppng::sat
This file contains private API, this might break at any time between releases.
Definition capabilities.h:22
zyppng::sat::StringQueue
Queue StringQueue
Queue with String ids.
Definition queue.h:29
poolcomponents.h
queue.h
idstring.h