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