haiku/headers/os/net/FileRequest.h
Leorize e67a4284c0 libbnetapi: Disallow instantiation of BUrlRequest subclasses directly
This API change forces all creation of BUrlRequest to be done via
BUrlProtocolRoster::MakeRequest(). This allows the structure of protocol
addons to be altered without breaking ABI for client applications.

Change-Id: I1785c9136c50d19eaa9e57cb9d259ed8d88a5b56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3080
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-12 06:36:00 +00:00

37 lines
677 B
C++

/*
* 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>
#include <UrlProtocolRoster.h>
class BFileRequest : public BUrlRequest {
public:
virtual ~BFileRequest();
const BUrlResult& Result() const;
void SetDisableListener(bool disable);
private:
friend class BUrlProtocolRoster;
BFileRequest(const BUrl& url,
BUrlProtocolListener* listener = NULL,
BUrlContext* context = NULL);
status_t _ProtocolLoop();
private:
BUrlResult fResult;
};
#endif // _B_FILE_REQUEST_H_