Flesh out the package kit solver API quite a bit more
* Reorganize things a bit:
- BSolver is now an abstract base class.
- A libsolv based implementation, LibsolvSolver, lives in a new
add-on, which is loaded lazily.
- Get rid of libpackage_solver. Save for LibsolvSolver everything
is moved to libpackage.
- This is a nicer solution for the cyclic dependency caused by
libsolv (libsolvext to be precise) using the package kit for
reading repositories and package files.
* Add a solver result data structure and and an accessor the solver.
* Add problem reporting support to the solver. There aren't data
structures for the problem solutions yet and support for selecting
solutions and re-solving is missing as well.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#define _PACKAGE__SOLVER_REPOSITORY_H_
|
||||
|
||||
|
||||
#include <ObjectList.h>
|
||||
#include <package/PackageDefs.h>
|
||||
#include <package/PackageInfoSet.h>
|
||||
#include <String.h>
|
||||
@@ -16,6 +17,7 @@ namespace BPackageKit {
|
||||
|
||||
class BPackageInfo;
|
||||
class BRepositoryConfig;
|
||||
class BSolverPackage;
|
||||
|
||||
|
||||
class BSolverRepository {
|
||||
@@ -45,21 +47,27 @@ public:
|
||||
status_t InitCheck();
|
||||
|
||||
bool IsInstalled() const;
|
||||
void SetInstalled(bool isInstalled);
|
||||
|
||||
BString Name() const;
|
||||
uint8 Priority() const;
|
||||
|
||||
bool IsEmpty() const;
|
||||
int32 CountPackages() const;
|
||||
BSolverPackage* PackageAt(int32 index) const;
|
||||
|
||||
status_t AddPackage(const BPackageInfo& info);
|
||||
status_t AddPackages(
|
||||
BPackageInstallationLocation location);
|
||||
|
||||
Iterator GetIterator() const;
|
||||
private:
|
||||
typedef BObjectList<BSolverPackage> PackageList;
|
||||
|
||||
private:
|
||||
BString fName;
|
||||
uint8 fPriority;
|
||||
bool fIsInstalled;
|
||||
BPackageInfoSet fPackages;
|
||||
PackageList fPackages;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user