1/* 2 * Copyright 2011-2015, Haiku, Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef _PACKAGE__REFRESH_REPOSITORY_REQUEST_H_ 6#define _PACKAGE__REFRESH_REPOSITORY_REQUEST_H_ 7 8 9#include <Entry.h> 10#include <String.h> 11 12#include <package/Context.h> 13#include <package/RepositoryConfig.h> 14#include <package/Request.h> 15 16 17namespace BPackageKit { 18 19 20namespace BPrivate { 21 class ValidateChecksumJob; 22} 23using BPrivate::ValidateChecksumJob; 24 25 26class BRefreshRepositoryRequest : public BRequest { 27 typedef BRequest inherited; 28 29public: 30 BRefreshRepositoryRequest( 31 const BContext& context, 32 const BRepositoryConfig& repoConfig); 33 virtual ~BRefreshRepositoryRequest(); 34 35 virtual status_t CreateInitialJobs(); 36 37protected: 38 // BJobStateListener 39 virtual void JobSucceeded(BSupportKit::BJob* job); 40 41private: 42 status_t _FetchRepositoryCache(); 43 44 BEntry fFetchedChecksumFile; 45 BRepositoryConfig fRepoConfig; 46 47 ValidateChecksumJob* fValidateChecksumJob; 48}; 49 50 51} // namespace BPackageKit 52 53 54#endif // _PACKAGE__REFRESH_REPOSITORY_REQUEST_H_ 55