]>
git.saurik.com Git - wxWidgets.git/blob - interface/url.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxURL class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
13 wxURL is a specialization of wxURI for parsing URLs.
14 Please look at wxURI documentation for more info about the functions
15 you can use to retrieve the various parts of the URL (scheme, server, port,
18 Supports standard assignment operators, copy constructors,
19 and comparison operators.
25 wxSocketBase, wxProtocol
27 class wxURL
: public wxURI
31 Constructs a URL object from the string. The URL must be valid according
32 to RFC 1738. In particular, file URLs must be of the format
33 @c file://hostname/path/to/file otherwise GetError()
34 will return a value different from @c wxURL_NOERR.
36 It is valid to leave out the hostname but slashes must remain in place -
37 i.e. a file URL without a hostname must contain three consecutive slashes
38 (e.g. @c file:///somepath/myfile).
43 #define wxURL(const wxString& url = wxEmptyString) /* implementation is private */
46 Destroys the URL object.
48 #define ~wxURL() /* implementation is private */
51 Returns the last error. This error refers to the URL parsing or to the protocol.
52 It can be one of these errors:
63 Syntax error in the URL string.
68 Found no protocol which can get this URL.
73 A host name is required for this protocol.
78 A path is required for this protocol.
88 An error occurred during negotiation.
90 wxURLError
GetError();
93 Creates a new input stream on the specified URL. You can use all but seek
94 functionality of wxStream. Seek isn't available on all streams. For example,
95 HTTP or FTP streams don't deal with it.
97 Note that this method is somewhat deprecated, all future wxWidgets applications
98 should really use wxFileSystem instead.
102 @returns Returns the initialized stream. You will have to delete it
107 wxInputStream
* GetInputStream();
110 Returns a reference to the protocol which will be used to get the URL.
112 wxProtocol
GetProtocol();
115 Returns @true if this object is correctly initialized, i.e. if
116 GetError() returns @c wxURL_NOERR.
118 #define bool IsOk() /* implementation is private */
121 Sets the default proxy server to use to get the URL. The string specifies
122 the proxy like this: hostname:port number.
125 Specifies the proxy to use
129 static void SetDefaultProxy(const wxString
& url_proxy
);
132 Sets the proxy to use for this URL.
134 @sa SetDefaultProxy()
136 void SetProxy(const wxString
& url_proxy
);
139 Initializes this object with the given URL and returns @c wxURL_NOERR
140 if it's valid (see GetError() for more info).
142 #define wxURLError SetURL(const wxString& url) /* implementation is private */