aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1fix/asn1fix_value.h
blob: 23208a855a16a0e172485406a2b0d7da209fdf33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Functions related with processing values.
 */
#ifndef	ASN1FIX_VALUE_H
#define	ASN1FIX_VALUE_H

struct asn1p_namespace_s;   /* Forward declaration */

/*
 * Resolve the value given by reference.
 * This function also takes a parameter which specifies the desired
 * value's type.
 * 
 * RETURN VALUES:
 * 0:		Value resolved successfully.
 * -1/EPERM:	Recursive looping detected.
 * -1/EEXIST:	Reference is not compatible with the desired type.
 * -1/ESRCH:	Cannot find the terminal reference.
 */
int asn1f_value_resolve(arg_t *arg, asn1p_expr_t *tc,
                        const enum asn1p_constraint_type_e *opt_constr_type);

/*
 * Check if a value in value_expr refers to the enumeration or integer element
 * within the type provided. If yes, it will replace referenced value with
 * the appropriate inline value.
 */
int asn1f_look_value_in_type(arg_t *arg,
		asn1p_expr_t *type_expr, asn1p_expr_t *value_expr);

#endif	/* ASN1FIX_VALUE_H */