]>
Dogcows Code - chaz/homebank/blob - src/hb-currency.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2019 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_CURRENCY_H__
21 #define __HB_CURRENCY_H__
23 typedef struct _currency Currency
;
24 typedef struct _iso4217 Currency4217
;
34 gchar
*symbol
; /* max symbol is 3 digits in unicode but mostly is 1 digit */
42 gchar format
[8]; /* hold decimal format: '%.xf' */
43 gchar monfmt
[32]; /* hold monetary format: 'prefix %s suffix' */
47 #define CF_CUSTOM (1<<1)
53 guint curr_frac_digit
;
56 gboolean curr_is_prefix
;
62 void da_cur_free(Currency
*item
);
63 Currency
*da_cur_malloc(void);
64 void da_cur_destroy(void);
65 void da_cur_new(void);
67 guint
da_cur_length(void);
68 gboolean
da_cur_remove(guint32 key
);
70 void da_cur_init_from4217(Currency
*cur
, Currency4217
*curfmt
);
71 void da_cur_initformat(Currency
*item
);
73 gboolean
da_cur_insert(Currency
*item
);
74 gboolean
da_cur_append(Currency
*item
);
75 guint32
da_cur_get_max_key(void);
77 Currency
*da_cur_get_by_name(gchar
*name
);
78 Currency
*da_cur_get_by_iso_code(gchar
*iso_code
);
79 Currency
*da_cur_get(guint32 key
);
81 gboolean
currency_is_euro(guint32 key
);
82 gboolean
currency_is_used(guint32 key
);
83 Currency
*currency_add_from_user(Currency4217
*curfmt
);
84 gboolean
currency_online_sync(GError
**error
);
86 Currency4217
*iso4217format_get(gchar
*code
);
This page took 0.036504 seconds and 5 git commands to generate.