1 \section{\class{wxURL
}}\label{wxurl
}
3 \wxheading{Derived from
}
5 \helpref{wxObject
}{wxobject
}
7 \wxheading{Include files
}
13 \helpref{wxSocketBase
}{wxsocketbase
},
\helpref{wxProtocol
}{wxprotocol
}
18 wxURL url("http://a.host/a.dir/a.file");
19 wxInputStream *in_stream;
21 in_stream = url.GetInputStream();
22 // Then, you can use all IO calls of in_stream (See wxStream)
25 % ----------------------------------------------------------------------------
27 % ----------------------------------------------------------------------------
29 \latexignore{\rtfignore{\wxheading{Members
}}}
31 \membersection{wxURL::wxURL
}\label{wxurlctor
}
33 \func{}{wxURL
}{\param{const wxString\&
}{ url
}}
35 Constructs a URL object from the string. The URL must be valid according
36 to RFC
1738. In particular, file URLs must be of the format
37 'file://hostname/path/to/file'. It is valid to leave out the hostname
38 but slashes must remain in place-- i.e. a file URL without a hostname must
39 contain three consecutive slashes.
41 \wxheading{Parameters
}
43 \docparam{url
}{Url string to parse.
}
45 \membersection{wxURL::
\destruct{wxURL
}}\label{wxurldtor
}
47 \func{}{\destruct{wxURL
}}{\void}
49 Destroys the URL object.
54 \membersection{wxURL::GetProtocolName
}\label{wxurlgetprotocolname
}
56 \constfunc{wxString
}{GetProtocolName
}{\void}
58 Returns the name of the protocol which will be used to get the URL.
63 \membersection{wxURL::GetProtocol
}\label{wxurlgetprotocol
}
65 \func{wxProtocol\&
}{GetProtocol
}{\void}
67 Returns a reference to the protocol which will be used to get the URL.
72 \membersection{wxURL::GetPath
}\label{wxurlgetpath
}
74 \func{wxString
}{GetPath
}{\void}
76 Returns the path of the file to fetch. This path was encoded in the URL.
81 \membersection{wxURL::GetError
}\label{wxurlgeterror
}
83 \constfunc{wxURLError
}{GetError
}{\void}
85 Returns the last error. This error refers to the URL parsing or to the protocol.
86 It can be one of these errors:
89 \begin{twocollist
}\itemsep=
0pt
%
90 \twocolitem{{\bf wxURL
\_NOERR}}{No error.
}
91 \twocolitem{{\bf wxURL
\_SNTXERR}}{Syntax error in the URL string.
}
92 \twocolitem{{\bf wxURL
\_NOPROTO}}{Found no protocol which can get this URL.
}
93 \twocolitem{{\bf wxURL
\_NOHOST}}{An host name is required for this protocol.
}
94 \twocolitem{{\bf wxURL
\_NOPATH}}{A path is required for this protocol.
}
95 \twocolitem{{\bf wxURL
\_CONNERR}}{Connection error.
}
96 \twocolitem{{\bf wxURL
\_PROTOERR}}{An error occurred during negotiation.
}
102 \membersection{wxURL::GetInputStream
}\label{wxurlgetinputstream
}
104 \func{wxInputStream *
}{GetInputStream
}{\void}
106 Creates a new input stream on the the specified URL. You can use all but seek
107 functionality of wxStream. Seek isn't available on all stream. For example,
108 http or ftp streams doesn't deal with it.
110 \wxheading{Return value
}
112 Returns the initialized stream. You will have to delete it yourself.
116 \helpref{wxInputStream
}{wxinputstream
}
121 \membersection{wxURL::SetDefaultProxy
}\label{wxurlsetdefaultproxy
}
123 \func{static void
}{SetDefaultProxy
}{\param{const wxString\&
}{ url
\_proxy}}
125 Sets the default proxy server to use to get the URL. The string specifies
126 the proxy like this: <hostname>:<port number>.
128 \wxheading{Parameters
}
130 \docparam{url
\_proxy}{Specifies the proxy to use
}
134 \helpref{wxURL::SetProxy
}{wxurlsetproxy
}
139 \membersection{wxURL::SetProxy
}\label{wxurlsetproxy
}
141 \func{void
}{SetProxy
}{\param{const wxString\&
}{ url
\_proxy}}
143 Sets the proxy to use for this URL.
147 \helpref{wxURL::SetDefaultProxy
}{wxurlsetdefaultproxy
}
152 \membersection{wxURL::ConvertToValidURI
}\label{wxurlconverttovaliduri
}
154 \func{static wxString
}{ConvertToValidURI
}{\param{const wxString\&
}{ uri
}}
156 It converts a non-standardized URI to a valid network URI. It encodes non