Skip to content

4.0 Wishlist: KURL -> KDE::Net::URI + KDE::Net::URL

Sunday, 14 September 2003  |  Tjansen

I hope this becomes a loose series of various things that I would like to change for KDE 4.0. The code may appear in kdenonbeta/kdeutil where I keep utility classes for the KDE namespace.

Here is number one: KURL. KURL basically describes HTTP URLs which happen to be also usable for all other URIs that use the Common Internet Syntax from RFC 1738 Section 3.1. But KURL is not suitable for a growing number of URIs (read this if you do not know the difference between URLs and URIs) that use different syntaxes, like URNs, data: URIs and service: URIs. So I'd like to move some code into a super class called KDE::Net::URI that implements the scheme part that all URIs have in common, and then rename KURL to KDE::Net::URL, following the Namespace convention described in a previous post. This would make it possible to create classes for other schemes. Network-transparent code like KIO should use the KDE::Net::URI class, to allow the use of protocols that do not follow the Common Internet syntax.