mirror of
https://review.haiku-os.org/haiku
synced 2025-01-24 15:24:50 +01:00
479ca8169c
Not functional (or tested) yet. The libsolv setup for a somewhat simplified installation case should be more or less complete, though. The solution conversion to to-be-created Haiku data structures and the handling of problems is still missing, though.
70 lines
1.5 KiB
C++
70 lines
1.5 KiB
C++
/*
|
|
* Copyright 2013, Haiku, Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _PACKAGE__SOLVER_REPOSITORY_H_
|
|
#define _PACKAGE__SOLVER_REPOSITORY_H_
|
|
|
|
|
|
#include <package/PackageDefs.h>
|
|
#include <package/PackageInfoSet.h>
|
|
#include <String.h>
|
|
|
|
|
|
namespace BPackageKit {
|
|
|
|
|
|
class BPackageInfo;
|
|
class BRepositoryConfig;
|
|
|
|
|
|
class BSolverRepository {
|
|
public:
|
|
enum BAllInstallationLocations {
|
|
B_ALL_INSTALLATION_LOCATIONS
|
|
};
|
|
|
|
typedef BPackageInfoSet::Iterator Iterator;
|
|
|
|
public:
|
|
BSolverRepository();
|
|
BSolverRepository(const BString& name);
|
|
BSolverRepository(
|
|
BPackageInstallationLocation location);
|
|
BSolverRepository(BAllInstallationLocations);
|
|
BSolverRepository(
|
|
const BRepositoryConfig& config);
|
|
~BSolverRepository();
|
|
|
|
status_t SetTo(const BString& name);
|
|
status_t SetTo(BPackageInstallationLocation location);
|
|
status_t SetTo(BAllInstallationLocations);
|
|
status_t SetTo(const BRepositoryConfig& config);
|
|
void Unset();
|
|
|
|
status_t InitCheck();
|
|
|
|
bool IsInstalled() const;
|
|
|
|
BString Name() const;
|
|
uint8 Priority() const;
|
|
|
|
status_t AddPackage(const BPackageInfo& info);
|
|
status_t AddPackages(
|
|
BPackageInstallationLocation location);
|
|
|
|
Iterator GetIterator() const;
|
|
|
|
private:
|
|
BString fName;
|
|
uint8 fPriority;
|
|
bool fIsInstalled;
|
|
BPackageInfoSet fPackages;
|
|
};
|
|
|
|
|
|
} // namespace BPackageKit
|
|
|
|
|
|
#endif // _PACKAGE__SOLVER_REPOSITORY_H_
|