libzypp
17.38.6
modalias.cc
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
----------------------------------------------------------------------*/
9
#include "
modalias.h
"
10
11
#include <
zypp-core/base/String.h
>
12
#include <
zypp/ng/idstring.h
>
13
14
namespace
zyppng::sat::namespaces
{
15
16
bool
ModaliasNamespaceProvider::isSatisfied
(
detail::IdType
value )
const
17
{
18
if
( !
_query
)
19
return
false
;
20
21
//@TODO this will use the target modalias implementation
22
23
// modalias strings in capability may be hexencoded because rpm does not allow
24
// ',', ' ' or other special chars.
25
std::string decoded =
zypp::str::hexdecode
(
IdString
(value).
asString
() );
26
return
_query
( decoded );
27
}
28
29
}
String.h
zyppng::sat::namespaces::ModaliasNamespaceProvider::_query
ModaliasQuery _query
Definition
modalias.h:40
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
modalias.h
zypp::str::hexdecode
std::string hexdecode(const C_Str &str_r)
Decode hexencoded XX sequences.
Definition
String.cc:148
zypp::asString
std::string asString(const Patch::Category &obj)
relates: Patch::Category string representation.
Definition
Patch.cc:122
zyppng::sat::detail::IdType
zypp::sat::detail::IdType IdType
Definition
poolconstants.h:43
zyppng::sat::namespaces
Definition
filesystem.cc:18
zyppng::IdString
zypp::IdString IdString
Definition
idstring.h:16
idstring.h
zypp
ng
sat
namespaces
modalias.cc
Generated by
1.16.1