BPackageManager: Eliminate RequestHandler.

- Pull functionality back into package manager itself since the extra
  indirection doesn't really buy us anything in this case, as neither
  request that it handles requires a decision provider.
- Adjust pkgman and HaikuDepot accordingly.
This commit is contained in:
Rene Gollent
2013-09-29 17:25:32 -04:00
parent 672795a37e
commit fe39d2eb8d
6 changed files with 47 additions and 70 deletions
@@ -41,7 +41,6 @@ public:
class InstallationInterface;
class ClientInstallationInterface;
class UserInteractionHandler;
class RequestHandler;
typedef BObjectList<RemoteRepository> RemoteRepositoryList;
typedef BObjectList<InstalledRepository> InstalledRepositoryList;
@@ -56,8 +55,9 @@ public:
public:
BPackageManager(
BPackageInstallationLocation location);
~BPackageManager();
BPackageInstallationLocation location,
BJobStateListener* listener);
virtual ~BPackageManager();
void Init(uint32 flags);
@@ -90,6 +90,13 @@ public:
void VerifyInstallation();
virtual status_t DownloadPackage(const BString& fileURL,
const BEntry& targetEntry,
const BString& checksum);
virtual status_t RefreshRepository(
const BRepositoryConfig& repoConfig);
protected:
InstalledRepository& InstallationRepository();
@@ -133,8 +140,8 @@ protected:
// must be set by the derived class
InstallationInterface* fInstallationInterface;
RequestHandler* fRequestHandler;
UserInteractionHandler* fUserInteractionHandler;
BJobStateListener* fJobStateListener;
};
@@ -243,18 +250,6 @@ private:
};
class BPackageManager::RequestHandler {
public:
virtual ~RequestHandler();
virtual status_t RefreshRepository(
const BRepositoryConfig& repoConfig) = 0;
virtual status_t DownloadPackage(const BString& fileURL,
const BEntry& targetEntry,
const BString& checksum) = 0;
};
class BPackageManager::UserInteractionHandler {
public:
virtual ~UserInteractionHandler();