e67a4284c0
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>
50 lines
982 B
C++
50 lines
982 B
C++
/*
|
|
* Copyright 2014 Haiku Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _B_GOPHER_REQUEST_H_
|
|
#define _B_GOPHER_REQUEST_H_
|
|
|
|
|
|
#include <deque>
|
|
|
|
#include <NetworkRequest.h>
|
|
#include <UrlProtocolRoster.h>
|
|
|
|
|
|
class BGopherRequest : public BNetworkRequest {
|
|
public:
|
|
virtual ~BGopherRequest();
|
|
|
|
status_t Stop();
|
|
const BUrlResult& Result() const;
|
|
void SetDisableListener(bool disable);
|
|
|
|
private:
|
|
friend class BUrlProtocolRoster;
|
|
|
|
BGopherRequest(const BUrl& url,
|
|
BUrlProtocolListener* listener = NULL,
|
|
BUrlContext* context = NULL);
|
|
|
|
status_t _ProtocolLoop();
|
|
void _SendRequest();
|
|
|
|
bool _NeedsParsing();
|
|
bool _NeedsLastDotStrip();
|
|
void _ParseInput(bool last);
|
|
|
|
BString& _HTMLEscapeString(BString &str);
|
|
|
|
private:
|
|
char fItemType;
|
|
BString fPath;
|
|
|
|
ssize_t fPosition;
|
|
|
|
BUrlResult fResult;
|
|
};
|
|
|
|
|
|
#endif // _B_GOPHER_REQUEST_H_
|