+/*
+ * The tag enumeration is validated to ensure that it contains only mappings
+ * from numeric values to a single tag. Overlapping tag value ranges are
+ * therefore forbidden.
+ */
+struct type_class_variant *variant_type_class_new(const char *name);
+void variant_type_class_add_field(struct type_class_variant *variant_class,
+ const char *tag_name,
+ struct type_class *type_class);
+struct type_class_field *
+variant_type_class_get_field_from_tag(struct type_class_variant *variant_class,
+ GQuark tag);
+/*
+ * Returns 0 on success, -EPERM on error.
+ */
+int variant_type_set_tag(struct type_variant *variant,
+ struct type *enum_tag_instance);
+/*
+ * Returns the field selected by the current tag value.
+ * field returned only valid as long as the variant structure is not appended
+ * to.
+ */
+struct field *
+variant_type_get_current_field(struct type_variant *variant);
+