1/* 2 * Copyright 2019, Ryan Leavengood 3 * Copyright 2009, Axel D��rfler, axeld@pinc-software.de. 4 * Distributed under the terms of the MIT License. 5 */ 6#ifndef _PORT_POOL_H 7#define _PORT_POOL_H 8 9 10#include <ServerInterface.h> 11 12#include <set> 13 14 15namespace BPrivate { 16namespace media { 17 18 19class PortPool : BLocker { 20public: 21 PortPool(); 22 ~PortPool(); 23 24 port_id GetPort(); 25 void PutPort(port_id port); 26 27private: 28 typedef std::set<port_id> PortSet; 29 30 PortSet fPool; 31}; 32 33 34extern PortPool* gPortPool; 35 36 37} // namespace media 38} // namespace BPrivate 39 40 41#endif // _PORT_POOL_H