Signed-off-by: Sage Weil <sage@redhat.com>
#include <set>
#include <string>
+#include <list>
struct md_config_t;
const std::set<int>& changed) { }
};
+class NoopConfigObserver : public md_config_obs_t {
+ std::list<std::string> options;
+ const char **ptrs = 0;
+
+public:
+ NoopConfigObserver(std::list<std::string> l) : options(l) {
+ ptrs = new const char*[options.size() + 1];
+ unsigned j = 0;
+ for (auto& i : options) {
+ ptrs[j++] = i.c_str();
+ }
+ ptrs[j] = 0;
+ }
+ ~NoopConfigObserver() {
+ delete[] ptrs;
+ }
+
+ const char** get_tracked_conf_keys() const override {
+ return ptrs;
+ }
+ void handle_conf_change(const struct md_config_t *conf,
+ const std::set <std::string> &changed) override {
+ }
+};
+
#endif