libzypp 17.37.17
Modalias.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_TARGET_MODALIAS_MODALIAS_H
13#define ZYPP_TARGET_MODALIAS_MODALIAS_H
14
15#include <iosfwd>
16#include <vector>
17#include <string>
18
19#include <zypp/Globals.h>
20#include <zypp/base/PtrTypes.h>
21#include <zypp/IdString.h>
22
24namespace zypp
25{
27 namespace target
28 {
29
31 //
32 // CLASS NAME : Modalias
33 //
37 {
38 friend std::ostream & operator<<( std::ostream & str, const Modalias & obj );
39
40 public:
42 struct Impl;
43
44 public:
45 using ModaliasList = std::vector<std::string>;
46
48 static Modalias & instance();
49
51 ~Modalias();
52
53 public:
54
70 bool query( IdString cap_r ) const
71 { return query( cap_r.c_str() ); }
72
73 bool query( const char * cap_r ) const;
75 bool query( const std::string & cap_r ) const
76 { return query( cap_r.c_str() ); }
77
79 const ModaliasList & modaliasList() const;
80
82 void modaliasList( ModaliasList newlist_r );
83
84 private:
86 Modalias();
87
90 };
91
92
94 std::ostream & operator<<( std::ostream & str, const Modalias & obj ) ZYPP_API_DEPTESTOMATIC;
95
97 } // namespace target
100} // namespace zypp
102#endif // ZYPP_TARGET_MODALIAS_MODALIAS_H
std::ostream & operator<<(std::ostream &str, const zypp::sat::detail::CDataiterator *obj)
Access to the sat-pools string space.
Definition IdString.h:44
const char * c_str() const
Conversion to const char *
Definition IdString.cc:50
Hardware abstaction layer singleton.
Definition Modalias.h:37
std::vector< std::string > ModaliasList
Definition Modalias.h:45
Modalias()
Singleton ctor.
Definition Modalias.cc:216
bool query(IdString cap_r) const
Checks if a device on the system matches a modalias pattern.
Definition Modalias.h:70
static Modalias & instance()
Singleton access.
Definition Modalias.cc:223
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition Modalias.h:89
bool query(const std::string &cap_r) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Modalias.h:75
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const CommitPackageCache &obj)
Easy-to use interface to the ZYPP dependency resolver.
Wrapper for const correct access via Smart pointer types.
Definition PtrTypes.h:293
Modalias implementation.
Definition Modalias.cc:119
#define ZYPP_API_DEPTESTOMATIC
Definition Globals.h:77