1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
|
<HTML>
<head><title>wxURL</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxurl"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx253.htm#wxupdateuievent"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx255.htm#wxvalidator"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxURL</H2>
<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/url.h><P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx209.htm#wxsocketbase">wxSocketBase</A>, <A HREF="wx186.htm#wxprotocol">wxProtocol</A><P>
<B><FONT COLOR="#FF0000">Example</FONT></B><P>
<PRE>
wxURL url("http://a.host/a.dir/a.file");
wxInputStream *in_stream;
in_stream = url.GetInputStream();
// Then, you can use all IO calls of in_stream (See wxStream)
</PRE>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#wxurlconstr">wxURL::wxURL</A><BR>
<A HREF="#topic998">wxURL::~wxURL</A><BR>
<A HREF="#topic999">wxURL::GetProtocolName</A><BR>
<A HREF="#topic1000">wxURL::GetProtocol</A><BR>
<A HREF="#topic1001">wxURL::GetPath</A><BR>
<A HREF="#topic1002">wxURL::GetError</A><BR>
<A HREF="#topic1003">wxURL::GetInputStream</A><BR>
<A HREF="#wxurlsetdefaultproxy">wxURL::SetDefaultProxy</A><BR>
<A HREF="#wxurlsetproxy">wxURL::SetProxy</A><BR>
<P>
<HR>
<A NAME="wxurlconstr"></A>
<H3>wxURL::wxURL</H3>
<P>
<B></B> <B>wxURL</B>(<B>const wxString&</B><I> url</I>)<P>
Constructs an URL object from the string.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>url</I><UL><UL>
Url string to parse.</UL></UL>
<P>
<HR>
<A NAME="topic998"></A>
<H3>wxURL::~wxURL</H3>
<P>
<B></B> <B>~wxURL</B>()<P>
Destroys the URL object.<P>
<HR>
<A NAME="topic999"></A>
<H3>wxURL::GetProtocolName</H3>
<P>
<B>wxString</B> <B>GetProtocolName</B>() <B>const</B><P>
Returns the name of the protocol which will be used to get the URL.<P>
<HR>
<A NAME="topic1000"></A>
<H3>wxURL::GetProtocol</H3>
<P>
<B>wxProtocol&</B> <B>GetProtocol</B>()<P>
Returns a reference to the protocol which will be used to get the URL.<P>
<HR>
<A NAME="topic1001"></A>
<H3>wxURL::GetPath</H3>
<P>
<B>wxString</B> <B>GetPath</B>()<P>
Returns the path of the file to fetch. This path was encoded in the URL.<P>
<HR>
<A NAME="topic1002"></A>
<H3>wxURL::GetError</H3>
<P>
<B>wxURLError</B> <B>GetError</B>() <B>const</B><P>
Returns the last error. This error refers to the URL parsing or to the protocol.
It can be one of these errors:<P>
<TABLE>
<TR><TD VALIGN=TOP>
<B>wxURL_NOERR</B>
</TD>
<TD VALIGN=TOP>
No error.
</TD></TR>
<TR><TD VALIGN=TOP>
<B>wxURL_SNTXERR</B>
</TD>
<TD VALIGN=TOP>
Syntax error in the URL string.
</TD></TR>
<TR><TD VALIGN=TOP>
<B>wxURL_NOPROTO</B>
</TD>
<TD VALIGN=TOP>
Found no protocol which can get this URL.
</TD></TR>
<TR><TD VALIGN=TOP>
<B>wxURL_NOHOST</B>
</TD>
<TD VALIGN=TOP>
An host name is required for this protocol.
</TD></TR>
<TR><TD VALIGN=TOP>
<B>wxURL_NOPATH</B>
</TD>
<TD VALIGN=TOP>
A path is required for this protocol.
</TD></TR>
<TR><TD VALIGN=TOP>
<B>wxURL_CONNERR</B>
</TD>
<TD VALIGN=TOP>
Connection error.
</TD></TR>
<TR><TD VALIGN=TOP>
<B>wxURL_PROTOERR</B>
</TD>
<TD VALIGN=TOP>
An error occured during negotiation.
</TD></TR>
</TABLE>
<HR>
<A NAME="topic1003"></A>
<H3>wxURL::GetInputStream</H3>
<P>
<B>wxInputStream *</B> <B>GetInputStream</B>()<P>
Creates a new input stream on the the specified URL. You can use all but seek
functionnality of wxStream. Seek isn't available on all stream. For example,
http or ftp streams doesn't deal with it.<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
Returns the initialized stream. You will have to delete it yourself.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
wxInputStream<P>
<HR>
<A NAME="wxurlsetdefaultproxy"></A>
<H3>wxURL::SetDefaultProxy</H3>
<P>
<B>static void</B> <B>SetDefaultProxy</B>(<B>const wxString&</B><I> url_proxy</I>)<P>
Sets the default proxy server to use to get the URL. The string specifies
the proxy like this: <hostname>:<port number>.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>url_proxy</I><UL><UL>
Specifies the proxy to use</UL></UL>
<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx254.htm#wxurlsetproxy">wxURL::SetProxy</A><P>
<HR>
<A NAME="wxurlsetproxy"></A>
<H3>wxURL::SetProxy</H3>
<P>
<B>void</B> <B>SetProxy</B>(<B>const wxString&</B><I> url_proxy</I>)<P>
Sets the proxy to use for this URL.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx254.htm#wxurlsetdefaultproxy">wxURL::SetDefaultProxy</A><P>
</BODY></HTML>
|