summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/apimagic/apimagic.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/apimagic/apimagic.h b/include/apimagic/apimagic.h
index 500463c..f6c1767 100644
--- a/include/apimagic/apimagic.h
+++ b/include/apimagic/apimagic.h
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <stdio.h>
+#include <cparser/ast/entity.h>
#include <cparser/driver/c_driver.h>
#include <cparser/driver/driver_t.h>
@@ -76,11 +77,39 @@ struct amgc_unit_meta {
int ngenerated;
};
+struct amgc_define {
+ const pp_definition_t * symbol;
+ const char * definition;
+ const char * altname;
+};
+
+struct amgc_entity {
+ const union entity_t * entity;
+ const char * altname;
+ int enumval;
+ bool fmbstr;
+ bool futf16;
+ bool fset;
+ bool fexclude;
+};
+
+struct amgc_unit_entities {
+ struct amgc_define * defines;
+ struct amgc_entity * enums;
+ struct amgc_entity * enumvals;
+ struct amgc_entity * typedefs;
+ struct amgc_entity * structs;
+ struct amgc_entity * unions;
+ struct amgc_entity * functions;
+ struct amgc_entity * generated;
+};
+
struct amgc_unit_ctx {
const char * const * path;
const struct amgc_input * map;
const struct amgc_common_ctx * cctx;
const struct amgc_unit_meta * meta;
+ const struct amgc_unit_entities*entities;
const struct compilation_unit_t*ccunit;
void * any;
int status;
@@ -105,6 +134,8 @@ amgc_api int amgc_lang_std_from_string (const char * std);
/* low-level api */
amgc_api int amgc_init_unit_meta (const struct amgc_unit_ctx *, struct amgc_unit_meta *);
+amgc_api int amgc_get_unit_entities (const struct amgc_unit_ctx *, struct amgc_unit_meta *, struct amgc_unit_entities **);
+amgc_api void amgc_free_unit_entities (struct amgc_unit_entities *);
#ifdef __cplusplus
}