]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/url.tex
Doc updates.
[wxWidgets.git] / docs / latex / wx / url.tex
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
35 Constructs 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
45 Destroys the URL object.
46
47 %
48 % GetProtocolName
49 %
50 \membersection{wxURL::GetProtocolName}
51
52 \constfunc{wxString}{GetProtocolName}{\void}
53
54 Returns 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
63 Returns 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
72 Returns 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
81 Returns the last error. This error refers to the URL parsing or to the protocol.
82 It 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 occured during negotiation.}
93 \end{twocollist}%
94
95 %
96 % GetInputStream
97 %
98 \membersection{wxURL::GetInputStream}
99
100 \func{wxInputStream *}{GetInputStream}{\void}
101
102 Creates a new input stream on the the specified URL. You can use all but seek
103 functionnality of wxStream. Seek isn't available on all stream. For example,
104 http or ftp streams doesn't deal with it.
105
106 \wxheading{Return value}
107
108 Returns the initialized stream. You will have to delete it yourself.
109
110 \wxheading{See also}
111
112 %\helpref{wxInputStream}{wxinputstream}
113 wxInputStream
114
115 %
116 % SetDefaultProxy
117 %
118 \membersection{wxURL::SetDefaultProxy}\label{wxurlsetdefaultproxy}
119
120 \func{static void}{SetDefaultProxy}{\param{const wxString\&}{ url\_proxy}}
121
122 Sets the default proxy server to use to get the URL. The string specifies
123 the proxy like this: <hostname>:<port number>.
124
125 \wxheading{Parameters}
126
127 \docparam{url\_proxy}{Specifies the proxy to use}
128
129 \wxheading{See also}
130
131 \helpref{wxURL::SetProxy}{wxurlsetproxy}
132
133 %
134 % SetProxy
135 %
136 \membersection{wxURL::SetProxy}\label{wxurlsetproxy}
137
138 \func{void}{SetProxy}{\param{const wxString\&}{ url\_proxy}}
139
140 Sets the proxy to use for this URL.
141
142 \wxheading{See also}
143
144 \helpref{wxURL::SetDefaultProxy}{wxurlsetdefaultproxy}
145