@@ -255,7 +255,6 @@ struct rb_node;
255255 * --------------
256256 * - ::lyd_new_inner()
257257 * - ::lyd_new_term()
258- * - ::lyd_new_term_bin()
259258 * - ::lyd_new_list()
260259 * - ::lyd_new_list2()
261260 * - ::lyd_new_list3()
@@ -1260,23 +1259,21 @@ LIBYANG_API_DECL LY_ERR lyd_new_inner(struct lyd_node *parent, const struct lys_
12601259#define LYD_NEW_VAL_OUTPUT 0x01 /**< Flag in case the @p parent is RPC/Action. If value is 0, the input's data nodes of the RPC/Action are
12611260 taken into consideration. Otherwise, the output's data node is going to be created. */
12621261#define LYD_NEW_VAL_STORE_ONLY 0x02 /**< Whether to perform only storing operation with no or minimum valitions */
1263- #define LYD_NEW_VAL_BIN 0x04 /**< Interpret the provided leaf/leaf-list @p value as being in the binary
1264- ::LY_VALUE_LYB format, to learn what exactly is expected see @ref howtoDataLYB. */
1265- #define LYD_NEW_VAL_CANON 0x08 /**< Interpret the provided leaf/leaf-list @p value as being in the canonical
1262+ #define LYD_NEW_VAL_CANON 0x04 /**< Interpret the provided leaf/leaf-list @p value as being in the canonical
12661263 (or JSON if no defined) ::LY_VALUE_CANON format. If it is not, it may lead
12671264 to unexpected behavior. */
1268- #define LYD_NEW_META_CLEAR_DFLT 0x10 /**< Whether to clear the default flag starting from @p parent, recursively all NP containers. */
1269- #define LYD_NEW_PATH_UPDATE 0x20 /**< If the target node exists, is a leaf, and it is updated with a new value or its
1265+ #define LYD_NEW_META_CLEAR_DFLT 0x08 /**< Whether to clear the default flag starting from @p parent, recursively all NP containers. */
1266+ #define LYD_NEW_PATH_UPDATE 0x10 /**< If the target node exists, is a leaf, and it is updated with a new value or its
12701267 default flag is changed, it is returned. If the target node exists and is not
12711268 a leaf or generally no change occurs in the @p parent tree, NULL is returned and
12721269 no error set. */
1273- #define LYD_NEW_PATH_OPAQ 0x40 /**< Enables the creation of opaque nodes with some specific rules. If the __last node__
1270+ #define LYD_NEW_PATH_OPAQ 0x20 /**< Enables the creation of opaque nodes with some specific rules. If the __last node__
12741271 in the path is not uniquely defined ((leaf-)list without a predicate) or has an
12751272 invalid value (leaf/leaf-list), it is created as opaque. Otherwise a regular node
12761273 is created. */
1277- #define LYD_NEW_PATH_WITH_OPAQ 0x80 /**< Consider opaque nodes normally when searching for existing nodes. */
1278- #define LYD_NEW_PATH_ANY_DATATREE 0x100 /**< The @p value is actually a data tree, not a string. */
1279- #define LYD_NEW_ANY_USE_VALUE 0x200 /**< Whether to use dynamic @p value or make a copy. */
1274+ #define LYD_NEW_PATH_WITH_OPAQ 0x40 /**< Consider opaque nodes normally when searching for existing nodes. */
1275+ #define LYD_NEW_PATH_ANY_DATATREE 0x80 /**< The @p value is actually a data tree, not a string. */
1276+ #define LYD_NEW_ANY_USE_VALUE 0x0100 /**< Whether to use dynamic @p value or make a copy. */
12801277
12811278/** @} newvaloptions */
12821279
@@ -1290,7 +1287,6 @@ LIBYANG_API_DECL LY_ERR lyd_new_inner(struct lyd_node *parent, const struct lys_
12901287 * @param[out] node Optional created node.
12911288 * @param[in] ... Ordered key values of the new list instance, all must be set. In case of an instance-identifier
12921289 * or identityref value, the JSON format is expected (module names instead of prefixes). No keys are expected for key-less lists.
1293- * In case options include ::LYD_NEW_VAL_BIN, every key value must be followed by its size in bits (uint32_t).
12941290 * @return LY_ERR value.
12951291 */
12961292LIBYANG_API_DECL LY_ERR lyd_new_list (struct lyd_node * parent , const struct lys_module * module , const char * name ,
@@ -1331,8 +1327,6 @@ LIBYANG_API_DECL LY_ERR lyd_new_list3(struct lyd_node *parent, const struct lys_
13311327/**
13321328 * @brief Create a new term node in the data tree.
13331329 *
1334- * To create a term node based on binary value, use ::lyd_new_term_bin().
1335- *
13361330 * @param[in] parent Parent node for the node being created. NULL in case of creating a top level element.
13371331 * @param[in] module Module of the node being created. If NULL, @p parent module will be used.
13381332 * @param[in] name Schema node name of the new data node. The node can be #LYS_LEAF or #LYS_LEAFLIST.
@@ -1344,21 +1338,6 @@ LIBYANG_API_DECL LY_ERR lyd_new_list3(struct lyd_node *parent, const struct lys_
13441338LIBYANG_API_DECL LY_ERR lyd_new_term (struct lyd_node * parent , const struct lys_module * module , const char * name ,
13451339 const char * value , uint32_t options , struct lyd_node * * node );
13461340
1347- /**
1348- * @brief Create a new term node in the data tree based on binary value.
1349- *
1350- * @param[in] parent Parent node for the node being created. NULL in case of creating a top level element.
1351- * @param[in] module Module of the node being created. If NULL, @p parent module will be used.
1352- * @param[in] name Schema node name of the new data node. The node can be #LYS_LEAF or #LYS_LEAFLIST.
1353- * @param[in] value Binary value of the node. To learn what exactly is expected see @ref howtoDataLYB.
1354- * @param[in] value_size_bits Size of @p value in bits.
1355- * @param[in] options Bitmask of options, see @ref newvaloptions.
1356- * @param[out] node Optional created node.
1357- * @return LY_ERR value.
1358- */
1359- LIBYANG_API_DECL LY_ERR lyd_new_term_bin (struct lyd_node * parent , const struct lys_module * module , const char * name ,
1360- const void * value , uint32_t value_size_bits , uint32_t options , struct lyd_node * * node );
1361-
13621341/**
13631342 * @brief Create a new any node in the data tree.
13641343 *
0 commit comments