mirror of
https://review.haiku-os.org/haiku
synced 2025-01-27 00:34:50 +01:00
500bb6305c
(console-)tool git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40261 a95241bf-73f2-0310-859d-f6bbb57e9c96
56 lines
1.0 KiB
C++
56 lines
1.0 KiB
C++
/*
|
|
* Copyright 2011, Haiku, Inc.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _HAIKU__PACKAGE__ROSTER_H_
|
|
#define _HAIKU__PACKAGE__ROSTER_H_
|
|
|
|
|
|
#include <Entry.h>
|
|
#include <Path.h>
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
namespace Haiku {
|
|
|
|
namespace Package {
|
|
|
|
|
|
struct RepositoryConfigVisitor {
|
|
virtual ~RepositoryConfigVisitor()
|
|
{
|
|
}
|
|
|
|
virtual status_t operator()(const BEntry& entry) = 0;
|
|
};
|
|
|
|
|
|
class Roster {
|
|
public:
|
|
Roster();
|
|
~Roster();
|
|
|
|
status_t GetCommonRepositoryConfigPath(BPath* path,
|
|
bool create = false) const;
|
|
status_t GetUserRepositoryConfigPath(BPath* path,
|
|
bool create = false) const;
|
|
|
|
status_t VisitCommonRepositoryConfigs(
|
|
RepositoryConfigVisitor& visitor);
|
|
status_t VisitUserRepositoryConfigs(
|
|
RepositoryConfigVisitor& visitor);
|
|
|
|
private:
|
|
status_t _VisitRepositoryConfigs(const BPath& path,
|
|
RepositoryConfigVisitor& visitor);
|
|
|
|
};
|
|
|
|
|
|
} // namespace Package
|
|
|
|
} // namespace Haiku
|
|
|
|
|
|
#endif // _HAIKU__PACKAGE__ROSTER_H_
|