summaryrefslogtreecommitdiff
path: root/sapconnectionrequest.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2014-10-19 18:45:03 +0200
committerJavier <dev.git@javispedro.com>2014-10-19 18:45:03 +0200
commitd8d8fc7a0d139e7b864eee3b573bd208f823ad4f (patch)
treea9b54d6e6e6941c620f4f10cef4b5def9be86f82 /sapconnectionrequest.h
downloadsapd-d8d8fc7a0d139e7b864eee3b573bd208f823ad4f.tar.gz
sapd-d8d8fc7a0d139e7b864eee3b573bd208f823ad4f.zip
initial import, no crypto
Diffstat (limited to 'sapconnectionrequest.h')
-rw-r--r--sapconnectionrequest.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/sapconnectionrequest.h b/sapconnectionrequest.h
new file mode 100644
index 0000000..bbb4a0e
--- /dev/null
+++ b/sapconnectionrequest.h
@@ -0,0 +1,32 @@
+#ifndef SAPCONNECTIONREQUEST_H
+#define SAPCONNECTIONREQUEST_H
+
+#include <QtCore/QList>
+
+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