GnuCash c935c2f+
Loading...
Searching...
No Matches
dialog-customer-import.h
Go to the documentation of this file.
1/*
2 * dialog-customer-import.h --
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, contact:
16 *
17 * Free Software Foundation Voice: +1-617-542-5942
18 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
19 * Boston, MA 02110-1301, USA gnu@gnu.org
20 */
21
30#ifndef GNC_PLUGIN_customer_import_customer_import_H
31#define GNC_PLUGIN_customer_import_customer_import_H
32
33#include <glib.h>
34#include <gtk/gtk.h>
35
36G_BEGIN_DECLS
37
38// model
39enum customer_import_model_columns
40{
41 CI_ID, CI_COMPANY,
42 CI_NAME, CI_ADDR1, CI_ADDR2, CI_ADDR3, CI_ADDR4, CI_PHONE, CI_FAX, CI_EMAIL,
43 CI_NOTES,
44 CI_SHIPNAME, CI_SHIPADDR1, CI_SHIPADDR2, CI_SHIPADDR3, CI_SHIPADDR4, CI_SHIPPHONE,
45 CI_SHIPFAX, CI_SHIPEMAIL, CI_N_COLUMNS
46};
47
48enum _customer_import_result
49{
50 CI_RESULT_OK,
51 CI_RESULT_OPEN_FAILED,
52 CI_RESULT_ERROR_IN_REGEXP,
53};
54typedef enum _customer_import_result customer_import_result;
55
57{
58 int n_imported, n_ignored;
59 GString *ignored_lines;
60};
61typedef struct _customer_import_stats customer_import_stats;
62
63
64customer_import_result
65gnc_customer_import_read_file (const gchar *filename, const gchar *parser_regexp, GtkListStore *store, guint max_rows, customer_import_stats *stats);
66
67void
68gnc_customer_import_fix_customers (GtkListStore *store, guint *fixed, guint *deleted, gchar * type);
69
70void
71gnc_customer_import_create_customers (GtkListStore *store, QofBook *book, guint *n_customers_created, guint *n_customers_updated, gchar * type);
72
73
74G_END_DECLS
75
76#endif /* GNC_PLUGIN_customer_import_customer_import_H */
77
QofBook reference.
Definition qofbook-p.hpp:47