1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
15 #include "zypp/ResObject.h"
16 #include "zypp/detail/PatchImplIf.h"
18 ///////////////////////////////////////////////////////////////////
20 { /////////////////////////////////////////////////////////////////
22 DEFINE_PTR_TYPE(Patch);
24 ///////////////////////////////////////////////////////////////////
28 /** Class representing a patch.
29 * \todo Patch::atoms can't be const, if Impl does not
30 * provide a const method. Check it.
32 class Patch : public ResObject
35 typedef detail::PatchImplIf Impl;
37 typedef ResTraits<Self> TraitsType;
38 typedef TraitsType::PtrType Ptr;
39 typedef TraitsType::constPtrType constPtr;
42 typedef Impl::AtomList AtomList;
46 std::string id() const;
47 /** Patch time stamp */
48 Date timestamp() const;
49 /** Patch category (recommended, security,...) */
50 std::string category() const;
51 /** Does the system need to reboot to finish the update process? */
52 bool reboot_needed() const;
53 /** Does the patch affect the package manager itself? */
54 bool affects_pkg_manager() const;
55 /** The list of all atoms building the patch */
56 AtomList atoms() const;
57 /** Is the patch installation interactive? (does it need user input?) */
58 bool interactive() const;
61 void mark_atoms_to_freshen(bool freshen) ZYPP_DEPRECATED;
62 bool any_atom_selected() ZYPP_DEPRECATED;
63 void select() ZYPP_DEPRECATED;
67 Patch( const NVRAD & nvrad_r );
72 /** Access implementation */
73 virtual Impl & pimpl() = 0;
74 /** Access implementation */
75 virtual const Impl & pimpl() const = 0;
78 /////////////////////////////////////////////////////////////////
80 ///////////////////////////////////////////////////////////////////
81 #endif // ZYPP_PATCH_H