haiku/headers/os/net/UrlResult.h
Stephan Aßmus 45939109b4 Patch done by Christophe Huriaux as part of GSoC 2010 "Services Kit" project:
Integrated the classes in the Network Kit (libbnetapi.so). Only the foundation
classed BUrl, BUrlContext, BNetworkCookie, BNetworkCookieJar and the private
HttpTime code is currently compiled. The BUrlProtocol currently contains some
misplaced BUrlProtocolHttp specific stuff, and the HTTP stuff itself has a
dependency on libcrypto and should live in an add-on instead. I've sprinkled
some TODOs in the code, and I've done some renaming compared to the last
version of the GSoC patch. Any help to bring this further along is appreciated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-27 14:03:31 +00:00

57 lines
1.1 KiB
C++

/*
* Copyright 2010 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _B_URL_RESULT_H_
#define _B_URL_RESULT_H_
#include <iostream>
#include <DataIO.h>
#include <HttpHeaders.h>
#include <String.h>
#include <Url.h>
class BUrlProtocol;
class BUrlResult {
friend class BUrlProtocol;
public:
BUrlResult(const BUrl& url);
BUrlResult(const BUrlResult& other);
// Result parameters modifications
void SetUrl(const BUrl& url);
// Result parameters access
const BUrl& Url() const;
const BMallocIO& RawData() const;
const BHttpHeaders& Headers() const;
const BString& StatusText() const;
int32 StatusCode() const;
// Result tests
bool HasHeaders() const;
// Overloaded members
BUrlResult& operator=(const BUrlResult& other);
friend std::ostream& operator<<(std::ostream& out,
const BUrlResult& result);
private:
BUrl fUrl;
BMallocIO fRawData;
BHttpHeaders fHeaders;
// TODO: HTTP specific stuff should not live here.
int32 fStatusCode;
BString fStatusString;
};
#endif // _B_URL_RESULT_H_