Revision b04cbed6
Von aquamaniac vor etwa 21 Jahren hinzugefügt
| src/libs/aqbanking++/banking.cpp | ||
|---|---|---|
|  | ||
|  | ||
|  | ||
|   AB_BANKING *Banking::getCInterface(){
 | ||
|     return _banking;
 | ||
|   }
 | ||
|  | ||
|  | ||
|   AB_PROVIDER *Banking::getProvider(const char *name){
 | ||
|     return AB_Banking_GetProvider(_banking, name);
 | ||
|   }
 | ||
|  | ||
|  | ||
| } /* namespace */
 | ||
| src/libs/aqbanking++/banking.h | ||
|---|---|---|
|     virtual ~Banking();
 | ||
|  | ||
|  | ||
|     AB_BANKING *getCInterface();
 | ||
|  | ||
|  | ||
|     /**
 | ||
|      * See @ref AB_Banking_Init
 | ||
|      */
 | ||
| ... | ... | |
|     int fini();
 | ||
|  | ||
|  | ||
|     /**
 | ||
|      * Loads a backend with the given name. You can use
 | ||
|      * @ref AB_Banking_GetProviderDescrs to retrieve a list of available
 | ||
|      * backends. Such a backend can then be asked to return an account list.
 | ||
|      */
 | ||
|     AB_PROVIDER *getProvider(const char *name);
 | ||
|  | ||
|  | ||
|     /**
 | ||
|      * This function loads the given backend (if it not already has been) and
 | ||
|      * imports any account that backend might offer. You can use this function
 | ||
| src/libs/aqbanking++/provider.cpp | ||
|---|---|---|
| /***************************************************************************
 | ||
|  $RCSfile$
 | ||
|                              -------------------
 | ||
|     cvs         : $Id$
 | ||
|     begin       : Mon Mar 01 2004
 | ||
|     copyright   : (C) 2004 by Martin Preuss
 | ||
|     email       : martin@libchipcard.de
 | ||
|  | ||
|  ***************************************************************************
 | ||
|  *          Please see toplevel file COPYING for license details           *
 | ||
|  ***************************************************************************/
 | ||
|  | ||
|  | ||
| #ifdef HAVE_CONFIG_H
 | ||
| # include <config.h>
 | ||
| #endif
 | ||
|  | ||
|  | ||
| #include "provider_p.h"
 | ||
| #include <assert.h>
 | ||
|  | ||
| #include <gwenhywfar/inherit.h>
 | ||
| #include <gwenhywfar/debug.h>
 | ||
|  | ||
|  | ||
| namespace AB {
 | ||
|  | ||
|   GWEN_INHERIT(AB_PROVIDER_WIZARD, ProviderWizard);
 | ||
|  | ||
|  | ||
|   int ProviderWizard_Linker::setup(AB_PROVIDER_WIZARD *pw){
 | ||
|     ProviderWizard *kw;
 | ||
|  | ||
|     assert(pw);
 | ||
|     kw=GWEN_INHERIT_GETDATA(AB_PROVIDER_WIZARD, ProviderWizard, pw);
 | ||
|     assert(kw);
 | ||
|  | ||
|     return kw->setup();
 | ||
|   }
 | ||
|  | ||
|  | ||
|  | ||
|   void ProviderWizard_Linker::freeData(void *bp, void *p) {
 | ||
|     ProviderWizard *kw;
 | ||
|  | ||
|     DBG_NOTICE(0, "ProviderWizard_Linker: Freeing ProviderWizard");
 | ||
|     kw=(ProviderWizard*)p;
 | ||
|     if (kw->_providerWizard) {
 | ||
|       kw->_providerWizard=0;
 | ||
|     }
 | ||
|     delete kw;
 | ||
|   }
 | ||
|  | ||
|  | ||
|  | ||
|   ProviderWizard::ProviderWizard(AB_PROVIDER *pro,
 | ||
|                                  const char *name){
 | ||
|     assert(pro);
 | ||
|     _providerWizard=AB_ProviderWizard_new(pro, name);
 | ||
|     GWEN_INHERIT_SETDATA(AB_PROVIDER_WIZARD, ProviderWizard,
 | ||
|                          _providerWizard, this,
 | ||
|                          ProviderWizard_Linker::freeData);
 | ||
|     AB_ProviderWizard_SetSetupFn(_providerWizard,
 | ||
|                                  ProviderWizard_Linker::setup);
 | ||
|   }
 | ||
|  | ||
|  | ||
|  | ||
|   ProviderWizard::~ProviderWizard(){
 | ||
|     DBG_NOTICE(0, "~ProviderWizard: Freeing ProviderWizard");
 | ||
|     if (_providerWizard) {
 | ||
|       GWEN_INHERIT_UNLINK(AB_PROVIDER_WIZARD, ProviderWizard,
 | ||
| 			  _providerWizard)
 | ||
|       AB_ProviderWizard_free(_providerWizard);
 | ||
|     }
 | ||
|   }
 | ||
|  | ||
|  | ||
|  | ||
|   const char *ProviderWizard::getName(){
 | ||
|     return AB_ProviderWizard_GetName(_providerWizard);
 | ||
|   }
 | ||
|  | ||
|  | ||
|  | ||
|   AB_PROVIDER *ProviderWizard::getProvider(){
 | ||
|     return AB_ProviderWizard_GetProvider(_providerWizard);
 | ||
|   }
 | ||
|  | ||
|  | ||
|  | ||
|   GWEN_DB_NODE *ProviderWizard::getData(){
 | ||
|     return AB_ProviderWizard_GetData(_providerWizard);
 | ||
|   }
 | ||
|  | ||
|  | ||
|  | ||
|   AB_PROVIDER_WIZARD *ProviderWizard::getProviderWizardPtr(){
 | ||
|     return _providerWizard;
 | ||
|   }
 | ||
|  | ||
|  | ||
|  | ||
|   int ProviderWizard::setup(){
 | ||
|     return AB_ERROR_NOT_SUPPORTED;
 | ||
|   }
 | ||
|  | ||
|  | ||
|  | ||
| } /* namespace */
 | ||
|  | ||
|  | ||
|  | ||
|  | ||
|  | ||
|  | ||
|  | ||
|  | ||
|  | ||
|  | ||
| src/libs/aqbanking++/provider.h | ||
|---|---|---|
| /***************************************************************************
 | ||
|  $RCSfile$
 | ||
|                              -------------------
 | ||
|     cvs         : $Id$
 | ||
|     begin       : Mon Mar 01 2004
 | ||
|     copyright   : (C) 2004 by Martin Preuss
 | ||
|     email       : martin@libchipcard.de
 | ||
|  | ||
|  ***************************************************************************
 | ||
|  *          Please see toplevel file COPYING for license details           *
 | ||
|  ***************************************************************************/
 | ||
|  | ||
| #ifndef AQ_PROVIDER_CPP_H
 | ||
| #define AQ_PROVIDER_CPP_H
 | ||
|  | ||
|  | ||
| #include <aqbanking/provider.h>
 | ||
|  | ||
|  | ||
| #endif /* AQ_PROVIDER_CPP_H */
 | ||
|  | ||
|  | ||
| src/libs/aqbanking++/provider_p.h | ||
|---|---|---|
| /***************************************************************************
 | ||
|  $RCSfile$
 | ||
|                              -------------------
 | ||
|     cvs         : $Id$
 | ||
|     begin       : Mon Mar 01 2004
 | ||
|     copyright   : (C) 2004 by Martin Preuss
 | ||
|     email       : martin@libchipcard.de
 | ||
|  | ||
|  ***************************************************************************
 | ||
|  *          Please see toplevel file COPYING for license details           *
 | ||
|  ***************************************************************************/
 | ||
|  | ||
| #ifndef AQ_PROVIDER_CPP_P_H
 | ||
| #define AQ_PROVIDER_CPP_P_H
 | ||
|  | ||
|  | ||
| #endif /* AQ_PROVIDER_CPP_P_H */
 | ||
| src/libs/aqbanking/banking.c | ||
|---|---|---|
|       p=GWEN_StringListEntry_Data(se);
 | ||
|       assert(p);
 | ||
|  | ||
|       pro=AB_Banking_GetProvider(ab, p);
 | ||
|       pro=AB_Banking_FindProvider(ab, p);
 | ||
|       if (pro) {
 | ||
|         rv=AB_Provider_Fini(pro);
 | ||
|         if (rv) {
 | ||
| src/libs/aqbanking/banking.h | ||
|---|---|---|
|  | ||
|  | ||
|  | ||
| /** @name Functions Used by Backends
 | ||
| /** @name Functions Used by Backends And Wizards
 | ||
|  *
 | ||
|  */
 | ||
| /*@{*/
 | ||
| ... | ... | |
| AQBANKING_API 
 | ||
| int AB_Banking_GetProviderUserDataDir(const AB_BANKING *ab, GWEN_BUFFER *buf);
 | ||
|  | ||
|  | ||
| /**
 | ||
|  * Loads a backend with the given name. You can use
 | ||
|  * @ref AB_Banking_GetProviderDescrs to retrieve a list of available
 | ||
|  * backends. Such a backend can then be asked to return an account list.
 | ||
|  */
 | ||
| AQBANKING_API 
 | ||
| AB_PROVIDER *AB_Banking_GetProvider(AB_BANKING *ab, const char *name);
 | ||
|  | ||
| /*@}*/
 | ||
|  | ||
|  | ||
| src/libs/aqbanking/banking_l.h | ||
|---|---|---|
|  | ||
| GWEN_TYPE_UINT32 AB_Banking_GetUniqueId(AB_BANKING *ab);
 | ||
|  | ||
| /**
 | ||
|  * Loads a backend with the given name. You can use
 | ||
|  * @ref AB_Banking_GetProviderDescrs to retrieve a list of available
 | ||
|  * backends. Such a backend can then be asked to return an account list.
 | ||
|  */
 | ||
| AB_PROVIDER *AB_Banking_GetProvider(AB_BANKING *ab, const char *name);
 | ||
|  | ||
|  | ||
|  | ||
| /** @name Functions For Loading Provider Plugins
 | ||
|  *
 | ||
Auch abrufbar als: Unified diff
- aqbanking:
- removed AB_ProviderWizard. A Wizard is now a stand-alone executable so
there is no need for dynamically loading a module
- banking:
- added functions which allow to temporarily suspend backends. This
is needed while a setup wizard is executed
- made some functions private to AqBanking
- added AB_Banking_GetWizardPath() which returns the folder where
executable wizards for a given backend are located
- provider: added functions to init and deinit backends
- aqbanking++: removed provider files, because the ProviderWizard no longer
exists
git-svn-id: https://devel.aqbanking.de/svn/aqbanking/trunk@46 5c42a225-8b10-0410-9873-89b7810ad06e