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/PackageInfoSet.h> 13#include <package/RepositoryInfo.h> 14 15 16namespace BPackageKit { 17 18 19class BRepositoryCache { 20public: 21 typedef BPackageInfoSet::Iterator Iterator; 22 23public: 24 BRepositoryCache(); 25 virtual ~BRepositoryCache(); 26 27 status_t SetTo(const BEntry& entry); 28 29 const BRepositoryInfo& Info() const; 30 const BEntry& Entry() const; 31 bool IsUserSpecific() const; 32 33 void SetIsUserSpecific(bool isUserSpecific); 34 35 uint32 CountPackages() const; 36 Iterator GetIterator() const; 37 38private: 39 struct RepositoryContentHandler; 40 41private: 42 BEntry fEntry; 43 BRepositoryInfo fInfo; 44 bool fIsUserSpecific; 45 46 BPackageInfoSet fPackages; 47}; 48 49 50} // namespace BPackageKit 51 52 53#endif // _PACKAGE__REPOSITORY_CACHE_H_ 54