1 /* 2 * Copyright 2011, Haiku, Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _PACKAGE__HPKG__V1__PACKAGE_INFO_CONTENT_HANDLER_H_ 6 #define _PACKAGE__HPKG__V1__PACKAGE_INFO_CONTENT_HANDLER_H_ 7 8 9 #include <package/hpkg/v1/PackageContentHandler.h> 10 11 12 namespace BPackageKit { 13 14 15 class BPackageInfo; 16 17 18 namespace BHPKG { 19 20 21 class BErrorOutput; 22 23 24 namespace V1 { 25 26 27 class BPackageInfoContentHandler : public BPackageContentHandler { 28 public: 29 BPackageInfoContentHandler( 30 BPackageInfo& packageInfo, 31 BHPKG::BErrorOutput* errorOutput = NULL); 32 virtual ~BPackageInfoContentHandler(); 33 34 virtual status_t HandleEntry(BPackageEntry* entry); 35 virtual status_t HandleEntryAttribute(BPackageEntry* entry, 36 BPackageEntryAttribute* attribute); 37 virtual status_t HandleEntryDone(BPackageEntry* entry); 38 39 virtual status_t HandlePackageAttribute( 40 const BHPKG::BPackageInfoAttributeValue& 41 value); 42 43 virtual void HandleErrorOccurred(); 44 45 protected: 46 BPackageInfo& fPackageInfo; 47 BHPKG::BErrorOutput* fErrorOutput; 48 }; 49 50 51 } // namespace V1 52 53 } // namespace BHPKG 54 55 } // namespace BPackageKit 56 57 58 #endif // _PACKAGE__HPKG__V1__PACKAGE_INFO_CONTENT_HANDLER_H_ 59