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 17 namespace BPackageKit { 18 19 20 namespace BPrivate { 21 class ValidateChecksumJob; 22 } 23 using BPrivate::ValidateChecksumJob; 24 25 26 class BRefreshRepositoryRequest : public BRequest { 27 typedef BRequest inherited; 28 29 public: 30 BRefreshRepositoryRequest( 31 const BContext& context, 32 const BRepositoryConfig& repoConfig); 33 virtual ~BRefreshRepositoryRequest(); 34 35 virtual status_t CreateInitialJobs(); 36 37 protected: 38 // BJobStateListener 39 virtual void JobSucceeded(BSupportKit::BJob* job); 40 41 private: 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