aqbanking  5.7.8
Typedefs

This group contains the main API function group. More...

Typedefs

typedef struct AB_BANKING AB_BANKING
 

Extensions supported by the application

#define AB_BANKING_EXTENSION_NONE   0x00000000
 

Constructor, Destructor, Init, Fini

This object is prepared to be inherited (using GWEN_INHERIT_SETDATA).

AB_BANKINGAB_Banking_new (const char *appName, const char *dname, uint32_t extensions)
 
void AB_Banking_free (AB_BANKING *ab)
 
void AB_Banking_GetVersion (int *major, int *minor, int *patchlevel, int *build)
 
int AB_Banking_Init (AB_BANKING *ab)
 
int AB_Banking_Fini (AB_BANKING *ab)
 
int AB_Banking_OnlineInit (AB_BANKING *ab)
 
int AB_Banking_OnlineFini (AB_BANKING *ab)
 

Working With Backends

const GWEN_STRINGLIST * AB_Banking_GetActiveProviders (const AB_BANKING *ab)
 
GWEN_PLUGIN_DESCRIPTION_LIST2 * AB_Banking_GetProviderDescrs (AB_BANKING *ab)
 
GWEN_DIALOG * AB_Banking_GetNewUserDialog (AB_BANKING *ab, const char *backend, int mode)
 

Working With Backends (Deprecated)

These functions are now deprecated and will be removed prior to the release of AqBanking5.

Since AqBanking5 configuration dialogs and assistents are implemented using GWEN's Dialog Framework. This framework allows for platform-independent dialogs (see AB_ImporterDialog_new).

AQBANKING_DEPRECATED int AB_Banking_FindWizard (AB_BANKING *ab, const char *backend, const char *frontends, GWEN_BUFFER *pbuf)
 
AQBANKING_DEPRECATED int AB_Banking_FindDebugger (AB_BANKING *ab, const char *backend, const char *frontends, GWEN_BUFFER *pbuf)
 

Application Data

Applications may let AqBanking store global application specific data.

const char * AB_Banking_GetAppName (const AB_BANKING *ab)
 
const char * AB_Banking_GetEscapedAppName (const AB_BANKING *ab)
 
int AB_Banking_GetUserDataDir (const AB_BANKING *ab, GWEN_BUFFER *buf)
 
int AB_Banking_GetAppUserDataDir (const AB_BANKING *ab, GWEN_BUFFER *buf)
 
int AB_Banking_GetSharedDataDir (const AB_BANKING *ab, const char *name, GWEN_BUFFER *buf)
 
void * AB_Banking_GetUserData (AB_BANKING *ab)
 
void AB_Banking_SetUserData (AB_BANKING *ab, void *user_data)
 

Plugin Handling

These functions are also obsolete and will be removed for AqBanking5.

AQBANKING_DEPRECATED GWEN_PLUGIN_DESCRIPTION_LIST2 * AB_Banking_GetWizardDescrs (AB_BANKING *ab)
 
AQBANKING_DEPRECATED GWEN_PLUGIN_DESCRIPTION_LIST2 * AB_Banking_GetDebuggerDescrs (AB_BANKING *ab, const char *pn)
 

Detailed Description

This group contains the main API function group.

A program should first call AB_Banking_Init to allow AqBanking to load its configuration files and initialize itself.

After that you may call any other function of this group (most likely the program will request a list of managed account via AB_Banking_GetAccounts).

When the program has finished its work it should call AB_Banking_Fini as the last function of AqBanking (just before calling AB_Banking_free).

Macro Definition Documentation

◆ AB_BANKING_EXTENSION_NONE

#define AB_BANKING_EXTENSION_NONE   0x00000000

Definition at line 89 of file banking.h.

Typedef Documentation

◆ AB_BANKING

typedef struct AB_BANKING AB_BANKING

Object to be operated on by functions in this group (AB_BANKING).

Definition at line 26 of file banking.h.

Function Documentation

◆ AB_Banking_FindDebugger()

AQBANKING_DEPRECATED int AB_Banking_FindDebugger ( AB_BANKING ab,
const char *  backend,
const char *  frontends,
GWEN_BUFFER *  pbuf 
)

◆ AB_Banking_FindWizard()

AQBANKING_DEPRECATED int AB_Banking_FindWizard ( AB_BANKING ab,
const char *  backend,
const char *  frontends,
GWEN_BUFFER *  pbuf 
)

This function is deprecated and will be removed for the final release of AqBanking5. You can use AB_SetupDialog_new to create the new setup dialog within your application and run it via GWEN_Dialog_Exec().

◆ AB_Banking_Fini()

int AB_Banking_Fini ( AB_BANKING ab)

Deinitializes AqBanking thus allowing it to save its data and to unload backends. Please remember to call AB_Banking_OnlineFini before this function if you have used online banking functions.

Returns
0 if ok, error code otherwise (see Error Codes)
Parameters
abbanking interface

◆ AB_Banking_free()

void AB_Banking_free ( AB_BANKING ab)

Destroys the given instance of AqBanking. Please note that if AB_Banking_Init has been called on this object then AB_Banking_Fini should be called before this function.

◆ AB_Banking_GetActiveProviders()

const GWEN_STRINGLIST* AB_Banking_GetActiveProviders ( const AB_BANKING ab)

Returns a list of the names of currently active providers.

◆ AB_Banking_GetAppName()

const char* AB_Banking_GetAppName ( const AB_BANKING ab)

Returns the application name as given to AB_Banking_new.

Parameters
abpointer to the AB_BANKING object

◆ AB_Banking_GetAppUserDataDir()

int AB_Banking_GetAppUserDataDir ( const AB_BANKING ab,
GWEN_BUFFER *  buf 
)

Returns the name of the user folder for application data. Normally this is something like "/home/me/.aqbanking/apps". Your application may choose to create folders below this one to store user data. If you only add AqBanking to an existing program to add home banking support you will most likely use your own folders and thus won't need this function.

Returns
0 if ok, error code otherwise (see Error Codes)
Parameters
abpointer to the AB_BANKING object
bufGWEN_BUFFER to append the path name to

◆ AB_Banking_GetDebuggerDescrs()

AQBANKING_DEPRECATED GWEN_PLUGIN_DESCRIPTION_LIST2* AB_Banking_GetDebuggerDescrs ( AB_BANKING ab,
const char *  pn 
)

◆ AB_Banking_GetEscapedAppName()

const char* AB_Banking_GetEscapedAppName ( const AB_BANKING ab)

Returns the escaped version of the application name. This name can safely be used to create file paths since all special characters (like '/', '.' etc) are escaped.

Parameters
abpointer to the AB_BANKING object

◆ AB_Banking_GetNewUserDialog()

GWEN_DIALOG* AB_Banking_GetNewUserDialog ( AB_BANKING ab,
const char *  backend,
int  mode 
)

Create a dialog which allows to create a new user.

Returns
dialog
Parameters
abpointer to the AqBanking object
backendname of the backend for which a user is to be created (e.g. "aqhbci", "aqebics" etc)
modeadditional parameter depending on the backend. it can be used to specify the user type to be created (e.g. for HBCI those values specify whether PIN/TAN, keyfile or chipcard users are to be created, see AqHBCI_NewUserDialog_CodeGeneric and following). Use value 0 for the generic dialog.

◆ AB_Banking_GetProviderDescrs()

GWEN_PLUGIN_DESCRIPTION_LIST2* AB_Banking_GetProviderDescrs ( AB_BANKING ab)

◆ AB_Banking_GetSharedDataDir()

int AB_Banking_GetSharedDataDir ( const AB_BANKING ab,
const char *  name,
GWEN_BUFFER *  buf 
)

Returns the path to a folder to which shared data can be stored. This might be used by multiple applications if they wish to share some of their data, e.g. QBankManager and AqMoney3 share their transaction storage so that both may work with it. Please note that this folder does not necessarily exist, but you are free to create it.

◆ AB_Banking_GetUserData()

void* AB_Banking_GetUserData ( AB_BANKING ab)

Returns the void pointer that was stored by AB_Banking_SetUserData(). This might be useful for passing data to the callback functions.

On the other hand, we strongly encourage using the GWEN_INHERIT macros to store non-trivial data structures in this object.

Parameters
abPointer to the AB_BANKING object

◆ AB_Banking_GetUserDataDir()

int AB_Banking_GetUserDataDir ( const AB_BANKING ab,
GWEN_BUFFER *  buf 
)

Returns the name of the user folder for AqBanking's data. Normally this is something like "/home/me/.aqbanking".

Returns
0 if ok, error code otherwise (see Error Codes)
Parameters
abpointer to the AB_BANKING object
bufGWEN_BUFFER to append the path name to

◆ AB_Banking_GetVersion()

void AB_Banking_GetVersion ( int *  major,
int *  minor,
int *  patchlevel,
int *  build 
)

◆ AB_Banking_GetWizardDescrs()

AQBANKING_DEPRECATED GWEN_PLUGIN_DESCRIPTION_LIST2* AB_Banking_GetWizardDescrs ( AB_BANKING ab)

◆ AB_Banking_Init()

int AB_Banking_Init ( AB_BANKING ab)

Initializes AqBanking. This sets up the plugins, plugin managers and path managers. If you want to use online banking tasks you must also call AB_Banking_OnlineInit afterwards.

Returns
0 if ok, error code otherwise (see Error Codes)
Parameters
abbanking interface

◆ AB_Banking_new()

AB_BANKING* AB_Banking_new ( const char *  appName,
const char *  dname,
uint32_t  extensions 
)

Creates an instance of AqBanking. Though AqBanking is quite object oriented (and thus allows multiple instances of AB_BANKING to co-exist) you should avoid having multiple AB_BANKING objects in parallel.

This is just because the backends are loaded dynamically and might not like to be used with multiple instances of AB_BANKING in parallel.

You should later free this object using AB_Banking_free.

This function does not actually load the configuration file or setup AqBanking, that is performed by AB_Banking_Init and AB_Banking_OnlineInit, respectively.

Returns
new instance of AB_BANKING
Parameters
appNamename of the application which wants to use AqBanking. This allows AqBanking to separate settings and data for multiple applications.
dnamePath for the directory containing the user data of AqBanking. You should in most cases present a NULL for this parameter, which means AqBanking will choose the default user data folder which is "$HOME/.aqbanking". The configuration itself is handled using GWEN's GWEN_ConfigMgr module (see GWEN_ConfigMgr_Factory). That module stores the configuration in AqBanking's subfolder "settings" (i.e. the full path to the user/account configuration is "$HOME/.aqbanking/settings").
extensionsuse 0 for now.

◆ AB_Banking_OnlineFini()

int AB_Banking_OnlineFini ( AB_BANKING ab)

Uninitialize the online banking part of AqBanking.

Returns
0 if ok, error code otherwise (see Error Codes)
Parameters
abbanking interface

◆ AB_Banking_OnlineInit()

int AB_Banking_OnlineInit ( AB_BANKING ab)

Setup the online banking part of AqBanking. This function actually loads the users and accounts.

Returns
0 if ok, error code otherwise (see Error Codes)
Parameters
abbanking interface

◆ AB_Banking_SetUserData()

void AB_Banking_SetUserData ( AB_BANKING ab,
void *  user_data 
)

Save the void pointer that can be retrieved by AB_Banking_GetUserData(). This might be useful for passing data to the callback functions.

On the other hand, we strongly encourage using the GWEN_INHERIT macros to store non-trivial data structures in this object.

Parameters
abPointer to the AB_BANKING object
user_dataArbitrary pointer to be stored in the AB_BANKING