xref: /haiku/headers/os/package/AddRepositoryRequest.h (revision 97dfeb96704e5dbc5bec32ad7b21379d0125e031)
1 /*
2  * Copyright 2011-2015, Haiku, Inc.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _PACKAGE__ADD_REPOSITORY_REQUEST_H_
6 #define _PACKAGE__ADD_REPOSITORY_REQUEST_H_
7 
8 
9 #include <String.h>
10 
11 #include <package/Context.h>
12 #include <package/Request.h>
13 
14 
15 namespace BPackageKit {
16 
17 
18 namespace BPrivate {
19 	class ActivateRepositoryConfigJob;
20 }
21 using BPrivate::ActivateRepositoryConfigJob;
22 
23 
24 class AddRepositoryRequest : public BRequest {
25 	typedef	BRequest				inherited;
26 
27 public:
28 								AddRepositoryRequest(const BContext& context,
29 									const BString& repositoryBaseURL,
30 									bool asUserRepository);
31 	virtual						~AddRepositoryRequest();
32 
33 	virtual	status_t			CreateInitialJobs();
34 
35 			const BString&		RepositoryName() const;
36 
37 protected:
38 								// BJobStateListener
39 	virtual	void				JobSucceeded(BSupportKit::BJob* job);
40 
41 private:
42 			BString				fRepositoryBaseURL;
43 			bool				fAsUserRepository;
44 
45 			ActivateRepositoryConfigJob*	fActivateJob;
46 
47 			BString				fRepositoryName;
48 };
49 
50 
51 }	// namespace BPackageKit
52 
53 
54 #endif // _PACKAGE__ADD_REPOSITORY_REQUEST_H_
55