1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2016 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_IMPORT_H__
21 #define __HB_IMPORT_H__
24 typedef struct _ImportContext ImportContext
;
27 GList
*trans_list
; // trn storage
28 gint next_acc_key
; //max key account when start
31 const gchar
*encoding
;
33 gint nb_src_acc
, nb_new_acc
;
42 typedef struct _OfxContext OfxContext
;
47 gboolean curr_acc_isnew
;
52 typedef struct _QifContext QifContext
;
53 typedef struct _qif_split QIFSplit
;
54 typedef struct _qif_tran QIF_Tran
;
56 #define QIF_UNKNOW_ACCOUNT_NAME "(unknown)"
88 QIFSplit splits
[TXN_MAX_SPLIT
];
106 GList
*account_import_qif(gchar
*filename
, ImportContext
*ictx
);
107 gdouble
hb_qif_parser_get_amount(gchar
*string
);
111 Account
*import_create_account(gchar
*name
, gchar
*number
);
112 GList
*homebank_ofx_import(gchar
*filename
, ImportContext
*ictx
);
114 gboolean
hb_csv_row_valid(gchar
**str_array
, guint nbcolumns
, gint
*csvtype
);
115 gchar
**hb_csv_row_get(gchar
*string
, gchar
*delimiter
, gint max_tokens
);
117 GList
*homebank_csv_import(gchar
*filename
, ImportContext
*ictx
);