2011-01-22 01:18:58 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2011, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2011-01-25 20:07:27 +03:00
|
|
|
#ifndef _PACKAGE__REPOSITORY_CACHE_H_
|
|
|
|
#define _PACKAGE__REPOSITORY_CACHE_H_
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
2011-01-24 23:48:03 +03:00
|
|
|
#include <Entry.h>
|
|
|
|
#include <String.h>
|
2011-01-22 01:18:58 +03:00
|
|
|
|
2011-02-09 22:11:23 +03:00
|
|
|
#include <package/RepositoryInfo.h>
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
namespace BPackageKit {
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
class BRepositoryCache {
|
2011-01-22 01:18:58 +03:00
|
|
|
public:
|
2011-01-25 20:07:27 +03:00
|
|
|
BRepositoryCache();
|
|
|
|
BRepositoryCache(const BEntry& entry);
|
|
|
|
virtual ~BRepositoryCache();
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
status_t SetTo(const BEntry& entry);
|
|
|
|
status_t InitCheck() const;
|
|
|
|
|
2011-02-09 22:11:23 +03:00
|
|
|
const BRepositoryInfo& Info() const;
|
2011-01-24 23:48:03 +03:00
|
|
|
const BEntry& Entry() const;
|
|
|
|
bool IsUserSpecific() const;
|
|
|
|
|
|
|
|
void SetIsUserSpecific(bool isUserSpecific);
|
|
|
|
|
2011-02-15 18:47:20 +03:00
|
|
|
uint32 PackageCount() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct PackageMap;
|
|
|
|
|
2011-01-24 23:48:03 +03:00
|
|
|
private:
|
|
|
|
status_t fInitStatus;
|
|
|
|
|
|
|
|
BEntry fEntry;
|
2011-02-09 22:11:23 +03:00
|
|
|
BRepositoryInfo fInfo;
|
2011-01-24 23:48:03 +03:00
|
|
|
bool fIsUserSpecific;
|
2011-02-15 18:47:20 +03:00
|
|
|
|
|
|
|
PackageMap* fPackageMap;
|
2011-01-22 01:18:58 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
} // namespace BPackageKit
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
#endif // _PACKAGE__REPOSITORY_CACHE_H_
|