summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Session')
-rw-r--r--Swiften/Session/BasicSessionStream.cpp6
-rw-r--r--Swiften/Session/BasicSessionStream.h3
-rw-r--r--Swiften/Session/SessionStream.h3
3 files changed, 9 insertions, 3 deletions
diff --git a/Swiften/Session/BasicSessionStream.cpp b/Swiften/Session/BasicSessionStream.cpp
index 5377e6c..03985bd 100644
--- a/Swiften/Session/BasicSessionStream.cpp
+++ b/Swiften/Session/BasicSessionStream.cpp
@@ -88,7 +88,11 @@ void BasicSessionStream::writeFooter() {
xmppLayer->writeFooter();
}
-bool BasicSessionStream::isAvailable() {
+void BasicSessionStream::close() {
+ connection->disconnect();
+}
+
+bool BasicSessionStream::isOpen() {
return available;
}
diff --git a/Swiften/Session/BasicSessionStream.h b/Swiften/Session/BasicSessionStream.h
index 330db9d..747177a 100644
--- a/Swiften/Session/BasicSessionStream.h
+++ b/Swiften/Session/BasicSessionStream.h
@@ -36,7 +36,8 @@ namespace Swift {
);
~BasicSessionStream();
- virtual bool isAvailable();
+ virtual void close();
+ virtual bool isOpen();
virtual void writeHeader(const ProtocolHeader& header);
virtual void writeElement(boost::shared_ptr<Element>);
diff --git a/Swiften/Session/SessionStream.h b/Swiften/Session/SessionStream.h
index 55082f4..d0f93ee 100644
--- a/Swiften/Session/SessionStream.h
+++ b/Swiften/Session/SessionStream.h
@@ -37,7 +37,8 @@ namespace Swift {
virtual ~SessionStream();
- virtual bool isAvailable() = 0;
+ virtual void close() = 0;
+ virtual bool isOpen() = 0;
virtual void writeHeader(const ProtocolHeader& header) = 0;
virtual void writeFooter() = 0;