]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/url.tex
As per the wx-dev discussion in early Jan, replaced
[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
35Constructs an URL object from the string.
36
37\wxheading{Parameters}
38
39\docparam{url}{Url string to parse.}
40
41\membersection{wxURL::\destruct{wxURL}}
42ff6409 42
e79848ac
GL
43\func{}{\destruct{wxURL}}{\void}
44
45Destroys the URL object.
46
47%
48% GetProtocolName
49%
50\membersection{wxURL::GetProtocolName}
42ff6409 51
e79848ac
GL
52\constfunc{wxString}{GetProtocolName}{\void}
53
54Returns the name of the protocol which will be used to get the URL.
55
56%
57% GetProtocol
58%
59\membersection{wxURL::GetProtocol}
42ff6409 60
e79848ac
GL
61\func{wxProtocol\&}{GetProtocol}{\void}
62
63Returns a reference to the protocol which will be used to get the URL.
64
375abe3d
GL
65%
66% GetPath
67%
68\membersection{wxURL::GetPath}
69
70\func{wxString}{GetPath}{\void}
71
72Returns the path of the file to fetch. This path was encoded in the URL.
73
e79848ac
GL
74%
75% GetError
76%
77\membersection{wxURL::GetError}
42ff6409 78
e79848ac
GL
79\constfunc{wxURLError}{GetError}{\void}
80
81Returns the last error. This error refers to the URL parsing or to the protocol.
82It can be one of these errors:
83
84\twocolwidtha{7cm}
6be663cf 85\begin{twocollist}\itemsep=0pt%
e79848ac
GL
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.}
f6bcfd97 92\twocolitem{{\bf wxURL\_PROTOERR}}{An error occurred during negotiation.}
e79848ac
GL
93\end{twocollist}%
94
95%
96% GetInputStream
97%
98\membersection{wxURL::GetInputStream}
42ff6409 99
e79848ac
GL
100\func{wxInputStream *}{GetInputStream}{\void}
101
7d2946d2
GL
102Creates a new input stream on the the specified URL. You can use all but seek
103functionnality of wxStream. Seek isn't available on all stream. For example,
104http or ftp streams doesn't deal with it.
e79848ac 105
42ff6409 106\wxheading{Return value}
e79848ac 107
7d2946d2 108Returns the initialized stream. You will have to delete it yourself.
e79848ac 109
42ff6409 110\wxheading{See also}
e79848ac 111
b2cf617c 112\helpref{wxInputStream}{wxinputstream}
e79848ac
GL
113
114%
115% SetDefaultProxy
116%
42ff6409
JS
117\membersection{wxURL::SetDefaultProxy}\label{wxurlsetdefaultproxy}
118
e79848ac
GL
119\func{static void}{SetDefaultProxy}{\param{const wxString\&}{ url\_proxy}}
120
121Sets the default proxy server to use to get the URL. The string specifies
122the proxy like this: <hostname>:<port number>.
123
124\wxheading{Parameters}
125
126\docparam{url\_proxy}{Specifies the proxy to use}
127
128\wxheading{See also}
129
130\helpref{wxURL::SetProxy}{wxurlsetproxy}
131
132%
133% SetProxy
134%
42ff6409
JS
135\membersection{wxURL::SetProxy}\label{wxurlsetproxy}
136
e79848ac
GL
137\func{void}{SetProxy}{\param{const wxString\&}{ url\_proxy}}
138
139Sets the proxy to use for this URL.
140
141\wxheading{See also}
142
143\helpref{wxURL::SetDefaultProxy}{wxurlsetdefaultproxy}
42ff6409 144
5a96d2f4
GL
145%
146% SetProxy
147%
148\membersection{wxURL::ConvertToValidURI}
149
150\func{static wxString}{ConvertToValidURI}{\param{const wxString\&}{ uri}}
151
152It converts a non-standardized URI to a valid network URI. It encodes non
153standard characters.
22d6efa8 154