BPackageInfo: Add ArchitectureName()
This commit is contained in:
@@ -77,6 +77,8 @@ public:
|
||||
uint32 Flags() const;
|
||||
|
||||
BPackageArchitecture Architecture() const;
|
||||
const char* ArchitectureName() const;
|
||||
// NULL, if invalid
|
||||
|
||||
const BPackageVersion& Version() const;
|
||||
|
||||
|
||||
@@ -470,6 +470,17 @@ BPackageInfo::Architecture() const
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
BPackageInfo::ArchitectureName() const
|
||||
{
|
||||
if ((int)fArchitecture < 0
|
||||
|| fArchitecture >= B_PACKAGE_ARCHITECTURE_ENUM_COUNT) {
|
||||
return NULL;
|
||||
}
|
||||
return kArchitectureNames[fArchitecture];
|
||||
}
|
||||
|
||||
|
||||
const BPackageVersion&
|
||||
BPackageInfo::Version() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user