Write userdata string to history log (fate#312521)
[platform/upstream/libzypp.git] / zypp / parser / HistoryLogReader.h
index 45ecd27..b8941dd 100644 (file)
@@ -7,11 +7,11 @@
 |                                                                      |
 \---------------------------------------------------------------------*/
 
-/** \file HistoryLogReader.h
+/** \file zypp/parser/HistoryLogReader.h
  *
  */
-#ifndef ZYPP_HISTORYLOGREADER_H_
-#define ZYPP_HISTORYLOGREADER_H_
+#ifndef ZYPP_PARSER_HISTORYLOGREADER_H_
+#define ZYPP_PARSER_HISTORYLOGREADER_H_
 
 #include "zypp/base/PtrTypes.h"
 #include "zypp/ProgressData.h"
@@ -29,47 +29,40 @@ namespace zypp
   namespace parser
   { /////////////////////////////////////////////////////////////////
 
-
+  ///////////////////////////////////////////////////////////////////
+  /// \class HistoryLogReader
+  /// \brief Zypp history file parser
+  /// \ingroup g_ZyppHistory
+  /// \ingroup g_ZyppParser
+  ///
+  /// Reads a zypp history log file and calls the ProcessItem function
+  /// passed in the constructor for each item read.
+  ///
+  /// \code
+  /// struct HistoryItemCollector
+  /// {
+  ///   vector<HistoryItem::Ptr> items;
+  ///
+  ///   bool operator()( const HistoryItem::Ptr & item_ptr )
+  ///   {
+  ///     items.push_back(item_ptr);
+  ///     return true;
+  ///   }
+  /// }
+  /// ...
+  /// HistoryItemCollector ic;
+  /// HistoryLogReader reader("/var/log/zypp/history", boost::ref(ic));
+  ///
+  /// try
+  /// {
+  ///   reader.readAll();
+  /// }
+  /// catch (const Exception & e)
+  /// {
+  ///   cout << e.asUserHistory() << endl;
+  /// }
+  /// \endcode
   /////////////////////////////////////////////////////////////////////
-  //
-  // CLASS NAME: HistoryLogReader
-  //
-  /**
-   * Reads a zypp history log file and calls the ProcessItem function passed
-   * in the constructor for each item read.
-   *
-   * Example:
-   * <code>
-   *
-   * struct HistoryItemCollector
-   * {
-   *   vector<HistoryItem::Ptr> items;
-   *
-   *   bool processEntry( const HistoryItem::Ptr & item_ptr )
-   *   {
-   *     items.push_back(item_ptr);
-   *     return true;
-   *   }
-   * }
-   *
-   * ...
-   *
-   * HistoryItemCollector ic;
-   * HistoryLogReader reader("/var/log/zypp/history", boost::ref(ic));
-   *
-   * try
-   * {
-   *   reader.readAll();
-   * }
-   * catch (const Exception & e)
-   * {
-   *   cout << e.asUserHistory() << endl;
-   * }
-   *
-   * </code>
-   *
-   * \see http://en.opensuse.org/Libzypp/Package_History
-   */
   class HistoryLogReader
   {
   public:
@@ -150,4 +143,4 @@ namespace zypp
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
 
-#endif /* ZYPP_HISTORYLOGREADER_H_ */
+#endif /* ZYPP_PARSER_HISTORYLOGREADER_H_ */