]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/url.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Guilhem Lavaux
8 // Copyright: (c) 1997, 1998 Guilhem Lavaux
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
19 #include "wx/object.h"
22 #include "wx/protocol/protocol.h"
23 #include "wx/protocol/http.h"
35 class WXDLLEXPORT wxURL
: public wxObject
{
36 DECLARE_DYNAMIC_CLASS(wxURL
)
38 static wxProtoInfo
*g_protocols
;
39 static wxHTTP
*g_proxy
;
40 wxProtoInfo
*m_protoinfo
;
41 wxProtocol
*m_protocol
;
44 wxString m_protoname
, m_hostname
, m_servname
, m_path
, m_url
;
45 wxString m_user
, m_password
;
48 bool PrepProto(wxString
& url
);
49 bool PrepHost(wxString
& url
);
50 bool PrepPath(wxString
& url
);
55 friend class wxProtoInfo
;
56 friend class wxProtocolModule
;
59 wxURL(const wxString
& url
);
62 inline wxString
GetProtocolName() const
63 { return m_protoinfo
->m_protoname
; }
64 inline wxString
GetHostName() const { return m_hostname
; }
65 inline wxString
GetURL() const { return m_url
; }
66 inline wxProtocol
& GetProtocol() { return *m_protocol
; }
67 inline wxURLError
GetError() const { return m_error
; }
68 inline wxString
GetPath() const { return m_path
; }
70 wxInputStream
*GetInputStream();
72 static void SetDefaultProxy(const wxString
& url_proxy
);
73 void SetProxy(const wxString
& url_proxy
);
75 static wxString
ConvertToValidURI(const wxString
& uri
);