- Create the cache directly from the schema (installed) file.
[platform/upstream/libzypp.git] / zypp / Changelog.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Changelog.h
10  *
11 */
12 #ifndef ZYPP_CHANGELOG_H
13 #define ZYPP_CHANGELOG_H
14
15 #include <string>
16 #include <list>
17
18 #include "zypp/Date.h"
19
20 ///////////////////////////////////////////////////////////////////
21 namespace zypp
22 { /////////////////////////////////////////////////////////////////
23
24   ///////////////////////////////////////////////////////////////////
25   //
26   //    CLASS NAME : ChangelogEntry
27   //
28   /** Single entry in a change log
29   */
30   class ChangelogEntry
31   {
32   public:
33     /** Default ctor */
34     ChangelogEntry( const Date & d,
35                     const std::string & a,
36                     const std::string & t )
37     : _date( d ), _author( a ), _text( t )
38     {};
39     /** Dtor */
40     ~ChangelogEntry()
41     {}
42     Date date() const { return _date; }
43     std::string author() const { return _author; }
44     std::string text() const { return _text; }
45
46   private:
47     Date _date;
48     std::string _author;
49     std::string _text;
50   };
51
52   /** List of ChangelogEntry. */
53   typedef std::list<ChangelogEntry> Changelog;
54
55   /** \relates ChangelogEntry */
56   std::ostream & operator<<( std::ostream & out, const ChangelogEntry & obj );
57
58   ///////////////////////////////////////////////////////////////////
59 } // namespace zypp
60 ///////////////////////////////////////////////////////////////////
61
62 #endif // ZYPP_CHANGELOG_H