libzypp
13.10.6
|
Local facts about a repository This class represents the status of a repository on the system. More...
#include <RepoStatus.h>
Classes | |
struct | Impl |
RepoStatus implementation. More... | |
Public Member Functions | |
void | saveToCookieFile (const Pathname &path) const |
save the status information to a cookie file More... | |
std::string | checksum () const |
Checksum of the repository. More... | |
Date | timestamp () const |
timestamp of the repository. More... | |
bool | empty () const |
Is the status empty? More... | |
RepoStatus & | setChecksum (const std::string &checksum) |
set the repository checksum More... | |
RepoStatus & | setTimestamp (const Date ×tamp) |
set the repository timestamp More... | |
RepoStatus () | |
Default ctor. More... | |
RepoStatus (const Pathname &file) | |
Status from a single file As most repository state is represented by the status of the index file, you can construct the status from a file. More... | |
~RepoStatus () | |
Dtor. More... | |
Static Public Member Functions | |
static RepoStatus | fromCookieFile (const Pathname &path) |
reads the status from a file which contains the checksum and timestamp in each line. More... | |
Private Attributes | |
RWCOW_pointer< Impl > | _pimpl |
Pointer to implementation. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const RepoStatus &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const RepoStatus &obj) |
Local facts about a repository This class represents the status of a repository on the system.
Anything that is not provided on the metadata files, like the timestamp of the downloaded metadata, and its checksum.
Definition at line 37 of file RepoStatus.h.
zypp::RepoStatus::RepoStatus | ( | ) |
Default ctor.
Definition at line 71 of file RepoStatus.cc.
zypp::RepoStatus::RepoStatus | ( | const Pathname & | file | ) |
Status from a single file As most repository state is represented by the status of the index file, you can construct the status from a file.
Definition at line 75 of file RepoStatus.cc.
zypp::RepoStatus::~RepoStatus | ( | ) |
Dtor.
Definition at line 94 of file RepoStatus.cc.
|
static |
reads the status from a file which contains the checksum and timestamp in each line.
Definition at line 97 of file RepoStatus.cc.
void zypp::RepoStatus::saveToCookieFile | ( | const Pathname & | path | ) | const |
save the status information to a cookie file
Exception | if the file can't be saved |
Definition at line 114 of file RepoStatus.cc.
string zypp::RepoStatus::checksum | ( | ) | const |
Checksum of the repository.
Usually the checksum of the index, but any checksum that changes when the repository changes in any way is sufficient.
Definition at line 141 of file RepoStatus.cc.
Date zypp::RepoStatus::timestamp | ( | ) | const |
timestamp of the repository.
If the repository changes, it has to be updated as well with the new timestamp.
Definition at line 144 of file RepoStatus.cc.
bool zypp::RepoStatus::empty | ( | ) | const |
Is the status empty?
An empty status means that the status was not calculated.
Definition at line 124 of file RepoStatus.cc.
RepoStatus & zypp::RepoStatus::setChecksum | ( | const std::string & | checksum | ) |
set the repository checksum
checksum |
Definition at line 129 of file RepoStatus.cc.
RepoStatus & zypp::RepoStatus::setTimestamp | ( | const Date & | timestamp | ) |
set the repository timestamp
timestamp |
Definition at line 135 of file RepoStatus.cc.
|
friend |
Definition at line 170 of file RepoStatus.cc.
|
related |
Stream output
Definition at line 170 of file RepoStatus.cc.
|
private |
Pointer to implementation.
Definition at line 126 of file RepoStatus.h.