1 /* 2 * Copyright 2011, Haiku, Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _PACKAGE__REPOSITORY_CACHE_H_ 6 #define _PACKAGE__REPOSITORY_CACHE_H_ 7 8 9 #include <Entry.h> 10 #include <String.h> 11 12 #include <package/RepositoryInfo.h> 13 14 15 namespace BPackageKit { 16 17 18 class BRepositoryCache { 19 public: 20 BRepositoryCache(); 21 BRepositoryCache(const BEntry& entry); 22 virtual ~BRepositoryCache(); 23 24 status_t SetTo(const BEntry& entry); 25 status_t InitCheck() const; 26 27 const BRepositoryInfo& Info() const; 28 const BEntry& Entry() const; 29 bool IsUserSpecific() const; 30 31 void SetIsUserSpecific(bool isUserSpecific); 32 33 uint32 PackageCount() const; 34 35 private: 36 struct PackageMap; 37 38 private: 39 status_t fInitStatus; 40 41 BEntry fEntry; 42 BRepositoryInfo fInfo; 43 bool fIsUserSpecific; 44 45 PackageMap* fPackageMap; 46 }; 47 48 49 } // namespace BPackageKit 50 51 52 #endif // _PACKAGE__REPOSITORY_CACHE_H_ 53