]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/url.tex
Always use wxFULL_REPAINT_ON_RESIZE for generic status bar.
[wxWidgets.git] / docs / latex / wx / url.tex
CommitLineData
e79848ac
GL
1\section{\class{wxURL}}\label{wxurl}
2
b60b2ec8
RN
3Parses URLs.
4
5Supports standard assignment operators, copy constructors,
6and comparison operators.
7
e79848ac
GL
8\wxheading{Derived from}
9
b60b2ec8 10\helpref{wxURI}{wxuri}
e79848ac 11
954b8ae6
JS
12\wxheading{Include files}
13
14<wx/url.h>
15
e79848ac
GL
16\wxheading{See also}
17
42ff6409 18\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxProtocol}{wxprotocol}
e79848ac
GL
19
20% ----------------------------------------------------------------------------
21% Members
22% ----------------------------------------------------------------------------
296ec7d3
VZ
23
24\latexignore{\rtfignore{\wxheading{Members}}}
e79848ac 25
15d83f72 26\membersection{wxURL::wxURL}\label{wxurlctor}
42ff6409 27
e79848ac
GL
28\func{}{wxURL}{\param{const wxString\&}{ url}}
29
085c39b4
DE
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.
e79848ac
GL
35
36\wxheading{Parameters}
37
38\docparam{url}{Url string to parse.}
39
15d83f72 40\membersection{wxURL::\destruct{wxURL}}\label{wxurldtor}
42ff6409 41
e79848ac
GL
42\func{}{\destruct{wxURL}}{\void}
43
44Destroys the URL object.
45
e79848ac
GL
46%
47% GetProtocol
48%
15d83f72 49\membersection{wxURL::GetProtocol}\label{wxurlgetprotocol}
42ff6409 50
e79848ac
GL
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%
15d83f72 58\membersection{wxURL::GetError}\label{wxurlgeterror}
42ff6409 59
e79848ac
GL
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}
6be663cf 66\begin{twocollist}\itemsep=0pt%
e79848ac
GL
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.}
f6bcfd97 73\twocolitem{{\bf wxURL\_PROTOERR}}{An error occurred during negotiation.}
e79848ac
GL
74\end{twocollist}%
75
76%
77% GetInputStream
78%
15d83f72 79\membersection{wxURL::GetInputStream}\label{wxurlgetinputstream}
42ff6409 80
e79848ac
GL
81\func{wxInputStream *}{GetInputStream}{\void}
82
43e8916f 83Creates a new input stream on the specified URL. You can use all but seek
154b6b0f
VZ
84functionality of wxStream. Seek isn't available on all streams. For example,
85HTTP or FTP streams don't deal with it.
e79848ac 86
ce321570
RN
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
42ff6409 103\wxheading{Return value}
e79848ac 104
7d2946d2 105Returns the initialized stream. You will have to delete it yourself.
e79848ac 106
42ff6409 107\wxheading{See also}
e79848ac 108
b2cf617c 109\helpref{wxInputStream}{wxinputstream}
e79848ac
GL
110
111%
112% SetDefaultProxy
113%
42ff6409
JS
114\membersection{wxURL::SetDefaultProxy}\label{wxurlsetdefaultproxy}
115
e79848ac
GL
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%
42ff6409
JS
132\membersection{wxURL::SetProxy}\label{wxurlsetproxy}
133
e79848ac
GL
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}
42ff6409 141