Go to the documentation of this file.
27 using parser::ParseException;
35 const HistoryActionID HistoryActionID::NONE (HistoryActionID::NONE_e);
36 const HistoryActionID HistoryActionID::INSTALL (HistoryActionID::INSTALL_e);
37 const HistoryActionID HistoryActionID::REMOVE (HistoryActionID::REMOVE_e);
38 const HistoryActionID HistoryActionID::REPO_ADD (HistoryActionID::REPO_ADD_e);
39 const HistoryActionID HistoryActionID::REPO_REMOVE (HistoryActionID::REPO_REMOVE_e);
40 const HistoryActionID HistoryActionID::REPO_CHANGE_ALIAS (HistoryActionID::REPO_CHANGE_ALIAS_e);
41 const HistoryActionID HistoryActionID::REPO_CHANGE_URL (HistoryActionID::REPO_CHANGE_URL_e);
42 const HistoryActionID HistoryActionID::STAMP_COMMAND (HistoryActionID::STAMP_COMMAND_e);
43 const HistoryActionID HistoryActionID::PATCH_STATE_CHANGE (HistoryActionID::PATCH_STATE_CHANGE_e);
45 HistoryActionID::HistoryActionID(
const std::string & strval_r)
46 : _id(parse(strval_r))
51 typedef std::map<std::string,ID> MapType;
67 MapType::const_iterator it =
_table.find( strval_r );
71 WAR <<
"Unknown history action ID '" + strval_r +
"'" << endl;
78 typedef std::pair<std::string,std::string> PairType;
79 typedef std::map<ID, PairType> MapType;
99 {
return str <<
id.asString(); }
143 if ( fields_r.size() < expect_r )
153 catch (
const std::exception & excpt )
173 : _pimpl( new
Impl( fields_r, expect_r ) )
177 : _pimpl( new
Impl( fields_r, expectedId_r, expect_r ) )
185 if ( fields_r.size() >= 2 )
190 #define OUTS(E,T) case HistoryActionID::E: return Ptr( new T( fields_r ) ); break;
223 static const std::string _empty;
A zypp history log line for an installed packaged.
std::string userdata() const
userdata/transactionID
HistoryLogData(FieldVector &fields_r, size_type expect_r=2)
Ctor moving FieldVector (via swap).
A zypp history log line for a removed repository.
std::string userdata() const
userdata/transactionID
const std::string & asString(bool pad=false) const
requested by (user@hostname, pid:appname, or empty (solver))
std::string reqby() const
requested by (user@hostname, pid:appname, or empty (solver))
FieldVector::size_type size_type
RWCOW_pointer< Impl > _pimpl
Implementation class.
Arch arch() const
package architecture
std::vector< std::string > FieldVector
Edition edition() const
package edition
std::string newstate() const
Url url() const
repository url
size_type size() const
Number of fields in vector.
HistoryLogDataRemove(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
static std::map< std::string, ServiceType::Type > _table
std::string repoAlias() const
repository providing the package
A zypp history log line for a removed packge.
Patch::SeverityFlag severity() const
Edition represents [epoch:]version[-release]
std::string joinEscaped(TIterator begin, TIterator end, const char sep_r=' ')
Join strings using separator sep_r, quoting or escaping the values.
Patch::Category category() const
HistoryLogDataRepoAliasChange(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
std::string name() const
package name
A zypp history log line split into fields.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
std::string alias() const
repository alias
FieldVector::const_iterator const_iterator
const_iterator begin() const
Iterator pointing to 1st element in vector (or end()).
virtual ~HistoryLogData()
Dtor.
std::string alias() const
repository alias
A zypp history log line for a repo url change.
std::string oldAlias() const
repositories old alias
Edition edition() const
package edition
SeverityFlag
Possible severity levels for (security) patches.
Edition edition() const
package edition
Url newUrl() const
repositories new url
std::string userdata() const
userdata/transactionID
Impl(FieldVector &fields_r, size_type expect_r)
Arch arch() const
package architecture
const_iterator end() const
Iterator pointing behind the last element in vector.
std::string repoAlias() const
repository providing the package
repository providing the patch
HistoryLogDataRepoAdd(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
requested by (user@hostname, pid:appname, or empty (solver))
A zypp history log line identifying the program that triggered the following commit.
the state of the patch after the change
std::string reqby() const
requested by (user@hostname, pid:appname, or empty (solver))
HistoryActionID action() const
HistoryActionID (or NONE_e if unknown)
std::string userdata() const
userdata/transactionID
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
HistoryLogPatchStateChange(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
static HistoryActionID::ID parse(const std::string &strval_r)
Easy-to use interface to the ZYPP dependency resolver.
HistoryLogDataInstall(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
HistoryLogDataRepoUrlChange(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
std::string oldstate() const
Impl(FieldVector &fields_r, HistoryActionID action_r, size_type expect_r)
A zypp history log line for an added repository.
Category categoryEnum() const
This patch's category as enum of wellknown categories.
the state of the patch before the change
repository providing the package
std::string userdata() const
userdata/transactionID
const std::string & at(size_type idx_r) const
Access (required) field by number.
std::string userdata() const
userdata/transactionID
executed by user@hostname
CheckSum checksum() const
package checksum
void _checkFields(const FieldVector &fields_r, size_type expect_r)
const std::string & optionalAt(size_type idx_r) const
Access (optional) field by number.
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Store and operate on date (time_t).
std::string executedBy() const
executed by user@hostname
std::string userdata() const
userdata/transactionID
static Ptr create(FieldVector &fields_r)
Factory method creating HistoryLogData classes.
HistoryLogDataStampCommand(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
std::string name() const
package name
HistoryLogDataRepoRemove(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
#define HISTORY_LOG_DATE_FORMAT
std::string newAlias() const
repositories new alias
bool empty() const
Whether FieldVector is empty.
Arch arch() const
package architecture
std::string userdata() const
userdata/transactionID
A zypp history log line for a repo alias change.
String related utilities and Regular expression matching.
A zypp history log line for an installed packaged.
Enumeration of known history actions.
std::string trim(const std::string &s, const Trim trim_r)
std::string command() const
the commandline executed
std::string alias() const
repository alias
SeverityFlag severityFlag() const
Severity string mapped to an enum.
std::string name() const
package name
shared_ptr< HistoryLogData > Ptr