00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE Linux Products GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: YUMRepodata.h 00014 00015 Author: Michael Andres <ma@suse.de> 00016 Maintainer: Michael Andres <ma@suse.de> 00017 00018 Purpose: 00019 00020 /-*/ 00021 #ifndef YUMRepodata_h 00022 #define YUMRepodata_h 00023 00024 #include <iosfwd> 00025 00026 #include <y2util/Pathname.h> 00027 00028 #include "y2pm/PMError.h" 00029 #include "y2pm/MediaAccessPtr.h" 00030 00032 namespace YUM 00033 { 00034 00036 // 00037 // CLASS NAME : Repodata 00041 class Repodata 00042 { 00043 public: 00044 00045 Repodata( const Pathname & repodataDir_r ); 00046 00047 ~Repodata(); 00048 00049 PMError 00050 update( MediaAccessPtr media_r, const Pathname & repodataDir_r ); 00051 00052 bool 00053 hasData() const 00054 { return _repodataId.size(); } 00055 00056 std::string 00057 getId() const 00058 { return _repodataId; } 00059 00060 Pathname 00061 primaryFile() const; 00062 00063 public: 00064 00065 static Pathname 00066 defaultRepodataDir() 00067 { return "repodata"; } 00068 00069 static std::string 00070 defaultRepomd_Xml() 00071 { return "repomd.xml"; } 00072 00073 private: 00074 00075 Pathname _repodataDir; 00076 std::string _repodataId; 00077 }; 00079 00081 } // namespace YUM 00083 #endif // YUMRepodata_h
1.4.4