2 #include <glib-object.h>
3 #include "exportable.h"
5 GType u_object_exportable_get_type(void)
9 static const GTypeInfo info = {
10 sizeof (UObjectExportable),
15 type = g_type_register_static(G_TYPE_INTERFACE,
16 "UObjectExportable", &info, 0);
21 int u_object_export(GObject *obj, FILE *f)
23 g_return_val_if_fail(U_OBJECT_IS_EXPORTABLE(obj), -1);
24 return U_OBJECT_EXPORTABLE_GET_INTERFACE(obj)->export(obj, f);
27 int u_object_export_name(GObject *obj, char *buf, size_t n)
29 g_return_val_if_fail(U_OBJECT_IS_EXPORTABLE(obj), -1);
30 return U_OBJECT_EXPORTABLE_GET_INTERFACE(obj)->export_name(obj, buf, n);