diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-07-06 13:37:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-07-06 13:37:35 +0100 |
| commit | 7ae514af0aea1b953a93f88d5507e6c1dd675908 (patch) | |
| tree | d14505318a517a3f86944fc194d9b4f5ce05a3e3 /src/lib/server_finder.h | |
| parent | 8fb1e87dc19210dc29a1eabc4e410af4a3fb740b (diff) | |
Better updating of servers list when things change.
Diffstat (limited to 'src/lib/server_finder.h')
| -rw-r--r-- | src/lib/server_finder.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/server_finder.h b/src/lib/server_finder.h index ec855938b..c43c2a422 100644 --- a/src/lib/server_finder.h +++ b/src/lib/server_finder.h @@ -19,13 +19,12 @@ #include "server.h" #include "signaller.h" +#include "config.h" #include <boost/signals2.hpp> class ServerFinder : public Signaller, public ExceptionStore { public: - boost::signals2::connection connect (boost::function<void (ServerDescription)>); - static ServerFinder* instance (); static void drop (); @@ -37,6 +36,11 @@ public: return _disabled; } + std::list<ServerDescription> servers () const; + + /** Emitted whenever the list of servers changes */ + boost::signals2::signal<void ()> ServersListChanged; + private: ServerFinder (); ~ServerFinder (); @@ -48,7 +52,7 @@ private: void start_accept (); void handle_accept (boost::system::error_code ec, boost::shared_ptr<Socket> socket); - boost::signals2::signal<void (ServerDescription)> ServerFound; + void config_changed (Config::Property what); bool _disabled; |
