diff options
author | Javier <dev.git@javispedro.com> | 2014-10-19 18:45:03 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2014-10-19 18:45:03 +0200 |
commit | d8d8fc7a0d139e7b864eee3b573bd208f823ad4f (patch) | |
tree | a9b54d6e6e6941c620f4f10cef4b5def9be86f82 /sapconnection.cc | |
download | sapd-d8d8fc7a0d139e7b864eee3b573bd208f823ad4f.tar.gz sapd-d8d8fc7a0d139e7b864eee3b573bd208f823ad4f.zip |
initial import, no crypto
Diffstat (limited to 'sapconnection.cc')
-rw-r--r-- | sapconnection.cc | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sapconnection.cc b/sapconnection.cc new file mode 100644 index 0000000..970ad11 --- /dev/null +++ b/sapconnection.cc @@ -0,0 +1,38 @@ +#include "sappeer.h" +#include "sapconnection.h" + +SAPConnection::SAPConnection(SAPPeer *peer, const QString &profile) + : QObject(peer), _profile(profile) +{ +} + +SAPPeer* SAPConnection::peer() +{ + return static_cast<SAPPeer*>(parent()); +} + +QString SAPConnection::profile() const +{ + return _profile; +} + +SAPSocket * SAPConnection::getSocket(int channelId) +{ + return _sockets.value(channelId, 0); +} + +QList<SAPSocket*> SAPConnection::sockets() +{ + return _sockets.values(); +} + +void SAPConnection::close() +{ + // TODO +} + +void SAPConnection::setSocket(int channelId, SAPSocket *socket) +{ + Q_ASSERT(!_sockets.contains(channelId)); + _sockets.insert(channelId, socket); +} |