GnuCash 2.4.99
gnc-ab-utils.h
Go to the documentation of this file.
00001 /*
00002  * gnc-ab-utils.h --
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License as
00006  * published by the Free Software Foundation; either version 2 of
00007  * the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, contact:
00016  *
00017  * Free Software Foundation           Voice:  +1-617-542-5942
00018  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
00019  * Boston, MA  02110-1301,  USA       gnu@gnu.org
00020  */
00021 
00033 #ifndef GNC_AB_UTILS_H
00034 #define GNC_AB_UTILS_H
00035 
00036 #include <glib.h>
00037 #include <gtk/gtk.h>
00038 #include <aqbanking/banking.h>
00039 #include <gwenhywfar/version.h>
00040 
00041 #include "Account.h"
00042 
00043 G_BEGIN_DECLS
00044 
00048 #define AQBANKING_VERSION_INT (10000 * AQBANKING_VERSION_MAJOR + 100 * AQBANKING_VERSION_MINOR + AQBANKING_VERSION_PATCHLEVEL)
00049 
00053 #define GWENHYWFAR_VERSION_INT (10000 * GWENHYWFAR_VERSION_MAJOR + 100 * GWENHYWFAR_VERSION_MINOR + GWENHYWFAR_VERSION_PATCHLEVEL)
00054 
00055 #if AQBANKING_VERSION_INT >= 39900
00056 
00058 # define AQBANKING_VERSION_4_PLUS
00059 #endif
00060 
00061 #if AQBANKING_VERSION_INT >= 49900
00062 
00064 # define AQBANKING_VERSION_5_PLUS
00065 #endif
00066 
00067 #if defined(AQBANKING_VERSION_4_PLUS) && !defined(AQBANKING_VERSION_5_PLUS)
00068 
00070 # define AQBANKING_VERSION_4_EXACTLY
00071 #endif
00072 
00073 #define GCONF_SECTION_AQBANKING "dialogs/import/hbci"
00074 #define KEY_FORMAT_SWIFT940 "format_swift_mt940"
00075 #define KEY_FORMAT_SWIFT942 "format_swift_mt942"
00076 #define KEY_FORMAT_DTAUS "format_dtaus"
00077 #define KEY_VERBOSE_DEBUG   "verbose_debug"
00078 
00079 typedef struct _GncABImExContextImport GncABImExContextImport;
00080 
00081 #define AWAIT_BALANCES      1 << 1
00082 #define FOUND_BALANCES      1 << 2
00083 #define IGNORE_BALANCES     1 << 3
00084 #define AWAIT_TRANSACTIONS  1 << 4
00085 #define FOUND_TRANSACTIONS  1 << 5
00086 #define IGNORE_TRANSACTIONS 1 << 6
00087 
00092 void gnc_GWEN_Init(void);
00093 
00097 void gnc_GWEN_Fini(void);
00098 
00106 AB_BANKING *gnc_AB_BANKING_new(void);
00107 
00114 void gnc_AB_BANKING_delete(AB_BANKING *api);
00115 
00125 gint gnc_AB_BANKING_fini(AB_BANKING *api);
00126 
00137 AB_ACCOUNT *gnc_ab_get_ab_account(const AB_BANKING *api, Account *gnc_acc);
00138 
00146 gchar *gnc_AB_VALUE_to_readable_string(const AB_VALUE *value);
00147 
00154 gchar *gnc_AB_JOB_to_readable_string(const AB_JOB *job);
00155 
00162 gchar *gnc_AB_JOB_ID_to_string(gulong job_id);
00163 
00172 gchar *gnc_ab_get_remote_name(const AB_TRANSACTION *ab_trans);
00173 
00182 gchar *gnc_ab_get_purpose(const AB_TRANSACTION *ab_trans);
00183 
00192 gchar *gnc_ab_description_to_gnc(const AB_TRANSACTION *ab_trans);
00193 
00202 gchar *gnc_ab_memo_to_gnc(const AB_TRANSACTION *ab_trans);
00203 
00212 Transaction *gnc_ab_trans_to_gnc(const AB_TRANSACTION *ab_trans, Account *gnc_acc);
00213 
00238 GncABImExContextImport *gnc_ab_import_context(
00239     AB_IMEXPORTER_CONTEXT *context, guint awaiting, gboolean execute_txns,
00240     AB_BANKING *api, GtkWidget *parent);
00241 
00249 guint gnc_ab_ieci_get_found(GncABImExContextImport *ieci);
00250 
00257 AB_JOB_LIST2 *gnc_ab_ieci_get_job_list(GncABImExContextImport *ieci);
00258 
00265 gboolean gnc_ab_ieci_run_matcher(GncABImExContextImport *ieci);
00266 
00267 
00273 GWEN_DB_NODE *gnc_ab_get_permanent_certs(void);
00274 
00275 G_END_DECLS
00276 
00280 #endif /* GNC_AB_UTILS_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines