#include #include "serializable.h" #include "upkg.h" GType upkg_serializable_get_type(void) { static GType type = 0; if (type == 0) { static const GTypeInfo info = { sizeof (UPkgSerializable), NULL, NULL, }; type = g_type_register_static(G_TYPE_INTERFACE, "UPkgSerializable", &info, 0); } return type; } int upkg_deserialize(GObject *obj, struct upkg_file *f) { g_return_val_if_fail(UPKG_IS_SERIALIZABLE(obj), -1); return UPKG_SERIALIZABLE_GET_INTERFACE(obj)->deserialize(obj, f); }