1 /* HomeBank -- Free, easy, personal accounting for everyone. 2 * Copyright (C) 1995-2021 Maxime DOYEN 3 * 4 * This file is part of HomeBank. 5 * 6 * HomeBank is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * HomeBank is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef __HB_GROUP_H__ 21 #define __HB_GROUP_H__ 22 23 24 typedef struct _group Group; 25 26 struct _group 27 { 28 guint32 key; 29 //gushort flags; 30 //gushort type; 31 gchar *name; 32 }; 33 34 35 /*typedef enum 36 { 37 GRP_TYPE_ACC = 1, 38 //GRP_TYPE_PAY 39 //GRP_TYPE_CAT 40 } HbGroupType; 41 */ 42 43 44 void da_grp_free(Group *item); 45 Group *da_grp_malloc(void); 46 47 void da_grp_destroy(void); 48 void da_grp_new(void); 49 50 guint da_grp_length(void); 51 gboolean da_grp_create_none(void); 52 gboolean da_grp_remove(guint32 key); 53 gboolean da_grp_insert(Group *item); 54 gboolean da_grp_append(Group *item); 55 guint32 da_grp_get_max_key(void); 56 Group *da_grp_get_by_name(gchar *name); 57 Group *da_grp_get_by_imp_name(gchar *name); 58 Group *da_grp_get(guint32 key); 59 60 void group_delete_unused(void); 61 GList *group_glist_sorted(gint column); 62 63 #endif