libzypp  17.23.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( std::string checksum_r, Date timestamp_r );
57 
59  ~RepoStatus();
60 
61  public:
67  static RepoStatus fromCookieFile( const Pathname & path );
68 
73  void saveToCookieFile( const Pathname & path_r ) const;
74 
75  public:
77  bool empty() const;
78 
80  Date timestamp() const;
81 
82  public:
83  struct Impl;
84  private:
86  };
88 
90  std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
91 
93  RepoStatus operator&&( const RepoStatus & lhs, const RepoStatus & rhs );
94 
96  bool operator==( const RepoStatus & lhs, const RepoStatus & rhs );
97 
99  inline bool operator!=( const RepoStatus & lhs, const RepoStatus & rhs )
100  { return ! ( lhs == rhs ); }
101 
103 } // namespace zypp
105 #endif // ZYPP2_REPOSTATUS_H
zypp::RepoStatus
Track changing files or directories.
Definition: RepoStatus.h:38
zypp::RepoStatus::operator&&
friend RepoStatus operator&&(const RepoStatus &lhs, const RepoStatus &rhs)
Definition: RepoStatus.cc:158
zypp::RepoStatus::~RepoStatus
~RepoStatus()
Dtor.
Definition: RepoStatus.cc:118
zypp::RepoStatus::empty
bool empty() const
Whether the status is empty (default constucted)
Definition: RepoStatus.cc:149
zypp::RepoStatus::operator==
friend bool operator==(const RepoStatus &lhs, const RepoStatus &rhs)
Definition: RepoStatus.cc:179
CheckSum.h
zypp::operator==
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: SetRelationMixin.h:84
PtrTypes.h
zypp::RepoStatus::saveToCookieFile
void saveToCookieFile(const Pathname &path_r) const
Save the status information to a cookie file.
Definition: RepoStatus.cc:139
zypp::RepoStatus::operator<<
friend std::ostream & operator<<(std::ostream &str, const RepoStatus &obj)
Definition: RepoStatus.cc:155
zypp::RepoStatus::operator!=
bool operator!=(const RepoStatus &lhs, const RepoStatus &rhs)
Definition: RepoStatus.h:99
zypp::RepoStatus::Impl
RepoStatus implementation.
Definition: RepoStatus.cc:31
zypp::RepoStatus::RepoStatus
RepoStatus()
Default ctor.
Definition: RepoStatus.cc:89
Date.h
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::operator&&
RepoStatus operator&&(const RepoStatus &lhs, const RepoStatus &rhs)
Definition: RepoStatus.cc:158
zypp::RepoStatus::fromCookieFile
static RepoStatus fromCookieFile(const Pathname &path)
Reads the status from a cookie file.
Definition: RepoStatus.cc:121
zypp::RepoStatus::timestamp
Date timestamp() const
The time the data were changed the last time.
Definition: RepoStatus.cc:152
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:147
zypp::Date
Store and operate on date (time_t).
Definition: Date.h:32
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:44
zypp::RWCOW_pointer< Impl >
str
String related utilities and Regular expression matching.
zypp::RepoStatus::_pimpl
RWCOW_pointer< Impl > _pimpl
Implementation.
Definition: RepoStatus.h:83