]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/protocol/http.h
5cc6e8e5bb6f65ac2dc2f15a6a22e3ba643aedf0
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: HTTP protocol
4 // Author: Guilhem Lavaux
6 // Created: August 1997
8 // Copyright: (c) 1997, 1998 Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #if wxUSE_PROTOCOL_HTTP
19 #include "wx/protocol/protocol.h"
21 class WXDLLEXPORT wxHTTP
: public wxProtocol
{
22 DECLARE_DYNAMIC_CLASS(wxHTTP
)
23 DECLARE_PROTOCOL(wxHTTP
)
25 wxProtocolError m_perr
;
27 bool m_read
, m_proxy_mode
;
28 wxSockAddress
*m_addr
;
33 bool Connect(const wxString
& host
);
34 bool Connect(wxSockAddress
& addr
, bool wait
);
36 wxInputStream
*GetInputStream(const wxString
& path
);
37 inline wxProtocolError
GetError() { return m_perr
; }
38 wxString
GetContentType();
40 void SetHeader(const wxString
& header
, const wxString
& h_data
);
41 wxString
GetHeader(const wxString
& header
);
43 void SetProxyMode(bool on
);
50 bool BuildRequest(const wxString
& path
, wxHTTP_Req req
);
54 // deletes the header value strings
57 DECLARE_NO_COPY_CLASS(wxHTTP
)
60 #endif // wxUSE_PROTOCOL_HTTP