* New wxStreams (to be documented), new classes: wxBufferedStreams,
wxTextStreams git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -45,15 +45,13 @@ IMPLEMENT_CLASS(wxURL, wxObject)
|
||||
wxProtoInfo *wxURL::g_protocols = NULL;
|
||||
wxHTTP *wxURL::g_proxy;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// wxURL ////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// --------------------------------------------------------------
|
||||
// wxURL
|
||||
// --------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* --------------------------------------------------------------
|
||||
* --------- wxURL CONSTRUCTOR DESTRUCTOR -----------------------
|
||||
* --------------------------------------------------------------
|
||||
*/
|
||||
// --------------------------------------------------------------
|
||||
// --------- wxURL CONSTRUCTOR DESTRUCTOR -----------------------
|
||||
// --------------------------------------------------------------
|
||||
|
||||
wxURL::wxURL(const wxString& url)
|
||||
{
|
||||
@@ -118,11 +116,10 @@ wxURL::~wxURL()
|
||||
CleanData();
|
||||
}
|
||||
|
||||
/*
|
||||
* --------------------------------------------------------------
|
||||
* --------- wxURL urls decoders --------------------------------
|
||||
* --------------------------------------------------------------
|
||||
*/
|
||||
// --------------------------------------------------------------
|
||||
// --------- wxURL urls decoders --------------------------------
|
||||
// --------------------------------------------------------------
|
||||
|
||||
bool wxURL::PrepProto(wxString& url)
|
||||
{
|
||||
int pos;
|
||||
@@ -219,11 +216,10 @@ bool wxURL::FetchProtocol()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* --------------------------------------------------------------
|
||||
* --------- wxURL get ------------------------------------------
|
||||
* --------------------------------------------------------------
|
||||
*/
|
||||
// --------------------------------------------------------------
|
||||
// --------- wxURL get ------------------------------------------
|
||||
// --------------------------------------------------------------
|
||||
|
||||
wxInputStream *wxURL::GetInputStream(void)
|
||||
{
|
||||
wxIPV4address addr;
|
||||
@@ -318,7 +314,22 @@ void wxURL::SetProxy(const wxString& url_proxy)
|
||||
|
||||
wxString wxURL::ConvertToValidURI(const wxString& uri)
|
||||
{
|
||||
return wxString(uri);
|
||||
wxString out_str;
|
||||
wxString hexa_code;
|
||||
size_t i;
|
||||
|
||||
for (i=0;i<uri.Len();i++) {
|
||||
wxChar c = uri.GetChar(i);
|
||||
|
||||
if (!isalpha(c) && c != _T('.') && c != _T('+') && c != _T('.') &&
|
||||
c != _T('/')) {
|
||||
hexa_code.Printf(_T("%02X"), c);
|
||||
out_str += hexa_code;
|
||||
} else
|
||||
out_str += c;
|
||||
}
|
||||
|
||||
return out_str;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user