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