libzypp  17.23.5
HistoryLogData.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
9 
13 #include <sstream>
14 
15 #include <zypp/base/PtrTypes.h>
16 #include <zypp/base/String.h>
17 #include <zypp/base/Logger.h>
19 
20 #include <zypp/HistoryLogData.h>
21 
22 using std::endl;
23 
25 namespace zypp
26 {
27  using parser::ParseException;
28 
30  //
31  // class HistoryActionID
32  //
34 
35  const HistoryActionID HistoryActionID::NONE (HistoryActionID::NONE_e);
37  const HistoryActionID HistoryActionID::REMOVE (HistoryActionID::REMOVE_e);
44 
45  HistoryActionID::HistoryActionID(const std::string & strval_r)
46  : _id(parse(strval_r))
47  {}
48 
49  HistoryActionID::ID HistoryActionID::parse( const std::string & strval_r )
50  {
51  typedef std::map<std::string,ID> MapType;
52  static MapType _table;
53  if ( _table.empty() )
54  {
55  // initialize it
56  _table["install"] = INSTALL_e;
57  _table["remove"] = REMOVE_e;
58  _table["radd"] = REPO_ADD_e;
59  _table["rremove"] = REPO_REMOVE_e;
60  _table["ralias"] = REPO_CHANGE_ALIAS_e;
61  _table["rurl"] = REPO_CHANGE_URL_e;
62  _table["command"] = STAMP_COMMAND_e;
63  _table["patch"] = PATCH_STATE_CHANGE_e;
64  _table["NONE"] = _table["none"] = NONE_e;
65  }
66 
67  MapType::const_iterator it = _table.find( strval_r );
68  if ( it != _table.end() )
69  return it->second;
70  // else:
71  WAR << "Unknown history action ID '" + strval_r + "'" << endl;
72  return NONE_e;
73  }
74 
75 
76  const std::string & HistoryActionID::asString( bool pad ) const
77  {
78  typedef std::pair<std::string,std::string> PairType;
79  typedef std::map<ID, PairType> MapType;
80  static MapType _table;
81  if ( _table.empty() )
82  {
83  // initialize it pad(7) (for now)
84  _table[INSTALL_e] = PairType( "install" , "install" );
85  _table[REMOVE_e] = PairType( "remove" , "remove " );
86  _table[REPO_ADD_e] = PairType( "radd" , "radd " );
87  _table[REPO_REMOVE_e] = PairType( "rremove" , "rremove" );
88  _table[REPO_CHANGE_ALIAS_e] = PairType( "ralias" , "ralias " );
89  _table[REPO_CHANGE_URL_e] = PairType( "rurl" , "rurl " );
90  _table[STAMP_COMMAND_e] = PairType( "command" , "command" );
91  _table[PATCH_STATE_CHANGE_e]= PairType( "patch" , "patch " );
92  _table[NONE_e] = PairType( "NONE" , "NONE " );
93  }
94 
95  return( pad ? _table[_id].second : _table[_id].first );
96  }
97 
98  std::ostream & operator << (std::ostream & str, const HistoryActionID & id)
99  { return str << id.asString(); }
100 
102 
104  //
105  // class HistoryLogData::Impl
106  //
109  {
110  public:
111  Impl( FieldVector & fields_r, size_type expect_r )
112  {
113  _checkFields( fields_r, expect_r );
114  _field.swap( fields_r );
115  // For whatever reason writer is ' '-padding the action field
116  // but we don't want to modify the vector before we moved it.
119  }
120 
121  Impl( FieldVector & fields_r, HistoryActionID action_r, size_type expect_r )
122  {
123  _checkFields( fields_r, expect_r );
124  // For whatever reason writer is ' '-padding the action field
125  // but we don't want to modify the vector before we moved it.
126  std::string trimmed( str::trim( fields_r[ACTION_INDEX] ) );
127  _action = HistoryActionID( trimmed );
128  if ( _action != action_r )
129  {
130  ZYPP_THROW( ParseException( str::form( "Bad action id. Got %s, expected %s.",
131  _action.asString().c_str(),
132  action_r.asString().c_str() ) ) );
133  }
134  _field.swap( fields_r );
135  // now adjust action field:
136  _field[ACTION_INDEX] = trimmed;
137  }
138 
139  void _checkFields( const FieldVector & fields_r, size_type expect_r )
140  {
141  if ( expect_r < 2 ) // at least 2 fields (date and action) are required
142  expect_r = 2;
143  if ( fields_r.size() < expect_r )
144  {
145  ZYPP_THROW( ParseException( str::form( "Bad number of fields. Got %zd, expected at least %zd.",
146  fields_r.size(),
147  expect_r ) ) );
148  }
149  try
150  {
152  }
153  catch ( const std::exception & excpt )
154  {
155  ZYPP_THROW( ParseException( excpt.what() ) ); // invalid date format
156  }
157  // _action handled later
158  }
159 
160  public:
164  };
165 
167  //
168  // class HistoryLogData
169  //
171 
173  : _pimpl( new Impl( fields_r, expect_r ) )
174  {}
175 
177  : _pimpl( new Impl( fields_r, expectedId_r, expect_r ) )
178  {}
179 
181  {}
182 
184  {
185  if ( fields_r.size() >= 2 )
186  {
187  // str::trim( _field[ACTION_INDEX] );
188  switch ( HistoryActionID( str::trim( fields_r[ACTION_INDEX] ) ).toEnum() )
189  {
190 #define OUTS(E,T) case HistoryActionID::E: return Ptr( new T( fields_r ) ); break;
191  OUTS( INSTALL_e, HistoryLogDataInstall );
192  OUTS( REMOVE_e, HistoryLogDataRemove );
193  OUTS( REPO_ADD_e, HistoryLogDataRepoAdd );
194  OUTS( REPO_REMOVE_e, HistoryLogDataRepoRemove );
195  OUTS( REPO_CHANGE_ALIAS_e, HistoryLogDataRepoAliasChange );
196  OUTS( REPO_CHANGE_URL_e, HistoryLogDataRepoUrlChange );
197  OUTS( STAMP_COMMAND_e, HistoryLogDataStampCommand );
198  OUTS( PATCH_STATE_CHANGE_e, HistoryLogPatchStateChange );
199 #undef OUTS
200  // intentionally no default:
202  break;
203  }
204  }
205  // unknown action or invalid fields? Ctor will accept or throw.
206  return Ptr( new HistoryLogData( fields_r ) );
207  }
208 
210  { return _pimpl->_field.empty(); }
211 
213  { return _pimpl->_field.size(); }
214 
216  { return _pimpl->_field.begin(); }
217 
219  { return _pimpl->_field.end(); }
220 
221  const std::string & HistoryLogData::optionalAt( size_type idx_r ) const
222  {
223  static const std::string _empty;
224  return( idx_r < size() ? _pimpl->_field[idx_r] : _empty );
225  }
226 
227  const std::string & HistoryLogData::at( size_type idx_r ) const
228  { return _pimpl->_field.at( idx_r ); }
229 
230 
232  { return _pimpl->_date; }
233 
235  { return _pimpl->_action; }
236 
237 
238  std::ostream & operator<<( std::ostream & str, const HistoryLogData & obj )
239  { return str << str::joinEscaped( obj.begin(), obj.end(), '|' ); }
240 
242  // class HistoryLogDataInstall
245  : HistoryLogData( fields_r )
246  {}
247  std::string HistoryLogDataInstall::name() const { return optionalAt( NAME_INDEX ); }
250  std::string HistoryLogDataInstall::reqby() const { return optionalAt( REQBY_INDEX ); }
253  std::string HistoryLogDataInstall::userdata() const { return optionalAt( USERDATA_INDEX ); }
254 
256  // class HistoryLogPatchStateChange
259  : HistoryLogData( fields_r )
260  {}
261  std::string HistoryLogPatchStateChange::name() const { return optionalAt( NAME_INDEX ); }
270 
272  // class HistoryLogDataRemove
275  : HistoryLogData( fields_r )
276  {}
277  std::string HistoryLogDataRemove::name() const { return optionalAt( NAME_INDEX ); }
280  std::string HistoryLogDataRemove::reqby() const { return optionalAt( REQBY_INDEX ); }
281  std::string HistoryLogDataRemove::userdata() const { return optionalAt( USERDATA_INDEX ); }
282 
284  // class HistoryLogDataRepoAdd
287  : HistoryLogData( fields_r )
288  {}
289  std::string HistoryLogDataRepoAdd::alias() const { return optionalAt( ALIAS_INDEX ); }
291  std::string HistoryLogDataRepoAdd::userdata() const { return optionalAt( USERDATA_INDEX ); }
292 
294  // class HistoryLogDataRepoRemove
297  : HistoryLogData( fields_r )
298  {}
299  std::string HistoryLogDataRepoRemove::alias() const { return optionalAt( ALIAS_INDEX ); }
301 
303  // class HistoryLogDataRepoAliasChange
306  : HistoryLogData( fields_r )
307  {}
311 
313  // class HistoryLogDataRepoUrlChange
316  : HistoryLogData( fields_r )
317  {}
318  std::string HistoryLogDataRepoUrlChange::alias() const { return optionalAt( ALIAS_INDEX ); }
321 
323  // class HistoryLogDataStampCommand
326  : HistoryLogData( fields_r )
327  {}
331 
332 } // namespace zypp
zypp::HistoryLogDataInstall
A zypp history log line for an installed packaged.
Definition: HistoryLogData.h:199
zypp::HistoryLogDataInstall::CHEKSUM_INDEX
package checksum
Definition: HistoryLogData.h:219
zypp::HistoryActionID::NONE_e
Definition: HistoryLogData.h:52
zypp::HistoryLogDataRepoAdd::userdata
std::string userdata() const
userdata/transactionID
Definition: HistoryLogData.cc:291
zypp::HistoryLogData::HistoryLogData
HistoryLogData(FieldVector &fields_r, size_type expect_r=2)
Ctor moving FieldVector (via swap).
Definition: HistoryLogData.cc:172
zypp::HistoryLogDataRepoRemove
A zypp history log line for a removed repository.
Definition: HistoryLogData.h:349
zypp::HistoryLogData::Impl::_field
FieldVector _field
Definition: HistoryLogData.cc:161
zypp::HistoryLogDataStampCommand::userdata
std::string userdata() const
userdata/transactionID
Definition: HistoryLogData.cc:330
zypp::HistoryLogPatchStateChange::USERDATA_INDEX
userdata/transactionID
Definition: HistoryLogData.h:262
zypp::HistoryLogData::date
Date date() const
date
Definition: HistoryLogData.cc:231
zypp::HistoryLogDataRepoAliasChange::NEWALIAS_INDEX
repositories new alias
Definition: HistoryLogData.h:394
zypp::HistoryLogPatchStateChange::oldstate
std::string oldstate() const
Definition: HistoryLogData.cc:267
zypp::HistoryActionID::asString
const std::string & asString(bool pad=false) const
Definition: HistoryLogData.cc:76
zypp::HistoryActionID::REPO_CHANGE_ALIAS
static const HistoryActionID REPO_CHANGE_ALIAS
Definition: HistoryLogData.h:45
zypp::HistoryLogDataInstall::REQBY_INDEX
requested by (user@hostname, pid:appname, or empty (solver))
Definition: HistoryLogData.h:217
zypp::HistoryLogDataInstall::reqby
std::string reqby() const
requested by (user@hostname, pid:appname, or empty (solver))
Definition: HistoryLogData.cc:250
zypp::HistoryLogData::size_type
FieldVector::size_type size_type
Definition: HistoryLogData.h:112
zypp::HistoryLogData::_pimpl
RWCOW_pointer< Impl > _pimpl
Implementation class.
Definition: HistoryLogData.h:183
zypp::HistoryLogDataRemove::arch
Arch arch() const
package architecture
Definition: HistoryLogData.cc:279
zypp::HistoryLogDataInstall::USERDATA_INDEX
userdata/transactionID
Definition: HistoryLogData.h:220
zypp::HistoryLogDataStampCommand::COMMAND_INDEX
the commandline executed
Definition: HistoryLogData.h:457
zypp::HistoryLogData::FieldVector
std::vector< std::string > FieldVector
Definition: HistoryLogData.h:111
zypp::HistoryLogDataRemove::edition
Edition edition() const
package edition
Definition: HistoryLogData.cc:278
zypp::HistoryLogDataRepoAdd::url
Url url() const
repository url
Definition: HistoryLogData.cc:290
zypp::HistoryLogData::size
size_type size() const
Number of fields in vector.
Definition: HistoryLogData.cc:212
zypp::CheckSum
Definition: CheckSum.h:33
zypp::HistoryActionID::REPO_ADD_e
Definition: HistoryLogData.h:56
zypp::HistoryLogDataRemove::HistoryLogDataRemove
HistoryLogDataRemove(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
Definition: HistoryLogData.cc:274
zypp::repo::_table
static std::map< std::string, ServiceType::Type > _table
Definition: ServiceType.cc:21
zypp::HistoryActionID::PATCH_STATE_CHANGE
static const HistoryActionID PATCH_STATE_CHANGE
Definition: HistoryLogData.h:48
zypp::HistoryLogDataInstall::repoAlias
std::string repoAlias() const
repository providing the package
Definition: HistoryLogData.cc:251
zypp::HistoryLogDataRemove
A zypp history log line for a removed packge.
Definition: HistoryLogData.h:283
zypp::HistoryActionID::REPO_ADD
static const HistoryActionID REPO_ADD
Definition: HistoryLogData.h:43
zypp::HistoryLogPatchStateChange::severity
Patch::SeverityFlag severity() const
Definition: HistoryLogData.cc:265
zypp::Edition
Edition represents [epoch:]version[-release]
Definition: Edition.h:60
zypp::HistoryLogPatchStateChange::CATEGORY_INDEX
patch category
Definition: HistoryLogData.h:259
zypp::str::joinEscaped
std::string joinEscaped(TIterator begin, TIterator end, const char sep_r=' ')
Join strings using separator sep_r, quoting or escaping the values.
Definition: String.h:794
zypp::HistoryActionID::REPO_CHANGE_URL
static const HistoryActionID REPO_CHANGE_URL
Definition: HistoryLogData.h:46
zypp::HistoryLogDataInstall::NAME_INDEX
package name
Definition: HistoryLogData.h:214
zypp::HistoryLogPatchStateChange::category
Patch::Category category() const
Definition: HistoryLogData.cc:266
zypp::HistoryLogDataRepoAliasChange::HistoryLogDataRepoAliasChange
HistoryLogDataRepoAliasChange(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
Definition: HistoryLogData.cc:305
zypp::HistoryLogDataRemove::name
std::string name() const
package name
Definition: HistoryLogData.cc:277
zypp::HistoryLogData::Impl
Definition: HistoryLogData.cc:108
zypp::HistoryLogData
A zypp history log line split into fields.
Definition: HistoryLogData.h:105
ZYPP_THROW
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
Definition: Exception.h:392
zypp::HistoryLogDataRepoAdd::alias
std::string alias() const
repository alias
Definition: HistoryLogData.cc:289
zypp::HistoryLogData::const_iterator
FieldVector::const_iterator const_iterator
Definition: HistoryLogData.h:113
zypp::HistoryLogData::begin
const_iterator begin() const
Iterator pointing to 1st element in vector (or end()).
Definition: HistoryLogData.cc:215
zypp::HistoryActionID::REPO_REMOVE_e
Definition: HistoryLogData.h:57
zypp::HistoryLogDataRepoUrlChange::ALIAS_INDEX
repository alias
Definition: HistoryLogData.h:424
PtrTypes.h
zypp::HistoryLogDataRepoAdd::URL_INDEX
repository url
Definition: HistoryLogData.h:334
zypp::HistoryLogDataStampCommand::USERDATA_INDEX
userdata/transactionID
Definition: HistoryLogData.h:458
zypp::HistoryLogData::~HistoryLogData
virtual ~HistoryLogData()
Dtor.
Definition: HistoryLogData.cc:180
HistoryLogData.h
zypp::HistoryLogDataRepoRemove::alias
std::string alias() const
repository alias
Definition: HistoryLogData.cc:299
zypp::HistoryLogDataRepoUrlChange
A zypp history log line for a repo url change.
Definition: HistoryLogData.h:409
zypp::Arch
Architecture.
Definition: Arch.h:36
zypp::HistoryLogPatchStateChange::ARCH_INDEX
patch architecture
Definition: HistoryLogData.h:256
zypp::HistoryLogDataRepoAliasChange::oldAlias
std::string oldAlias() const
repositories old alias
Definition: HistoryLogData.cc:308
zypp::HistoryLogDataInstall::edition
Edition edition() const
package edition
Definition: HistoryLogData.cc:248
zypp::Patch::SeverityFlag
SeverityFlag
Possible severity levels for (security) patches.
Definition: Patch.h:76
zypp::HistoryLogDataRepoRemove::ALIAS_INDEX
repository alias
Definition: HistoryLogData.h:364
zypp::HistoryLogPatchStateChange::edition
Edition edition() const
package edition
Definition: HistoryLogData.cc:262
zypp::HistoryLogDataRepoUrlChange::newUrl
Url newUrl() const
repositories new url
Definition: HistoryLogData.cc:319
zypp::HistoryLogDataRemove::EDITION_INDEX
package edition
Definition: HistoryLogData.h:299
ParseException.h
zypp::HistoryLogDataRepoRemove::userdata
std::string userdata() const
userdata/transactionID
Definition: HistoryLogData.cc:300
zypp::HistoryLogData::Impl::Impl
Impl(FieldVector &fields_r, size_type expect_r)
Definition: HistoryLogData.cc:111
zypp::HistoryLogDataRemove::NAME_INDEX
package name
Definition: HistoryLogData.h:298
zypp::HistoryActionID::NONE
static const HistoryActionID NONE
Definition: HistoryLogData.h:39
zypp::HistoryLogPatchStateChange::arch
Arch arch() const
package architecture
Definition: HistoryLogData.cc:263
zypp::HistoryLogData::end
const_iterator end() const
Iterator pointing behind the last element in vector.
Definition: HistoryLogData.cc:218
zypp::HistoryLogPatchStateChange::SEVERITY_INDEX
patch severity
Definition: HistoryLogData.h:258
zypp::HistoryActionID::REMOVE
static const HistoryActionID REMOVE
Definition: HistoryLogData.h:42
zypp::HistoryLogPatchStateChange::repoAlias
std::string repoAlias() const
repository providing the package
Definition: HistoryLogData.cc:264
zypp::HistoryLogPatchStateChange::REPOALIAS_INDEX
repository providing the patch
Definition: HistoryLogData.h:257
zypp::HistoryLogData::Impl::_action
HistoryActionID _action
Definition: HistoryLogData.cc:163
zypp::HistoryLogDataRepoAdd::HistoryLogDataRepoAdd
HistoryLogDataRepoAdd(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
Definition: HistoryLogData.cc:286
zypp::HistoryLogDataRemove::REQBY_INDEX
requested by (user@hostname, pid:appname, or empty (solver))
Definition: HistoryLogData.h:301
zypp::HistoryLogDataRepoUrlChange::USERDATA_INDEX
userdata/transactionID
Definition: HistoryLogData.h:426
zypp::HistoryLogDataStampCommand
A zypp history log line identifying the program that triggered the following commit.
Definition: HistoryLogData.h:441
zypp::HistoryLogData::Impl::_date
Date _date
Definition: HistoryLogData.cc:162
Logger.h
zypp::HistoryLogDataRepoAliasChange::OLDALIAS_INDEX
repositories old alias
Definition: HistoryLogData.h:393
zypp::HistoryLogPatchStateChange::NEWSTATE_INDEX
the state of the patch after the change
Definition: HistoryLogData.h:261
WAR
#define WAR
Definition: Logger.h:80
zypp::parser::ParseException
Definition: ParseException.h:33
zypp::HistoryLogData::DATE_INDEX
date
Definition: HistoryLogData.h:174
zypp::HistoryLogDataRemove::reqby
std::string reqby() const
requested by (user@hostname, pid:appname, or empty (solver))
Definition: HistoryLogData.cc:280
zypp::HistoryLogData::action
HistoryActionID action() const
HistoryActionID (or NONE_e if unknown)
Definition: HistoryLogData.cc:234
zypp::Patch::Category
Category
Definition: Patch.h:48
zypp::HistoryLogPatchStateChange::EDITION_INDEX
patch edition
Definition: HistoryLogData.h:255
OUTS
#define OUTS(E, T)
zypp::HistoryLogDataRepoUrlChange::userdata
std::string userdata() const
userdata/transactionID
Definition: HistoryLogData.cc:320
zypp::str::form
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Definition: String.cc:35
zypp::HistoryLogPatchStateChange::HistoryLogPatchStateChange
HistoryLogPatchStateChange(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
Definition: HistoryLogData.cc:258
zypp::HistoryActionID::parse
static HistoryActionID::ID parse(const std::string &strval_r)
Definition: HistoryLogData.cc:49
zypp::HistoryActionID::REPO_CHANGE_ALIAS_e
Definition: HistoryLogData.h:58
zypp::HistoryLogDataRepoAdd::USERDATA_INDEX
userdata/transactionID
Definition: HistoryLogData.h:335
zypp::HistoryActionID::toEnum
ID toEnum() const
Definition: HistoryLogData.h:70
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::HistoryLogDataInstall::HistoryLogDataInstall
HistoryLogDataInstall(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
Definition: HistoryLogData.cc:244
zypp::HistoryLogDataRepoUrlChange::HistoryLogDataRepoUrlChange
HistoryLogDataRepoUrlChange(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
Definition: HistoryLogData.cc:315
zypp::HistoryLogDataRemove::ARCH_INDEX
package architecture
Definition: HistoryLogData.h:300
zypp::HistoryActionID::REMOVE_e
Definition: HistoryLogData.h:55
zypp::HistoryLogDataRepoAdd::ALIAS_INDEX
repository alias
Definition: HistoryLogData.h:333
zypp::HistoryLogData::Impl::Impl
Impl(FieldVector &fields_r, HistoryActionID action_r, size_type expect_r)
Definition: HistoryLogData.cc:121
zypp::HistoryActionID::PATCH_STATE_CHANGE_e
Definition: HistoryLogData.h:61
zypp::HistoryActionID::ID
ID
Definition: HistoryLogData.h:50
zypp::HistoryLogDataRepoAdd
A zypp history log line for an added repository.
Definition: HistoryLogData.h:318
zypp::HistoryActionID::HistoryActionID
HistoryActionID()
Definition: HistoryLogData.h:64
zypp::Patch::categoryEnum
Category categoryEnum() const
This patch's category as enum of wellknown categories.
Definition: Patch.cc:49
zypp::HistoryActionID::REPO_REMOVE
static const HistoryActionID REPO_REMOVE
Definition: HistoryLogData.h:44
zypp::HistoryLogPatchStateChange::OLDSTATE_INDEX
the state of the patch before the change
Definition: HistoryLogData.h:260
zypp::HistoryLogDataRepoUrlChange::NEWURL_INDEX
repositories new url
Definition: HistoryLogData.h:425
zypp::HistoryLogDataInstall::REPOALIAS_INDEX
repository providing the package
Definition: HistoryLogData.h:218
zypp::HistoryLogDataRemove::userdata
std::string userdata() const
userdata/transactionID
Definition: HistoryLogData.cc:281
zypp::HistoryLogData::at
const std::string & at(size_type idx_r) const
Access (required) field by number.
Definition: HistoryLogData.cc:227
zypp::HistoryLogDataRepoAliasChange::userdata
std::string userdata() const
userdata/transactionID
Definition: HistoryLogData.cc:310
zypp::HistoryLogPatchStateChange::NAME_INDEX
patch name
Definition: HistoryLogData.h:254
zypp::HistoryActionID::STAMP_COMMAND_e
Definition: HistoryLogData.h:60
zypp::HistoryLogDataStampCommand::USER_INDEX
executed by user@hostname
Definition: HistoryLogData.h:456
zypp::HistoryLogDataInstall::checksum
CheckSum checksum() const
package checksum
Definition: HistoryLogData.cc:252
zypp::HistoryActionID::INSTALL
static const HistoryActionID INSTALL
Definition: HistoryLogData.h:41
zypp::HistoryActionID::REPO_CHANGE_URL_e
Definition: HistoryLogData.h:59
zypp::HistoryLogData::Impl::_checkFields
void _checkFields(const FieldVector &fields_r, size_type expect_r)
Definition: HistoryLogData.cc:139
zypp::HistoryActionID::STAMP_COMMAND
static const HistoryActionID STAMP_COMMAND
Definition: HistoryLogData.h:47
zypp::HistoryLogDataRepoRemove::USERDATA_INDEX
userdata/transactionID
Definition: HistoryLogData.h:365
zypp::HistoryLogData::optionalAt
const std::string & optionalAt(size_type idx_r) const
Access (optional) field by number.
Definition: HistoryLogData.cc:221
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::HistoryLogDataStampCommand::executedBy
std::string executedBy() const
executed by user@hostname
Definition: HistoryLogData.cc:328
zypp::HistoryLogPatchStateChange::userdata
std::string userdata() const
userdata/transactionID
Definition: HistoryLogData.cc:269
zypp::HistoryLogData::create
static Ptr create(FieldVector &fields_r)
Factory method creating HistoryLogData classes.
Definition: HistoryLogData.cc:183
zypp::HistoryActionID::_id
ID _id
Definition: HistoryLogData.h:77
zypp::HistoryLogDataStampCommand::HistoryLogDataStampCommand
HistoryLogDataStampCommand(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
Definition: HistoryLogData.cc:325
zypp::HistoryLogDataInstall::name
std::string name() const
package name
Definition: HistoryLogData.cc:247
String.h
zypp::HistoryLogDataRepoRemove::HistoryLogDataRepoRemove
HistoryLogDataRepoRemove(FieldVector &fields_r)
Ctor moving FieldVector (via swap).
Definition: HistoryLogData.cc:296
HISTORY_LOG_DATE_FORMAT
#define HISTORY_LOG_DATE_FORMAT
Definition: HistoryLogData.h:26
zypp::HistoryLogDataRepoAliasChange::newAlias
std::string newAlias() const
repositories new alias
Definition: HistoryLogData.cc:309
zypp::HistoryLogData::empty
bool empty() const
Whether FieldVector is empty.
Definition: HistoryLogData.cc:209
zypp::HistoryLogDataInstall::arch
Arch arch() const
package architecture
Definition: HistoryLogData.cc:249
zypp::HistoryLogDataInstall::userdata
std::string userdata() const
userdata/transactionID
Definition: HistoryLogData.cc:253
zypp::HistoryLogDataRepoAliasChange
A zypp history log line for a repo alias change.
Definition: HistoryLogData.h:378
zypp::HistoryLogDataInstall::EDITION_INDEX
package edition
Definition: HistoryLogData.h:215
str
String related utilities and Regular expression matching.
zypp::HistoryLogPatchStateChange
A zypp history log line for an installed packaged.
Definition: HistoryLogData.h:239
zypp::HistoryActionID
Enumeration of known history actions.
Definition: HistoryLogData.h:37
zypp::HistoryLogData::ACTION_INDEX
HistoryActionID.
Definition: HistoryLogData.h:175
zypp::Url
Url manipulation class.
Definition: Url.h:87
zypp::HistoryActionID::INSTALL_e
Definition: HistoryLogData.h:54
zypp::HistoryLogDataInstall::ARCH_INDEX
package architecture
Definition: HistoryLogData.h:216
zypp::str::trim
std::string trim(const std::string &s, const Trim trim_r)
Definition: String.cc:216
zypp::HistoryLogDataStampCommand::command
std::string command() const
the commandline executed
Definition: HistoryLogData.cc:329
zypp::HistoryLogDataRemove::USERDATA_INDEX
userdata/transactionID
Definition: HistoryLogData.h:302
zypp::HistoryLogDataRepoUrlChange::alias
std::string alias() const
repository alias
Definition: HistoryLogData.cc:318
zypp::Patch::severityFlag
SeverityFlag severityFlag() const
Severity string mapped to an enum.
Definition: Patch.cc:137
zypp::HistoryLogPatchStateChange::name
std::string name() const
package name
Definition: HistoryLogData.cc:261
zypp::HistoryLogPatchStateChange::newstate
std::string newstate() const
Definition: HistoryLogData.cc:268
zypp::HistoryLogDataRepoAliasChange::USERDATA_INDEX
userdata/transactionID
Definition: HistoryLogData.h:395
zypp::HistoryLogData::Ptr
shared_ptr< HistoryLogData > Ptr
Definition: HistoryLogData.h:108