libzypp  17.1.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 
19 namespace zypp
20 {
21  class PoolItem;
22  class RepoInfo;
23 
55  class HistoryLog
56  {
57  HistoryLog( const HistoryLog & );
58  HistoryLog & operator=( const HistoryLog & );
59  public:
65  HistoryLog( const Pathname & rootdir = Pathname() );
66  ~HistoryLog();
67 
76  static void setRoot( const Pathname & root );
77 
81  static const Pathname & fname();
82 
89  void comment( const std::string & comment, bool timestamp = false );
90 
92  void stampCommand();
93 
97  void install( const PoolItem & pi );
98 
102  void remove( const PoolItem & pi );
103 
109  void addRepository( const RepoInfo & repo );
110 
116  void removeRepository( const RepoInfo & repo );
117 
124  void modifyRepository( const RepoInfo & oldrepo, const RepoInfo & newrepo );
125  };
127 
128 } // namespace zypp
129 
130 #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
HistoryLog & operator=(const HistoryLog &)
void removeRepository(const RepoInfo &repo)
Log recently removed repository.
Definition: HistoryLog.cc:301
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:289
Writing the zypp history fileReference counted signleton for writhing the zypp history file...
Definition: HistoryLog.h:55
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:312
HistoryLog(const HistoryLog &)
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1