libzypp  13.10.6
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 
94  void install( const PoolItem & pi );
95 
99  void remove( const PoolItem & pi );
100 
106  void addRepository( const RepoInfo & repo );
107 
113  void removeRepository( const RepoInfo & repo );
114 
121  void modifyRepository( const RepoInfo & oldrepo, const RepoInfo & newrepo );
122  };
124 
125 } // namespace zypp
126 
127 #endif // ZYPP_TARGET_COMMITLOG_H
What is known about a repository.
Definition: RepoInfo.h:66
void install(const PoolItem &pi)
Log installation (or update) of a package.
Definition: HistoryLog.cc:188
HistoryLog & operator=(const HistoryLog &)
void removeRepository(const RepoInfo &repo)
Log recently removed repository.
Definition: HistoryLog.cc:257
static const Pathname & fname()
Get the current log file path.
Definition: HistoryLog.cc:147
void addRepository(const RepoInfo &repo)
Log a newly added repository.
Definition: HistoryLog.cc:245
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:131
void comment(const std::string &comment, bool timestamp=false)
Log a comment (even multiline).
Definition: HistoryLog.cc:156
Reference to a PoolItem connecting ResObject and ResStatus.
Definition: PoolItem.h:50
void modifyRepository(const RepoInfo &oldrepo, const RepoInfo &newrepo)
Log certain modifications to a repository.
Definition: HistoryLog.cc:268
HistoryLog(const HistoryLog &)