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;
59 // TODO add comments and reevaluate the need for functions below
60 void mark_atoms_to_freshen(bool freshen);
61 bool any_atom_selected();
62 void select(); // TODO parameter to specify select/unselect or another function
66 Patch( const NVRAD & nvrad_r );
71 /** Access implementation */
72 virtual Impl & pimpl() = 0;
73 /** Access implementation */
74 virtual const Impl & pimpl() const = 0;
77 /////////////////////////////////////////////////////////////////
79 ///////////////////////////////////////////////////////////////////
80 #endif // ZYPP_PATCH_H