00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef InstData_h
00023 #define InstData_h
00024
00025 #include <iosfwd>
00026 #include <list>
00027
00028 #include <y2util/Pathname.h>
00029
00030 #include <y2pm/PMPackagePtr.h>
00031 #include <y2pm/PMSelectionPtr.h>
00032 #include <y2pm/PMYouPatchPtr.h>
00033
00034 #include <y2pm/MediaAccess.h>
00035
00037
00038
00039
00043 class InstData {
00044
00045 protected:
00046
00047 InstData();
00048
00049 virtual ~InstData();
00050
00051 public:
00052
00059 virtual const std::list<PMSelectionPtr>& getSelections (void) const = 0;
00060
00061 unsigned numSelections() const { return getSelections().size(); }
00062
00069 virtual const std::list<PMPackagePtr>& getPackages (void) const = 0;
00070
00071 unsigned numPackages() const { return getPackages().size(); }
00072
00079 virtual const std::vector<PMYouPatchPtr>& getPatches (void) const = 0;
00080
00081 unsigned numPatches() const { return getPatches().size(); }
00082
00087 static const std::list<PMPackagePtr> findPackages (const std::list<PMPackagePtr>& packages, const std::string& name = "", const std::string& arch = "", const std::string& version = "", const std::string& release = "");
00088
00093 static const std::list<PMSelectionPtr> findSelections (const std::list<PMSelectionPtr>& selections, const std::string& arch = "", const std::string& name = "", const std::string& version = "", const std::string& release = "");
00094 };
00095
00097
00098 #endif // InstData_h
00099