Loading...
Searching...
No Matches
node_dynlist.h
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2025, Olivier MATZ <zer0@droids-corp.org>
*/
#pragma once
struct ec_node;
struct ec_pnode;
typedef struct ec_strvec *(*ec_node_dynlist_get_t)(struct ec_pnode *pstate, void *opaque);
enum ec_node_dynlist_flags {
DYNLIST_MATCH_LIST = 1 << 0,
DYNLIST_MATCH_REGEXP = 1 << 1,
DYNLIST_EXCLUDE_LIST = 1 << 2,
};
struct ec_node *ec_node_dynlist(
const char *id,
ec_node_dynlist_get_t get,
void *opaque,
const char *re_str,
enum ec_node_dynlist_flags flags
);
ec_node_dynlist
struct ec_node * ec_node_dynlist(const char *id, ec_node_dynlist_get_t get, void *opaque, const char *re_str, enum ec_node_dynlist_flags flags)
Create a dynlist node.
ec_node_dynlist_get_t
struct ec_strvec *(* ec_node_dynlist_get_t)(struct ec_pnode *pstate, void *opaque)
Callback invoked by parse() or complete() to build the strvec containing the list of object names.
Definition node_dynlist.h:37
ec_node_dynlist_flags
ec_node_dynlist_flags
Flags passed at ec_node_dynlist creation.
Definition node_dynlist.h:42
DYNLIST_MATCH_REGEXP
@ DYNLIST_MATCH_REGEXP
Match names from regexp pattern.
Definition node_dynlist.h:51
DYNLIST_MATCH_LIST
@ DYNLIST_MATCH_LIST
Match names returned by the user callback.
Definition node_dynlist.h:46
DYNLIST_EXCLUDE_LIST
@ DYNLIST_EXCLUDE_LIST
Don't match names returned by the user callback, even if it matches the regexp.
Definition node_dynlist.h:57
ec_node
struct ec_node * ec_node(const char *typename, const char *id)
Create a new node from its type name.
ec_pnode
struct ec_pnode * ec_pnode(const struct ec_node *node)
Create an empty parsing tree.
ec_strvec
struct ec_strvec * ec_strvec(void)
Allocate a new empty string vector.