xref: /haiku/headers/os/package/RefreshRepositoryRequest.h (revision e711e6e42fd7ec3111ba9dc2324fa8efedd6674b)
135edda8fSOliver Tappe /*
2*e711e6e4SAxel Dörfler  * Copyright 2011-2015, Haiku, Inc.
335edda8fSOliver Tappe  * Distributed under the terms of the MIT License.
435edda8fSOliver Tappe  */
57d7ed9bfSOliver Tappe #ifndef _PACKAGE__REFRESH_REPOSITORY_REQUEST_H_
67d7ed9bfSOliver Tappe #define _PACKAGE__REFRESH_REPOSITORY_REQUEST_H_
735edda8fSOliver Tappe 
835edda8fSOliver Tappe 
935edda8fSOliver Tappe #include <Entry.h>
1035edda8fSOliver Tappe #include <String.h>
1135edda8fSOliver Tappe 
1235edda8fSOliver Tappe #include <package/Context.h>
1335edda8fSOliver Tappe #include <package/RepositoryConfig.h>
1435edda8fSOliver Tappe #include <package/Request.h>
1535edda8fSOliver Tappe 
1635edda8fSOliver Tappe 
177d7ed9bfSOliver Tappe namespace BPackageKit {
1835edda8fSOliver Tappe 
1935edda8fSOliver Tappe 
207d7ed9bfSOliver Tappe namespace BPrivate {
2135edda8fSOliver Tappe 	class ValidateChecksumJob;
2235edda8fSOliver Tappe }
237d7ed9bfSOliver Tappe using BPrivate::ValidateChecksumJob;
2435edda8fSOliver Tappe 
257d7ed9bfSOliver Tappe 
267d7ed9bfSOliver Tappe class BRefreshRepositoryRequest : public BRequest {
277d7ed9bfSOliver Tappe 	typedef	BRequest				inherited;
2835edda8fSOliver Tappe 
2935edda8fSOliver Tappe public:
307d7ed9bfSOliver Tappe 								BRefreshRepositoryRequest(
317d7ed9bfSOliver Tappe 									const BContext& context,
327d7ed9bfSOliver Tappe 									const BRepositoryConfig& repoConfig);
337d7ed9bfSOliver Tappe 	virtual						~BRefreshRepositoryRequest();
3435edda8fSOliver Tappe 
3535edda8fSOliver Tappe 	virtual	status_t			CreateInitialJobs();
3635edda8fSOliver Tappe 
3735edda8fSOliver Tappe protected:
387d7ed9bfSOliver Tappe 								// BJobStateListener
39*e711e6e4SAxel Dörfler 	virtual	void				JobSucceeded(BSupportKit::BJob* job);
4035edda8fSOliver Tappe 
4135edda8fSOliver Tappe private:
4235edda8fSOliver Tappe 			status_t			_FetchRepositoryCache();
4335edda8fSOliver Tappe 
4435edda8fSOliver Tappe 			BEntry				fFetchedChecksumFile;
457d7ed9bfSOliver Tappe 			BRepositoryConfig	fRepoConfig;
4635edda8fSOliver Tappe 
4735edda8fSOliver Tappe 			ValidateChecksumJob*	fValidateChecksumJob;
4835edda8fSOliver Tappe };
4935edda8fSOliver Tappe 
5035edda8fSOliver Tappe 
517d7ed9bfSOliver Tappe }	// namespace BPackageKit
5235edda8fSOliver Tappe 
5335edda8fSOliver Tappe 
547d7ed9bfSOliver Tappe #endif // _PACKAGE__REFRESH_REPOSITORY_REQUEST_H_
55