2 #ifndef GS_CATEGORIES_H
3 #define GS_CATEGORIES_H
6 * Avoid some strange warnings with callback defs.
13 enum e_gs_type_category {
14 e_gs_type_cat_undefined = 0,
16 e_gs_type_cat_elemental,
21 e_gs_type_cat_ignored,
30 enum e_gs_elemental_encoding {
31 e_gs_elemental_encoding_undefined = 0,
33 e_gs_elemental_encoding_unsigned_integer,
34 e_gs_elemental_encoding_signed_integer,
35 e_gs_elemental_encoding_floating_point,
37 e_gs_elemental_encoding_invalid
40 struct s_gs_cat_elemental {
48 struct s_gs_cat_struct_field {
54 void (*before_callback)(void *vars,
55 struct s_gs_type *p_type,
58 void (*after_callback)(void *vars,
59 struct s_gs_type *p_type,
63 struct s_gs_cat_struct {
66 struct s_gs_cat_struct_field **field_array;
73 struct s_gs_cat_union_field {
78 void (*before_callback)(void *vars,
79 struct s_gs_type *p_type,
82 void (*after_callback)(void *vars,
83 struct s_gs_type *p_type,
87 struct s_gs_cat_union {
90 struct s_gs_cat_union_field **field_array;
92 /* callback used to return the field number */
93 int (*callback)(void *vars,
94 struct s_gs_type *p_type,
102 struct s_gs_cat_ref {
105 /* callback used to return the referenced type number */
106 int (*callback)(void *vars,
107 struct s_gs_type *p_type,
115 struct s_gs_cat_array {
118 /* element_count < 0 means dynamically defined */
119 long int element_count;
121 /* callback used to return the dynamic length */
122 long int (*callback)(void *vars,
123 struct s_gs_type *p_type,
130 struct s_gs_cat_ignored {
135 gs_type_new_elemental(gras_type_bag_t *p_bag,
136 gras_connection_t *p_connection,
138 enum e_gs_elemental_encoding encoding,
142 gs_type_new_elemental_with_callback(gras_type_bag_t *p_bag,
143 gras_connection_t *p_connection,
145 enum e_gs_elemental_encoding encoding,
148 void (*callback)(void *vars,
154 #endif /* GS_CATEGORIES_H */