summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Component/ComponentSession.h')
-rw-r--r--Swiften/Component/ComponentSession.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/Swiften/Component/ComponentSession.h b/Swiften/Component/ComponentSession.h
index 073c3f4..3103335 100644
--- a/Swiften/Component/ComponentSession.h
+++ b/Swiften/Component/ComponentSession.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -20,6 +20,7 @@
namespace Swift {
class ComponentAuthenticator;
+ class CryptoProvider;
class SWIFTEN_API ComponentSession : public boost::enable_shared_from_this<ComponentSession> {
public:
@@ -35,15 +36,15 @@ namespace Swift {
struct Error : public Swift::Error {
enum Type {
AuthenticationFailedError,
- UnexpectedElementError,
+ UnexpectedElementError
} type;
Error(Type type) : type(type) {}
};
~ComponentSession();
- static boost::shared_ptr<ComponentSession> create(const JID& jid, const std::string& secret, boost::shared_ptr<SessionStream> stream) {
- return boost::shared_ptr<ComponentSession>(new ComponentSession(jid, secret, stream));
+ static boost::shared_ptr<ComponentSession> create(const JID& jid, const std::string& secret, boost::shared_ptr<SessionStream> stream, CryptoProvider* crypto) {
+ return boost::shared_ptr<ComponentSession>(new ComponentSession(jid, secret, stream, crypto));
}
State getState() const {
@@ -61,7 +62,7 @@ namespace Swift {
boost::signal<void (boost::shared_ptr<Stanza>)> onStanzaReceived;
private:
- ComponentSession(const JID& jid, const std::string& secret, boost::shared_ptr<SessionStream>);
+ ComponentSession(const JID& jid, const std::string& secret, boost::shared_ptr<SessionStream>, CryptoProvider*);
void finishSession(Error::Type error);
void finishSession(boost::shared_ptr<Swift::Error> error);
@@ -78,6 +79,7 @@ namespace Swift {
JID jid;
std::string secret;
boost::shared_ptr<SessionStream> stream;
+ CryptoProvider* crypto;
boost::shared_ptr<Swift::Error> error;
State state;
};