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