libzypp  16.22.5
RepoStatus.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP2_REPOSTATUS_H
13 #define ZYPP2_REPOSTATUS_H
14 
15 #include <iosfwd>
16 #include "zypp/base/PtrTypes.h"
17 #include "zypp/CheckSum.h"
18 #include "zypp/Date.h"
19 
21 namespace zypp
22 {
23 
38  class RepoStatus
39  {
40  friend std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
41  friend RepoStatus operator&&( const RepoStatus & lhs, const RepoStatus & rhs );
42  friend bool operator==( const RepoStatus & lhs, const RepoStatus & rhs );
43 
44  public:
46  RepoStatus();
47 
53  explicit RepoStatus( const Pathname & path_r );
54 
56  ~RepoStatus();
57 
58  public:
64  static RepoStatus fromCookieFile( const Pathname & path );
65 
70  void saveToCookieFile( const Pathname & path_r ) const;
71 
72  public:
74  bool empty() const;
75 
77  Date timestamp() const;
78 
79  public:
80  class Impl;
81  private:
83  };
85 
87  std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
88 
90  RepoStatus operator&&( const RepoStatus & lhs, const RepoStatus & rhs );
91 
93  bool operator==( const RepoStatus & lhs, const RepoStatus & rhs );
94 
96  inline bool operator!=( const RepoStatus & lhs, const RepoStatus & rhs )
97  { return ! ( lhs == rhs ); }
98 
100 } // namespace zypp
102 #endif // ZYPP2_REPOSTATUS_H
void saveToCookieFile(const Pathname &path_r) const
Save the status information to a cookie file.
Definition: RepoStatus.cc:126
Date timestamp() const
The time the data were changed the last time.
Definition: RepoStatus.cc:139
bool empty() const
Whether the status is empty (default constucted)
Definition: RepoStatus.cc:136
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
RepoStatus operator&&(const RepoStatus &lhs, const RepoStatus &rhs)
Definition: RepoStatus.cc:145
RepoStatus()
Default ctor.
Definition: RepoStatus.cc:74
static RepoStatus fromCookieFile(const Pathname &path)
Reads the status from a cookie file.
Definition: RepoStatus.cc:108
Store and operate on date (time_t).
Definition: Date.h:32
friend std::ostream & operator<<(std::ostream &str, const RepoStatus &obj)
Definition: RepoStatus.cc:142
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:147
bool operator!=(const RepoStatus &lhs, const RepoStatus &rhs)
Definition: RepoStatus.h:96
friend bool operator==(const RepoStatus &lhs, const RepoStatus &rhs)
Definition: RepoStatus.cc:166
RepoStatus implementation.
Definition: RepoStatus.cc:31
~RepoStatus()
Dtor.
Definition: RepoStatus.cc:105
RWCOW_pointer< Impl > _pimpl
Implementation.
Definition: RepoStatus.h:80
Track changing files or directories.
Definition: RepoStatus.h:38
friend RepoStatus operator&&(const RepoStatus &lhs, const RepoStatus &rhs)
Definition: RepoStatus.cc:145