libzypp: zypp/ng/sat/namespaces/modalias.h Source File

libzypp 17.38.14

modalias.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_NAMESPACES_MODALIAS_H_INCLUDED
15#define ZYPP_NG_SAT_NAMESPACES_MODALIAS_H_INCLUDED
16
17#include <zypp/ng/sat/namespaces/namespaceprovider.h>
18#include <string>
19#include <functional>
20
21namespace zyppng::sat::namespaces {
22
27 class ModaliasNamespaceProvider : public NamespaceProvider {
28 public:
29 ModaliasNamespaceProvider() = default;
30 bool isSatisfied( detail::IdType value ) const override;
31
36 using ModaliasQuery = std::function<bool(const std::string &)>;
37 void setQueryCallback( ModaliasQuery query ) { _query = std::move(query); }
38
39 private:
40 ModaliasQuery _query;
41 };
42
43}
44
45#endif
bool
zyppng::sat::NamespaceProvider
Abstract base class for logic providing data to a libsolv namespace.
Definition namespaceprovider.h:35
zyppng::sat::namespaces::ModaliasNamespaceProvider::_query
ModaliasQuery _query
Definition modalias.h:40
zyppng::sat::namespaces::ModaliasNamespaceProvider::ModaliasNamespaceProvider
ModaliasNamespaceProvider()=default
zyppng::sat::namespaces::ModaliasNamespaceProvider::setQueryCallback
void setQueryCallback(ModaliasQuery query)
Definition modalias.h:37
zyppng::sat::namespaces::ModaliasNamespaceProvider::ModaliasQuery
std::function< bool(const std::string &)> ModaliasQuery
Callback to perform the actual modalias query.
Definition modalias.h:36
zyppng::sat::namespaces::ModaliasNamespaceProvider::isSatisfied
bool isSatisfied(detail::IdType value) const override
Check if a specific value satisfies this namespace condition.
Definition modalias.cc:16
namespaceprovider.h
zyppng::sat::detail::IdType
zypp::sat::detail::IdType IdType
Definition poolconstants.h:43
zyppng::sat::namespaces
Definition filesystem.cc:18