]>
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 licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "url.h"
23 #include "wx/object.h"
24 #include "wx/protocol/protocol.h"
26 #if wxUSE_PROTOCOL_HTTP
27 #include "wx/protocol/http.h"
40 class WXDLLIMPEXP_NET wxURL
: public wxObject
43 wxURL(const wxString
& url
);
46 wxString
GetProtocolName() const { return m_protoinfo
->m_protoname
; }
47 wxString
GetHostName() const { return m_hostname
; }
48 wxString
GetURL() const { return m_url
; }
49 wxProtocol
& GetProtocol() { return *m_protocol
; }
50 wxURLError
GetError() const { return m_error
; }
51 wxString
GetPath() const { return m_path
; }
53 wxInputStream
*GetInputStream();
56 static void SetDefaultProxy(const wxString
& url_proxy
);
57 void SetProxy(const wxString
& url_proxy
);
58 #endif // wxUSE_SOCKETS
60 static wxString
ConvertToValidURI(
62 const wxChar
* delims
= wxT(";/?:@&=+$,")
64 static wxString
ConvertFromURI(const wxString
& uri
);
67 static wxProtoInfo
*ms_protocols
;
70 static wxHTTP
*ms_proxyDefault
;
71 static bool ms_useDefaultProxy
;
73 #endif // wxUSE_SOCKETS
75 wxProtoInfo
*m_protoinfo
;
76 wxProtocol
*m_protocol
;
79 wxString m_protoname
, m_hostname
, m_servname
, m_path
, m_url
;
80 wxString m_user
, m_password
;
83 bool PrepProto(wxString
& url
);
84 bool PrepHost(wxString
& url
);
85 bool PrepPath(wxString
& url
);
90 friend class wxProtoInfo
;
91 friend class wxURLModule
;
94 // VZ: can't use default copy ctor for this class, should write a correct
96 DECLARE_NO_COPY_CLASS(wxURL
)
98 DECLARE_DYNAMIC_CLASS(wxURL
)