#include "gm-iuserlist.h" GType gm_iuserlist_get_type() { static GType iuserlist_type = 0; if (iuserlist_type == 0) { static const GTypeInfo iuserlist_info = { sizeof (GmIUserlistInterface), NULL, /* base_init */ NULL, /* base_finalize */ NULL, /* class_init */ NULL, /* class_finalize */ NULL, /* class_data */ 0, 0, /* n_preallocs */ NULL /* instance_init */ }; iuserlist_type = g_type_register_static(G_TYPE_INTERFACE, "GmIUserlist", &iuserlist_info, 0); } return iuserlist_type; } GList * gm_iuserlist_get_menu(GmIUserlist *self, gint id) { GmIUserlistInterface *iface; g_return_val_if_fail(GM_IS_IUSERLIST(self), NULL); iface = GM_IUSERLIST_GET_INTERFACE(self); if (iface->get_menu) { return (* iface->get_menu) (self, id); } else { return NULL; } } gboolean gm_iuserlist_supports_status(GmIUserlist *self) { GmIUserlistInterface *iface; g_return_val_if_fail(GM_IS_IUSERLIST(self), FALSE); iface = GM_IUSERLIST_GET_INTERFACE(self); if (iface->supports_status) { return (* iface->supports_status) (self); } else { return FALSE; } } gchar * gm_iuserlist_get_status(GmIUserlist *self, gint id) { GmIUserlistInterface *iface; g_return_val_if_fail(GM_IS_IUSERLIST(self), NULL); iface = GM_IUSERLIST_GET_INTERFACE(self); if (iface->get_status) { return (* iface->get_status) (self, id); } else { return NULL; } } gchar const * gm_iuserlist_get_name(GmIUserlist *self, gint id) { GmIUserlistInterface *iface; g_return_val_if_fail(GM_IS_IUSERLIST(self), NULL); iface = GM_IUSERLIST_GET_INTERFACE(self); if (iface->get_name) { return (* iface->get_name) (self, id); } else { return NULL; } }