summaryrefslogtreecommitdiff
path: root/src/include/tome/squelch/automatizer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/tome/squelch/automatizer.hpp')
-rw-r--r--src/include/tome/squelch/automatizer.hpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/include/tome/squelch/automatizer.hpp b/src/include/tome/squelch/automatizer.hpp
index 786ca1ae..833b5648 100644
--- a/src/include/tome/squelch/automatizer.hpp
+++ b/src/include/tome/squelch/automatizer.hpp
@@ -2,8 +2,8 @@
#include <boost/noncopyable.hpp>
#include <memory>
+#include <jsoncons/json.hpp>
#include <vector>
-#include <jansson.h>
#include "tome/squelch/rule_fwd.hpp"
#include "tome/squelch/cursor_fwd.hpp"
@@ -44,15 +44,14 @@ public:
bool apply_rules(object_type *o_ptr, int item_idx) const;
/**
- * Build a JSON data structure to represent
- * all the rules.
+ * Build a JSON document to represent all the rules.
*/
- std::shared_ptr<json_t> to_json() const;
+ jsoncons::json to_json() const;
/**
- * Load rules from a JSON data structure.
+ * Load rules from a JSON document.
*/
- void load_json(json_t *json);
+ void load_json(jsoncons::json const &);
/**
* Remove currently selected condition or rule.
@@ -115,10 +114,9 @@ public:
void add_new_condition(std::function<std::shared_ptr<Condition> ()> factory);
/**
- * Get rule names. The names are not stable across multiple
- * calls to methods on this class.
+ * Get rule names.
*/
- void get_rule_names(std::vector<const char *> *names) const;
+ std::vector<std::string> get_rule_names() const;
/**
* Get current number of rules.