libzypp 17.32.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
21namespace zypp
22{
23
24 class RepoInfo;
25
41 {
42 friend std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
43 friend RepoStatus operator&&( const RepoStatus & lhs, const RepoStatus & rhs );
44 friend bool operator==( const RepoStatus & lhs, const RepoStatus & rhs );
45
46 public:
48 RepoStatus();
57 explicit RepoStatus( const Pathname & path_r );
58
60 explicit RepoStatus( const RepoInfo & info_r );
61
63 RepoStatus( std::string checksum_r, Date timestamp_r );
64
67
68 RepoStatus(const RepoStatus &) = default;
70 RepoStatus &operator=(const RepoStatus &) = default;
72
73 public:
80
90
95 void saveToCookieFile( const Pathname & path_r ) const;
96
97 public:
99 bool empty() const;
100
102 Date timestamp() const;
103
104 public:
105 struct Impl;
106 private:
108 };
110
112 std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
113
115 RepoStatus operator&&( const RepoStatus & lhs, const RepoStatus & rhs );
116
118 bool operator==( const RepoStatus & lhs, const RepoStatus & rhs );
119
121 inline bool operator!=( const RepoStatus & lhs, const RepoStatus & rhs )
122 { return ! ( lhs == rhs ); }
123
125} // namespace zypp
127#endif // ZYPP2_REPOSTATUS_H
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition AutoDispose.h:95
Store and operate on date (time_t).
Definition Date.h:33
What is known about a repository.
Definition RepoInfo.h:72
Track changing files or directories.
Definition RepoStatus.h:41
static RepoStatus fromCookieFileUseMtime(const Pathname &path)
Reads the status from a cookie file but uses the files mtime.
RWCOW_pointer< Impl > _pimpl
Implementation.
Definition RepoStatus.h:107
static RepoStatus fromCookieFile(const Pathname &path)
Reads the status from a cookie file.
Date timestamp() const
The time the data were changed the last time.
bool empty() const
Whether the status is empty (empty checksum)
friend bool operator==(const RepoStatus &lhs, const RepoStatus &rhs)
friend RepoStatus operator&&(const RepoStatus &lhs, const RepoStatus &rhs)
RepoStatus()
Default ctor.
friend std::ostream & operator<<(std::ostream &str, const RepoStatus &obj)
void saveToCookieFile(const Pathname &path_r) const
Save the status information to a cookie file.
RepoStatus(RepoStatus &&) noexcept=default
RepoStatus(const RepoStatus &)=default
Definition Arch.h:364
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
RW_pointer supporting 'copy on write' functionality.
Definition PtrTypes.h:468
RepoStatus implementation.
Definition RepoStatus.cc:58