aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-04-14 11:27:49 +0000
committerVincent Richard <[email protected]>2005-04-14 11:27:49 +0000
commit34595491817bd3d062b05fe0d2bfd4289410ab51 (patch)
treede05c249d6e43a1b89c36ef95bd6f62743b9ea79
parentImplemented comparison operators. (diff)
downloadvmime-34595491817bd3d062b05fe0d2bfd4289410ab51.tar.gz
vmime-34595491817bd3d062b05fe0d2bfd4289410ab51.zip
Moved 'url' and 'urlUtils' classes to 'utility' namespace.
-rw-r--r--ChangeLog5
-rw-r--r--SConstruct6
-rw-r--r--src/messaging/serviceFactory.cpp4
-rw-r--r--src/messaging/session.cpp4
-rw-r--r--src/utility/url.cpp (renamed from src/messaging/url.cpp)8
-rw-r--r--src/utility/urlUtils.cpp (renamed from src/messaging/urlUtils.cpp)6
-rw-r--r--vmime/messaging/serviceFactory.hpp5
-rw-r--r--vmime/messaging/session.hpp6
-rw-r--r--vmime/utility/url.hpp (renamed from vmime/messaging/url.hpp)13
-rw-r--r--vmime/utility/urlUtils.hpp (renamed from vmime/messaging/urlUtils.hpp)10
10 files changed, 37 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index b0a9c252..2a5c8c9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
VERSION 0.7.1cvs
================
+2005-04-14 Vincent Richard <[email protected]>
+
+ * url.{hpp|cpp}, urlUtils.{hpp|cpp}: moved 'url' and 'urlUtils' from
+ 'vmime::messaging' namespace to 'vmime::utility' namespace.
+
2005-04-12 Vincent Richard <[email protected]>
* Started version 0.7.1.
diff --git a/SConstruct b/SConstruct
index 5019f2fb..3f98823b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -155,6 +155,8 @@ libvmime_sources = [
'utility/stream.cpp', 'utility/stream.hpp',
'utility/stringProxy.cpp', 'utility/stringProxy.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/MDNInfos.cpp', 'mdn/MDNInfos.hpp',
'mdn/receivedMDNInfos.cpp', 'mdn/receivedMDNInfos.hpp',
@@ -192,9 +194,7 @@ libvmime_messaging_sources = [
'messaging/socket.hpp',
'messaging/store.hpp',
'messaging/timeoutHandler.hpp',
- 'messaging/transport.hpp',
- 'messaging/url.cpp', 'messaging/url.hpp',
- 'messaging/urlUtils.cpp', 'messaging/urlUtils.hpp'
+ 'messaging/transport.hpp'
]
libvmime_messaging_proto_sources = [
diff --git a/src/messaging/serviceFactory.cpp b/src/messaging/serviceFactory.cpp
index ea7166ba..ea1752dd 100644
--- a/src/messaging/serviceFactory.cpp
+++ b/src/messaging/serviceFactory.cpp
@@ -60,13 +60,13 @@ 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);
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();
// Path portion of the URL is used to point a specific folder (empty = root).
diff --git a/src/messaging/session.cpp b/src/messaging/session.cpp
index a1f5d36e..35c188a2 100644
--- a/src/messaging/session.cpp
+++ b/src/messaging/session.cpp
@@ -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);
@@ -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);
diff --git a/src/messaging/url.cpp b/src/utility/url.cpp
index 1ee9607a..0c0a5799 100644
--- a/src/messaging/url.cpp
+++ b/src/utility/url.cpp
@@ -17,17 +17,17 @@
// 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/messaging/urlUtils.hpp"
+#include "vmime/utility/urlUtils.hpp"
#include "vmime/exception.hpp"
#include <sstream>
namespace vmime {
-namespace messaging {
+namespace utility {
// Known protocols
@@ -302,5 +302,5 @@ void url::setPath(const string& path)
}
-} // messaging
+} // utility
} // vmime
diff --git a/src/messaging/urlUtils.cpp b/src/utility/urlUtils.cpp
index 7dc1e30f..6099c19b 100644
--- a/src/messaging/urlUtils.cpp
+++ b/src/utility/urlUtils.cpp
@@ -17,12 +17,12 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
-#include "vmime/messaging/urlUtils.hpp"
+#include "vmime/utility/urlUtils.hpp"
#include "vmime/parserHelpers.hpp"
namespace vmime {
-namespace messaging {
+namespace utility {
const string urlUtils::encode(const string& s)
@@ -90,5 +90,5 @@ const string urlUtils::decode(const string& s)
}
-} // messaging
+} // utility
} // vmime
diff --git a/vmime/messaging/serviceFactory.hpp b/vmime/messaging/serviceFactory.hpp
index 513697c0..5c17afcc 100644
--- a/vmime/messaging/serviceFactory.hpp
+++ b/vmime/messaging/serviceFactory.hpp
@@ -25,13 +25,14 @@
#include "vmime/types.hpp"
#include "vmime/base.hpp"
+
#include "vmime/utility/stringUtils.hpp"
+#include "vmime/utility/url.hpp"
#include "vmime/messaging/serviceInfos.hpp"
#include "vmime/messaging/authenticator.hpp"
#include "vmime/messaging/progressionListener.hpp"
#include "vmime/messaging/timeoutHandler.hpp"
-#include "vmime/messaging/url.hpp"
namespace vmime {
@@ -146,7 +147,7 @@ public:
* @throw exceptions::no_service_available if no service is registered
* 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.
*
diff --git a/vmime/messaging/session.hpp b/vmime/messaging/session.hpp
index ae9845c3..958ee448 100644
--- a/vmime/messaging/session.hpp
+++ b/vmime/messaging/session.hpp
@@ -23,7 +23,7 @@
#include "vmime/messaging/authenticator.hpp"
#include "vmime/messaging/progressionListener.hpp"
-#include "vmime/messaging/url.hpp"
+#include "vmime/utility/url.hpp"
#include "vmime/propertySet.hpp"
@@ -79,7 +79,7 @@ public:
* credentials by reading the session properties "auth.username" and "auth.password".
* @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
* in the session properties.
@@ -111,7 +111,7 @@ public:
* credentials by reading the session properties "auth.username" and "auth.password".
* @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.
*/
diff --git a/vmime/messaging/url.hpp b/vmime/utility/url.hpp
index cd0655fc..89f63c7b 100644
--- a/vmime/messaging/url.hpp
+++ b/vmime/utility/url.hpp
@@ -17,8 +17,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
-#ifndef VMIME_MESSAGING_URL_HPP_INCLUDED
-#define VMIME_MESSAGING_URL_HPP_INCLUDED
+#ifndef VMIME_UTILITY_URL_HPP_INCLUDED
+#define VMIME_UTILITY_URL_HPP_INCLUDED
#include "vmime/types.hpp"
@@ -26,7 +26,7 @@
namespace vmime {
-namespace messaging {
+namespace utility {
/** This class represents a Uniform Resource Locator (a pointer
@@ -52,7 +52,8 @@ public:
/** 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);
@@ -181,8 +182,8 @@ private:
};
-} // messaging
+} // utility
} // vmime
-#endif // VMIME_MESSAGING_URL_HPP_INCLUDED
+#endif // VMIME_UTILITY_URL_HPP_INCLUDED
diff --git a/vmime/messaging/urlUtils.hpp b/vmime/utility/urlUtils.hpp
index 6e55d0cf..5f4d2794 100644
--- a/vmime/messaging/urlUtils.hpp
+++ b/vmime/utility/urlUtils.hpp
@@ -17,8 +17,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
-#ifndef VMIME_MESSAGING_URLUTILS_HPP_INCLUDED
-#define VMIME_MESSAGING_URLUTILS_HPP_INCLUDED
+#ifndef VMIME_UTILITY_URLUTILS_HPP_INCLUDED
+#define VMIME_UTILITY_URLUTILS_HPP_INCLUDED
#include "vmime/types.hpp"
@@ -26,7 +26,7 @@
namespace vmime {
-namespace messaging {
+namespace utility {
/** Miscellaneous functions related to URLs.
@@ -47,8 +47,8 @@ public:
};
-} // messaging
+} // utility
} // vmime
-#endif // VMIME_MESSAGING_URLUTILS_HPP_INCLUDED
+#endif // VMIME_UTILITY_URLUTILS_HPP_INCLUDED