+// 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()
+{
+ srkString description;
+ Description(description);
+ return description;
+}
+
+void debListParser::Description(srkString &Str) {
+ const char *Start, *Stop;
+ if (!Section.Find("Description", Start, Stop))
+ if (!Section.Find(("Description-" + pkgIndexFile::LanguageCode()).c_str(), Start, Stop)) {
+ Start = NULL;
+ Stop = NULL;
+ }
+ Str.assign(Start, Stop);
+}
+ /*}}}*/
+// ListParser::DescriptionLanguage - Return the description lang string /*{{{*/
+// ---------------------------------------------------------------------
+/* This is to return the string describing the language of
+ description. If this returns the blank string then the entry is
+ assumed to describe original description. */
+string debListParser::DescriptionLanguage()
+{
+ const char *Start, *Stop;
+ return Section.Find("Description", Start, Stop) ? std::string() : pkgIndexFile::LanguageCode();
+}
+ /*}}}*/
+// ListParser::Description - Return the description_md5 MD5SumValue /*{{{*/
+// ---------------------------------------------------------------------
+/* This is to return the md5 string to allow the check if it is the right
+ description. If no Description-md5 is found in the section it will be
+ calculated.
+ */
+MD5SumValue debListParser::Description_md5()
+{
+ const char *Start;
+ const char *Stop;
+ if (!Section.Find("Description-md5", Start, Stop))
+ {
+ MD5Summation md5;
+ srkString description;
+ Description(description);
+ md5.Add((const unsigned char *) description.Start, description.Size);
+ md5.Add("\n");
+ return md5.Result();
+ } else
+ return MD5SumValue(srkString(Start, Stop));
+}
+ /*}}}*/