00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef ULSelectionParser_h
00022 #define ULSelectionParser_h
00023
00024 #include <string>
00025 #include <list>
00026 #include <utility>
00027 #include <fstream>
00028
00029 #include <y2util/Pathname.h>
00030 #include <y2util/TaggedParser.h>
00031 #include <y2util/TaggedFile.h>
00032
00033 #include <y2pm/PMError.h>
00034 #include <y2pm/MediaAccessPtr.h>
00035 #include <y2pm/PMSelectionPtr.h>
00036 #include <y2pm/PMULSelectionDataProviderPtr.h>
00037 #include <y2pm/InstSrcPtr.h>
00038
00039 #include <y2pm/ULSelectionParserPtr.h>
00040
00041 class ULSelectionParser : public CountedRep {
00042 private:
00043
00044 const InstSrcPtr _source;
00045
00046
00047 enum Tags {
00048 SELECTION,
00049 SUMMARY,
00050 CATEGORY,
00051 VISIBLE,
00052 ORDER,
00053 RECOMMENDS,
00054 SUGGESTS,
00055 REQUIRES,
00056 PROVIDES,
00057 CONFLICTS,
00058 OBSOLETES,
00059 SIZE,
00060 INSPACKS,
00061 DELPACKS,
00062 NUM_TAGS
00063 };
00064
00065
00066 TaggedParser _parser;
00067
00068 TaggedFile::TagSet _tagset;
00069
00070
00071 PMSelectionPtr toProvider (PMULSelectionDataProviderPtr dataprovider);
00072
00073 public:
00074 ULSelectionParser (const InstSrcPtr source);
00075 ~ULSelectionParser();
00076
00083 PMError fromPath (const Pathname& path, PMSelectionPtr& selection);
00084
00089 PMError fromMediaDir (std::list<PMSelectionPtr>& selections,
00090 MediaAccessPtr media_r, const Pathname& descr_dir_r );
00091
00092 };
00093
00094 #endif //ULSelectionParser_h