xref: /haiku/headers/private/netservices/FileRequest.h (revision 70b63f18b32a7ae90e4ff49659ba3844ce4c9aa5)
1603e0bdfSNiels Sascha Reedijk /*
2603e0bdfSNiels Sascha Reedijk  * Copyright 2013 Haiku Inc. All rights reserved.
3603e0bdfSNiels Sascha Reedijk  * Distributed under the terms of the MIT License.
4603e0bdfSNiels Sascha Reedijk  */
5603e0bdfSNiels Sascha Reedijk #ifndef _B_FILE_REQUEST_H_
6603e0bdfSNiels Sascha Reedijk #define _B_FILE_REQUEST_H_
7603e0bdfSNiels Sascha Reedijk 
8603e0bdfSNiels Sascha Reedijk 
9603e0bdfSNiels Sascha Reedijk #include <deque>
10603e0bdfSNiels Sascha Reedijk 
11603e0bdfSNiels Sascha Reedijk 
12603e0bdfSNiels Sascha Reedijk #include <UrlRequest.h>
13603e0bdfSNiels Sascha Reedijk #include <UrlProtocolRoster.h>
14603e0bdfSNiels Sascha Reedijk 
15603e0bdfSNiels Sascha Reedijk 
16ce64ffdbSNiels Sascha Reedijk namespace BPrivate {
17ce64ffdbSNiels Sascha Reedijk 
18ce64ffdbSNiels Sascha Reedijk namespace Network {
19*70b63f18SNiels Sascha Reedijk 
20ce64ffdbSNiels Sascha Reedijk 
21603e0bdfSNiels Sascha Reedijk class BFileRequest : public BUrlRequest {
22603e0bdfSNiels Sascha Reedijk public:
23603e0bdfSNiels Sascha Reedijk 	virtual						~BFileRequest();
24603e0bdfSNiels Sascha Reedijk 
25603e0bdfSNiels Sascha Reedijk 	const 	BUrlResult&			Result() const;
26603e0bdfSNiels Sascha Reedijk 			void				SetDisableListener(bool disable);
27603e0bdfSNiels Sascha Reedijk 
28603e0bdfSNiels Sascha Reedijk private:
29603e0bdfSNiels Sascha Reedijk 			friend class BUrlProtocolRoster;
30603e0bdfSNiels Sascha Reedijk 
3178b14420SLeorize 								BFileRequest(const BUrl& url,
3278b14420SLeorize 									BDataIO* output,
3378b14420SLeorize 									BUrlProtocolListener* listener = NULL,
3478b14420SLeorize 									BUrlContext* context = NULL);
35603e0bdfSNiels Sascha Reedijk 
36603e0bdfSNiels Sascha Reedijk 			status_t			_ProtocolLoop();
37603e0bdfSNiels Sascha Reedijk private:
38603e0bdfSNiels Sascha Reedijk 			BUrlResult			fResult;
39603e0bdfSNiels Sascha Reedijk };
40603e0bdfSNiels Sascha Reedijk 
41*70b63f18SNiels Sascha Reedijk 
42ce64ffdbSNiels Sascha Reedijk } // namespace Network
43ce64ffdbSNiels Sascha Reedijk 
44ce64ffdbSNiels Sascha Reedijk } // namespace BPrivate
45603e0bdfSNiels Sascha Reedijk 
46603e0bdfSNiels Sascha Reedijk #endif // _B_FILE_REQUEST_H_
47