1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
15 #include "zypp/ResObject.h"
16 #include "zypp/detail/PatchImplIf.h"
18 ///////////////////////////////////////////////////////////////////
20 { /////////////////////////////////////////////////////////////////
22 ///////////////////////////////////////////////////////////////////
26 /** Class representing a patch.
27 * \todo Patch::atoms can't be const, if Impl does not
28 * provide a const method. Check it.
30 class Patch : public ResObject
34 typedef detail::PatchImplIf Impl;
35 typedef base::intrusive_ptr<Self> Ptr;
36 typedef base::intrusive_ptr<const Self> constPtr;
39 typedef Impl::AtomList AtomList;
43 std::string id() const;
44 /** Patch time stamp */
45 unsigned int timestamp() const;
46 /** Patch category (recommended, security,...) */
47 std::string category() const;
48 /** Does the system need to reboot to finish the update process? */
49 bool reboot_needed() const;
50 /** Does the patch affect the package manager itself? */
51 bool affects_pkg_manager() const;
52 /** The list of all atoms building the patch */
54 /** Is the patch installation interactive? (does it need user input?) */
56 // TODO add comments and reevaluate the need for functions below
57 void mark_atoms_to_freshen(bool freshen);
58 bool any_atom_selected();
59 void select(); // TODO parameter to specify select/unselect or another function
63 Patch( const std::string & name_r,
64 const Edition & edition_r,
65 const Arch & arch_r );
70 /** Access implementation */
71 virtual Impl & pimpl() = 0;
72 /** Access implementation */
73 virtual const Impl & pimpl() const = 0;
76 /////////////////////////////////////////////////////////////////
78 ///////////////////////////////////////////////////////////////////
79 #endif // ZYPP_PATCH_H