]> Dogcows Code - chaz/homebank/blob - src/import.h
add gitignore
[chaz/homebank] / src / import.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2014 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 __HOMEBANK_IMPORT_H__
21 #define __HOMEBANK_IMPORT_H__
22
23 #define QIF_UNKNOW_ACCOUNT_NAME "(unknown)"
24
25
26 enum
27 {
28 PAGE_INTRO,
29 PAGE_FILE,
30 PAGE_RESULT,
31 PAGE_OPTIONS,
32 PAGE_CONFIRM,
33 NUM_PAGE
34 };
35
36
37 typedef struct _OfxContext OfxContext;
38 struct _OfxContext
39 {
40 GList *trans_list;
41 Account *curr_acc;
42 gboolean curr_acc_isnew;
43 };
44
45
46 typedef struct _ImportContext ImportContext;
47 struct _ImportContext
48 {
49 GList *trans_list; // trn storage
50 gint cnt_initial_acc; //max key account when start
51 gint cnt_new_acc; //
52 gint cnt_new_ope;
53 gint cnt_new_pay;
54 gint cnt_new_cat;
55 gint datefmt;
56 const gchar *encoding;
57 gint cnt_err_date;
58 gint nb_duplicate;
59 };
60
61
62 struct import_data
63 {
64 GtkWidget *assistant;
65 GtkWidget *pages[NUM_PAGE];
66
67 GtkWidget *GR_page;
68
69 GdkPixbuf *head_pixbuf;
70 GdkPixbuf *side_pixbuf;
71
72 GtkWidget *filechooser;
73 GtkWidget *user_info;
74 GtkWidget *ok_image;
75 GtkWidget *ko_image;
76
77 GtkWidget *TX_filepath;
78 GtkWidget *TX_filename;
79 GtkWidget *TX_encoding;
80 GtkWidget *TX_filedetails;
81
82 GtkWidget *GR_error;
83 GtkWidget *GR_options;
84 GtkWidget *GR_duplicate;
85
86 // GtkWidget *LA_acc;
87 GtkWidget *NB_maxgap;
88
89 GtkWidget *BT_refresh;
90 GtkWidget *CY_dateorder;
91
92 GtkWidget *LV_acc;
93 GtkWidget *BT_edit;
94
95 GtkWidget *imported_ope;
96 GtkWidget *duplicat_ope;
97
98 GtkWidget *TX_acc_upd;
99 GtkWidget *TX_acc_new;
100 GtkWidget *TX_trn_imp;
101 GtkWidget *TX_trn_nop;
102 GtkWidget *TX_trn_asg;
103
104 gchar *filepath;
105 gchar *filename;
106 guint filetype;
107
108 /* count imported items */
109 guint imp_cnt_acc;
110 guint imp_cnt_trn;
111 guint imp_cnt_asg;
112
113 gboolean valid;
114
115 // guint step;
116 // guint maxstep;
117
118
119 // import context
120 ImportContext ictx;
121
122 };
123
124 struct import_target_data
125 {
126 GtkWidget *getwidget1;
127 GtkWidget *getwidget2;
128 GtkWidget *radio[2];
129 };
130
131
132 GtkWidget *ui_import_window_new (void);
133 Account *import_create_account(gchar *name, gchar *number);
134 const gchar *homebank_file_getencoding(gchar *filename);
135 gchar *homebank_utf8_ensure(gchar *buffer);
136
137 #endif
138
139
This page took 0.033641 seconds and 4 git commands to generate.