#ifndef WebHTTPLoadInfo_h
#define WebHTTPLoadInfo_h
#include "WebCommon.h"
#include "WebPrivatePtr.h"
namespace WebCore {
struct ResourceLoadInfo;
}
namespace blink {
class WebString;
class WebHTTPLoadInfo {
public:
WebHTTPLoadInfo() { initialize(); }
~WebHTTPLoadInfo() { reset(); }
WebHTTPLoadInfo(const WebHTTPLoadInfo& r) { assign(r); }
WebHTTPLoadInfo& operator =(const WebHTTPLoadInfo& r)
{
assign(r);
return *this;
}
BLINK_PLATFORM_EXPORT void initialize();
BLINK_PLATFORM_EXPORT void reset();
BLINK_PLATFORM_EXPORT void assign(const WebHTTPLoadInfo& r);
BLINK_PLATFORM_EXPORT int httpStatusCode() const;
BLINK_PLATFORM_EXPORT void setHTTPStatusCode(int);
BLINK_PLATFORM_EXPORT WebString httpStatusText() const;
BLINK_PLATFORM_EXPORT void setHTTPStatusText(const WebString&);
BLINK_PLATFORM_EXPORT long long encodedDataLength() const;
BLINK_PLATFORM_EXPORT void setEncodedDataLength(long long);
BLINK_PLATFORM_EXPORT void addRequestHeader(const WebString& name, const WebString& value);
BLINK_PLATFORM_EXPORT void addResponseHeader(const WebString& name, const WebString& value);
BLINK_PLATFORM_EXPORT WebString requestHeadersText() const;
BLINK_PLATFORM_EXPORT void setRequestHeadersText(const WebString&);
BLINK_PLATFORM_EXPORT WebString responseHeadersText() const;
BLINK_PLATFORM_EXPORT void setResponseHeadersText(const WebString&);
#if INSIDE_BLINK
BLINK_PLATFORM_EXPORT WebHTTPLoadInfo(WTF::PassRefPtr<WebCore::ResourceLoadInfo>);
BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<WebCore::ResourceLoadInfo>() const;
#endif
private:
WebPrivatePtr<WebCore::ResourceLoadInfo> m_private;
};
}
#endif