]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/url.tex
toplevel code transferred to wxTopLevelWindow
[wxWidgets.git] / docs / latex / wx / url.tex
... / ...
CommitLineData
1\section{\class{wxURL}}\label{wxurl}
2
3\wxheading{Derived from}
4
5\helpref{wxObject}{wxobject}
6
7\wxheading{Include files}
8
9<wx/url.h>
10
11\wxheading{See also}
12
13\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxProtocol}{wxprotocol}
14
15\wxheading{Example}
16
17\begin{verbatim}
18 wxURL url("http://a.host/a.dir/a.file");
19 wxInputStream *in_stream;
20
21 in_stream = url.GetInputStream();
22 // Then, you can use all IO calls of in_stream (See wxStream)
23\end{verbatim}
24
25% ----------------------------------------------------------------------------
26% Members
27% ----------------------------------------------------------------------------
28
29\latexignore{\rtfignore{\wxheading{Members}}}
30
31\membersection{wxURL::wxURL}\label{wxurlconstr}
32
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}}
42
43\func{}{\destruct{wxURL}}{\void}
44
45Destroys the URL object.
46
47%
48% GetProtocolName
49%
50\membersection{wxURL::GetProtocolName}
51
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}
60
61\func{wxProtocol\&}{GetProtocol}{\void}
62
63Returns a reference to the protocol which will be used to get the URL.
64
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
74%
75% GetError
76%
77\membersection{wxURL::GetError}
78
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}
85\begin{twocollist}\itemsep=0pt%
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.}
92\twocolitem{{\bf wxURL\_PROTOERR}}{An error occurred during negotiation.}
93\end{twocollist}%
94
95%
96% GetInputStream
97%
98\membersection{wxURL::GetInputStream}
99
100\func{wxInputStream *}{GetInputStream}{\void}
101
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.
105
106\wxheading{Return value}
107
108Returns the initialized stream. You will have to delete it yourself.
109
110\wxheading{See also}
111
112\helpref{wxInputStream}{wxinputstream}
113
114%
115% SetDefaultProxy
116%
117\membersection{wxURL::SetDefaultProxy}\label{wxurlsetdefaultproxy}
118
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%
135\membersection{wxURL::SetProxy}\label{wxurlsetproxy}
136
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}
144
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.
154