1 \section{\class{wxURL
}}\label{wxurl
}
3 \wxheading{Derived from
}
5 \helpref{wxObject
}{wxobject
}
7 \wxheading{Include files
}
13 \helpref{wxSocketBase
}{wxsocketbase
},
\helpref{wxProtocol
}{wxprotocol
}
18 wxURL url("http://a.host/a.dir/a.file");
19 wxInputStream *in_stream;
21 in_stream = url.GetInputStream();
22 // Then, you can use all IO calls of in_stream (See wxStream)
25 % ----------------------------------------------------------------------------
27 % ----------------------------------------------------------------------------
29 \latexignore{\rtfignore{\wxheading{Members
}}}
31 \membersection{wxURL::wxURL
}\label{wxurlconstr
}
33 \func{}{wxURL
}{\param{const wxString\&
}{ url
}}
35 Constructs an URL object from the string.
37 \wxheading{Parameters
}
39 \docparam{url
}{Url string to parse.
}
41 \membersection{wxURL::
\destruct{wxURL
}}
43 \func{}{\destruct{wxURL
}}{\void}
45 Destroys the URL object.
50 \membersection{wxURL::GetProtocolName
}
52 \constfunc{wxString
}{GetProtocolName
}{\void}
54 Returns the name of the protocol which will be used to get the URL.
59 \membersection{wxURL::GetProtocol
}
61 \func{wxProtocol\&
}{GetProtocol
}{\void}
63 Returns a reference to the protocol which will be used to get the URL.
68 \membersection{wxURL::GetPath
}
70 \func{wxString
}{GetPath
}{\void}
72 Returns the path of the file to fetch. This path was encoded in the URL.
77 \membersection{wxURL::GetError
}
79 \constfunc{wxURLError
}{GetError
}{\void}
81 Returns the last error. This error refers to the URL parsing or to the protocol.
82 It can be one of these errors:
85 \begin{twocollist
}\itemsep=
0pt
%
86 \twocolitem{{\bf wxURL
\_NOERR}}{No error.
}
87 \twocolitem{{\bf wxURL
\_SNTXERR}}{Syntax error in the URL string.
}
88 \twocolitem{{\bf wxURL
\_NOPROTO}}{Found no protocol which can get this URL.
}
89 \twocolitem{{\bf wxURL
\_NOHOST}}{An host name is required for this protocol.
}
90 \twocolitem{{\bf wxURL
\_NOPATH}}{A path is required for this protocol.
}
91 \twocolitem{{\bf wxURL
\_CONNERR}}{Connection error.
}
92 \twocolitem{{\bf wxURL
\_PROTOERR}}{An error occurred during negotiation.
}
98 \membersection{wxURL::GetInputStream
}
100 \func{wxInputStream *
}{GetInputStream
}{\void}
102 Creates a new input stream on the the specified URL. You can use all but seek
103 functionnality of wxStream. Seek isn't available on all stream. For example,
104 http or ftp streams doesn't deal with it.
106 \wxheading{Return value
}
108 Returns the initialized stream. You will have to delete it yourself.
112 \helpref{wxInputStream
}{wxinputstream
}
117 \membersection{wxURL::SetDefaultProxy
}\label{wxurlsetdefaultproxy
}
119 \func{static void
}{SetDefaultProxy
}{\param{const wxString\&
}{ url
\_proxy}}
121 Sets the default proxy server to use to get the URL. The string specifies
122 the proxy like this: <hostname>:<port number>.
124 \wxheading{Parameters
}
126 \docparam{url
\_proxy}{Specifies the proxy to use
}
130 \helpref{wxURL::SetProxy
}{wxurlsetproxy
}
135 \membersection{wxURL::SetProxy
}\label{wxurlsetproxy
}
137 \func{void
}{SetProxy
}{\param{const wxString\&
}{ url
\_proxy}}
139 Sets the proxy to use for this URL.
143 \helpref{wxURL::SetDefaultProxy
}{wxurlsetdefaultproxy
}
148 \membersection{wxURL::ConvertToValidURI
}
150 \func{static wxString
}{ConvertToValidURI
}{\param{const wxString\&
}{ uri
}}
152 It converts a non-standardized URI to a valid network URI. It encodes non