GnuCash c935c2f+
Loading...
Searching...
No Matches
import-parse.h
1/*
2 * import-parse.h -- a generic "parser" API for importers.. Allows importers
3 * to parse dates and numbers, and provides a UI to ask for users to
4 * resolve ambiguities.
5 *
6 * Created by: Derek Atkins <derek@ihtfp.com>
7 * Copyright (c) 2003 Derek Atkins <warlord@MIT.EDU>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, contact:
21 *
22 * Free Software Foundation Voice: +1-617-542-5942
23 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
24 * Boston, MA 02110-1301, USA gnu@gnu.org
25 */
26
27#ifndef IMPORT_PARSE_H
28#define IMPORT_PARSE_H
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#include "qof.h"
35
36typedef enum
37{
38 GNCIF_NONE = 0,
39
40 /* number formats */
41 GNCIF_NUM_PERIOD = (1 << 1),
42 GNCIF_NUM_COMMA = (1 << 2),
43
44 /* date formats */
45 GNCIF_DATE_MDY = (1 << 8),
46 GNCIF_DATE_DMY = (1 << 9),
47 GNCIF_DATE_YMD = (1 << 10),
48 GNCIF_DATE_YDM = (1 << 11)
49} GncImportFormat;
50
51
52GncImportFormat gnc_import_test_numeric(const char* str, GncImportFormat fmts);
53GncImportFormat gnc_import_test_date(const char* str, GncImportFormat fmts);
54
55
56GncImportFormat gnc_import_choose_fmt(const char* msg, GncImportFormat fmts,
57 gpointer user_data);
58
59gboolean gnc_import_parse_numeric(const char* str, GncImportFormat fmt,
60 gnc_numeric *val);
61gboolean gnc_import_parse_date(const char *date, GncImportFormat fmt,
62 time64 *val);
63
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* IMPORT_PARSE_H */
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition gnc-date.h:87