summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgrecords.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2013-08-18 22:20:25 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-05-09 13:06:27 +0200
commitffe3c68e494efc1c2c4d748fa9d69e150867e5c2 (patch)
treee4d4ecab9da79cdf4bd75ac2b8c7b2e7cc599bbc /apt-pkg/pkgrecords.h
parent895417ef99bb1371d8970da1afe87c6d64382f67 (diff)
parse and retrieve multiple Descriptions in one record
It seems unlikely for now that proper archives will carry multiple Description-* stanzas in the Packages (or Translation-*) file, but sometimes apt eats its own output as shown by the usage of the CD team and it would be interesting to let apt output multiple translations e.g. in 'apt-cache show'.
Diffstat (limited to 'apt-pkg/pkgrecords.h')
-rw-r--r--apt-pkg/pkgrecords.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h
index b0b449ae1..a902da8b8 100644
--- a/apt-pkg/pkgrecords.h
+++ b/apt-pkg/pkgrecords.h
@@ -75,8 +75,22 @@ class pkgRecords::Parser /*{{{*/
// These are some general stats about the package
virtual std::string Maintainer() {return std::string();};
- virtual std::string ShortDesc() {return std::string();};
- virtual std::string LongDesc() {return std::string();};
+ /** return short description in language from record.
+ *
+ * @see #LongDesc
+ */
+ virtual std::string ShortDesc(std::string const &/*lang*/) {return std::string();};
+ /** return long description in language from record.
+ *
+ * If \b lang is empty the "best" available language will be
+ * returned as determined by the APT::Languages configuration.
+ * If a (requested) language can't be found in this record an empty
+ * string will be returned.
+ */
+ virtual std::string LongDesc(std::string const &/*lang*/) {return std::string();};
+ std::string ShortDesc() {return ShortDesc("");};
+ std::string LongDesc() {return LongDesc("");};
+
virtual std::string Name() {return std::string();};
virtual std::string Homepage() {return std::string();}