1 /* 2 * Copyright 2009,2011, Haiku, Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _PACKAGE__HPKG__V1__PACKAGE_ENTRY_ATTRIBUTE_H_ 6 #define _PACKAGE__HPKG__V1__PACKAGE_ENTRY_ATTRIBUTE_H_ 7 8 9 #include <package/hpkg/v1/PackageData.h> 10 11 12 namespace BPackageKit { 13 14 namespace BHPKG { 15 16 namespace V1 { 17 18 19 class BPackageEntryAttribute { 20 public: 21 BPackageEntryAttribute(const char* name); 22 23 const char* Name() const { return fName; } 24 uint32 Type() const { return fType; } 25 26 BPackageData& Data() { return fData; } 27 28 void SetType(uint32 type) { fType = type; } 29 30 private: 31 const char* fName; 32 uint32 fType; 33 BPackageData fData; 34 }; 35 36 37 } // namespace V1 38 39 } // namespace BHPKG 40 41 } // namespace BPackageKit 42 43 44 #endif // _PACKAGE__HPKG__V1__PACKAGE_ENTRY_ATTRIBUTE_H_ 45