1 #include "qom/object_interfaces.h"
2 #include "qemu/module.h"
4 void user_creatable_complete(Object
*obj
, Error
**errp
)
7 UserCreatableClass
*ucc
;
9 (UserCreatable
*)object_dynamic_cast(obj
, TYPE_USER_CREATABLE
);
15 ucc
= USER_CREATABLE_GET_CLASS(uc
);
17 ucc
->complete(uc
, errp
);
21 bool user_creatable_can_be_deleted(UserCreatable
*uc
, Error
**errp
)
24 UserCreatableClass
*ucc
= USER_CREATABLE_GET_CLASS(uc
);
26 if (ucc
->can_be_deleted
) {
27 return ucc
->can_be_deleted(uc
, errp
);
33 static void register_types(void)
35 static const TypeInfo uc_interface_info
= {
36 .name
= TYPE_USER_CREATABLE
,
37 .parent
= TYPE_INTERFACE
,
38 .class_size
= sizeof(UserCreatableClass
),
41 type_register_static(&uc_interface_info
);
44 type_init(register_types
)