summaryrefslogtreecommitdiffstats
path: root/src/tree_schema.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tree_schema.h')
-rw-r--r--src/tree_schema.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/tree_schema.h b/src/tree_schema.h
index c57a0fc..e712239 100644
--- a/src/tree_schema.h
+++ b/src/tree_schema.h
@@ -1579,9 +1579,7 @@ struct lysc_node_choice {
};
};
- struct lysc_node_case *cases; /**< list of the cases (linked list). Note that all the children of all the cases are linked each other
- as siblings. Their parent pointers points to the specific case they belongs to, so distinguish the
- case is simple. */
+ struct lysc_node_case *cases; /**< list of all the cases (linked list) */
struct lysc_when **when; /**< list of pointers to when statements ([sized array](@ref sizedarrays)) */
struct lysc_node_case *dflt; /**< default case of the choice, only a pointer into the cases array. */
};
@@ -1887,6 +1885,14 @@ LIBYANG_API_DECL struct lysc_must *lysc_node_musts(const struct lysc_node *node)
LIBYANG_API_DECL struct lysc_when **lysc_node_when(const struct lysc_node *node);
/**
+ * @brief Get the target node of a leafref node.
+ *
+ * @param[in] node Leafref node.
+ * @return Leafref target, NULL on any error.
+ */
+LIBYANG_API_DECL const struct lysc_node *lysc_node_lref_target(const struct lysc_node *node);
+
+/**
* @brief Callback to be called for every schema node in a DFS traversal.
*
* @param[in] node Current node.
@@ -1971,6 +1977,8 @@ LIBYANG_API_DECL struct lysp_feature *lysp_feature_next(const struct lysp_featur
#define LYS_FIND_XP_OUTPUT 0x10 /**< Search RPC/action output nodes instead of input ones. */
#define LYS_FIND_NO_MATCH_ERROR 0x40 /**< Return error if a path segment matches no nodes, otherwise only warning
is printed. */
+#define LYS_FIND_SCHEMAMOUNT 0x0200 /**< Traverse also nodes from mounted modules. If any such nodes are returned,
+ the caller **must free** their context! */
/** @} findxpathoptions */
/**
@@ -2189,6 +2197,9 @@ LIBYANG_API_DECL const struct lysc_node *lys_getnext_ext(const struct lysc_node
#define LYS_GETNEXT_INTONPCONT 0x08 /**< ::lys_getnext() option to look into non-presence container, instead of returning container itself */
#define LYS_GETNEXT_OUTPUT 0x10 /**< ::lys_getnext() option to provide RPC's/action's output schema nodes instead of input schema nodes
provided by default */
+#define LYS_GETNEXT_WITHSCHEMAMOUNT 0x20 /**< ::lys_getnext() option to also traverse top-level nodes of all the mounted modules
+ on the parent mount point but note that if any such nodes are returned,
+ the caller **must free** their context */
/** @} sgetnextflags */
/**