blob: 23208a855a16a0e172485406a2b0d7da209fdf33 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001/*
2 * Functions related with processing values.
3 */
Lev Walkinc6cac8e2016-03-14 02:57:07 -07004#ifndef ASN1FIX_VALUE_H
5#define ASN1FIX_VALUE_H
Lev Walkinf15320b2004-06-03 03:38:44 +00006
Lev Walkinc0e03b92017-08-22 01:48:23 -07007struct asn1p_namespace_s; /* Forward declaration */
8
Lev Walkinf15320b2004-06-03 03:38:44 +00009/*
10 * Resolve the value given by reference.
11 * This function also takes a parameter which specifies the desired
12 * value's type.
13 *
14 * RETURN VALUES:
15 * 0: Value resolved successfully.
16 * -1/EPERM: Recursive looping detected.
17 * -1/EEXIST: Reference is not compatible with the desired type.
18 * -1/ESRCH: Cannot find the terminal reference.
19 */
Lev Walkin9288d1c2005-03-10 11:27:13 +000020int asn1f_value_resolve(arg_t *arg, asn1p_expr_t *tc,
Lev Walkinc0e03b92017-08-22 01:48:23 -070021 const enum asn1p_constraint_type_e *opt_constr_type);
Lev Walkinf15320b2004-06-03 03:38:44 +000022
23/*
24 * Check if a value in value_expr refers to the enumeration or integer element
25 * within the type provided. If yes, it will replace referenced value with
26 * the appropriate inline value.
27 */
28int asn1f_look_value_in_type(arg_t *arg,
29 asn1p_expr_t *type_expr, asn1p_expr_t *value_expr);
30
Lev Walkinc6cac8e2016-03-14 02:57:07 -070031#endif /* ASN1FIX_VALUE_H */