1/* 2 * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef PACKAGE_NODE_ATTRIBUTE_H 6#define PACKAGE_NODE_ATTRIBUTE_H 7 8 9#include <util/DoublyLinkedList.h> 10 11#include <package/hpkg/PackageData.h> 12 13 14using BPackageKit::BHPKG::BPackageData; 15 16class PackageNode; 17 18 19class PackageNodeAttribute 20 : public DoublyLinkedListLinkImpl<PackageNodeAttribute> { 21public: 22 PackageNodeAttribute(uint32 type, 23 const BPackageData& data); 24 ~PackageNodeAttribute(); 25 26 const char* Name() const { return fName; } 27 uint32 Type() const { return fType; } 28 const BPackageData& Data() const { return fData; } 29 30 status_t Init(const char* name); 31 32 void SetIndexCookie(void* cookie) 33 { fIndexCookie = cookie; } 34 void* IndexCookie() const 35 { return fIndexCookie; } 36 37protected: 38 BPackageData fData; 39 char* fName; 40 void* fIndexCookie; 41 uint32 fType; 42}; 43 44 45typedef DoublyLinkedList<PackageNodeAttribute> PackageNodeAttributeList; 46 47 48#endif // PACKAGE_NODE_ATTRIBUTE_H 49