Add PortLinkRef class which use a existing sender and receiver for communication. Suggestion for a better name?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38167 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2009, Haiku.
|
* Copyright 2005-2010, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Axel Dörfler, [email protected]
|
* Axel Dörfler, [email protected]
|
||||||
|
* Clemens Zeidler, [email protected]
|
||||||
*/
|
*/
|
||||||
#ifndef _PORT_LINK_H
|
#ifndef _PORT_LINK_H
|
||||||
#define _PORT_LINK_H
|
#define _PORT_LINK_H
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
|
|
||||||
|
|
||||||
|
/*! Provide a new LinkSender and LinkReceiver for the ServerLink. */
|
||||||
class PortLink : public ServerLink {
|
class PortLink : public ServerLink {
|
||||||
public:
|
public:
|
||||||
PortLink(port_id sender = -1,
|
PortLink(port_id sender = -1,
|
||||||
@@ -23,6 +25,13 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*! Use existing LinkSender and LinkReceiver in ServerLink. */
|
||||||
|
class PortLinkRef : public ServerLink {
|
||||||
|
public:
|
||||||
|
PortLinkRef(LinkSender* send, LinkReceiver* receive);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
} // namespace BPrivate
|
} // namespace BPrivate
|
||||||
|
|
||||||
#endif /* _PORT_LINK_H */
|
#endif /* _PORT_LINK_H */
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2009, Haiku Inc.
|
* Copyright 2005-2010, Haiku Inc.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Axel Dörfler, [email protected]
|
* Axel Dörfler, [email protected]
|
||||||
|
* Clemens Zeidler, [email protected]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -27,4 +28,11 @@ PortLink::~PortLink()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PortLinkRef::PortLinkRef(LinkSender* send, LinkReceiver* receive)
|
||||||
|
{
|
||||||
|
fSender = send;
|
||||||
|
fReceiver = receive;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace BPrivate
|
} // namespace BPrivate
|
||||||
|
|||||||
Reference in New Issue
Block a user