42 static shared_ptr<Impl> _nullimpl(
new Impl );
47 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
50 {
return new Impl( *
this ); }
71 RepoStatus::RepoStatus()
72 : _pimpl( new
Impl() )
76 : _pimpl( new
Impl() )
99 std::ifstream file(cookiefile.c_str());
101 WAR <<
"No cookie file " << cookiefile << endl;
116 std::ofstream file(cookiefile.c_str());
126 return _pimpl->checksum.empty();
142 {
return _pimpl->checksum; }
145 {
return _pimpl->timestamp; }
157 stringstream ss( lchk < rchk ? lchk+rchk : rchk+lchk );
172 return str << *obj.
_pimpl;
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
Date timestamp() const
timestamp of the repository.
std::string sha1sum(const Pathname &file)
Compute a files sha1sum.
std::string checksum() const
Checksum of the repository.
RepoStatus & setTimestamp(const Date ×tamp)
set the repository timestamp
bool empty() const
Is the status empty?
RepoStatus operator&&(const RepoStatus &lhs, const RepoStatus &rhs)
combines 2 repostatus with a checksum based on both checksums and the newest timestamp ...
RepoStatus()
Default ctor.
static RepoStatus fromCookieFile(const Pathname &path)
reads the status from a file which contains the checksum and timestamp in each line.
Store and operate on date (time_t).
std::ostream & operator<<(std::ostream &str, const Exception &obj)
static shared_ptr< Impl > nullimpl()
Offer default Impl.
std::string numstring(char n, int w=0)
Impl * clone() const
clone for RWCOW_pointer
void saveToCookieFile(const Pathname &path) const
save the status information to a cookie file
RepoStatus & setChecksum(const std::string &checksum)
set the repository checksum
RepoStatus implementation.
Base class for Exception.
std::string checksum(const Pathname &file, const std::string &algorithm)
Compute a files checksum.
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
std::ostream & operator<<(std::ostream &str, const RepoStatus::Impl &obj)
static CheckSum sha1(const std::string &checksum)
Local facts about a repository This class represents the status of a repository on the system...