libzypp  17.23.5
HistoryLog.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_TARGET_COMMITLOG_H
13 #define ZYPP_TARGET_COMMITLOG_H
14 
15 #include <iosfwd>
16 
17 #include <zypp/Pathname.h>
18 #include <zypp/ResStatus.h>
19 
20 namespace zypp
21 {
22  class PoolItem;
23  class RepoInfo;
24 
56  class HistoryLog
57  {
58  HistoryLog( const HistoryLog & );
59  HistoryLog & operator=( const HistoryLog & );
60  public:
66  HistoryLog( const Pathname & rootdir = Pathname() );
67  ~HistoryLog();
68 
77  static void setRoot( const Pathname & root );
78 
82  static const Pathname & fname();
83 
90  void comment( const std::string & comment, bool timestamp = false );
91 
93  void stampCommand();
94 
98  void install( const PoolItem & pi );
99 
103  void remove( const PoolItem & pi );
104 
110  void addRepository( const RepoInfo & repo );
111 
117  void removeRepository( const RepoInfo & repo );
118 
125  void modifyRepository( const RepoInfo & oldrepo, const RepoInfo & newrepo );
126 
132  void patchStateChange( const PoolItem & pi, ResStatus::ValidateValue oldstate );
133 
134  };
136 
137 } // namespace zypp
138 
139 #endif // ZYPP_TARGET_COMMITLOG_H
zypp::PoolItem
Combining sat::Solvable and ResStatus.
Definition: PoolItem.h:50
zypp::HistoryLog::HistoryLog
HistoryLog(const HistoryLog &)
zypp::RepoInfo
What is known about a repository.
Definition: RepoInfo.h:71
zypp::ResStatus::ValidateValue
ValidateValue
Definition: ResStatus.h:93
zypp::HistoryLog::install
void install(const PoolItem &pi)
Log installation (or update) of a package.
Definition: HistoryLog.cc:232
zypp::HistoryLog::operator=
HistoryLog & operator=(const HistoryLog &)
zypp::HistoryLog::setRoot
static void setRoot(const Pathname &root)
Set new root directory to the default history log file path.
Definition: HistoryLog.cc:163
zypp::HistoryLog::patchStateChange
void patchStateChange(const PoolItem &pi, ResStatus::ValidateValue oldstate)
Log state changes in patches.
Definition: HistoryLog.cc:335
Pathname.h
zypp::HistoryLog
Writing the zypp history file.
Definition: HistoryLog.h:56
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::HistoryLog::fname
static const Pathname & fname()
Get the current log file path.
Definition: HistoryLog.cc:179
zypp::HistoryLog::stampCommand
void stampCommand()
Log info about the current process.
Definition: HistoryLog.cc:220
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:44
zypp::HistoryLog::remove
void remove(const PoolItem &pi)
Log removal of a package.
Definition: HistoryLog.cc:260
zypp::HistoryLog::removeRepository
void removeRepository(const RepoInfo &repo)
Log recently removed repository.
Definition: HistoryLog.cc:299
zypp::HistoryLog::comment
void comment(const std::string &comment, bool timestamp=false)
Log a comment (even multiline).
Definition: HistoryLog.cc:188
zypp::HistoryLog::modifyRepository
void modifyRepository(const RepoInfo &oldrepo, const RepoInfo &newrepo)
Log certain modifications to a repository.
Definition: HistoryLog.cc:310
zypp::HistoryLog::~HistoryLog
~HistoryLog()
Definition: HistoryLog.cc:158
zypp::HistoryLog::addRepository
void addRepository(const RepoInfo &repo)
Log a newly added repository.
Definition: HistoryLog.cc:287
ResStatus.h