24 #ifndef _CONFIG_NET_HANDLER_H_
25 #define _CONFIG_NET_HANDLER_H_
27 #include <config/change_handler.h>
28 #include <config/config.h>
29 #include <config/net_messages.h>
30 #include <core/threading/thread.h>
31 #include <core/utils/lock_list.h>
32 #include <core/utils/lock_queue.h>
33 #include <netcomm/fawkes/handler.h>
43 class FawkesNetworkHub;
45 class ConfigNetworkHandler :
public Thread,
46 public FawkesNetworkHandler,
47 public ConfigurationChangeHandler
75 void send_inv_value(
unsigned int clid,
const char *path);
79 prepare_msg(
const char *path,
bool is_default)
81 T *m = (T *)calloc(1,
sizeof(T));
82 snprintf(m->cp.path, CONFIG_MSG_PATH_LENGTH,
"%s", path);
83 m->cp.is_default = is_default;
89 prepare_value_msg(
const char *path,
94 void *__attribute__((__may_alias__)) * data)
97 void * m = calloc(1, data_size);
99 snprintf(cd->
path, CONFIG_MSG_PATH_LENGTH,
"%s", path);
106 Configuration * config_;
107 FawkesNetworkHub * hub_;
108 LockQueue<FawkesNetworkMessage *> inbound_queue_;
110 LockList<unsigned int> subscribers_;
111 LockList<unsigned int>::iterator sit_;