Im/Exporter API
[AB_BANKING (Main Interface)]

This group contains a very simple API. More...

Request Functions

int AB_Banking_RequestBalance (AB_BANKING *ab, const char *bankCode, const char *accountNumber)
int AB_Banking_RequestTransactions (AB_BANKING *ab, const char *bankCode, const char *accountNumber, const GWEN_TIME *firstDate, const GWEN_TIME *lastDate)
int AB_Banking_RequestStandingOrders (AB_BANKING *ab, const char *bankCode, const char *accountNumber)
int AB_Banking_RequestDatedTransfers (AB_BANKING *ab, const char *bankCode, const char *accountNumber)
int AB_Banking_GatherResponses (AB_BANKING *ab, AB_IMEXPORTER_CONTEXT *ctx)

Mapping Application Accounts to Online Accounts

Functions in this group provide an optional service for account mapping. Most applications assign unique ids to their own accounts. This unique id can be mapped to an account of AqBanking.

void AB_Banking_SetAccountAlias (AB_BANKING *ab, AB_ACCOUNT *a, const char *alias)
AB_ACCOUNTAB_Banking_GetAccountByAlias (AB_BANKING *ab, const char *alias)

Detailed Description

This group contains a very simple API.

This API is intended to be used when adding support for AqBanking to already existing applications. Basically this API just defines some functions which enqueue requests (such as "Get balance") and a function which gathers answers to all requests into an importer/exporter context.

This way your application only needs to provide the functionality to import such a context.

Mixing the Job-API with this API is allowed.

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

You need to setup AqBanking before using functions of this group (i.e. accounts must be setup). 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).

The following is a small example of how the High Level API might be used. It requests the status (e.g. balance etc) of an account.

 TODO: Add example

Function Documentation

int AB_Banking_GatherResponses AB_BANKING ab,
AB_IMEXPORTER_CONTEXT ctx
 

This functions gathers all available information from the results of all currently finished jobs. Jobs which have been evaluated by this function and which had been created by the calling application are automatically removed from the queue of finished jobs.

Please note that this function even returns information extracted from requests which have been issued by other applications (those finished jobs are not removed from the finished queue to allow the requesting application to later gather its own responses).

All information is added to the given import context. Thus you only need a single function in your application to import data read from a file (via the Import/Export API) and from online requests.

Returns:
0 if ok, !=0 on error (see (Error Codes))
Parameters:
ab AqBanking main object
ctx import/export context to which all information is to be added

AB_ACCOUNT* AB_Banking_GetAccountByAlias AB_BANKING ab,
const char *  alias
 

This function returns the AqBanking account to which the given alias (=unique id of your application's own account data) has been mapped.

AqBanking remains the owner of the object returned (if any), so you must not free it.

Please also note that the object returned is only valid until AB_Banking_Fini() has been called (or until the corresponding backend for this particular account has been deactivated).

Returns:
corresponding AqBanking (or 0 if none)
Parameters:
ab AqBanking main object
alias unique id of your application's own account structure

int AB_Banking_RequestBalance AB_BANKING ab,
const char *  bankCode,
const char *  accountNumber
 

This function enqueues a request for the balance of an account. You need to call AB_Banking_ExecuteQueue to actually perform the job.

int AB_Banking_RequestDatedTransfers AB_BANKING ab,
const char *  bankCode,
const char *  accountNumber
 

This function enqueues a request for the list of pending dated transfers of an account. You need to call AB_Banking_ExecuteQueue to actually perform the job.

int AB_Banking_RequestStandingOrders AB_BANKING ab,
const char *  bankCode,
const char *  accountNumber
 

This function enqueues a request for the standing orders of an account. You need to call AB_Banking_ExecuteQueue to actually perform the job.

int AB_Banking_RequestTransactions AB_BANKING ab,
const char *  bankCode,
const char *  accountNumber,
const GWEN_TIME *  firstDate,
const GWEN_TIME *  lastDate
 

This function enqueues a request for the transactions of an account. You need to call AB_Banking_ExecuteQueue to actually perform the job. Please note that not all backends and all banks allow a time span to be given to this function. In such cases the dates are simply ignored.

void AB_Banking_SetAccountAlias AB_BANKING ab,
AB_ACCOUNT a,
const char *  alias
 

Sets an alias for the given AqBanking account. You can later use AB_Banking_GetAccountByAlias to refer to an online account by using the unique id of your application's account.

AqBanking separates the aliases for each application.

Parameters:
ab AqBanking main object
a online account of AqBanking you wish to map your account to
alias unique id of your application's own account structure


Generated on Sat Jan 7 04:22:43 2006 for aqbanking by  doxygen 1.4.6