blob: 755763bd4cb9f57bcf560ff750d29d4ae38ec171 (
plain) (
blame)
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "map_source.h"
#include <set>
namespace slobrok {
/**
* Proof-of-concept implementation of MapSource broadcasting.
**/
class ProxyMapSource : public MapSource, public MapListener {
std::set<MapListener *> _listeners;
void registerListener(MapListener &listener) override;
void unregisterListener(MapListener &listener) override;
public:
ProxyMapSource();
~ProxyMapSource();
void add(const ServiceMapping &mapping) override;
void remove(const ServiceMapping &mapping) override;
void update(const ServiceMapping &old_mapping,
const ServiceMapping &new_mapping) override;
};
} // namespace slobrok
|