24 #ifndef __CONFIG_NETCONF_H_ 25 #define __CONFIG_NETCONF_H_ 27 #include <config/config.h> 28 #include <netcomm/fawkes/client_handler.h> 29 #include <core/exception.h> 38 class InterruptibleBarrier;
39 class FawkesNetworkClient;
40 class SQLiteConfiguration;
59 virtual void load(
const char *filename,
const char *defaults_filename,
60 const char *tag = NULL);
62 virtual void tag(
const char *tag);
63 virtual std::list<std::string> tags();
65 virtual bool exists(
const char *path);
66 virtual bool is_float(
const char *path);
67 virtual bool is_uint(
const char *path);
68 virtual bool is_int(
const char *path);
69 virtual bool is_bool(
const char *path);
70 virtual bool is_string(
const char *path);
72 virtual bool is_default(
const char *path);
74 virtual float get_float(
const char *path);
75 virtual unsigned int get_uint(
const char *path);
76 virtual int get_int(
const char *path);
77 virtual bool get_bool(
const char *path);
78 virtual std::string get_string(
const char *path);
80 virtual std::string get_comment(
const char *path);
81 virtual std::string get_default_comment(
const char *path);
82 virtual std::string get_type(
const char *path);
84 virtual void set_float(
const char *path,
float f);
85 virtual void set_uint(
const char *path,
unsigned int uint);
86 virtual void set_int(
const char *path,
int i);
87 virtual void set_bool(
const char *path,
bool b);
88 virtual void set_string(
const char *path, std::string &s);
89 virtual void set_string(
const char *path,
const char *s);
90 virtual void set_comment(
const char *path, std::string &comment);
91 virtual void set_comment(
const char *path,
const char *comment);
93 virtual void erase(
const char *path);
95 virtual void set_default_float(
const char *path,
float f);
96 virtual void set_default_uint(
const char *path,
unsigned int uint);
97 virtual void set_default_int(
const char *path,
int i);
98 virtual void set_default_bool(
const char *path,
bool b);
99 virtual void set_default_string(
const char *path, std::string &s);
100 virtual void set_default_string(
const char *path,
const char *s);
101 virtual void set_default_comment(
const char *path, std::string &comment);
102 virtual void set_default_comment(
const char *path,
const char *comment);
104 virtual void erase_default(
const char *path);
106 virtual void deregistered(
unsigned int id)
throw();
108 unsigned int id)
throw();
109 virtual void connection_died(
unsigned int id)
throw();
110 virtual void connection_established(
unsigned int id)
throw();
112 virtual void set_mirror_mode(
bool mirror);
124 virtual bool valid()
const;
126 virtual const char * path()
const;
127 virtual const char * type()
const;
129 virtual bool is_float()
const;
130 virtual bool is_uint()
const;
131 virtual bool is_int()
const;
132 virtual bool is_bool()
const;
133 virtual bool is_string()
const;
135 virtual bool is_default()
const;
137 virtual float get_float()
const;
138 virtual unsigned int get_uint()
const;
139 virtual int get_int()
const;
140 virtual bool get_bool()
const;
141 virtual std::string get_string()
const;
142 virtual std::string get_as_string()
const;
144 virtual std::string get_comment()
const;
163 void send_get(
const char *path,
unsigned int msgid);
165 void set_float_internal(
unsigned int msg_type,
const char *path,
float f);
166 void set_uint_internal(
unsigned int msg_type,
const char *path,
168 void set_int_internal(
unsigned int msg_type,
const char *path,
int i);
169 void set_bool_internal(
unsigned int msg_type,
const char *path,
bool b);
170 void set_string_internal(
unsigned int msg_type,
const char *path,
172 void set_comment_internal(
unsigned int msg_type,
const char *path,
175 void erase_internal(
const char *path,
bool is_default);
184 bool __mirror_mode_before_connection_dead;
185 unsigned int __mirror_timeout_sec;
Message handler for FawkesNetworkClient.
Simple Fawkes network client.
Configuration storage using SQLite.
Fawkes library namespace.
Interface for configuration change handling.
Representation of a message that is sent over the network.
A barrier is a synchronization tool which blocks until a given number of threads have reached the bar...
Base class for exceptions in Fawkes.
Thrown if enabling mirror mode failed.
Iterator interface to iterate over config values.
Network configuration value iterator.
Mutex mutual exclusion lock.
Interface for configuration handling.
CannotEnableMirroringException(const char *msg)
Constructor.
Remote configuration via Fawkes net.