]>
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
41 wxURL(const wxString
& url
);
44 wxString
GetProtocolName() const { return m_protoinfo
->m_protoname
; }
45 wxString
GetHostName() const { return m_hostname
; }
46 wxString
GetURL() const { return m_url
; }
47 wxProtocol
& GetProtocol() { return *m_protocol
; }
48 wxURLError
GetError() const { return m_error
; }
49 wxString
GetPath() const { return m_path
; }
51 wxInputStream
*GetInputStream();
54 static void SetDefaultProxy(const wxString
& url_proxy
);
55 void SetProxy(const wxString
& url_proxy
);
56 #endif // wxUSE_SOCKETS
58 static wxString
ConvertToValidURI(const wxString
& uri
);
59 static wxString
ConvertFromURI(const wxString
& uri
);
62 static wxProtoInfo
*ms_protocols
;
65 static wxHTTP
*ms_proxyDefault
;
66 static bool ms_useDefaultProxy
;
68 #endif // wxUSE_SOCKETS
70 wxProtoInfo
*m_protoinfo
;
71 wxProtocol
*m_protocol
;
74 wxString m_protoname
, m_hostname
, m_servname
, m_path
, m_url
;
75 wxString m_user
, m_password
;
78 bool PrepProto(wxString
& url
);
79 bool PrepHost(wxString
& url
);
80 bool PrepPath(wxString
& url
);
85 friend class wxProtoInfo
;
86 friend class wxURLModule
;
89 // VZ: can't use default copy ctor for this class, should write a correct
91 DECLARE_NO_COPY_CLASS(wxURL
);
93 DECLARE_DYNAMIC_CLASS(wxURL
)