libzypp  15.28.6
RepoindexFileReader.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef zypp_source_yum_RepoindexFileReader_H
13 #define zypp_source_yum_RepoindexFileReader_H
14 
15 #include "zypp/base/PtrTypes.h"
16 #include "zypp/base/NonCopyable.h"
17 #include "zypp/base/Function.h"
18 #include "zypp/base/InputStream.h"
19 #include "zypp/Pathname.h"
20 #include "zypp/Date.h"
21 
22 namespace zypp
23 {
24  class RepoInfo;
25 
26  namespace parser
27  {
28 
45  {
46  public:
52  typedef function< bool( const RepoInfo & )> ProcessResource;
53 
62  RepoindexFileReader( const zypp::Pathname & repoindexFile,
63  const ProcessResource & callback);
64 
74  const ProcessResource & callback );
75 
80 
82  Date::Duration ttl() const;
83 
84  private:
85  class Impl;
87  };
88 
89 
90  } // ns parser
91 } // ns zypp
92 
93 #endif /*zypp_source_yum_RepoindexFileReader_H*/
94 
95 // vim: set ts=2 sts=2 sw=2 et ai:
Date::Duration ttl() const
Metadata TTL (repoindex.xml:xpath:/repoindex or 0).
function< bool(const RepoInfo &)> ProcessResource
Callback definition.
Reads through a repoindex.xml file and collects repositories.
Helper to create and pass std::istream.
Definition: InputStream.h:56
RepoindexFileReader(const zypp::Pathname &repoindexFile, const ProcessResource &callback)
CTOR.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26
time_t Duration
Definition: Date.h:39
Wrapper for const correct access via Smart pointer types.
Definition: PtrTypes.h:285
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl