1998-09-20 11:45:12 -04:00
|
|
|
\section{\class{wxURL}}\label{wxurl}
|
|
|
|
|
2004-10-28 02:49:46 -04:00
|
|
|
Parses URLs.
|
|
|
|
|
|
|
|
Supports standard assignment operators, copy constructors,
|
|
|
|
and comparison operators.
|
|
|
|
|
1998-09-20 11:45:12 -04:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
2004-10-28 02:49:46 -04:00
|
|
|
\helpref{wxURI}{wxuri}
|
1998-09-20 11:45:12 -04:00
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/url.h>
|
|
|
|
|
1998-09-20 11:45:12 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
1998-10-07 07:04:27 -04:00
|
|
|
\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxProtocol}{wxprotocol}
|
1998-09-20 11:45:12 -04:00
|
|
|
|
|
|
|
% ----------------------------------------------------------------------------
|
|
|
|
% Members
|
|
|
|
% ----------------------------------------------------------------------------
|
1999-02-27 09:36:05 -05:00
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
1998-09-20 11:45:12 -04:00
|
|
|
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxURL::wxURL}\label{wxurlctor}
|
1998-10-07 07:04:27 -04:00
|
|
|
|
1998-09-20 11:45:12 -04:00
|
|
|
\func{}{wxURL}{\param{const wxString\&}{ url}}
|
|
|
|
|
2003-06-07 21:58:10 -04:00
|
|
|
Constructs a URL object from the string. The URL must be valid according
|
|
|
|
to RFC 1738. In particular, file URLs must be of the format
|
|
|
|
'file://hostname/path/to/file'. It is valid to leave out the hostname
|
|
|
|
but slashes must remain in place-- i.e. a file URL without a hostname must
|
|
|
|
contain three consecutive slashes.
|
1998-09-20 11:45:12 -04:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{url}{Url string to parse.}
|
|
|
|
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxURL::\destruct{wxURL}}\label{wxurldtor}
|
1998-10-07 07:04:27 -04:00
|
|
|
|
1998-09-20 11:45:12 -04:00
|
|
|
\func{}{\destruct{wxURL}}{\void}
|
|
|
|
|
|
|
|
Destroys the URL object.
|
|
|
|
|
|
|
|
%
|
|
|
|
% GetProtocol
|
|
|
|
%
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxURL::GetProtocol}\label{wxurlgetprotocol}
|
1998-10-07 07:04:27 -04:00
|
|
|
|
1998-09-20 11:45:12 -04:00
|
|
|
\func{wxProtocol\&}{GetProtocol}{\void}
|
|
|
|
|
|
|
|
Returns a reference to the protocol which will be used to get the URL.
|
|
|
|
|
|
|
|
%
|
|
|
|
% GetError
|
|
|
|
%
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxURL::GetError}\label{wxurlgeterror}
|
1998-10-07 07:04:27 -04:00
|
|
|
|
1998-09-20 11:45:12 -04:00
|
|
|
\constfunc{wxURLError}{GetError}{\void}
|
|
|
|
|
|
|
|
Returns the last error. This error refers to the URL parsing or to the protocol.
|
|
|
|
It can be one of these errors:
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
1999-01-12 13:28:34 -05:00
|
|
|
\begin{twocollist}\itemsep=0pt%
|
1998-09-20 11:45:12 -04:00
|
|
|
\twocolitem{{\bf wxURL\_NOERR}}{No error.}
|
|
|
|
\twocolitem{{\bf wxURL\_SNTXERR}}{Syntax error in the URL string.}
|
|
|
|
\twocolitem{{\bf wxURL\_NOPROTO}}{Found no protocol which can get this URL.}
|
|
|
|
\twocolitem{{\bf wxURL\_NOHOST}}{An host name is required for this protocol.}
|
|
|
|
\twocolitem{{\bf wxURL\_NOPATH}}{A path is required for this protocol.}
|
|
|
|
\twocolitem{{\bf wxURL\_CONNERR}}{Connection error.}
|
2000-07-15 15:51:35 -04:00
|
|
|
\twocolitem{{\bf wxURL\_PROTOERR}}{An error occurred during negotiation.}
|
1998-09-20 11:45:12 -04:00
|
|
|
\end{twocollist}%
|
|
|
|
|
|
|
|
%
|
|
|
|
% GetInputStream
|
|
|
|
%
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxURL::GetInputStream}\label{wxurlgetinputstream}
|
1998-10-07 07:04:27 -04:00
|
|
|
|
1998-09-20 11:45:12 -04:00
|
|
|
\func{wxInputStream *}{GetInputStream}{\void}
|
|
|
|
|
2005-04-08 10:34:30 -04:00
|
|
|
Creates a new input stream on the specified URL. You can use all but seek
|
2002-06-07 16:15:28 -04:00
|
|
|
functionality of wxStream. Seek isn't available on all stream. For example,
|
1999-01-10 15:14:07 -05:00
|
|
|
http or ftp streams doesn't deal with it.
|
1998-09-20 11:45:12 -04:00
|
|
|
|
2004-10-28 18:22:40 -04:00
|
|
|
Note that this method is somewhat depreciated, all future wxWidgets applications
|
|
|
|
should really use \helpref{wxFileSystem}{wxfilesystem} instead.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
wxURL url("http://a.host/a.dir/a.file");
|
|
|
|
if (url.GetError() == wxURL_NOERR)
|
|
|
|
{
|
|
|
|
wxInputStream *in_stream;
|
|
|
|
|
|
|
|
in_stream = url.GetInputStream();
|
|
|
|
// Then, you can use all IO calls of in_stream (See wxStream)
|
|
|
|
}
|
|
|
|
\end{verbatim}
|
|
|
|
|
1998-10-07 07:04:27 -04:00
|
|
|
\wxheading{Return value}
|
1998-09-20 11:45:12 -04:00
|
|
|
|
1999-01-10 15:14:07 -05:00
|
|
|
Returns the initialized stream. You will have to delete it yourself.
|
1998-09-20 11:45:12 -04:00
|
|
|
|
1998-10-07 07:04:27 -04:00
|
|
|
\wxheading{See also}
|
1998-09-20 11:45:12 -04:00
|
|
|
|
2000-03-17 12:59:56 -05:00
|
|
|
\helpref{wxInputStream}{wxinputstream}
|
1998-09-20 11:45:12 -04:00
|
|
|
|
|
|
|
%
|
|
|
|
% SetDefaultProxy
|
|
|
|
%
|
1998-10-07 07:04:27 -04:00
|
|
|
\membersection{wxURL::SetDefaultProxy}\label{wxurlsetdefaultproxy}
|
|
|
|
|
1998-09-20 11:45:12 -04:00
|
|
|
\func{static void}{SetDefaultProxy}{\param{const wxString\&}{ url\_proxy}}
|
|
|
|
|
|
|
|
Sets the default proxy server to use to get the URL. The string specifies
|
|
|
|
the proxy like this: <hostname>:<port number>.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{url\_proxy}{Specifies the proxy to use}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxURL::SetProxy}{wxurlsetproxy}
|
|
|
|
|
|
|
|
%
|
|
|
|
% SetProxy
|
|
|
|
%
|
1998-10-07 07:04:27 -04:00
|
|
|
\membersection{wxURL::SetProxy}\label{wxurlsetproxy}
|
|
|
|
|
1998-09-20 11:45:12 -04:00
|
|
|
\func{void}{SetProxy}{\param{const wxString\&}{ url\_proxy}}
|
|
|
|
|
|
|
|
Sets the proxy to use for this URL.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxURL::SetDefaultProxy}{wxurlsetdefaultproxy}
|
1998-10-07 07:04:27 -04:00
|
|
|
|