1998-09-20 15:45:12 +00:00
|
|
|
\section{\class{wxURL}}\label{wxurl}
|
|
|
|
|
2004-10-28 06:49:46 +00:00
|
|
|
Parses URLs.
|
|
|
|
|
|
|
|
Supports standard assignment operators, copy constructors,
|
|
|
|
and comparison operators.
|
|
|
|
|
1998-09-20 15:45:12 +00:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
2004-10-28 06:49:46 +00:00
|
|
|
\helpref{wxURI}{wxuri}
|
1998-09-20 15:45:12 +00:00
|
|
|
|
1999-02-15 20:41:29 +00:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/url.h>
|
|
|
|
|
1998-09-20 15:45:12 +00:00
|
|
|
\wxheading{See also}
|
|
|
|
|
1998-10-07 11:04:27 +00:00
|
|
|
\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxProtocol}{wxprotocol}
|
1998-09-20 15:45:12 +00:00
|
|
|
|
|
|
|
% ----------------------------------------------------------------------------
|
|
|
|
% Members
|
|
|
|
% ----------------------------------------------------------------------------
|
1999-02-27 14:36:05 +00:00
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
1998-09-20 15:45:12 +00:00
|
|
|
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxURL::wxURL}\label{wxurlctor}
|
1998-10-07 11:04:27 +00:00
|
|
|
|
1998-09-20 15:45:12 +00:00
|
|
|
\func{}{wxURL}{\param{const wxString\&}{ url}}
|
|
|
|
|
2003-06-08 01:58:10 +00: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 15:45:12 +00:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{url}{Url string to parse.}
|
|
|
|
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxURL::\destruct{wxURL}}\label{wxurldtor}
|
1998-10-07 11:04:27 +00:00
|
|
|
|
1998-09-20 15:45:12 +00:00
|
|
|
\func{}{\destruct{wxURL}}{\void}
|
|
|
|
|
|
|
|
Destroys the URL object.
|
|
|
|
|
|
|
|
%
|
|
|
|
% GetProtocol
|
|
|
|
%
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxURL::GetProtocol}\label{wxurlgetprotocol}
|
1998-10-07 11:04:27 +00:00
|
|
|
|
1998-09-20 15:45:12 +00:00
|
|
|
\func{wxProtocol\&}{GetProtocol}{\void}
|
|
|
|
|
|
|
|
Returns a reference to the protocol which will be used to get the URL.
|
|
|
|
|
|
|
|
%
|
|
|
|
% GetError
|
|
|
|
%
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxURL::GetError}\label{wxurlgeterror}
|
1998-10-07 11:04:27 +00:00
|
|
|
|
1998-09-20 15:45:12 +00: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 18:28:34 +00:00
|
|
|
\begin{twocollist}\itemsep=0pt%
|
1998-09-20 15:45:12 +00: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 19:51:35 +00:00
|
|
|
\twocolitem{{\bf wxURL\_PROTOERR}}{An error occurred during negotiation.}
|
1998-09-20 15:45:12 +00:00
|
|
|
\end{twocollist}%
|
|
|
|
|
|
|
|
%
|
|
|
|
% GetInputStream
|
|
|
|
%
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxURL::GetInputStream}\label{wxurlgetinputstream}
|
1998-10-07 11:04:27 +00:00
|
|
|
|
1998-09-20 15:45:12 +00:00
|
|
|
\func{wxInputStream *}{GetInputStream}{\void}
|
|
|
|
|
1999-01-10 20:14:07 +00:00
|
|
|
Creates a new input stream on the the specified URL. You can use all but seek
|
2002-06-07 20:15:28 +00:00
|
|
|
functionality of wxStream. Seek isn't available on all stream. For example,
|
1999-01-10 20:14:07 +00:00
|
|
|
http or ftp streams doesn't deal with it.
|
1998-09-20 15:45:12 +00:00
|
|
|
|
2004-10-28 22:22:40 +00: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 11:04:27 +00:00
|
|
|
\wxheading{Return value}
|
1998-09-20 15:45:12 +00:00
|
|
|
|
1999-01-10 20:14:07 +00:00
|
|
|
Returns the initialized stream. You will have to delete it yourself.
|
1998-09-20 15:45:12 +00:00
|
|
|
|
1998-10-07 11:04:27 +00:00
|
|
|
\wxheading{See also}
|
1998-09-20 15:45:12 +00:00
|
|
|
|
2000-03-17 17:59:56 +00:00
|
|
|
\helpref{wxInputStream}{wxinputstream}
|
1998-09-20 15:45:12 +00:00
|
|
|
|
|
|
|
%
|
|
|
|
% SetDefaultProxy
|
|
|
|
%
|
1998-10-07 11:04:27 +00:00
|
|
|
\membersection{wxURL::SetDefaultProxy}\label{wxurlsetdefaultproxy}
|
|
|
|
|
1998-09-20 15:45:12 +00: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 11:04:27 +00:00
|
|
|
\membersection{wxURL::SetProxy}\label{wxurlsetproxy}
|
|
|
|
|
1998-09-20 15:45:12 +00: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 11:04:27 +00:00
|
|
|
|