Add url and sourceURL properties to BPackageInfo

Also extend the parser to accept "url" and "source-url" attributes.
This commit is contained in:
Ingo Weinhold
2011-11-25 06:18:34 +01:00
parent 1338e7b6ae
commit eb7e89518a
3 changed files with 94 additions and 0 deletions
+10
View File
@@ -65,6 +65,8 @@ public:
const BObjectList<BString>& CopyrightList() const;
const BObjectList<BString>& LicenseList() const;
const BObjectList<BString>& URLList() const;
const BObjectList<BString>& SourceURLList() const;
const BObjectList<BPackageResolvable>& ProvidesList() const;
const BObjectList<BPackageResolvableExpression>&
@@ -97,6 +99,12 @@ public:
void ClearLicenseList();
status_t AddLicense(const BString& license);
void ClearURLList();
status_t AddURL(const BString& url);
void ClearSourceURLList();
status_t AddSourceURL(const BString& url);
void ClearProvidesList();
status_t AddProvides(const BPackageResolvable& provides);
@@ -146,6 +154,8 @@ private:
BObjectList<BString> fCopyrightList;
BObjectList<BString> fLicenseList;
BObjectList<BString> fURLList;
BObjectList<BString> fSourceURLList;
BObjectList<BPackageResolvable> fProvidesList;
@@ -34,6 +34,8 @@ enum BPackageInfoAttributeID {
B_PACKAGE_INFO_REPLACES, // list of resolvables that this package
// will replace (upon update)
B_PACKAGE_INFO_FLAGS,
B_PACKAGE_INFO_URLS, // list
B_PACKAGE_INFO_SOURCE_URLS, // list
B_PACKAGE_INFO_CHECKSUM, // sha256-checksum
//
B_PACKAGE_INFO_ENUM_COUNT,