From d8d8fc7a0d139e7b864eee3b573bd208f823ad4f Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 19 Oct 2014 18:45:03 +0200 Subject: initial import, no crypto --- sapconnection.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sapconnection.h (limited to 'sapconnection.h') diff --git a/sapconnection.h b/sapconnection.h new file mode 100644 index 0000000..7702e43 --- /dev/null +++ b/sapconnection.h @@ -0,0 +1,43 @@ +#ifndef SAPCONNECTION_H +#define SAPCONNECTION_H + +#include +#include + +class SAPPeer; +class SAPSocket; + +class SAPConnection : public QObject +{ + Q_OBJECT + + SAPConnection(SAPPeer *peer, const QString &profile); + +public: + SAPPeer *peer(); + + QString profile() const; + + SAPSocket *getSocket(int channelId); + + QList sockets(); + +public slots: + void close(); + +signals: + void connected(); + void error(int errorCode); + void disconnected(); + +private: + void setSocket(int channelId, SAPSocket *socket); + +private: + const QString _profile; + QMap _sockets; + + friend class SAPPeer; +}; + +#endif // SAPCONNECTION_H -- cgit v1.2.3