Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Functions related with processing values. |
| 3 | */ |
Lev Walkin | c6cac8e | 2016-03-14 02:57:07 -0700 | [diff] [blame] | 4 | #ifndef ASN1FIX_VALUE_H |
| 5 | #define ASN1FIX_VALUE_H |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 6 | |
Lev Walkin | c0e03b9 | 2017-08-22 01:48:23 -0700 | [diff] [blame] | 7 | struct asn1p_namespace_s; /* Forward declaration */ |
| 8 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 9 | /* |
| 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 Walkin | 9288d1c | 2005-03-10 11:27:13 +0000 | [diff] [blame] | 20 | int asn1f_value_resolve(arg_t *arg, asn1p_expr_t *tc, |
Lev Walkin | c0e03b9 | 2017-08-22 01:48:23 -0700 | [diff] [blame] | 21 | const enum asn1p_constraint_type_e *opt_constr_type); |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 22 | |
| 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 | */ |
| 28 | int asn1f_look_value_in_type(arg_t *arg, |
| 29 | asn1p_expr_t *type_expr, asn1p_expr_t *value_expr); |
| 30 | |
Lev Walkin | c6cac8e | 2016-03-14 02:57:07 -0700 | [diff] [blame] | 31 | #endif /* ASN1FIX_VALUE_H */ |