Imported Upstream version 14.45.0
[platform/upstream/libzypp.git] / zypp / parser / RepoindexFileReader.cc
index 5414d0c..4207606 100644 (file)
@@ -16,7 +16,6 @@
 #include "zypp/base/Logger.h"
 #include "zypp/base/Gettext.h"
 #include "zypp/base/InputStream.h"
-#include "zypp/base/DefaultIntegral.h"
 
 #include "zypp/Pathname.h"
 
@@ -49,9 +48,9 @@ namespace zypp
        /** */
        void setVar( const std::string & key_r, const std::string & val_r )
        {
-         //MIL << "*** Inject " << key_r << " = " << val_r;
+         MIL << "*** Inject " << key_r << " = " << val_r;
          _vars[key_r] = replace( val_r );
-         //MIL << " (" << _vars[key_r] << ")" << endl;
+         MIL << " (" << _vars[key_r] << ")" << endl;
        }
 
        std::string replace( const std::string & val_r ) const
@@ -113,8 +112,6 @@ namespace zypp
      */
     bool consumeNode( Reader & reader_r );
 
-    DefaultIntegral<Date::Duration,0> _ttl;
-
   private:
     bool getAttrValue( const std::string & key_r, Reader & reader_r, std::string & value_r )
     {
@@ -165,14 +162,7 @@ namespace zypp
       if ( reader_r->name() == "repoindex" )
       {
        while ( reader_r.nextNodeAttribute() )
-       {
-         const std::string & name( reader_r->localName().asString() );
-         const std::string & value( reader_r->value().asString() );
-         _replacer.setVar( name, value );
-         // xpath: /repoindex@ttl
-         if ( name == "ttl" )
-           _ttl = str::strtonum<Date::Duration>(value);
-       }
+         _replacer.setVar( reader_r->localName().asString(), reader_r->value().asString() );
         return true;
       }
 
@@ -262,18 +252,20 @@ namespace zypp
   //
   ///////////////////////////////////////////////////////////////////
 
-  RepoindexFileReader::RepoindexFileReader( const Pathname & repoindex_file, const ProcessResource & callback )
-  : _pimpl(new Impl(InputStream(repoindex_file), callback))
+  RepoindexFileReader::RepoindexFileReader(
+      const Pathname & repoindex_file, const ProcessResource & callback)
+    :
+      _pimpl(new Impl(InputStream(repoindex_file), callback))
   {}
 
-  RepoindexFileReader::RepoindexFileReader( const InputStream &is, const ProcessResource & callback )
-  : _pimpl(new Impl(is, callback))
+  RepoindexFileReader::RepoindexFileReader(
+       const InputStream &is, const ProcessResource & callback )
+    : _pimpl(new Impl(is, callback))
   {}
 
   RepoindexFileReader::~RepoindexFileReader()
   {}
 
-  Date::Duration RepoindexFileReader::ttl() const      { return _pimpl->_ttl; }
 
   } // ns parser
 } // ns zypp