summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-19 11:44:20 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-19 11:59:04 (GMT)
commit1de12ed346fc0018527afe082886129088e27a95 (patch)
tree16013a9294588f505a559a99fe27a603584f2ac2 /Swiften/Client/Session.h
parent5d504472c63b7acaa7df99ff1097024cf463f1bd (diff)
downloadswift-contrib-1de12ed346fc0018527afe082886129088e27a95.zip
swift-contrib-1de12ed346fc0018527afe082886129088e27a95.tar.bz2
(Client)Session & Connection refactoring.
ClientSession no longer sets up a connection. Connection no longer resolves addresses.
Diffstat (limited to 'Swiften/Client/Session.h')
-rw-r--r--Swiften/Client/Session.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/Swiften/Client/Session.h b/Swiften/Client/Session.h
index 17c10b9..58531b3 100644
--- a/Swiften/Client/Session.h
+++ b/Swiften/Client/Session.h
@@ -26,7 +26,6 @@ namespace Swift {
public:
enum State {
Initial,
- Connecting,
WaitingForStreamStart,
Negotiating,
Compressing,
@@ -40,8 +39,6 @@ namespace Swift {
};
enum SessionError {
NoError,
- DomainNameResolveError,
- ConnectionError,
ConnectionReadError,
ConnectionWriteError,
XMLError,
@@ -55,7 +52,12 @@ namespace Swift {
ClientCertificateError
};
- Session(const JID& jid, ConnectionFactory*, TLSLayerFactory*, PayloadParserFactoryCollection*, PayloadSerializerCollection*);
+ Session(
+ const JID& jid,
+ boost::shared_ptr<Connection>,
+ TLSLayerFactory*,
+ PayloadParserFactoryCollection*,
+ PayloadSerializerCollection*);
~Session();
State getState() const {
@@ -72,6 +74,7 @@ namespace Swift {
void start();
void stop();
+
void sendCredentials(const String& password);
void sendElement(boost::shared_ptr<Element>);
void setCertificate(const PKCS12Certificate& certificate);
@@ -86,7 +89,6 @@ namespace Swift {
void sendStreamHeader();
void sendSessionStart();
- void handleConnected();
void handleDisconnected(const boost::optional<Connection::Error>&);
void handleElement(boost::shared_ptr<Element>);
void handleStreamStart();
@@ -106,7 +108,6 @@ namespace Swift {
private:
JID jid_;
- ConnectionFactory* connectionFactory_;
TLSLayerFactory* tlsLayerFactory_;
PayloadParserFactoryCollection* payloadParserFactories_;
PayloadSerializerCollection* payloadSerializers_;