libzypp  10.5.0
RepoStatus.h
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP2_REPOSTATUS_H
00013 #define ZYPP2_REPOSTATUS_H
00014 
00015 #include <iosfwd>
00016 #include "zypp/base/PtrTypes.h"
00017 #include "zypp/CheckSum.h"
00018 #include "zypp/Date.h"
00019 
00021 namespace zypp
00022 { 
00023 
00025   //
00026   //    CLASS NAME : RepoStatus
00027   //
00037   class RepoStatus
00038   {
00039     friend std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
00040 
00041   public:
00042 
00050     static RepoStatus fromCookieFile( const Pathname &path );
00051 
00056     void saveToCookieFile( const Pathname &path ) const;
00057 
00064     std::string checksum() const;
00065 
00071     Date timestamp() const;
00072 
00079     bool empty() const;
00080 
00085     RepoStatus & setChecksum( const std::string &checksum );
00086 
00091     RepoStatus & setTimestamp( const Date &timestamp );
00092 
00094     class Impl;
00095 
00096   public:
00098     RepoStatus();
00099 
00117     RepoStatus( const Pathname &file );
00118 
00120     ~RepoStatus();
00121 
00122   public:
00123 
00124   private:
00126     RWCOW_pointer<Impl> _pimpl;
00127   };
00129 
00131   std::ostream & operator<<( std::ostream & str, const RepoStatus & obj );
00132 
00137   RepoStatus operator&&( const RepoStatus &lhs, const RepoStatus &rhs );
00138 
00140 } // namespace zypp
00142 #endif // ZYPP2_REPOSTATUS_H