]>
Dogcows Code - chaz/homebank/blob - src/hb-category.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2017 Maxime DOYEN
4 * This file is part of HomeBank.
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.
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.
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/>.
20 #ifndef __HB_CATEGORY_H__
21 #define __HB_CATEGORY_H__
24 typedef struct _category Category
;
34 gdouble budget
[13]; //0:is same value, 1 ..12 are months
43 #define GF_INCOME (1<<1)
44 #define GF_CUSTOM (1<<2)
45 #define GF_BUDGET (1<<3)
46 #define GF_FORCED (1<<4)
48 Category
*da_cat_clone(Category
*src_item
);
49 void da_cat_free(Category
*item
);
50 Category
*da_cat_malloc(void);
51 void da_cat_destroy(void);
52 void da_cat_new(void);
54 guint
da_cat_length(void);
55 guint32
da_cat_remove(guint32 key
);
56 gboolean
da_cat_insert(Category
*acc
);
57 gboolean
da_cat_append(Category
*cat
);
58 guint32
da_cat_get_max_key(void);
59 gchar
*da_cat_get_fullname(Category
*cat
);
61 guint32
da_cat_get_key_by_name(gchar
*name
);
63 guint32
category_report_id(guint32 key
, gboolean subcat
);
65 Category
*da_cat_get_by_name(gchar
*name
);
66 Category
*da_cat_get(guint32 key
);
67 Category
*da_cat_get_by_fullname(gchar
*fullname
);
68 Category
*da_cat_append_ifnew_by_fullname(gchar
*fullname
, gboolean imported
);
69 void da_cat_consistency(Category
*item
);
71 GList
*category_glist_sorted(gint column
);
73 void category_delete_unused(void);
74 void category_fill_usage(void);
75 void category_move(guint32 key1
, guint32 key2
);
76 gboolean
category_rename(Category
*item
, const gchar
*newname
);
77 gint
category_change_type(Category
*item
, gboolean isIncome
);
79 gboolean
category_load_csv(gchar
*filename
, gchar
**error
);
80 gboolean
category_save_csv(gchar
*filename
, gchar
**error
);
81 gchar
*category_find_preset(gchar
**lang
);
82 gint
category_type_get(Category
*item
);
This page took 0.041123 seconds and 4 git commands to generate.