+typedef union _AttributeValue {
+ int dv_int;
+ unsigned dv_uint;
+ long dv_long;
+ unsigned long dv_ulong;
+ float dv_float;
+ double dv_double;
+ timespec dv_timespec;
+ gpointer dv_pointer;
+ char *dv_string;
+ gobject *dv_gobject;
+} AttributeValue;
+
+
+typedef struct _Attribute {
+ LttvAttributeName name;
+ LttvAttributeType type;
+ AttributeValue value;
+} Attribute;
+
+
+GType
+lttv_attribute_get_type (void)
+{
+ static GType type = 0;
+ if (type == 0) {
+ static const GTypeInfo info = {
+ sizeof (LttvAttributeClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ attribute_class_init, /* class_init */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (LttvAttribute),
+ 0, /* n_preallocs */
+ attribute_instance_init /* instance_init */
+ };
+
+ static const GInterfaceInfo iattribute_info = {
+ (GInterfaceInitFunc) attribute_interface_init, /* interface_init */
+ NULL, /* interface_finalize */
+ NULL /* interface_data */
+ };
+
+ type = g_type_register_static (G_TYPE_OBJECT, "LttvAttributeType", &info,
+ 0);
+ g_type_add_interface_static (type, LTTV_IATTRIBUTE_TYPE, &iattribute_info);
+ }
+ return type;