1 \section{\class{wxURL
}}\label{wxurl
}
5 Supports standard assignment operators, copy constructors,
6 and comparison operators.
8 \wxheading{Derived from
}
10 \helpref{wxURI
}{wxuri
}
12 \wxheading{Include files
}
18 \helpref{wxSocketBase
}{wxsocketbase
},
\helpref{wxProtocol
}{wxprotocol
}
23 wxURL url("http://a.host/a.dir/a.file");
24 wxInputStream *in_stream;
26 in_stream = url.GetInputStream();
27 // Then, you can use all IO calls of in_stream (See wxStream)
30 % ----------------------------------------------------------------------------
32 % ----------------------------------------------------------------------------
34 \latexignore{\rtfignore{\wxheading{Members
}}}
36 \membersection{wxURL::wxURL
}\label{wxurlctor
}
38 \func{}{wxURL
}{\param{const wxString\&
}{ url
}}
40 Constructs a URL object from the string. The URL must be valid according
41 to RFC
1738. In particular, file URLs must be of the format
42 'file://hostname/path/to/file'. It is valid to leave out the hostname
43 but slashes must remain in place-- i.e. a file URL without a hostname must
44 contain three consecutive slashes.
46 \wxheading{Parameters
}
48 \docparam{url
}{Url string to parse.
}
50 \membersection{wxURL::
\destruct{wxURL
}}\label{wxurldtor
}
52 \func{}{\destruct{wxURL
}}{\void}
54 Destroys the URL object.
59 \membersection{wxURL::GetProtocolName
}\label{wxurlgetprotocolname
}
61 \constfunc{wxString
}{GetProtocolName
}{\void}
63 Returns the name of the protocol which will be used to get the URL.
68 \membersection{wxURL::GetProtocol
}\label{wxurlgetprotocol
}
70 \func{wxProtocol\&
}{GetProtocol
}{\void}
72 Returns a reference to the protocol which will be used to get the URL.
77 \membersection{wxURL::GetPath
}\label{wxurlgetpath
}
79 \func{wxString
}{GetPath
}{\void}
81 Returns the path of the file to fetch. This path was encoded in the URL.
86 \membersection{wxURL::GetError
}\label{wxurlgeterror
}
88 \constfunc{wxURLError
}{GetError
}{\void}
90 Returns the last error. This error refers to the URL parsing or to the protocol.
91 It can be one of these errors:
94 \begin{twocollist
}\itemsep=
0pt
%
95 \twocolitem{{\bf wxURL
\_NOERR}}{No error.
}
96 \twocolitem{{\bf wxURL
\_SNTXERR}}{Syntax error in the URL string.
}
97 \twocolitem{{\bf wxURL
\_NOPROTO}}{Found no protocol which can get this URL.
}
98 \twocolitem{{\bf wxURL
\_NOHOST}}{An host name is required for this protocol.
}
99 \twocolitem{{\bf wxURL
\_NOPATH}}{A path is required for this protocol.
}
100 \twocolitem{{\bf wxURL
\_CONNERR}}{Connection error.
}
101 \twocolitem{{\bf wxURL
\_PROTOERR}}{An error occurred during negotiation.
}
107 \membersection{wxURL::GetInputStream
}\label{wxurlgetinputstream
}
109 \func{wxInputStream *
}{GetInputStream
}{\void}
111 Creates a new input stream on the the specified URL. You can use all but seek
112 functionality of wxStream. Seek isn't available on all stream. For example,
113 http or ftp streams doesn't deal with it.
115 \wxheading{Return value
}
117 Returns the initialized stream. You will have to delete it yourself.
121 \helpref{wxInputStream
}{wxinputstream
}
126 \membersection{wxURL::SetDefaultProxy
}\label{wxurlsetdefaultproxy
}
128 \func{static void
}{SetDefaultProxy
}{\param{const wxString\&
}{ url
\_proxy}}
130 Sets the default proxy server to use to get the URL. The string specifies
131 the proxy like this: <hostname>:<port number>.
133 \wxheading{Parameters
}
135 \docparam{url
\_proxy}{Specifies the proxy to use
}
139 \helpref{wxURL::SetProxy
}{wxurlsetproxy
}
144 \membersection{wxURL::SetProxy
}\label{wxurlsetproxy
}
146 \func{void
}{SetProxy
}{\param{const wxString\&
}{ url
\_proxy}}
148 Sets the proxy to use for this URL.
152 \helpref{wxURL::SetDefaultProxy
}{wxurlsetdefaultproxy
}