1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/parser/yum/RepomdFileReader.h
10 * Interface of repomd.xml file reader.
12 #ifndef zypp_source_yum_RepomdFileReader_H
13 #define zypp_source_yum_RepomdFileReader_H
15 #include "zypp/base/PtrTypes.h"
16 #include "zypp/base/NonCopyable.h"
17 #include "zypp/base/Function.h"
19 #include "zypp/OnMediaLocation.h"
30 * Reads through a repomd.xml file and collects type, location, checksum and
31 * other data about metadata files to be processed.
33 * After each file entry is read, an \ref OnMediaLocation and the resource type
34 * string are prepared and passed to the \ref _callback.
36 class RepomdFileReader : private base::NonCopyable
39 /** Callback taking \ref OnMediaLocation and the resource type string */
40 typedef function< bool( OnMediaLocation &&, const std::string & )> ProcessResource;
43 * CTOR. Creates also \ref xml::Reader and starts reading.
45 * \param repomd_file is the repomd.xml file you want to read
46 * \param callback is a function.
48 * \see RepomdFileReader::ProcessResource
50 RepomdFileReader( const Pathname & repomd_file, const ProcessResource & callback );
57 RW_pointer<Impl,rw_pointer::Scoped<Impl> > _pimpl;
65 #endif // zypp_source_yum_RepomdFileReader_H