compile
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 28 Jun 2006 17:24:29 +0000 (17:24 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 28 Jun 2006 17:24:29 +0000 (17:24 +0000)
zypp/cache/SourceCache.cpp
zypp/source/SourceInfo.cc
zypp/source/SourceInfo.h

index 9a164c9..cc1cc16 100644 (file)
@@ -27,7 +27,7 @@ namespace zypp
 namespace cache
 { /////////////////////////////////////////////////////////////////
 
-static int int_to_tribool( boost::tribool b )
+static int tribool_to_int( boost::tribool b )
 {
   if (b)
     return 1;
@@ -37,19 +37,19 @@ static int int_to_tribool( boost::tribool b )
     return 2;
 }  
   
-static boost::tribool b tribool_to_int( int i )
+static boost::tribool int_to_tribool( int i )
 {
   if (i==1)
     return true;
   else if (i==0)
     return false;
   else
-    return boost;indeterminate;
+    return boost::indeterminate;
 }
   
 static std::string checksum_to_string( const CheckSum &checksum )
 {
-  return checksum.type() + ":" checksum.checksum();
+  return checksum.type() + ":" checksum.checksum();
 }  
   
 static CheckSum string_to_checksum( const std::string &checksum )
@@ -58,7 +58,7 @@ static CheckSum string_to_checksum( const std::string &checksum )
   if ( str::split( checksum, std::back_inserter(words), ":" ) != 2 )
     return CheckSum();
   
-  return CheckSum( words[0], words[19);
+  return CheckSum( words[0], words[19]);
 }
   
 #define SOURCES_TABLE_SCHEMA "create table sources ( alias varchar primary key, type varchar, description varchar,  url varchar, path varchar,  enabled integer, autorefresh integer, timestamp varchar, checksum varchar);"   
@@ -128,7 +128,7 @@ source::SourceInfoList SourceCache::knownSources() const
         info.setPath(reader.getstring(4));
         info.setEnabled( int_to_tribool(reader.getint(5)) );
         info.setAutorefresh( int_to_tribool( reader.getint(6) ));
-        info.setTimestamp(reader.getstring(7));
+        //info.setTimestamp(Date(reader.getstring(7)));
         info.setChecksum(string_to_checksum(reader.getstring(8)));
         sources.push_back(info);
       }
index adc1862..48de9b5 100644 (file)
@@ -94,7 +94,7 @@ namespace source
     return *this;
   }
   
-  SourceInfo & SourceInfo::setTimesamp( const Date &timestamp )
+  SourceInfo & SourceInfo::setTimestamp( const Date &timestamp )
   {
     _timestamp = timestamp;
     return *this;
index 99544ce..12ec19b 100644 (file)
@@ -43,7 +43,7 @@ namespace source
     SourceInfo & setCacheDir( const Pathname &p );
     SourceInfo & setDescription( const std::string &description );
     SourceInfo & setChecksum( const CheckSum &checksum );
-    SourceInfo & setTimesamp( const Date &timestamp );
+    SourceInfo & setTimestamp( const Date &timestamp );
     boost::tribool enabled() const;
     boost::tribool autorefresh() const;
     Pathname cacheDir() const;