return true;
}
/*}}}*/
-// ListParser::Description - Return the description string /*{{{*/
-// ---------------------------------------------------------------------
-/* This is to return the string describing the package in debian
- form. If this returns the blank string then the entry is assumed to
- only describe package properties */
-string debListParser::Description(std::string const &lang)
-{
- return Description(StringView(lang)).to_string();
-}
-
-StringView debListParser::Description(StringView lang)
-{
- if (lang.empty())
- return Section.Find("Description");
- else
- return Section.Find(string("Description-").append(lang.data(), lang.size()));
-}
- /*}}}*/
// ListParser::AvailableDescriptionLanguages /*{{{*/
std::vector<std::string> debListParser::AvailableDescriptionLanguages()
{
StringView const value = Section.Find("Description-md5");
if (value.empty() == true)
{
- StringView const desc = Description(StringView());
+ StringView const desc = Section.Find("Description");
if (desc == "\n")
return MD5SumValue();
virtual bool ArchitectureAll() APT_OVERRIDE;
virtual std::string Version() APT_OVERRIDE;
virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
- virtual std::string Description(std::string const &lang) APT_OVERRIDE;
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
- APT::StringView Description(APT::StringView lang);
-#endif
virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
virtual MD5SumValue Description_md5() APT_OVERRIDE;
virtual unsigned short VersionHash() APT_OVERRIDE;
// ListParser::Description - Return the description string /*{{{*/
// ---------------------------------------------------------------------
/* Sorry, no description for the resolvers… */
-std::string edspListParser::Description()
+std::vector<std::string> edspListParser::AvailableDescriptionLanguages()
{
- return "";
-}
-std::string edspListParser::DescriptionLanguage()
-{
- return "";
+ return {};
}
MD5SumValue edspListParser::Description_md5()
{
edspListParserPrivate * const d;
public:
virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
- virtual std::string Description();
- virtual std::string DescriptionLanguage();
+ virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
virtual MD5SumValue Description_md5() APT_OVERRIDE;
virtual unsigned short VersionHash() APT_OVERRIDE;
virtual bool ArchitectureAll() = 0;
virtual std::string Version() = 0;
virtual bool NewVersion(pkgCache::VerIterator &Ver) = 0;
- virtual std::string Description(std::string const &lang) = 0;
virtual std::vector<std::string> AvailableDescriptionLanguages() = 0;
virtual MD5SumValue Description_md5() = 0;
virtual unsigned short VersionHash() = 0;