1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
12 #include "zypp/base/Logger.h"
13 #include "zypp/base/String.h"
15 #include "zypp/cache/Utils.h"
19 //////////////////////////////////////////////////////////////////
21 { /////////////////////////////////////////////////////////////////
22 ///////////////////////////////////////////////////////////////////
24 { /////////////////////////////////////////////////////////////////
26 int tribool_to_int( boost::tribool b )
36 boost::tribool int_to_tribool( int i )
43 return boost::indeterminate;
46 std::string checksum_to_string( const CheckSum &checksum )
48 return checksum.type() + ":" + checksum.checksum();
51 CheckSum string_to_checksum( const std::string &checksum )
53 std::vector<std::string> words;
54 if ( str::split( checksum, std::back_inserter(words), ":" ) != 2 )
57 return CheckSum( words[0], words[19]);