Imported Upstream version 17.22.0
[platform/upstream/libzypp.git] / zypp / parser / yum / RepomdFileReader.h
index dd193ea..fdebdea 100644 (file)
@@ -17,7 +17,6 @@
 #include "zypp/base/Function.h"
 
 #include "zypp/OnMediaLocation.h"
-#include "zypp/repo/yum/ResourceType.h"
 
 namespace zypp
 {
@@ -31,30 +30,14 @@ namespace zypp
    * Reads through a repomd.xml file and collects type, location, checksum and
    * other data about metadata files to be processed.
    *
-   * After each package is read, a \ref OnMediaLocation
-   * and \ref repo::yum::ResourceType is prepared and \ref _callback
-   * is called with these two objects passed in.
-   *
-   * The \ref _callback is provided on construction.
-   *
-   *
-   * \code
-   * RepomdFileReader reader(repomd_file, 
-   *                  bind( &SomeClass::callbackfunc, &SomeClassInstance, _1, _2 ) );
-   * \endcode
+   * After each file entry is read, an \ref OnMediaLocation and the resource type
+   * string are prepared and passed to the \ref _callback.
    */
   class RepomdFileReader : private base::NonCopyable
   {
   public:
-   /**
-    * Callback definition.
-    * First parameter is a \ref OnMediaLocation object with the resource
-    * second parameter is the resource type.
-    */
-    typedef function< bool(
-        const OnMediaLocation &,
-        const repo::yum::ResourceType &)>
-      ProcessResource;
+    /** Callback taking \ref OnMediaLocation and the resource type string */
+    typedef function< bool( OnMediaLocation &&, const std::string & )> ProcessResource;
 
    /**
     * CTOR. Creates also \ref xml::Reader and starts reading.
@@ -64,12 +47,9 @@ namespace zypp
     *
     * \see RepomdFileReader::ProcessResource
     */
-    RepomdFileReader(
-      const Pathname & repomd_file, const ProcessResource & callback);
+    RepomdFileReader( const Pathname & repomd_file, const ProcessResource & callback );
 
-    /**
-     * DTOR
-     */
+    /** DTOR */
     ~RepomdFileReader();
 
   private:
@@ -78,10 +58,8 @@ namespace zypp
   };
 
 
-    } // ns yum
-  } // ns parser
-} // ns zypp
-
-#endif /*zypp_source_yum_RepomdFileReader_H*/
+    } // namespace yum
+  } // namespace parser
+} // namespace zypp
 
-// vim: set ts=2 sts=2 sw=2 et ai:
+#endif // zypp_source_yum_RepomdFileReader_H