aboutsummaryrefslogtreecommitdiffstats
path: root/src/messaging/session.hpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2004-12-26 16:46:52 +0000
committerVincent Richard <[email protected]>2004-12-26 16:46:52 +0000
commitf5f15e5076b979e1c532bf03a12cda96c42bf0b1 (patch)
treef35b0ed8fd175d08101f0a0cb09cc9db26ebe75d /src/messaging/session.hpp
parentFixed bug in URL parsing. (diff)
downloadvmime-f5f15e5076b979e1c532bf03a12cda96c42bf0b1.tar.gz
vmime-f5f15e5076b979e1c532bf03a12cda96c42bf0b1.zip
Allow creating a service from an URL.
Diffstat (limited to 'src/messaging/session.hpp')
-rw-r--r--src/messaging/session.hpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/messaging/session.hpp b/src/messaging/session.hpp
index 61e94fb1..4ee25157 100644
--- a/src/messaging/session.hpp
+++ b/src/messaging/session.hpp
@@ -23,6 +23,7 @@
#include "messaging/authenticator.hpp"
#include "messaging/progressionListener.hpp"
+#include "messaging/url.hpp"
#include "propertySet.hpp"
@@ -70,6 +71,16 @@ public:
*/
transport* getTransport(const string& protocol, authenticator* auth = NULL);
+ /** Return a transport service instance for the specified URL.
+ *
+ * @param url full URL with at least the protocol to use (eg: "smtp://myserver.com/")
+ * @param auth authenticator object to use for the new transport service. If
+ * NULL, a default one is used. The default authenticator simply return user
+ * 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);
+
/** Return a transport service instance for the protocol specified
* in the session properties.
*
@@ -78,7 +89,7 @@ public:
* @param auth authenticator object to use for the new store service. If
* NULL, a default one is used. The default authenticator simply return user
* credentials by reading the session properties "auth.username" and "auth.password".
- * @return a new transport service
+ * @return a new store service
*/
store* getStore(authenticator* auth = NULL);
@@ -88,10 +99,20 @@ public:
* @param auth authenticator object to use for the new store service. If
* NULL, a default one is used. The default authenticator simply return user
* credentials by reading the session properties "auth.username" and "auth.password".
- * @return a new transport service
+ * @return a new store service
*/
store* getStore(const string& protocol, authenticator* auth = NULL);
+ /** Return a store service instance for the specified URL.
+ *
+ * @param url full URL with at least the protocol to use (eg: "imap://username:[email protected]/")
+ * @param auth authenticator object to use for the new store service. If
+ * NULL, a default one is used. The default authenticator simply return user
+ * 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);
+
/** Properties for the session and for the services.
*/
const propertySet& getProperties() const;