603e0bdf62
These classes have been moved to the public API too soon, and they need some more time to mature before they can be declared stable. Change-Id: I9c52a8e6cc103922abde7a6b911fe0c3e6bf5700 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3665 Reviewed-by: Adrien Destugues <pulkomandy@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_
|