From d3f07e5d9a9fad51b71f35af6c704c1636c451fd Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 1 Jan 2016 22:48:32 -0500 Subject: interface actions: initial design. --- include/apimagic/apimagic.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/apimagic/apimagic.h b/include/apimagic/apimagic.h index beee461..1139873 100644 --- a/include/apimagic/apimagic.h +++ b/include/apimagic/apimagic.h @@ -41,17 +41,36 @@ extern "C" { #define AMGC_DRIVER_VERSION 0x0010 #define AMGC_DRIVER_DRY_RUN 0x0020 -/* unit action flags */ +enum amgc_action_type { + AMGC_ACTION_NONE, + AMGC_ACTION_OUTPUT, +}; + +enum amgc_output_action { + AMGC_OUTPUT_DEFINE, + AMGC_OUTPUT_ENUM, + AMGC_OUTPUT_TYPEDEF, + AMGC_OUTPUT_STRUCT, + AMGC_OUTPUT_UNION, + AMGC_OUTPUT_FUNCTION, +}; struct amgc_input { void * addr; size_t size; }; +struct amgc_action { + enum amgc_action_type type; + int action; + const char * filter; +}; + struct amgc_common_ctx { uint64_t drvflags; uint64_t actflags; uint64_t fmtflags; + const struct amgc_action * actions; struct compilation_env_t * ccenv; enum lang_standard_t std; }; -- cgit v1.2.3