From a45977185a485624095bff1a15024e9199eee676 Mon Sep 17 00:00:00 2001 From: Javier Date: Fri, 1 Jan 2016 22:05:42 +0100 Subject: reorganize source files into SAP and agents --- sap/sapconnectionrequest.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sap/sapconnectionrequest.h (limited to 'sap/sapconnectionrequest.h') diff --git a/sap/sapconnectionrequest.h b/sap/sapconnectionrequest.h new file mode 100644 index 0000000..bbb4a0e --- /dev/null +++ b/sap/sapconnectionrequest.h @@ -0,0 +1,32 @@ +#ifndef SAPCONNECTIONREQUEST_H +#define SAPCONNECTIONREQUEST_H + +#include + +class SAPPeer; +class SAPConnection; + +class SAPConnectionRequest +{ + SAPConnectionRequest(SAPConnection *conn, int initiatorId, int acceptorId); + +public: + SAPPeer * peer(); + SAPConnection *connection(); + + void accept(); + void reject(int reason = 1); + +protected: + int initiatorId() const; + int acceptorId() const; + +private: + SAPConnection *_conn; + int _initiator; + int _acceptor; + + friend class SAPPeer; +}; + +#endif // SAPCONNECTIONREQUEST_H -- cgit v1.2.3