]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/url.tex
quote an underscore
[wxWidgets.git] / docs / latex / wx / url.tex
... / ...
CommitLineData
1\section{\class{wxURL}}\label{wxurl}
2
3Parses URLs.
4
5Supports standard assignment operators, copy constructors,
6and comparison operators.
7
8\wxheading{Derived from}
9
10\helpref{wxURI}{wxuri}
11
12\wxheading{Include files}
13
14<wx/url.h>
15
16\wxheading{See also}
17
18\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxProtocol}{wxprotocol}
19
20% ----------------------------------------------------------------------------
21% Members
22% ----------------------------------------------------------------------------
23
24\latexignore{\rtfignore{\wxheading{Members}}}
25
26\membersection{wxURL::wxURL}\label{wxurlctor}
27
28\func{}{wxURL}{\param{const wxString\&}{ url}}
29
30Constructs a URL object from the string. The URL must be valid according
31to RFC 1738. In particular, file URLs must be of the format
32'file://hostname/path/to/file'. It is valid to leave out the hostname
33but slashes must remain in place-- i.e. a file URL without a hostname must
34contain three consecutive slashes.
35
36\wxheading{Parameters}
37
38\docparam{url}{Url string to parse.}
39
40\membersection{wxURL::\destruct{wxURL}}\label{wxurldtor}
41
42\func{}{\destruct{wxURL}}{\void}
43
44Destroys the URL object.
45
46%
47% GetProtocol
48%
49\membersection{wxURL::GetProtocol}\label{wxurlgetprotocol}
50
51\func{wxProtocol\&}{GetProtocol}{\void}
52
53Returns a reference to the protocol which will be used to get the URL.
54
55%
56% GetError
57%
58\membersection{wxURL::GetError}\label{wxurlgeterror}
59
60\constfunc{wxURLError}{GetError}{\void}
61
62Returns the last error. This error refers to the URL parsing or to the protocol.
63It can be one of these errors:
64
65\twocolwidtha{7cm}
66\begin{twocollist}\itemsep=0pt%
67\twocolitem{{\bf wxURL\_NOERR}}{No error.}
68\twocolitem{{\bf wxURL\_SNTXERR}}{Syntax error in the URL string.}
69\twocolitem{{\bf wxURL\_NOPROTO}}{Found no protocol which can get this URL.}
70\twocolitem{{\bf wxURL\_NOHOST}}{An host name is required for this protocol.}
71\twocolitem{{\bf wxURL\_NOPATH}}{A path is required for this protocol.}
72\twocolitem{{\bf wxURL\_CONNERR}}{Connection error.}
73\twocolitem{{\bf wxURL\_PROTOERR}}{An error occurred during negotiation.}
74\end{twocollist}%
75
76%
77% GetInputStream
78%
79\membersection{wxURL::GetInputStream}\label{wxurlgetinputstream}
80
81\func{wxInputStream *}{GetInputStream}{\void}
82
83Creates a new input stream on the specified URL. You can use all but seek
84functionality of wxStream. Seek isn't available on all streams. For example,
85HTTP or FTP streams don't deal with it.
86
87Note that this method is somewhat depreciated, all future wxWidgets applications
88should really use \helpref{wxFileSystem}{wxfilesystem} instead.
89
90Example:
91
92\begin{verbatim}
93 wxURL url("http://a.host/a.dir/a.file");
94 if (url.GetError() == wxURL_NOERR)
95 {
96 wxInputStream *in_stream;
97
98 in_stream = url.GetInputStream();
99 // Then, you can use all IO calls of in_stream (See wxStream)
100 }
101\end{verbatim}
102
103\wxheading{Return value}
104
105Returns the initialized stream. You will have to delete it yourself.
106
107\wxheading{See also}
108
109\helpref{wxInputStream}{wxinputstream}
110
111%
112% SetDefaultProxy
113%
114\membersection{wxURL::SetDefaultProxy}\label{wxurlsetdefaultproxy}
115
116\func{static void}{SetDefaultProxy}{\param{const wxString\&}{ url\_proxy}}
117
118Sets the default proxy server to use to get the URL. The string specifies
119the proxy like this: <hostname>:<port number>.
120
121\wxheading{Parameters}
122
123\docparam{url\_proxy}{Specifies the proxy to use}
124
125\wxheading{See also}
126
127\helpref{wxURL::SetProxy}{wxurlsetproxy}
128
129%
130% SetProxy
131%
132\membersection{wxURL::SetProxy}\label{wxurlsetproxy}
133
134\func{void}{SetProxy}{\param{const wxString\&}{ url\_proxy}}
135
136Sets the proxy to use for this URL.
137
138\wxheading{See also}
139
140\helpref{wxURL::SetDefaultProxy}{wxurlsetdefaultproxy}
141