24 #ifndef __CONFIG_NET_HANDLER_H_ 25 #define __CONFIG_NET_HANDLER_H_ 27 #include <core/threading/thread.h> 28 #include <netcomm/fawkes/handler.h> 29 #include <core/utils/lock_queue.h> 30 #include <core/utils/lock_list.h> 32 #include <config/net_messages.h> 33 #include <config/config.h> 34 #include <config/change_handler.h> 44 class FawkesNetworkHub;
73 void send_inv_value(
unsigned int clid,
const char *path);
76 T * prepare_msg(
const char *path,
bool is_default)
78 T * m = (T *)calloc(1,
sizeof(T));
79 strncpy(m->cp.path, path, CONFIG_MSG_PATH_LENGTH);
80 m->cp.is_default = is_default;
85 T * prepare_string_msg(
const char *path,
bool is_default,
size_t s_length)
87 T * m = (T *)calloc(1,
sizeof(T) + s_length);
88 strncpy(m->cp.path, path, CONFIG_MSG_PATH_LENGTH);
89 m->cp.is_default = is_default;
90 m->s_length = s_length;
Fawkes library namespace.
virtual void config_value_changed(const Configuration::ValueIterator *v)
Called whenever a watched value has changed.
virtual void run()
Code to execute in the thread.
~ConfigNetworkHandler()
Destructor.
Interface for configuration change handling.
virtual void handle_network_message(FawkesNetworkMessage *msg)
Handle network message.
virtual void config_value_erased(const char *path)
Called whenever a value has been erased from the config.
Representation of a message that is sent over the network.
Thread class encapsulation of pthreads.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual void loop()
Process all network messages that have been received.
ConfigNetworkHandler(Configuration *config, FawkesNetworkHub *hub)
Constructor.
Fawkes Configuration Network Handler.
Network handler abstract base class.
virtual void client_disconnected(unsigned int clid)
Client disconnected.
virtual void client_connected(unsigned int clid)
Client connected.
Iterator interface to iterate over config values.
virtual void config_comment_changed(const Configuration::ValueIterator *v)
Called whenever a comment of a watched value has changed.
Interface for configuration handling.
virtual void config_tag_changed(const char *new_location)
Tag changed.