X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2c09fb3b8b492e6cdfd003a6d8f441aa255f2045..1dfd425a8cda56960488f1ba5b39ad6e223a1e05:/src/common/uri.cpp?ds=sidebyside diff --git a/src/common/uri.cpp b/src/common/uri.cpp index f7351a56ac..be18e65e5d 100644 --- a/src/common/uri.cpp +++ b/src/common/uri.cpp @@ -62,7 +62,7 @@ wxURI::wxURI(const wxString& uri) : m_hostType(wxURI_REGNAME), m_fields(0) Create(uri); } -wxURI::wxURI(const wxURI& uri) : m_hostType(wxURI_REGNAME), m_fields(0) +wxURI::wxURI(const wxURI& uri) : wxObject(), m_hostType(wxURI_REGNAME), m_fields(0) { Assign(uri); } @@ -79,7 +79,7 @@ wxURI::~wxURI() void wxURI::Clear() { m_scheme = m_user = m_server = m_port = m_path = - m_query = m_fragment = wxT(""); + m_query = m_fragment = wxEmptyString; m_hostType = wxURI_REGNAME; @@ -401,7 +401,7 @@ const wxChar* wxURI::ParseScheme(const wxChar* uri) } else //relative uri with relative path reference - m_scheme = wxT(""); + m_scheme = wxEmptyString; } // else //relative uri with _possible_ relative path reference @@ -450,7 +450,7 @@ const wxChar* wxURI::ParseUser(const wxChar* uri) uricopy = ++uri; } else - m_user = wxT(""); + m_user = wxEmptyString; return uricopy; } @@ -739,7 +739,7 @@ void wxURI::Resolve(const wxURI& base, int flags) return; } - //No sheme - inherit + //No scheme - inherit m_scheme = base.m_scheme; m_fields |= wxURI_SCHEME; @@ -802,7 +802,7 @@ void wxURI::Resolve(const wxURI& base, int flags) // T.query = R.query; if (m_path[0u] != wxT('/')) { - //Marge paths + //Merge paths const wxChar* op = m_path.c_str(); const wxChar* bp = base.m_path.c_str() + base.m_path.Length(); @@ -1227,7 +1227,7 @@ bool wxURI::IsDigit(const wxChar& c) // --------------------------------------------------------------------------- // -// wxURL Compatability +// wxURL Compatibility // // --------------------------------------------------------------------------- @@ -1237,6 +1237,21 @@ bool wxURI::IsDigit(const wxChar& c) #include "wx/url.h" +wxString wxURL::GetProtocolName() const +{ + return m_scheme; +} + +wxString wxURL::GetHostName() const +{ + return m_server; +} + +wxString wxURL::GetPath() const +{ + return m_path; +} + //Note that this old code really doesn't convert to a URI that well and looks //more like a dirty hack than anything else...