1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
15 #include "zypp/ResObject.h"
17 ///////////////////////////////////////////////////////////////////
19 { /////////////////////////////////////////////////////////////////
21 DEFINE_PTR_TYPE(Patch);
23 ///////////////////////////////////////////////////////////////////
27 /** Class representing a patch.
28 * \todo Patch::atoms can't be const, if Impl does not
29 * provide a const method. Check it.
31 class Patch : public ResObject
35 typedef ResTraits<Self> TraitsType;
36 typedef TraitsType::PtrType Ptr;
37 typedef TraitsType::constPtrType constPtr;
40 typedef std::list<ResObject::Ptr> AtomList;
44 std::string id() const;
45 /** Patch time stamp */
46 Date timestamp() const;
47 /** Patch category (recommended, security,...) */
48 std::string category() const;
49 /** Does the system need to reboot to finish the update process? */
50 bool reboot_needed() const;
51 /** Does the patch affect the package manager itself? */
52 bool affects_pkg_manager() const;
53 /** Is the patch installation interactive? (does it need user input?) */
54 bool interactive() const;
56 /** The list of all atoms building the patch */
57 ZYPP_DEPRECATED AtomList atoms() const
58 { return AtomList(); }
61 friend Ptr make<Self>( const sat::Solvable & solvable_r );
63 Patch( const sat::Solvable & solvable_r );
68 /////////////////////////////////////////////////////////////////
70 ///////////////////////////////////////////////////////////////////
71 #endif // ZYPP_PATCH_H