1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/VendorAttr.h
12 #ifndef ZYPP_VENDORATTR_H
13 #define ZYPP_VENDORATTR_H
18 #include "zypp/base/NonCopyable.h"
19 #include "zypp/NeedAType.h"
21 ///////////////////////////////////////////////////////////////////
23 //////////////////////////////////////////////////////////////////
25 class VendorAttr : private base::NonCopyable
29 static const VendorAttr & instance();
31 /** Enable autoprotection of foreign vendor packages.
32 * This is the default.
33 * \note This will \b not change the status of already
36 static void enableAutoProtect();
37 /** Disable autoprotection of foreign vendor packages.
38 * Autoprotection is on per defult.
39 * \note This will \b not change the status of already
42 static void disableAutoProtect();
45 * Return whether it's a known vendor
47 bool isKnown( const Vendor & vendor_r ) const;
50 * Return whether this vendors packages should be
51 * protected by default.
53 bool autoProtect( const Vendor & vendor_r ) const;
55 /** Return whether two vendor strings shold be treated as the same vendor.
56 * Usually the solver is allowed to automatically select a package of an
57 * equivalent vendor when updating. Replacing a package with one of a
58 * different vendor usually must be confirmed by the user.
60 bool equivalent( const Vendor & lhs, const Vendor & rhs ) const;
66 ///////////////////////////////////////////////////////////////////
68 ///////////////////////////////////////////////////////////////////
70 #endif // ZYPP_VENDORATTR_H