summaryrefslogtreecommitdiffstats
blob: 17d9a24ada85222c49d547efb9de878de3be7909 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include <boost/signal.hpp>
#include <boost/shared_ptr.hpp>

#include "Swiften/Elements/ProtocolHeader.h"
#include "Swiften/Elements/Element.h"

namespace Swift {
	class SessionStream {
		public:
			virtual ~SessionStream();

			virtual void writeHeader(const ProtocolHeader& header) = 0;
			virtual void writeElement(boost::shared_ptr<Element>) = 0;

			virtual bool supportsTLSEncryption() = 0;
			virtual void addTLSEncryption() = 0;

			virtual void addWhitespacePing() = 0;

			virtual void resetXMPPParser() = 0;

			boost::signal<void (const ProtocolHeader&)> onStreamStartReceived;
			boost::signal<void (boost::shared_ptr<Element>)> onElementReceived;
	};
}