Simplified API
[API for Applications]


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").

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


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)

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)


Function Documentation

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 Wed Oct 18 16:17:28 2006 for aqbanking by  doxygen 1.4.7