-int ec_completed_add_match(struct ec_completed *completed,
- struct ec_parsed *state,
- const struct ec_node *node, const char *add);
-int ec_completed_add_no_match(struct ec_completed *completed,
- struct ec_parsed *parsed_state,
- const struct ec_node *node);
-int ec_completed_add_partial_match(struct ec_completed *completed,
- struct ec_parsed *state, const struct ec_node *node,
- const char *add);
+struct ec_completed_item *
+ec_completed_item(struct ec_parsed *state, const struct ec_node *node);
+int ec_completed_item_set(struct ec_completed_item *item,
+ enum ec_completed_type type, const char *str);
+int ec_completed_item_add(struct ec_completed *completed,
+ struct ec_completed_item *item);
+void ec_completed_item_free(struct ec_completed_item *item);