From 8a185430e933fb4937a65550ba801d08d7192a34 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Tue, 4 Jun 2002 23:11:33 +0000 Subject: [PATCH] 2002-06-05 Christian Stimming * src/import-export/hbci/*: Add directory and initial files for HBCI support module. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6946 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 ++ configure.in | 2 + src/import-export/Makefile.am | 2 +- src/import-export/hbci/.cvsignore | 7 ++ src/import-export/hbci/Makefile.am | 40 ++++++++++++ src/import-export/hbci/gncmod-hbci.c | 65 +++++++++++++++++++ src/import-export/hbci/hbci.scm | 6 ++ src/import-export/hbci/test/.cvsignore | 5 ++ src/import-export/hbci/test/Makefile.am | 7 ++ .../hbci/test/test-link-module.c | 6 ++ 10 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 src/import-export/hbci/.cvsignore create mode 100644 src/import-export/hbci/Makefile.am create mode 100644 src/import-export/hbci/gncmod-hbci.c create mode 100644 src/import-export/hbci/hbci.scm create mode 100644 src/import-export/hbci/test/.cvsignore create mode 100644 src/import-export/hbci/test/Makefile.am create mode 100644 src/import-export/hbci/test/test-link-module.c diff --git a/ChangeLog b/ChangeLog index 0775d7a020..315936e26d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-06-05 Christian Stimming + + * src/import-export/hbci/*: Add directory and initial files for + HBCI support module. + 2002-05-31 David Hampton * src/gnome/reconcile-list.c: Fix the direction of the sort diff --git a/configure.in b/configure.in index a7a4dbbab4..6ad5a03e25 100644 --- a/configure.in +++ b/configure.in @@ -927,6 +927,8 @@ AC_OUTPUT( m4/Makefile intl/Makefile src/import-export/qif-import/test/Makefile src/import-export/qif-io-core/Makefile src/import-export/qif-io-core/test/Makefile + src/import-export/hbci/Makefile + src/import-export/hbci/test/Makefile src/network-utils/Makefile src/network-utils/test/Makefile src/optional/Makefile diff --git a/src/import-export/Makefile.am b/src/import-export/Makefile.am index eecc2cc64d..47472e17a5 100644 --- a/src/import-export/Makefile.am +++ b/src/import-export/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = binary-import qif-import +SUBDIRS = binary-import qif-import # FIXME remove this when qif-io-core is finished DIST_SUBDIRS = binary-import qif-import qif-io-core diff --git a/src/import-export/hbci/.cvsignore b/src/import-export/hbci/.cvsignore new file mode 100644 index 0000000000..88abab976f --- /dev/null +++ b/src/import-export/hbci/.cvsignore @@ -0,0 +1,7 @@ +.deps +.libs +.scm-links +*.la +*.lo +Makefile +Makefile.in diff --git a/src/import-export/hbci/Makefile.am b/src/import-export/hbci/Makefile.am new file mode 100644 index 0000000000..fd6c557891 --- /dev/null +++ b/src/import-export/hbci/Makefile.am @@ -0,0 +1,40 @@ +SUBDIRS = . test + +pkglib_LTLIBRARIES = libgncmod-hbci.la + +libgncmod_hbci_la_SOURCES = \ + gncmod-hbci.c + +libgncmod_hbci_la_LDFLAGS = -module +libgncmod_hbci_la_LIBADD = \ + ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \ + ${top_builddir}/src/app-file/libgncmod-app-file.la \ + ${top_builddir}/src/gnc-module/libgncmodule.la \ + ${top_builddir}/src/engine/libgncmod-engine.la \ + ${GUILE_LIBS} \ + ${GLIB_LIBS} + +AM_CFLAGS = -I${top_srcdir}/src/gnc-module \ + ${GLIB_CFLAGS} \ + ${GUILE_INCS} + + +.scm-links: + rm -f gnucash import-export + ln -sf . gnucash + ln -sf . import-export + touch .scm-links + +noinst_DATA = .scm-links + +gncscmmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/import-export +gncscmmod_DATA = hbci.scm + +gncscmdir = ${GNC_SHAREDIR}/scm +gncscm_DATA = + +EXTRA_DIST = \ + ${gncscmmod_DATA} \ + ${gncscm_DATA} + +CLEANFILES = ${SCM_FILE_LINKS} gnucash import-export .scm-links diff --git a/src/import-export/hbci/gncmod-hbci.c b/src/import-export/hbci/gncmod-hbci.c new file mode 100644 index 0000000000..9c8236f52d --- /dev/null +++ b/src/import-export/hbci/gncmod-hbci.c @@ -0,0 +1,65 @@ +/********************************************************************* + * gncmod-tax-us.c + * module definition/initialization for us tax info + * + * Copyright (c) 2001 Linux Developers Group, Inc. + *********************************************************************/ + +#include +#include +#include + +#include "gnc-module.h" +#include "gnc-module-api.h" + +/* version of the gnc module system interface we require */ +int libgncmod_hbci_LTX_gnc_module_system_interface = 0; + +/* module versioning uses libtool semantics. */ +int libgncmod_hbci_LTX_gnc_module_current = 0; +int libgncmod_hbci_LTX_gnc_module_revision = 0; +int libgncmod_hbci_LTX_gnc_module_age = 0; + +char * +libgncmod_hbci_LTX_gnc_module_path(void) { + return g_strdup("gnucash/import-export/hbci"); +} + +char * +libgncmod_hbci_LTX_gnc_module_description(void) { + return g_strdup("Support for HBCI protocol"); +} + +static void +lmod(char * mn) +{ + char * form = g_strdup_printf("(use-modules %s)\n", mn); + gh_eval_str(form); + g_free(form); +} + +int +libgncmod_hbci_LTX_gnc_module_init(int refcount) { + /* load the engine (we depend on it) */ + if(!gnc_module_load("gnucash/engine", 0)) { + return FALSE; + } + + /* load the app-utils (we depend on it) */ + if(!gnc_module_load("gnucash/app-utils", 0)) { + return FALSE; + } + + /* load the HBCI Scheme code */ + if(gh_eval_str("(use-modules (gnucash import-export hbci))") == + SCM_BOOL_F) { + return FALSE; + } + + return TRUE; +} + +int +libgncmod_hbci_LTX_gnc_module_end(int refcount) { + return TRUE; +} diff --git a/src/import-export/hbci/hbci.scm b/src/import-export/hbci/hbci.scm new file mode 100644 index 0000000000..5752e87711 --- /dev/null +++ b/src/import-export/hbci/hbci.scm @@ -0,0 +1,6 @@ +(define-module (gnucash import-export hbci)) + +;;(export gnc:txf-get-payer-name-source) +;;(export txf-expense-categories) + +;;(load-from-path "txf.scm") diff --git a/src/import-export/hbci/test/.cvsignore b/src/import-export/hbci/test/.cvsignore new file mode 100644 index 0000000000..6be40fc010 --- /dev/null +++ b/src/import-export/hbci/test/.cvsignore @@ -0,0 +1,5 @@ +.deps +.libs +Makefile +Makefile.in +test-link-module diff --git a/src/import-export/hbci/test/Makefile.am b/src/import-export/hbci/test/Makefile.am new file mode 100644 index 0000000000..1800147d4c --- /dev/null +++ b/src/import-export/hbci/test/Makefile.am @@ -0,0 +1,7 @@ +TESTS=test-link + +noinst_PROGRAMS=test-link-module + +test_link_module_SOURCES=test-link-module.c +test_link_module_LDADD=../libgncmod-hbci.la + diff --git a/src/import-export/hbci/test/test-link-module.c b/src/import-export/hbci/test/test-link-module.c new file mode 100644 index 0000000000..4f8ec032f1 --- /dev/null +++ b/src/import-export/hbci/test/test-link-module.c @@ -0,0 +1,6 @@ +int +main(int argc, char ** argv) +{ + return 0; +} +