GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-ab-utils.h
Go to the documentation of this file.
1 /*
2  * gnc-ab-utils.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 [email protected]
20  */
21 
33 #ifndef GNC_AB_UTILS_H
34 #define GNC_AB_UTILS_H
35 
36 #include <glib.h>
37 #include <gtk/gtk.h>
38 #include <aqbanking/banking.h>
39 #include <gwenhywfar/version.h>
40 
41 #include "Account.h"
42 
43 G_BEGIN_DECLS
44 
48 #define AQBANKING_VERSION_INT (10000 * AQBANKING_VERSION_MAJOR + 100 * AQBANKING_VERSION_MINOR + AQBANKING_VERSION_PATCHLEVEL)
49 
53 #define GWENHYWFAR_VERSION_INT (10000 * GWENHYWFAR_VERSION_MAJOR + 100 * GWENHYWFAR_VERSION_MINOR + GWENHYWFAR_VERSION_PATCHLEVEL)
54 
55 #if AQBANKING_VERSION_INT >= 39900
56 
58 # define AQBANKING_VERSION_4_PLUS
59 #endif
60 
61 #if AQBANKING_VERSION_INT >= 49900
62 
64 # define AQBANKING_VERSION_5_PLUS
65 #endif
66 
67 #if defined(AQBANKING_VERSION_4_PLUS) && !defined(AQBANKING_VERSION_5_PLUS)
68 
70 # define AQBANKING_VERSION_4_EXACTLY
71 #endif
72 
73 #define GNC_PREFS_GROUP_AQBANKING "dialogs.import.hbci"
74 #define GNC_PREF_FORMAT_SWIFT940 "format-swift-mt940"
75 #define GNC_PREF_FORMAT_SWIFT942 "format-swift-mt942"
76 #define GNC_PREF_FORMAT_DTAUS "format-dtaus"
77 #define GNC_PREF_VERBOSE_DEBUG "verbose-debug"
78 
80 
81 #define AWAIT_BALANCES 1 << 1
82 #define FOUND_BALANCES 1 << 2
83 #define IGNORE_BALANCES 1 << 3
84 #define AWAIT_TRANSACTIONS 1 << 4
85 #define FOUND_TRANSACTIONS 1 << 5
86 #define IGNORE_TRANSACTIONS 1 << 6
87 
92 void gnc_GWEN_Init(void);
93 
97 void gnc_GWEN_Fini(void);
98 
106 AB_BANKING *gnc_AB_BANKING_new(void);
107 
114 void gnc_AB_BANKING_delete(AB_BANKING *api);
115 
125 gint gnc_AB_BANKING_fini(AB_BANKING *api);
126 
137 AB_ACCOUNT *gnc_ab_get_ab_account(const AB_BANKING *api, Account *gnc_acc);
138 
146 gchar *gnc_AB_VALUE_to_readable_string(const AB_VALUE *value);
147 
154 gchar *gnc_AB_JOB_to_readable_string(const AB_JOB *job);
155 
162 gchar *gnc_AB_JOB_ID_to_string(gulong job_id);
163 
172 gchar *gnc_ab_get_remote_name(const AB_TRANSACTION *ab_trans);
173 
182 gchar *gnc_ab_get_purpose(const AB_TRANSACTION *ab_trans);
183 
192 gchar *gnc_ab_description_to_gnc(const AB_TRANSACTION *ab_trans);
193 
202 gchar *gnc_ab_memo_to_gnc(const AB_TRANSACTION *ab_trans);
203 
212 Transaction *gnc_ab_trans_to_gnc(const AB_TRANSACTION *ab_trans, Account *gnc_acc);
213 
239  AB_IMEXPORTER_CONTEXT *context, guint awaiting, gboolean execute_txns,
240  AB_BANKING *api, GtkWidget *parent);
241 
250 
258 
266 
267 
273 GWEN_DB_NODE *gnc_ab_get_permanent_certs(void);
274 
275 G_END_DECLS
276 
280 #endif /* GNC_AB_UTILS_H */
gchar * gnc_ab_get_remote_name(const AB_TRANSACTION *ab_trans)
Definition: gnc-ab-utils.c:342
gchar * gnc_AB_JOB_to_readable_string(const AB_JOB *job)
Definition: gnc-ab-utils.c:714
AB_JOB_LIST2 * gnc_ab_ieci_get_job_list(GncABImExContextImport *ieci)
gchar * gnc_ab_get_purpose(const AB_TRANSACTION *ab_trans)
Definition: gnc-ab-utils.c:364
gchar * gnc_ab_description_to_gnc(const AB_TRANSACTION *ab_trans)
Definition: gnc-ab-utils.c:383
gchar * gnc_AB_VALUE_to_readable_string(const AB_VALUE *value)
Definition: gnc-ab-utils.c:300
gchar * gnc_AB_JOB_ID_to_string(gulong job_id)
Definition: gnc-ab-utils.c:726
gchar * gnc_ab_memo_to_gnc(const AB_TRANSACTION *ab_trans)
Definition: gnc-ab-utils.c:419
gboolean gnc_ab_ieci_run_matcher(GncABImExContextImport *ieci)
GWEN_DB_NODE * gnc_ab_get_permanent_certs(void)
Account handling public routines.
Transaction * gnc_ab_trans_to_gnc(const AB_TRANSACTION *ab_trans, Account *gnc_acc)
Definition: gnc-ab-utils.c:477
AB_BANKING * gnc_AB_BANKING_new(void)
Definition: gnc-ab-utils.c:137
gint gnc_AB_BANKING_fini(AB_BANKING *api)
Definition: gnc-ab-utils.c:237
void gnc_AB_BANKING_delete(AB_BANKING *api)
Definition: gnc-ab-utils.c:218
void gnc_GWEN_Fini(void)
Definition: gnc-ab-utils.c:122
AB_ACCOUNT * gnc_ab_get_ab_account(const AB_BANKING *api, Account *gnc_acc)
Definition: gnc-ab-utils.c:264
GncABImExContextImport * gnc_ab_import_context(AB_IMEXPORTER_CONTEXT *context, guint awaiting, gboolean execute_txns, AB_BANKING *api, GtkWidget *parent)
void gnc_GWEN_Init(void)
Definition: gnc-ab-utils.c:87
guint gnc_ab_ieci_get_found(GncABImExContextImport *ieci)