]> Dogcows Code - chaz/homebank/blob - src/hb-split.h
import homebank-5.2.6
[chaz/homebank] / src / hb-split.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2019 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_SPLIT_H__
21 #define __HB_SPLIT_H__
22
23
24 #define TXN_MAX_SPLIT 60
25
26 typedef struct _split Split;
27
28
29 struct _split
30 {
31 guint32 kcat;
32 gdouble amount;
33 gchar *memo;
34 //unsaved data
35 gushort pos;
36 };
37
38
39 void da_split_free(Split *item);
40 Split *da_split_malloc(void);
41 void da_split_destroy(GPtrArray *splits);
42 GPtrArray *da_split_new(void);
43
44 void da_splits_sort(GPtrArray *splits);
45 guint da_splits_length(GPtrArray *splits);
46 gboolean da_splits_remove(GPtrArray *splits, Split *item);
47 void da_splits_append(GPtrArray *splits, Split *item);
48
49 Split *da_splits_get(GPtrArray *splits, guint index);
50 GPtrArray *da_splits_clone(GPtrArray *src_splits);
51
52 guint da_splits_parse(GPtrArray *splits, gchar *cats, gchar *amounts, gchar *memos);
53 guint da_splits_tostring(GPtrArray *splits, gchar **cats, gchar **amounts, gchar **memos);
54
55 guint da_splits_consistency (GPtrArray *splits);
56
57
58 #endif
This page took 0.034183 seconds and 4 git commands to generate.