2013-12-09 23:26:13 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2013 Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Adrien Destugues, pulkomandy@pulkomandy.tk
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _B_DATA_REQUEST_H_
|
|
|
|
#define _B_DATA_REQUEST_H_
|
|
|
|
|
|
|
|
|
2020-07-17 00:58:46 +03:00
|
|
|
#include <UrlProtocolRoster.h>
|
2013-12-09 23:26:13 +04:00
|
|
|
#include <UrlRequest.h>
|
|
|
|
|
|
|
|
|
2021-01-22 17:20:19 +03:00
|
|
|
#ifndef LIBNETAPI_DEPRECATED
|
|
|
|
namespace BPrivate {
|
|
|
|
|
|
|
|
namespace Network {
|
|
|
|
#endif
|
|
|
|
|
2013-12-09 23:26:13 +04:00
|
|
|
class BDataRequest: public BUrlRequest {
|
|
|
|
public:
|
2020-07-17 00:58:46 +03:00
|
|
|
const BUrlResult& Result() const;
|
|
|
|
private:
|
|
|
|
friend class BUrlProtocolRoster;
|
|
|
|
|
2020-07-25 07:45:42 +03:00
|
|
|
#ifdef LIBNETAPI_DEPRECATED
|
2013-12-09 23:26:13 +04:00
|
|
|
BDataRequest(const BUrl& url,
|
|
|
|
BUrlProtocolListener* listener = NULL,
|
|
|
|
BUrlContext* context = NULL);
|
2020-07-25 07:45:42 +03:00
|
|
|
#else
|
|
|
|
BDataRequest(const BUrl& url,
|
|
|
|
BDataIO* output,
|
|
|
|
BUrlProtocolListener* listener = NULL,
|
|
|
|
BUrlContext* context = NULL);
|
|
|
|
#endif
|
2020-07-17 00:58:46 +03:00
|
|
|
status_t _ProtocolLoop();
|
2013-12-09 23:26:13 +04:00
|
|
|
private:
|
|
|
|
BUrlResult fResult;
|
|
|
|
};
|
|
|
|
|
2021-01-22 17:20:19 +03:00
|
|
|
#ifndef LIBNETAPI_DEPRECATED
|
|
|
|
} // namespace Network
|
|
|
|
|
|
|
|
} // namespace BPrivate
|
|
|
|
#endif
|
|
|
|
|
2013-12-09 23:26:13 +04:00
|
|
|
#endif
|