]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/url.tex
added tied scoped pointers
[wxWidgets.git] / docs / latex / wx / url.tex
CommitLineData
e79848ac
GL
1\section{\class{wxURL}}\label{wxurl}
2
3\wxheading{Derived from}
4
5\helpref{wxObject}{wxobject}
6
954b8ae6
JS
7\wxheading{Include files}
8
9<wx/url.h>
10
e79848ac
GL
11\wxheading{See also}
12
42ff6409 13\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxProtocol}{wxprotocol}
e79848ac 14
9a1b2c28
GL
15\wxheading{Example}
16
17\begin{verbatim}
18 wxURL url("http://a.host/a.dir/a.file");
296ec7d3 19 wxInputStream *in_stream;
9a1b2c28 20
296ec7d3
VZ
21 in_stream = url.GetInputStream();
22 // Then, you can use all IO calls of in_stream (See wxStream)
9a1b2c28
GL
23\end{verbatim}
24
e79848ac
GL
25% ----------------------------------------------------------------------------
26% Members
27% ----------------------------------------------------------------------------
296ec7d3
VZ
28
29\latexignore{\rtfignore{\wxheading{Members}}}
e79848ac 30
42ff6409
JS
31\membersection{wxURL::wxURL}\label{wxurlconstr}
32
e79848ac
GL
33\func{}{wxURL}{\param{const wxString\&}{ url}}
34
085c39b4
DE
35Constructs a URL object from the string. The URL must be valid according
36to RFC 1738. In particular, file URLs must be of the format
37'file://hostname/path/to/file'. It is valid to leave out the hostname
38but slashes must remain in place-- i.e. a file URL without a hostname must
39contain three consecutive slashes.
e79848ac
GL
40
41\wxheading{Parameters}
42
43\docparam{url}{Url string to parse.}
44
45\membersection{wxURL::\destruct{wxURL}}
42ff6409 46
e79848ac
GL
47\func{}{\destruct{wxURL}}{\void}
48
49Destroys the URL object.
50
51%
52% GetProtocolName
53%
54\membersection{wxURL::GetProtocolName}
42ff6409 55
e79848ac
GL
56\constfunc{wxString}{GetProtocolName}{\void}
57
58Returns the name of the protocol which will be used to get the URL.
59
60%
61% GetProtocol
62%
63\membersection{wxURL::GetProtocol}
42ff6409 64
e79848ac
GL
65\func{wxProtocol\&}{GetProtocol}{\void}
66
67Returns a reference to the protocol which will be used to get the URL.
68
375abe3d
GL
69%
70% GetPath
71%
72\membersection{wxURL::GetPath}
73
74\func{wxString}{GetPath}{\void}
75
76Returns the path of the file to fetch. This path was encoded in the URL.
77
e79848ac
GL
78%
79% GetError
80%
81\membersection{wxURL::GetError}
42ff6409 82
e79848ac
GL
83\constfunc{wxURLError}{GetError}{\void}
84
85Returns the last error. This error refers to the URL parsing or to the protocol.
86It can be one of these errors:
87
88\twocolwidtha{7cm}
6be663cf 89\begin{twocollist}\itemsep=0pt%
e79848ac
GL
90\twocolitem{{\bf wxURL\_NOERR}}{No error.}
91\twocolitem{{\bf wxURL\_SNTXERR}}{Syntax error in the URL string.}
92\twocolitem{{\bf wxURL\_NOPROTO}}{Found no protocol which can get this URL.}
93\twocolitem{{\bf wxURL\_NOHOST}}{An host name is required for this protocol.}
94\twocolitem{{\bf wxURL\_NOPATH}}{A path is required for this protocol.}
95\twocolitem{{\bf wxURL\_CONNERR}}{Connection error.}
f6bcfd97 96\twocolitem{{\bf wxURL\_PROTOERR}}{An error occurred during negotiation.}
e79848ac
GL
97\end{twocollist}%
98
99%
100% GetInputStream
101%
102\membersection{wxURL::GetInputStream}
42ff6409 103
e79848ac
GL
104\func{wxInputStream *}{GetInputStream}{\void}
105
7d2946d2 106Creates a new input stream on the the specified URL. You can use all but seek
2edb0bde 107functionality of wxStream. Seek isn't available on all stream. For example,
7d2946d2 108http or ftp streams doesn't deal with it.
e79848ac 109
42ff6409 110\wxheading{Return value}
e79848ac 111
7d2946d2 112Returns the initialized stream. You will have to delete it yourself.
e79848ac 113
42ff6409 114\wxheading{See also}
e79848ac 115
b2cf617c 116\helpref{wxInputStream}{wxinputstream}
e79848ac
GL
117
118%
119% SetDefaultProxy
120%
42ff6409
JS
121\membersection{wxURL::SetDefaultProxy}\label{wxurlsetdefaultproxy}
122
e79848ac
GL
123\func{static void}{SetDefaultProxy}{\param{const wxString\&}{ url\_proxy}}
124
125Sets the default proxy server to use to get the URL. The string specifies
126the proxy like this: <hostname>:<port number>.
127
128\wxheading{Parameters}
129
130\docparam{url\_proxy}{Specifies the proxy to use}
131
132\wxheading{See also}
133
134\helpref{wxURL::SetProxy}{wxurlsetproxy}
135
136%
137% SetProxy
138%
42ff6409
JS
139\membersection{wxURL::SetProxy}\label{wxurlsetproxy}
140
e79848ac
GL
141\func{void}{SetProxy}{\param{const wxString\&}{ url\_proxy}}
142
143Sets the proxy to use for this URL.
144
145\wxheading{See also}
146
147\helpref{wxURL::SetDefaultProxy}{wxurlsetdefaultproxy}
42ff6409 148
5a96d2f4
GL
149%
150% SetProxy
151%
152\membersection{wxURL::ConvertToValidURI}
153
154\func{static wxString}{ConvertToValidURI}{\param{const wxString\&}{ uri}}
155
156It converts a non-standardized URI to a valid network URI. It encodes non
157standard characters.
22d6efa8 158