2011-01-24 23:48:03 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2011, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2011-01-25 20:07:27 +03:00
|
|
|
#ifndef _PACKAGE__REFRESH_REPOSITORY_REQUEST_H_
|
|
|
|
#define _PACKAGE__REFRESH_REPOSITORY_REQUEST_H_
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
|
|
|
|
#include <Entry.h>
|
|
|
|
#include <String.h>
|
|
|
|
|
|
|
|
#include <package/Context.h>
|
|
|
|
#include <package/RepositoryConfig.h>
|
|
|
|
#include <package/Request.h>
|
|
|
|
|
|
|
|
|
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
|
|
|
namespace BPrivate {
|
2011-01-24 23:48:03 +03:00
|
|
|
class ValidateChecksumJob;
|
|
|
|
}
|
2011-01-25 20:07:27 +03:00
|
|
|
using BPrivate::ValidateChecksumJob;
|
|
|
|
|
2011-01-24 23:48:03 +03:00
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
class BRefreshRepositoryRequest : public BRequest {
|
|
|
|
typedef BRequest inherited;
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
public:
|
2011-01-25 20:07:27 +03:00
|
|
|
BRefreshRepositoryRequest(
|
|
|
|
const BContext& context,
|
|
|
|
const BRepositoryConfig& repoConfig);
|
|
|
|
virtual ~BRefreshRepositoryRequest();
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
virtual status_t CreateInitialJobs();
|
|
|
|
|
|
|
|
protected:
|
2011-01-25 20:07:27 +03:00
|
|
|
// BJobStateListener
|
|
|
|
virtual void JobSucceeded(BJob* job);
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
status_t _FetchRepositoryCache();
|
|
|
|
|
|
|
|
BEntry fFetchedChecksumFile;
|
2011-01-25 20:07:27 +03:00
|
|
|
BRepositoryConfig fRepoConfig;
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
ValidateChecksumJob* fValidateChecksumJob;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
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__REFRESH_REPOSITORY_REQUEST_H_
|