]>
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 /////////////////////////////////////////////////////////////////////////////
20 #include "wx/object.h"
23 #include "wx/protocol/protocol.h"
26 #include "wx/protocol/http.h"
39 class WXDLLEXPORT wxURL
: public wxObject
42 wxURL(const wxString
& url
);
45 wxString
GetProtocolName() const { return m_protoinfo
->m_protoname
; }
46 wxString
GetHostName() const { return m_hostname
; }
47 wxString
GetURL() const { return m_url
; }
48 wxProtocol
& GetProtocol() { return *m_protocol
; }
49 wxURLError
GetError() const { return m_error
; }
50 wxString
GetPath() const { return m_path
; }
52 wxInputStream
*GetInputStream();
55 static void SetDefaultProxy(const wxString
& url_proxy
);
56 void SetProxy(const wxString
& url_proxy
);
57 #endif // wxUSE_SOCKETS
59 static wxString
ConvertToValidURI(
61 const wxChar
* delims
= wxT(";/?:@&=+$,")
63 static wxString
ConvertFromURI(const wxString
& uri
);
66 static wxProtoInfo
*ms_protocols
;
69 static wxHTTP
*ms_proxyDefault
;
70 static bool ms_useDefaultProxy
;
72 #endif // wxUSE_SOCKETS
74 wxProtoInfo
*m_protoinfo
;
75 wxProtocol
*m_protocol
;
78 wxString m_protoname
, m_hostname
, m_servname
, m_path
, m_url
;
79 wxString m_user
, m_password
;
82 bool PrepProto(wxString
& url
);
83 bool PrepHost(wxString
& url
);
84 bool PrepPath(wxString
& url
);
89 friend class wxProtoInfo
;
90 friend class wxURLModule
;
93 // VZ: can't use default copy ctor for this class, should write a correct
95 DECLARE_NO_COPY_CLASS(wxURL
)
97 DECLARE_DYNAMIC_CLASS(wxURL
)