Moved 'url' and 'urlUtils' classes to 'utility' namespace.

This commit is contained in:
Vincent Richard 2005-04-14 11:27:49 +00:00
parent 6a913043d7
commit 3459549181
10 changed files with 37 additions and 30 deletions

View File

@ -2,6 +2,11 @@
VERSION 0.7.1cvs VERSION 0.7.1cvs
================ ================
2005-04-14 Vincent Richard <vincent@vincent-richard.net>
* url.{hpp|cpp}, urlUtils.{hpp|cpp}: moved 'url' and 'urlUtils' from
'vmime::messaging' namespace to 'vmime::utility' namespace.
2005-04-12 Vincent Richard <vincent@vincent-richard.net> 2005-04-12 Vincent Richard <vincent@vincent-richard.net>
* Started version 0.7.1. * Started version 0.7.1.

View File

@ -155,6 +155,8 @@ libvmime_sources = [
'utility/stream.cpp', 'utility/stream.hpp', 'utility/stream.cpp', 'utility/stream.hpp',
'utility/stringProxy.cpp', 'utility/stringProxy.hpp', 'utility/stringProxy.cpp', 'utility/stringProxy.hpp',
'utility/stringUtils.cpp', 'utility/stringUtils.hpp', 'utility/stringUtils.cpp', 'utility/stringUtils.hpp',
'utility/url.cpp', 'utility/url.hpp',
'utility/urlUtils.cpp', 'utility/urlUtils.hpp',
'mdn/MDNHelper.cpp', 'mdn/MDNHelper.hpp', 'mdn/MDNHelper.cpp', 'mdn/MDNHelper.hpp',
'mdn/MDNInfos.cpp', 'mdn/MDNInfos.hpp', 'mdn/MDNInfos.cpp', 'mdn/MDNInfos.hpp',
'mdn/receivedMDNInfos.cpp', 'mdn/receivedMDNInfos.hpp', 'mdn/receivedMDNInfos.cpp', 'mdn/receivedMDNInfos.hpp',
@ -192,9 +194,7 @@ libvmime_messaging_sources = [
'messaging/socket.hpp', 'messaging/socket.hpp',
'messaging/store.hpp', 'messaging/store.hpp',
'messaging/timeoutHandler.hpp', 'messaging/timeoutHandler.hpp',
'messaging/transport.hpp', 'messaging/transport.hpp'
'messaging/url.cpp', 'messaging/url.hpp',
'messaging/urlUtils.cpp', 'messaging/urlUtils.hpp'
] ]
libvmime_messaging_proto_sources = [ libvmime_messaging_proto_sources = [

View File

@ -60,13 +60,13 @@ service* serviceFactory::create
service* serviceFactory::create service* serviceFactory::create
(session* sess, const url& u, authenticator* auth) (session* sess, const utility::url& u, authenticator* auth)
{ {
service* serv = create(sess, u.getProtocol(), auth); service* serv = create(sess, u.getProtocol(), auth);
sess->getProperties()[serv->getInfos().getPropertyPrefix() + "server.address"] = u.getHost(); sess->getProperties()[serv->getInfos().getPropertyPrefix() + "server.address"] = u.getHost();
if (u.getPort() != url::UNSPECIFIED_PORT) if (u.getPort() != utility::url::UNSPECIFIED_PORT)
sess->getProperties()[serv->getInfos().getPropertyPrefix() + "server.port"] = u.getPort(); sess->getProperties()[serv->getInfos().getPropertyPrefix() + "server.port"] = u.getPort();
// Path portion of the URL is used to point a specific folder (empty = root). // Path portion of the URL is used to point a specific folder (empty = root).

View File

@ -64,7 +64,7 @@ transport* session::getTransport(const string& protocol, authenticator* auth)
} }
transport* session::getTransport(const messaging::url& url, authenticator* auth) transport* session::getTransport(const utility::url& url, authenticator* auth)
{ {
service* sv = serviceFactory::getInstance()->create(this, url, auth); service* sv = serviceFactory::getInstance()->create(this, url, auth);
@ -98,7 +98,7 @@ store* session::getStore(const string& protocol, authenticator* auth)
} }
store* session::getStore(const messaging::url& url, authenticator* auth) store* session::getStore(const utility::url& url, authenticator* auth)
{ {
service* sv = serviceFactory::getInstance()->create(this, url, auth); service* sv = serviceFactory::getInstance()->create(this, url, auth);

View File

@ -17,17 +17,17 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include "vmime/messaging/url.hpp" #include "vmime/utility/url.hpp"
#include "vmime/parserHelpers.hpp" #include "vmime/parserHelpers.hpp"
#include "vmime/messaging/urlUtils.hpp" #include "vmime/utility/urlUtils.hpp"
#include "vmime/exception.hpp" #include "vmime/exception.hpp"
#include <sstream> #include <sstream>
namespace vmime { namespace vmime {
namespace messaging { namespace utility {
// Known protocols // Known protocols
@ -302,5 +302,5 @@ void url::setPath(const string& path)
} }
} // messaging } // utility
} // vmime } // vmime

View File

@ -17,12 +17,12 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include "vmime/messaging/urlUtils.hpp" #include "vmime/utility/urlUtils.hpp"
#include "vmime/parserHelpers.hpp" #include "vmime/parserHelpers.hpp"
namespace vmime { namespace vmime {
namespace messaging { namespace utility {
const string urlUtils::encode(const string& s) const string urlUtils::encode(const string& s)
@ -90,5 +90,5 @@ const string urlUtils::decode(const string& s)
} }
} // messaging } // utility
} // vmime } // vmime

View File

@ -25,13 +25,14 @@
#include "vmime/types.hpp" #include "vmime/types.hpp"
#include "vmime/base.hpp" #include "vmime/base.hpp"
#include "vmime/utility/stringUtils.hpp" #include "vmime/utility/stringUtils.hpp"
#include "vmime/utility/url.hpp"
#include "vmime/messaging/serviceInfos.hpp" #include "vmime/messaging/serviceInfos.hpp"
#include "vmime/messaging/authenticator.hpp" #include "vmime/messaging/authenticator.hpp"
#include "vmime/messaging/progressionListener.hpp" #include "vmime/messaging/progressionListener.hpp"
#include "vmime/messaging/timeoutHandler.hpp" #include "vmime/messaging/timeoutHandler.hpp"
#include "vmime/messaging/url.hpp"
namespace vmime { namespace vmime {
@ -146,7 +147,7 @@ public:
* @throw exceptions::no_service_available if no service is registered * @throw exceptions::no_service_available if no service is registered
* for this protocol * for this protocol
*/ */
service* create(session* sess, const url& u, authenticator* auth = NULL); service* create(session* sess, const utility::url& u, authenticator* auth = NULL);
/** Return information about a registered protocol. /** Return information about a registered protocol.
* *

View File

@ -23,7 +23,7 @@
#include "vmime/messaging/authenticator.hpp" #include "vmime/messaging/authenticator.hpp"
#include "vmime/messaging/progressionListener.hpp" #include "vmime/messaging/progressionListener.hpp"
#include "vmime/messaging/url.hpp" #include "vmime/utility/url.hpp"
#include "vmime/propertySet.hpp" #include "vmime/propertySet.hpp"
@ -79,7 +79,7 @@ public:
* credentials by reading the session properties "auth.username" and "auth.password". * credentials by reading the session properties "auth.username" and "auth.password".
* @return a new transport service * @return a new transport service
*/ */
transport* getTransport(const messaging::url& url, authenticator* auth = NULL); transport* getTransport(const utility::url& url, authenticator* auth = NULL);
/** Return a transport service instance for the protocol specified /** Return a transport service instance for the protocol specified
* in the session properties. * in the session properties.
@ -111,7 +111,7 @@ public:
* credentials by reading the session properties "auth.username" and "auth.password". * credentials by reading the session properties "auth.username" and "auth.password".
* @return a new store service * @return a new store service
*/ */
store* getStore(const messaging::url& url, authenticator* auth = NULL); store* getStore(const utility::url& url, authenticator* auth = NULL);
/** Properties for the session and for the services. /** Properties for the session and for the services.
*/ */

View File

@ -17,8 +17,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#ifndef VMIME_MESSAGING_URL_HPP_INCLUDED #ifndef VMIME_UTILITY_URL_HPP_INCLUDED
#define VMIME_MESSAGING_URL_HPP_INCLUDED #define VMIME_UTILITY_URL_HPP_INCLUDED
#include "vmime/types.hpp" #include "vmime/types.hpp"
@ -26,7 +26,7 @@
namespace vmime { namespace vmime {
namespace messaging { namespace utility {
/** This class represents a Uniform Resource Locator (a pointer /** This class represents a Uniform Resource Locator (a pointer
@ -52,7 +52,8 @@ public:
/** Construct an URL from a string (parse the URL components). /** Construct an URL from a string (parse the URL components).
* *
* @param s full URL string (eg. http://www.vmime.org:80/download.html * @param s full URL string (eg. http://www.vmime.org:80/download.html)
* @throw exceptions::malformed_url if URL is malformed
*/ */
url(const string& s); url(const string& s);
@ -181,8 +182,8 @@ private:
}; };
} // messaging } // utility
} // vmime } // vmime
#endif // VMIME_MESSAGING_URL_HPP_INCLUDED #endif // VMIME_UTILITY_URL_HPP_INCLUDED

View File

@ -17,8 +17,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#ifndef VMIME_MESSAGING_URLUTILS_HPP_INCLUDED #ifndef VMIME_UTILITY_URLUTILS_HPP_INCLUDED
#define VMIME_MESSAGING_URLUTILS_HPP_INCLUDED #define VMIME_UTILITY_URLUTILS_HPP_INCLUDED
#include "vmime/types.hpp" #include "vmime/types.hpp"
@ -26,7 +26,7 @@
namespace vmime { namespace vmime {
namespace messaging { namespace utility {
/** Miscellaneous functions related to URLs. /** Miscellaneous functions related to URLs.
@ -47,8 +47,8 @@ public:
}; };
} // messaging } // utility
} // vmime } // vmime
#endif // VMIME_MESSAGING_URLUTILS_HPP_INCLUDED #endif // VMIME_UTILITY_URLUTILS_HPP_INCLUDED