xref: /haiku/src/kits/app/PortLink.cpp (revision 1e36cfc2721ef13a187c6f7354dc9cbc485e89d3)
1 /*
2  * Copyright 2005, Haiku Inc.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Axel Dörfler, axeld@pinc-software.de
7  */
8 
9 
10 #include <PortLink.h>
11 
12 
13 namespace BPrivate {
14 
15 PortLink::PortLink(port_id send, port_id receive)
16 {
17 	fSender = new LinkSender(send);
18 	fReceiver = new LinkReceiver(receive);
19 }
20 
21 
22 PortLink::~PortLink()
23 {
24 	delete fReceiver;
25 	delete fSender;
26 }
27 
28 
29 void
30 PortLink::SetTo(port_id sender, port_id receiver)
31 {
32 	fSender->SetPort(sender);
33 	fReceiver->SetPort(receiver);
34 }
35 
36 }	// namespace BPrivate
37