MediaMetadataParser.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_PARSER_TAGFILE_MediaMetadataPARSER_H
00013 #define ZYPP_PARSER_TAGFILE_MediaMetadataPARSER_H
00014 
00015 #include <iosfwd>
00016 #include <set>
00017 #include <map>
00018 #include <list>
00019 
00020 #include "zypp/parser/tagfile/ParseException.h"
00021 
00022 #include "zypp/Pathname.h"
00023 
00025 namespace zypp
00026 { 
00027 
00028   namespace source
00029   { 
00030 
00031     namespace susetags
00032     { 
00033 
00035       //
00036       //        CLASS NAME : MediaMetadataParser
00037       //
00039       struct MediaMetadataParser
00040       {
00041         struct MediaEntry {
00042           std::string vendor;
00043           std::string timestamp;
00044           unsigned int count;
00045           std::set<std::string> flags;
00046           // map media number to ( map language -> description string )
00047           // entry.alternate_names[1]["de"] -> "SUSE Linux"
00048           std::map< unsigned int, std::map<std::string, std::string> > alternate_names;
00049         };
00050 
00051         virtual ~MediaMetadataParser()
00052         {}
00053 
00054         /* Parse file and invoke consume on each tag found.
00055          * \throw ParseException
00056          * \todo more doc on Ecaptions.
00057         */
00058         void parse( const Pathname & file_r, MediaEntry &entry_r );
00059         /* Parse a key.modifier (std::list of std::strings)
00060          * That means, translatable tag with multiple values
00061          * the default modifier will get the modifier of default (LABEL.de, LABEL as LANGUAGE.default)
00062          */ 
00063       };
00065 
00067     } // namespace tagfile
00070   } // namespace parser
00073 } // namespace zypp
00075 //
00076 #endif //  ZYPP_PARSER_TAGFILE_MediaMetadataPPARSER_H

Generated on Thu Jul 6 00:07:24 2006 for zypp by  doxygen 1.4.6