/* diversity-bard.h - DiversityBard * * Copyright 2007-2008 OpenMoko, Inc. * Authored by Chia-I Wu * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _DIVERSITY_BARD_H_ #define _DIVERSITY_BARD_H_ #define G_DISABLE_CAST_CHECKS #include #include #include G_BEGIN_DECLS #define DIVERSITY_TYPE_BARD (diversity_bard_get_type()) #define DIVERSITY_BARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), DIVERSITY_TYPE_BARD, DiversityBard)) #define DIVERSITY_BARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), DIVERSITY_TYPE_BARD, DiversityBardClass)) #define DIVERSITY_IS_BARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), DIVERSITY_TYPE_BARD)) #define DIVERSITY_IS_BARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), DIVERSITY_TYPE_BARD)) #define DIVERSITY_BARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), DIVERSITY_TYPE_BARD, DiversityBardClass)) typedef struct _DiversityBard DiversityBard; typedef struct _DiversityBardClass DiversityBardClass; struct _DiversityBard { DiversityObject parent_object; }; #include struct _DiversityBardClass { DiversityObjectClass parent_class; void (*equipment_equipped)(DiversityBard *bard, DiversityEquipment *eqp); void (*equipment_unequipped)(DiversityBard *bard, DiversityEquipment *eqp); }; GType diversity_bard_get_type(void) G_GNUC_CONST; DiversityBard *diversity_bard_new(void); /* EContact UID */ void diversity_bard_set_uid(DiversityBard *bard, const gchar *uid); const gchar *diversity_bard_get_uid(DiversityBard *bard); void diversity_bard_set_fullname(DiversityBard *bard, const gchar *fullname); const gchar *diversity_bard_get_fullname(DiversityBard *bard); void diversity_bard_set_phone(DiversityBard *bard, const gchar *phone); const gchar *diversity_bard_get_phone(DiversityBard *bard); void diversity_bard_set_alias(DiversityBard *bard, const gchar *alias); const gchar *diversity_bard_get_alias(DiversityBard *bard); void diversity_bard_set_twitter(DiversityBard *bard, const gchar *twitter); const gchar *diversity_bard_get_twitter(DiversityBard *bard); void diversity_bard_add_equipment(DiversityBard *bard, DiversityEquipment *eqp); void diversity_bard_remove_equipment(DiversityBard *bard, DiversityEquipment *eqp); gboolean diversity_bard_equip_equipment(DiversityBard *bard, DiversityEquipment *eqp); void diversity_bard_unequip_equipment(DiversityBard *bard, DiversityEquipment *eqp); gboolean diversity_bard_has_equipment(DiversityBard *bard, DiversityEquipment *eqp); DiversityEquipment *diversity_bard_get_equipment_by_name(DiversityBard *bard, const gchar *name); const GSList *diversity_bard_get_equipments(DiversityBard *bard); G_END_DECLS #endif /* _DIVERSITY_BARD_H_ */