zypp::Patch Class Reference

Class representing a patch. More...

#include <Patch.h>

Inheritance diagram for zypp::Patch:
[legend]

List of all members.

Classes

class  ReferenceIterator
 Query class for Patch issue references like bugzilla and security issues the patch is supposed to fix. More...

Public Types

enum  Category {
  CAT_OTHER, CAT_YAST, CAT_SECURITY, CAT_RECOMMENDED,
  CAT_OPTIONAL, CAT_DOCUMENT
}
typedef Patch Self
typedef ResTraits< SelfTraitsType
typedef TraitsType::PtrType Ptr
typedef TraitsType::constPtrType constPtr
typedef sat::SolvableSet Contents

Public Member Functions

Date timestamp () const
 Issue date time.
std::string category () const
 Patch category (recommended, security,.
Category categoryEnum () const
 Patch category as enum of wellknown categories.
bool rebootSuggested () const
 Does the system need to reboot to finish the update process?
bool restartSuggested () const
 Does the patch affect the package manager itself? restart is suggested then.
bool reloginSuggested () const
 Does the patch needs the user to relogin to take effect? relogin is suggested then.
std::string message (const Locale &lang_r=Locale()) const
 Information or warning to be displayed to the user.
bool interactive () const
 Is the patch installation interactive? (does it need user input?).
Contents contents () const
 The collection of packages associated with this patch.
ReferenceIterator referencesBegin () const
 Get an iterator to the beginning of the patch references.
ReferenceIterator referencesEnd () const
 Get an iterator to the end of the patch references.

Protected Member Functions

 Patch (const sat::Solvable &solvable_r)
 Ctor.
virtual ~Patch ()
 Dtor.

Friends

Ptr make (const sat::Solvable &solvable_r)
 Directly create a certain kind of ResObject from sat::Solvable.


Detailed Description

Class representing a patch.

A patch represents a specific problem that can be fixed by pulling in the patch dependencies.

Patches can be marked for installation but their installation is a no-op.

Definition at line 35 of file Patch.h.


Member Typedef Documentation

Reimplemented from zypp::ResObject.

Definition at line 38 of file Patch.h.

Reimplemented from zypp::ResObject.

Definition at line 39 of file Patch.h.

Reimplemented from zypp::ResObject.

Definition at line 40 of file Patch.h.

Reimplemented from zypp::ResObject.

Definition at line 41 of file Patch.h.

Definition at line 44 of file Patch.h.


Member Enumeration Documentation

Enumerator:
CAT_OTHER 
CAT_YAST 
CAT_SECURITY 
CAT_RECOMMENDED 
CAT_OPTIONAL 
CAT_DOCUMENT 

Definition at line 46 of file Patch.h.


Constructor & Destructor Documentation

zypp::Patch::Patch ( const sat::Solvable solvable_r  )  [protected]

Ctor.

Definition at line 31 of file Patch.cc.

zypp::Patch::~Patch (  )  [protected, virtual]

Dtor.

Definition at line 40 of file Patch.cc.


Member Function Documentation

Date zypp::Patch::timestamp (  )  const [inline]

Issue date time.

For now it is the same as buildtime().

Definition at line 60 of file Patch.h.

References zypp::ResObject::buildtime().

std::string zypp::Patch::category (  )  const

Patch category (recommended, security,.

..)

Definition at line 111 of file Patch.cc.

References zypp::sat::Solvable::lookupStrAttribute(), and zypp::sat::SolvAttr::patchcategory.

Referenced by categoryEnum().

Patch::Category zypp::Patch::categoryEnum (  )  const

Patch category as enum of wellknown categories.

Unknown values are mapped to CAT_OTHER.

Definition at line 49 of file Patch.cc.

References CAT_DOCUMENT, CAT_OPTIONAL, CAT_OTHER, CAT_RECOMMENDED, CAT_SECURITY, CAT_YAST, category(), and zypp::str::compareCI().

bool zypp::Patch::rebootSuggested (  )  const

Does the system need to reboot to finish the update process?

Definition at line 114 of file Patch.cc.

References zypp::sat::Solvable::lookupBoolAttribute(), and zypp::sat::SolvAttr::rebootSuggested.

Referenced by interactive().

bool zypp::Patch::restartSuggested (  )  const

Does the patch affect the package manager itself? restart is suggested then.

Definition at line 117 of file Patch.cc.

References zypp::sat::Solvable::lookupBoolAttribute(), and zypp::sat::SolvAttr::restartSuggested.

bool zypp::Patch::reloginSuggested (  )  const

Does the patch needs the user to relogin to take effect? relogin is suggested then.

Definition at line 120 of file Patch.cc.

References zypp::sat::Solvable::lookupBoolAttribute(), and zypp::sat::SolvAttr::reloginSuggested.

std::string zypp::Patch::message ( const Locale lang_r = Locale()  )  const

Information or warning to be displayed to the user.

Definition at line 108 of file Patch.cc.

References zypp::sat::Solvable::lookupStrAttribute(), and zypp::sat::SolvAttr::message.

Referenced by interactive().

bool zypp::Patch::interactive (  )  const

Is the patch installation interactive? (does it need user input?).

Definition at line 124 of file Patch.cc.

References zypp::sat::SolvableSet::begin(), contents(), zypp::sat::SolvableSet::end(), for_, zypp::ResObject::licenseToConfirm(), message(), and rebootSuggested().

Patch::Contents zypp::Patch::contents (  )  const

Patch::ReferenceIterator zypp::Patch::referencesBegin (  )  const [inline]

Get an iterator to the beginning of the patch references.

See also:
Patch::ReferenceIterator

Definition at line 186 of file Patch.h.

References zypp::Resolvable::satSolvable().

Patch::ReferenceIterator zypp::Patch::referencesEnd (  )  const [inline]

Get an iterator to the end of the patch references.

See also:
Patch::ReferenceIterator

Definition at line 189 of file Patch.h.


Friends And Related Function Documentation

Ptr make ( const sat::Solvable solvable_r  )  [friend]

Directly create a certain kind of ResObject from sat::Solvable.

If the sat::Solvables kind is not appropriate, a NULL pointer is returned.

 sat::Solvable s;
 ResObject::Ptr p( makeResObject( s ) );
 ResObject::Ptr q( make<ResObject>( s ) );
 Package::Ptr   pkg( make<Package>( s ) );

Definition at line 236 of file ResObject.h.


The documentation for this class was generated from the following files:

doxygen