00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00013 #include "zypp/source/yum/YUMProductImpl.h" 00014 #include "zypp/source/yum/YUMSourceImpl.h" 00015 #include <zypp/CapFactory.h> 00016 #include "zypp/parser/yum/YUMParserData.h" 00017 #include <zypp/parser/yum/YUMParser.h> 00018 #include "zypp/Package.h" 00019 #include "zypp/Script.h" 00020 #include "zypp/Message.h" 00021 #include "zypp/base/Logger.h" 00022 00023 00024 using namespace std; 00025 using namespace zypp::detail; 00026 using namespace zypp::parser::yum; 00027 00029 namespace zypp 00030 { 00031 00032 namespace source 00033 { 00034 namespace yum 00035 { 00037 // 00038 // CLASS NAME : YUMProductImpl 00039 // 00041 00045 YUMProductImpl::YUMProductImpl( 00046 Source_Ref source_r, 00047 const zypp::parser::yum::YUMProductData & parsed 00048 ) 00049 : _category(parsed.type), 00050 _vendor(parsed.vendor), 00051 _short_name(parsed.short_name), 00052 _source(source_r) 00053 { 00054 _category = source_r.baseSource() ? "base" : "add-on"; 00055 } 00056 00057 std::string YUMProductImpl::category() const 00058 { return _category; } 00059 00060 Label YUMProductImpl::vendor() const 00061 { return _vendor; } 00062 00063 TranslatedText YUMProductImpl::summary() const 00064 { return _summary; } 00065 00066 TranslatedText YUMProductImpl::description() const 00067 { return _description; } 00068 00069 Source_Ref YUMProductImpl::source() const 00070 { return _source; } 00071 00072 #warning the metadata specification doesn't support product flags 00073 std::list<std::string> YUMProductImpl::flags() const 00074 { return ProductImplIf::flags(); } 00075 00076 TranslatedText YUMProductImpl::shortName() const 00077 { return _short_name; } 00078 00079 } // namespace yum 00081 } // namespace source 00084 } // namespace zypp