1 /* 2 * Copyright 2011, Haiku, Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _PACKAGE__HPKG__REPOSITORY_CONTENT_HANDLER_H_ 6 #define _PACKAGE__HPKG__REPOSITORY_CONTENT_HANDLER_H_ 7 8 9 #include <SupportDefs.h> 10 11 #include <package/hpkg/HPKGDefs.h> 12 13 14 namespace BPackageKit { 15 16 17 class BRepositoryInfo; 18 19 20 namespace BHPKG { 21 22 23 struct BPackageInfoAttributeValue; 24 25 26 class BRepositoryContentHandler { 27 public: 28 virtual ~BRepositoryContentHandler(); 29 30 virtual status_t HandleRepositoryInfo( 31 const BRepositoryInfo& info) = 0; 32 33 virtual status_t HandlePackage(const char* packageName) = 0; 34 virtual status_t HandlePackageAttribute( 35 const BPackageInfoAttributeValue& value) 36 = 0; 37 virtual status_t HandlePackageDone(const char* packageName) = 0; 38 39 virtual void HandleErrorOccurred() = 0; 40 41 }; 42 43 44 } // namespace BHPKG 45 46 } // namespace BPackageKit 47 48 49 #endif // _PACKAGE__HPKG__REPOSITORY_CONTENT_HANDLER_H_ 50