1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/target/SystemCheck.h
12 #ifndef ZYPP_TARGET_SYSTEMCHECK_H
13 #define ZYPP_TARGET_SYSTEMCHECK_H
14 #ifndef ZYPP_USE_RESOLVER_INTERNALS
15 #error Do not directly include this file!
20 #include "zypp/base/NonCopyable.h"
21 #include "zypp/Capability.h"
23 ///////////////////////////////////////////////////////////////////
25 { /////////////////////////////////////////////////////////////////
26 ///////////////////////////////////////////////////////////////////
28 // CLASS NAME : SystemCheck
30 /** Save and restore locale set from file.
32 class SystemCheck : private base::NonCopyable
34 friend std::ostream & operator<<( std::ostream & str, const SystemCheck & obj );
39 static const SystemCheck & instance();
41 /** Return the file path. */
42 const Pathname & file();
44 /** Return the directory path. */
45 const Pathname & dir();
47 /** Set configuration file of system requirements
48 * Should be used for testcase only
50 bool setFile(const Pathname & file) const;
52 /** Set configuration directory for files of system
54 * Should be used for testcase only
56 bool setDir(const Pathname & dir) const;
58 /** Returns a list of required system capabilities.
60 const CapabilitySet & requiredSystemCap() const;
62 /** Returns a list of conflicting system capabilities.
64 const CapabilitySet & conflictSystemCap() const;
67 /** Ctor taking the file to read. */
69 bool loadFile(Pathname &file, bool reset_caps = true) const;
70 bool loadFiles() const;
72 ///////////////////////////////////////////////////////////////////
74 /** \relates SystemCheck Stream output */
75 std::ostream & operator<<( std::ostream & str, const SystemCheck & obj );
77 /////////////////////////////////////////////////////////////////
79 ///////////////////////////////////////////////////////////////////
80 #endif // ZYPP_USE_RESOLVER_INTERNALS
81 #endif // ZYPP_TARGET_SYSTEMCHECK_H