]>
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"
25 #include "wx/protocol/http.h"
38 class WXDLLEXPORT wxURL
: public wxObject
{
39 DECLARE_DYNAMIC_CLASS(wxURL
)
41 static wxProtoInfo
*g_protocols
;
43 static wxHTTP
*g_proxy
;
45 wxProtoInfo
*m_protoinfo
;
46 wxProtocol
*m_protocol
;
51 wxString m_protoname
, m_hostname
, m_servname
, m_path
, m_url
;
52 wxString m_user
, m_password
;
55 bool PrepProto(wxString
& url
);
56 bool PrepHost(wxString
& url
);
57 bool PrepPath(wxString
& url
);
62 friend class wxProtoInfo
;
63 friend class wxProtocolModule
;
66 wxURL(const wxString
& url
);
69 inline wxString
GetProtocolName() const
70 { return m_protoinfo
->m_protoname
; }
71 inline wxString
GetHostName() const { return m_hostname
; }
72 inline wxString
GetURL() const { return m_url
; }
73 inline wxProtocol
& GetProtocol() { return *m_protocol
; }
74 inline wxURLError
GetError() const { return m_error
; }
75 inline wxString
GetPath() const { return m_path
; }
77 wxInputStream
*GetInputStream();
80 static void SetDefaultProxy(const wxString
& url_proxy
);
81 void SetProxy(const wxString
& url_proxy
);
84 static wxString
ConvertToValidURI(const wxString
& uri
);
85 static wxString
ConvertFromURI(const wxString
& uri
);