2013-10-24 17:31:25 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2013 Haiku Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _B_FILE_REQUEST_H_
|
|
|
|
#define _B_FILE_REQUEST_H_
|
|
|
|
|
|
|
|
|
|
|
|
#include <deque>
|
|
|
|
|
|
|
|
|
|
|
|
#include <UrlRequest.h>
|
2020-07-16 16:58:46 -05:00
|
|
|
#include <UrlProtocolRoster.h>
|
2013-10-24 17:31:25 +02:00
|
|
|
|
|
|
|
|
2021-01-22 14:20:19 +00:00
|
|
|
namespace BPrivate {
|
|
|
|
|
|
|
|
namespace Network {
|
2021-09-11 08:09:44 +01:00
|
|
|
|
2021-01-22 14:20:19 +00:00
|
|
|
|
2013-10-24 17:31:25 +02:00
|
|
|
class BFileRequest : public BUrlRequest {
|
|
|
|
public:
|
|
|
|
virtual ~BFileRequest();
|
|
|
|
|
2013-12-09 20:26:13 +01:00
|
|
|
const BUrlResult& Result() const;
|
2020-07-16 16:58:46 -05:00
|
|
|
void SetDisableListener(bool disable);
|
2013-10-24 17:31:25 +02:00
|
|
|
|
|
|
|
private:
|
2020-07-16 16:58:46 -05:00
|
|
|
friend class BUrlProtocolRoster;
|
|
|
|
|
2020-07-24 23:45:42 -05:00
|
|
|
BFileRequest(const BUrl& url,
|
|
|
|
BDataIO* output,
|
|
|
|
BUrlProtocolListener* listener = NULL,
|
|
|
|
BUrlContext* context = NULL);
|
2020-07-16 16:58:46 -05:00
|
|
|
|
2013-10-24 17:31:25 +02:00
|
|
|
status_t _ProtocolLoop();
|
2013-12-09 20:26:13 +01:00
|
|
|
private:
|
|
|
|
BUrlResult fResult;
|
2013-10-24 17:31:25 +02:00
|
|
|
};
|
|
|
|
|
2021-09-11 08:09:44 +01:00
|
|
|
|
2021-01-22 14:20:19 +00:00
|
|
|
} // namespace Network
|
|
|
|
|
|
|
|
} // namespace BPrivate
|
2013-10-24 17:31:25 +02:00
|
|
|
|
|
|
|
#endif // _B_FILE_REQUEST_H_
|