23 #include "bbsync_plugin.h" 25 #include "sync_thread.h" 45 std::set<std::string> peers;
46 std::set<std::string> ignored_peers;
48 std::string prefix =
"/fawkes/bbsync/";
49 std::string peers_prefix = prefix +
"peers/";
53 std::string peer = std::string(i->
path()).substr(peers_prefix.length());
54 peer = peer.substr(0, peer.find(
"/"));
56 if ((peers.find(peer) == peers.end()) && (ignored_peers.find(peer) == ignored_peers.end())) {
57 std::string peer_prefix = peers_prefix + peer +
"/";
73 ignored_peers.insert(peer);
80 throw Exception(
"No synchronization peers configured, aborting");
84 PLUGIN_DESCRIPTION(
"Synchronize with remote Fawkes BlackBoards")
Fawkes library namespace.
virtual bool get_bool(const char *path)=0
Get value from configuration which is of type bool.
BlackBoardSynchronizationPlugin(fawkes::Configuration *config)
Constructor.
virtual ValueIterator * search(const char *path)=0
Iterator with search results.
virtual bool next()=0
Check if there is another element and advance to this if possible.
BlackBoard synchronization plugin.
Base class for exceptions in Fawkes.
ThreadList thread_list
Thread list member.
virtual const char * path() const =0
Path of value.
Thread to synchronize two BlackBoards.
Configuration * config
Fawkes configuration.
void push_back(Thread *thread)
Add thread to the end.
Iterator interface to iterate over config values.
Interface for configuration handling.