summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-10-13 16:14:26 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-01 11:19:59 (GMT)
commitee7c1b0ea8bd9483add1f8b06d5b6f745f1cfe27 (patch)
treea3d260f05c65b93f90d837788e8e97db73a0bade /Swiften/Session
parent0f0cde0cdff42db72df4307ed68dac62e8acb1f3 (diff)
downloadswift-ee7c1b0ea8bd9483add1f8b06d5b6f745f1cfe27.zip
swift-ee7c1b0ea8bd9483add1f8b06d5b6f745f1cfe27.tar.bz2
Refactored some degenerate stuff out of base Session.
Diffstat (limited to 'Swiften/Session')
-rw-r--r--Swiften/Session/Session.cpp6
-rw-r--r--Swiften/Session/Session.h10
2 files changed, 1 insertions, 15 deletions
diff --git a/Swiften/Session/Session.cpp b/Swiften/Session/Session.cpp
index 6f528c1..64456db 100644
--- a/Swiften/Session/Session.cpp
+++ b/Swiften/Session/Session.cpp
@@ -15,7 +15,6 @@ Session::Session(
payloadParserFactories(payloadParserFactories),
payloadSerializers(payloadSerializers),
streamStack(0),
- initialized(false),
finishing(false) {
}
@@ -80,9 +79,4 @@ void Session::handleDisconnected(const boost::optional<Connection::Error>& conne
}
}
-void Session::setInitialized() {
- initialized = true;
- onSessionStarted();
-}
-
}
diff --git a/Swiften/Session/Session.h b/Swiften/Session/Session.h
index 26d10c1..d63254a 100644
--- a/Swiften/Session/Session.h
+++ b/Swiften/Session/Session.h
@@ -44,6 +44,7 @@ namespace Swift {
void startSession();
void finishSession();
+
void sendElement(boost::shared_ptr<Element>);
const JID& getLocalJID() const {
@@ -55,19 +56,16 @@ namespace Swift {
}
boost::signal<void (boost::shared_ptr<Element>)> onElementReceived;
- boost::signal<void ()> onSessionStarted;
boost::signal<void (const boost::optional<SessionError>&)> onSessionFinished;
boost::signal<void (const ByteArray&)> onDataWritten;
boost::signal<void (const ByteArray&)> onDataRead;
protected:
void setRemoteJID(const JID& j) {
- assert(!isInitialized());
remoteJID = j;
}
void setLocalJID(const JID& j) {
- assert(!isInitialized());
localJID = j;
}
@@ -88,11 +86,6 @@ namespace Swift {
return streamStack;
}
- void setInitialized();
- bool isInitialized() const {
- return initialized;
- }
-
void setFinished();
private:
@@ -107,7 +100,6 @@ namespace Swift {
boost::shared_ptr<XMPPLayer> xmppLayer;
boost::shared_ptr<ConnectionLayer> connectionLayer;
StreamStack* streamStack;
- bool initialized;
bool finishing;
};
}