summaryrefslogtreecommitdiff
path: root/sapconnectionrequest.h
blob: bbb4a0e5d1988934ac0d814083fee24ceedbafbb (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
28
29
30
31
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