Partition: add client list
For efficient traversal within one partition, e.g. for distributing partition-local idle events.
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
#include "Chrono.hxx"
|
||||
#include "config.h"
|
||||
|
||||
#include <boost/intrusive/list.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
@@ -39,6 +41,7 @@ struct Instance;
|
||||
class MultipleOutputs;
|
||||
class SongLoader;
|
||||
class ClientListener;
|
||||
class Client;
|
||||
|
||||
/**
|
||||
* A partition of the Music Player Daemon. It is a separate unit with
|
||||
@@ -55,6 +58,11 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
|
||||
|
||||
std::unique_ptr<ClientListener> listener;
|
||||
|
||||
boost::intrusive::list<Client,
|
||||
boost::intrusive::base_hook<boost::intrusive::list_base_hook<boost::intrusive::tag<Partition>,
|
||||
boost::intrusive::link_mode<boost::intrusive::normal_link>>>,
|
||||
boost::intrusive::constant_time_size<false>> clients;
|
||||
|
||||
MaskMonitor global_events;
|
||||
|
||||
struct playlist playlist;
|
||||
|
||||
Reference in New Issue
Block a user