libzypp  17.24.1
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
void stampCommand()
Log info about the current process.
Definition: HistoryLog.cc:220
What is known about a repository.
Definition: RepoInfo.h:71
void install(const PoolItem &pi)
Log installation (or update) of a package.
Definition: HistoryLog.cc:232
void patchStateChange(const PoolItem &pi, ResStatus::ValidateValue oldstate)
Log state changes in patches.
Definition: HistoryLog.cc:335
HistoryLog & operator=(const HistoryLog &)
void removeRepository(const RepoInfo &repo)
Log recently removed repository.
Definition: HistoryLog.cc:299
static const Pathname & fname()
Get the current log file path.
Definition: HistoryLog.cc:179
void addRepository(const RepoInfo &repo)
Log a newly added repository.
Definition: HistoryLog.cc:287
Writing the zypp history fileReference counted signleton for writhing the zypp history file...
Definition: HistoryLog.h:56
static void setRoot(const Pathname &root)
Set new root directory to the default history log file path.
Definition: HistoryLog.cc:163
void comment(const std::string &comment, bool timestamp=false)
Log a comment (even multiline).
Definition: HistoryLog.cc:188
Combining sat::Solvable and ResStatus.
Definition: PoolItem.h:50
void modifyRepository(const RepoInfo &oldrepo, const RepoInfo &newrepo)
Log certain modifications to a repository.
Definition: HistoryLog.cc:310
HistoryLog(const HistoryLog &)
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1