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         {
00043           std::string vendor;
00044           std::string timestamp;
00045           unsigned int count;
00046           std::set<std::string> flags;
00047           // map media number to ( map language -> description string )
00048           // entry.alternate_names[1]["de"] -> "SUSE Linux"
00049           std::map< unsigned int, std::map<std::string, std::string> > alternate_names;
00050         };
00051 
00052         virtual ~MediaMetadataParser()
00053       {}
00054 
00055         /* Parse file and invoke consume on each tag found.
00056          * \throw ParseException
00057          * \todo more doc on Ecaptions.
00058         */
00059         void parse( const Pathname & file_r, MediaEntry &entry_r );
00060         /* Parse a key.modifier (std::list of std::strings)
00061          * That means, translatable tag with multiple values
00062          * the default modifier will get the modifier of default (LABEL.de, LABEL as LANGUAGE.default)
00063          */
00064       };
00066 
00068     } // namespace tagfile
00071   } // namespace parser
00074 } // namespace zypp
00076 //
00077 #endif //  ZYPP_PARSER_TAGFILE_MediaMetadataPPARSER_H

Generated on Tue Nov 28 16:49:32 2006 for zypp by  doxygen 1.5.0