blob: 3be9e803a7adc034c22d3fc4ae5b721924f82fde [file] [log] [blame]
Lev Walkinc6cac8e2016-03-14 02:57:07 -07001#ifndef ASN1C_FDEPS_H
2#define ASN1C_FDEPS_H
Lev Walkinacd9f8b2004-08-19 13:29:03 +00003
4typedef struct asn1c_fdeps_s {
5 char *filename; /* Or 0, if root. */
6
Lev Walkinf218e782006-09-12 06:21:18 +00007 enum fdep_usage {
8 FDEP_IGNORE = -1, /* Ignore contents of the section */
9 FDEP_NOTUSED = 0,
10 FDEP_REFERRED = 1, /* Dynamic list of dependencies */
11 FDEP_CONVERTER = 2, /* Name of the int main() file */
12 FDEP_COMMON_FILES = 3, /* Section for mandatory dependencies */
Lev Walkinf573ebb2017-07-24 00:25:51 +040013 FDEP_CODEC_OER = 4, /* Use contents only if -gen-OER */
14 FDEP_CODEC_PER = 8, /* Use contents only if -gen-PER */
Lev Walkinf218e782006-09-12 06:21:18 +000015 } usage; /* Some file refers to it */
Lev Walkinacd9f8b2004-08-19 13:29:03 +000016
17 struct asn1c_fdeps_s **elements;
18 int el_size;
19 int el_count;
20} asn1c_fdeps_t;
21
22asn1c_fdeps_t *asn1c_read_file_dependencies(arg_t *arg, const char *datadir);
23
24/* Data may be a filename or an "#include <>" string. */
25int asn1c_activate_dependency(asn1c_fdeps_t *deps, asn1c_fdeps_t *cur,
26 const char *data);
27
Lev Walkin8a85b362017-09-26 22:54:44 -070028asn1c_fdeps_t *asn1c_deps_flatten(const asn1c_fdeps_t *deps);
Bi-Ruei, Chiu6f348942016-11-08 15:41:23 +080029void asn1c_deps_freelist(asn1c_fdeps_t *deps);
Lev Walkinacd9f8b2004-08-19 13:29:03 +000030
Lev Walkinc6cac8e2016-03-14 02:57:07 -070031#endif /* ASN1C_FDEPS_H */