1 \section{\class{wxURL
}}\label{wxurl
}
5 Supports standard assignment operators, copy constructors,
6 and comparison operators.
8 \wxheading{Derived from
}
10 \helpref{wxURI
}{wxuri
}
12 \wxheading{Include files
}
18 \helpref{wxSocketBase
}{wxsocketbase
},
\helpref{wxProtocol
}{wxprotocol
}
20 % ----------------------------------------------------------------------------
22 % ----------------------------------------------------------------------------
24 \latexignore{\rtfignore{\wxheading{Members
}}}
26 \membersection{wxURL::wxURL
}\label{wxurlctor
}
28 \func{}{wxURL
}{\param{const wxString\&
}{ url
}}
30 Constructs a URL object from the string. The URL must be valid according
31 to 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
33 but slashes must remain in place-- i.e. a file URL without a hostname must
34 contain three consecutive slashes.
36 \wxheading{Parameters
}
38 \docparam{url
}{Url string to parse.
}
40 \membersection{wxURL::
\destruct{wxURL
}}\label{wxurldtor
}
42 \func{}{\destruct{wxURL
}}{\void}
44 Destroys the URL object.
49 \membersection{wxURL::GetProtocol
}\label{wxurlgetprotocol
}
51 \func{wxProtocol\&
}{GetProtocol
}{\void}
53 Returns a reference to the protocol which will be used to get the URL.
58 \membersection{wxURL::GetError
}\label{wxurlgeterror
}
60 \constfunc{wxURLError
}{GetError
}{\void}
62 Returns the last error. This error refers to the URL parsing or to the protocol.
63 It can be one of these errors:
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.
}
79 \membersection{wxURL::GetInputStream
}\label{wxurlgetinputstream
}
81 \func{wxInputStream *
}{GetInputStream
}{\void}
83 Creates a new input stream on the the specified URL. You can use all but seek
84 functionality of wxStream. Seek isn't available on all stream. For example,
85 http or ftp streams doesn't deal with it.
87 Note that this method is somewhat depreciated, all future wxWidgets applications
88 should really use
\helpref{wxFileSystem
}{wxfilesystem
} instead.
93 wxURL url("http://a.host/a.dir/a.file");
94 if (url.GetError() == wxURL_NOERR)
96 wxInputStream *in_stream;
98 in_stream = url.GetInputStream();
99 // Then, you can use all IO calls of in_stream (See wxStream)
103 \wxheading{Return value
}
105 Returns the initialized stream. You will have to delete it yourself.
109 \helpref{wxInputStream
}{wxinputstream
}
114 \membersection{wxURL::SetDefaultProxy
}\label{wxurlsetdefaultproxy
}
116 \func{static void
}{SetDefaultProxy
}{\param{const wxString\&
}{ url
\_proxy}}
118 Sets the default proxy server to use to get the URL. The string specifies
119 the proxy like this: <hostname>:<port number>.
121 \wxheading{Parameters
}
123 \docparam{url
\_proxy}{Specifies the proxy to use
}
127 \helpref{wxURL::SetProxy
}{wxurlsetproxy
}
132 \membersection{wxURL::SetProxy
}\label{wxurlsetproxy
}
134 \func{void
}{SetProxy
}{\param{const wxString\&
}{ url
\_proxy}}
136 Sets the proxy to use for this URL.
140 \helpref{wxURL::SetDefaultProxy
}{wxurlsetdefaultproxy
}