X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fecoli_completed.c;h=4836803c7ea20e8c158769fa0c31bfe656272efb;hb=ff1f48e335ca77cc97e49ea86b292233731ecb78;hp=553eccc5eb453b79f6882244a3ba503720387481;hpb=07da7f3238a980f1aa9654c2d084a24e00e48e90;p=protos%2Flibecoli.git diff --git a/lib/ecoli_completed.c b/lib/ecoli_completed.c index 553eccc..4836803 100644 --- a/lib/ecoli_completed.c +++ b/lib/ecoli_completed.c @@ -39,6 +39,19 @@ #include #include +struct ec_completed_item { + TAILQ_ENTRY(ec_completed_item) next; + enum ec_completed_type type; + const struct ec_node *node; + char *str; + char *display; + struct ec_keyval *attrs; + + /* reverse order: [0] = last, [len-1] = root */ + const struct ec_node **path; + size_t pathlen; +}; + struct ec_completed *ec_completed(void) { struct ec_completed *completed = NULL; @@ -340,6 +353,24 @@ ec_completed_item_add(struct ec_completed *completed, return 0; } +const char * +ec_completed_item_get_str(const struct ec_completed_item *item) +{ + return item->str; +} + +const char * +ec_completed_item_get_display(const struct ec_completed_item *item) +{ + return item->display; +} + +enum ec_completed_type +ec_completed_item_get_type(const struct ec_completed_item *item) +{ + return item->type; +} + void ec_completed_item_free(struct ec_completed_item *item) { if (item == NULL)