AB_PROVIDER (Online Banking Backends)

This group represents backends. (Don't use in applications). More...

Prototypes For Virtual Functions

typedef int(* AB_PROVIDER_INIT_FN )(AB_PROVIDER *pro, GWEN_DB_NODE *dbData)
typedef int(* AB_PROVIDER_FINI_FN )(AB_PROVIDER *pro, GWEN_DB_NODE *dbData)
typedef int(* AB_PROVIDER_UPDATEJOB_FN )(AB_PROVIDER *pro, AB_JOB *j)
typedef int(* AB_PROVIDER_ADDJOB_FN )(AB_PROVIDER *pro, AB_JOB *j)
typedef int(* AB_PROVIDER_EXECUTE_FN )(AB_PROVIDER *pro)
typedef int(* AB_PROVIDER_RESETQUEUE_FN )(AB_PROVIDER *pro)
typedef AB_ACCOUNT_LIST2 *(* AB_PROVIDER_GETACCOUNTLIST_FN )(AB_PROVIDER *pro)
typedef int(* AB_PROVIDER_UPDATEACCOUNT_FN )(AB_PROVIDER *pro, AB_ACCOUNT *a)
typedef int(* AB_PROVIDER_ADDACCOUNT_FN )(AB_PROVIDER *pro, AB_ACCOUNT *a)

Virtual Functions

int AB_Provider_Init (AB_PROVIDER *pro)
int AB_Provider_Fini (AB_PROVIDER *pro)
int AB_Provider_UpdateJob (AB_PROVIDER *pro, AB_JOB *j)
int AB_Provider_AddJob (AB_PROVIDER *pro, AB_JOB *j)
int AB_Provider_Execute (AB_PROVIDER *pro)
int AB_Provider_ResetQueue (AB_PROVIDER *pro)
AB_ACCOUNT_LIST2AB_Provider_GetAccountList (AB_PROVIDER *pro)
int AB_Provider_UpdateAccount (AB_PROVIDER *pro, AB_ACCOUNT *a)
int AB_Provider_AddAccount (AB_PROVIDER *pro, AB_ACCOUNT *a)

Setters For Virtual Functions

void AB_Provider_SetInitFn (AB_PROVIDER *pro, AB_PROVIDER_INIT_FN f)
void AB_Provider_SetFiniFn (AB_PROVIDER *pro, AB_PROVIDER_FINI_FN f)
void AB_Provider_SetUpdateJobFn (AB_PROVIDER *pro, AB_PROVIDER_UPDATEJOB_FN f)
void AB_Provider_SetAddJobFn (AB_PROVIDER *pro, AB_PROVIDER_ADDJOB_FN f)
void AB_Provider_SetExecuteFn (AB_PROVIDER *pro, AB_PROVIDER_EXECUTE_FN f)
void AB_Provider_SetResetQueueFn (AB_PROVIDER *pro, AB_PROVIDER_RESETQUEUE_FN f)
void AB_Provider_SetGetAccountListFn (AB_PROVIDER *pro, AB_PROVIDER_GETACCOUNTLIST_FN f)
void AB_Provider_SetUpdateAccountFn (AB_PROVIDER *pro, AB_PROVIDER_UPDATEACCOUNT_FN f)
void AB_Provider_SetAddAccountFn (AB_PROVIDER *pro, AB_PROVIDER_ADDACCOUNT_FN f)

Typedefs

typedef AB_PROVIDER *(* AB_PROVIDER_FACTORY_FN )(AB_BANKING *ab, GWEN_DB_NODE *db)

Functions

const char * AB_Provider_GetName (const AB_PROVIDER *pro)
const char * AB_Provider_GetEscapedName (const AB_PROVIDER *pro)
AB_BANKINGAB_Provider_GetBanking (const AB_PROVIDER *pro)
GWEN_TYPE_UINT32 AB_Provider_GetFlags (const AB_PROVIDER *pro)
int AB_Provider_GetUserDataDir (const AB_PROVIDER *pro, GWEN_BUFFER *buf)
GWEN_DB_NODE * AB_Provider_GetData (AB_PROVIDER *pro)
AB_PROVIDERAB_Provider_new (AB_BANKING *ab, const char *name)
int AB_Provider_IsInit (const AB_PROVIDER *pro)

Detailed Description

This group represents backends. (Don't use in applications).

(Provider is simply another word for backend.)

Functions in this group MUST NEVER be used by applications or depending libraries ! They may only be called by AqBanking or a provider on its own.

Writing an online banking provider for AqBanking is easy. There are only a few callback functions which must be set by the provider (marked as Virtual Functions below).

The work of a provider is based on jobs (see AB_JOB (Online Banking Tasks)). AqBanking also works based on jobs. If the application wants to create a job AqBanking calls the function AB_Provider_UpdateJob. This function lets the provider prepare some parameters for the job given (e.g. the maximum number of purpose lines for transfer jobs etc). These limits are used by applications when preparing a job.

If the application is finished preparing the job it calls AB_Banking_EnqueueJob. After the application has enqueued all jobs it calls AB_Banking_ExecuteQueue. This function now sends all jobs to their respective providers using AB_Provider_AddJob. When all jobs for a given provider are added AqBanking calls AB_Provider_Execute on this provider. This functions really sends the jobs to the bank server or creates DTAUS discs or whatever the provider is supposed to do. After that AqBanking call AB_Provider_ResetQueue to make sure no job is left in the providers queue after execution.

Another base class used between AqBanking and providers is AB_ACCOUNT (Managing accounts). When executing AB_Banking_Init AqBanking calls AB_Provider_GetAccountList on every active provider. This makes sure that AqBanking always has an updated list of accounts. When loading account information AqBanking also calls the function AB_Provider_UpdateAccount on the appropriate provider to make sure that all accounts have updated information (such as account name, owner name etc).


Typedef Documentation

typedef int(* AB_PROVIDER_ADDACCOUNT_FN)(AB_PROVIDER *pro, AB_ACCOUNT *a)
 

See AB_Provider_AddAccount.

Definition at line 102 of file provider_be.h.

typedef int(* AB_PROVIDER_ADDJOB_FN)(AB_PROVIDER *pro, AB_JOB *j)
 

See AB_Provider_AddJob.

Definition at line 76 of file provider_be.h.

typedef int(* AB_PROVIDER_EXECUTE_FN)(AB_PROVIDER *pro)
 

See AB_Provider_Execute

Definition at line 81 of file provider_be.h.

typedef AB_PROVIDER*(* AB_PROVIDER_FACTORY_FN)(AB_BANKING *ab, GWEN_DB_NODE *db)
 

This is the prototype for the provider factory function expected in provider plugins. Every provider plugin must have at least this function which returns a new provider object.

This function must contain the name of the provider in all-lowercase letters. For AqHBCI this function is called "aqhbci_factory".

Parameters:
ab AqBanking main object
dbData GWEN_DB group for the data of the backend (as returned by AB_Provider_GetData). This group MUST NOT be freed or unlinked, it is a group inside AqBankings config database.

Definition at line 50 of file provider_be.h.

typedef int(* AB_PROVIDER_FINI_FN)(AB_PROVIDER *pro, GWEN_DB_NODE *dbData)
 

See AB_Provider_Fini.

Definition at line 66 of file provider_be.h.

typedef AB_ACCOUNT_LIST2*(* AB_PROVIDER_GETACCOUNTLIST_FN)(AB_PROVIDER *pro)
 

See AB_Provider_GetAccountList.

Definition at line 92 of file provider_be.h.

typedef int(* AB_PROVIDER_INIT_FN)(AB_PROVIDER *pro, GWEN_DB_NODE *dbData)
 

See AB_Provider_Init.

Definition at line 61 of file provider_be.h.

typedef int(* AB_PROVIDER_RESETQUEUE_FN)(AB_PROVIDER *pro)
 

See AB_Provider_ResetQueue.

Definition at line 87 of file provider_be.h.

typedef int(* AB_PROVIDER_UPDATEACCOUNT_FN)(AB_PROVIDER *pro, AB_ACCOUNT *a)
 

See AB_Provider_UpdateAccount.

Definition at line 97 of file provider_be.h.

typedef int(* AB_PROVIDER_UPDATEJOB_FN)(AB_PROVIDER *pro, AB_JOB *j)
 

See AB_Provider_UpdateJob

Definition at line 71 of file provider_be.h.


Function Documentation

int AB_Provider_AddAccount AB_PROVIDER pro,
AB_ACCOUNT a
 

This function is currently unused. It may later be used to add an account to the backend which has been prepared by an application.

Parameters:
pro backend object
a account to be added (AqBanking still remains its owner)

int AB_Provider_AddJob AB_PROVIDER pro,
AB_JOB j
 

Add the given job to the backend's internal queue. This is an immediate queue, it is not persistent. The queue is flushed by AB_PROVIDER_EXECUTE_FN. The added job is removed in any case after AB_PROVIDER_EXECUTE_FN has been called.

This function should first check the job arguments (sanity checks etc). If this function returns an error the job MUST NOT be enqueued in the providers own queue. In this case the job will be marked "errornous".

However, if the backend prepares the job well enough (via AB_PROVIDER_UPDATEJOB_FN) then the application should have made sure that the job complies to the rules laid out by the backend. So rejecting a job here should be a rare case with well-designed applications and backends.

Parameters:
pro backend object

int AB_Provider_Execute AB_PROVIDER pro  ) 
 

Executes all jobs in the queue which have just been added via AB_PROVIDER_ADDJOB_FN. After calling this function all jobs are removed from the backend's queue in any case.

Parameters:
pro backend object

int AB_Provider_Fini AB_PROVIDER pro  ) 
 

Allow the backend to deinitialize itself.

Parameters:
pro backend object
dbData GWEN_DB group for the data of the backend (as returned by AB_Provider_GetData). This group MUST NOT be freed or unlinked, it is a group inside AqBankings config database.

AB_ACCOUNT_LIST2* AB_Provider_GetAccountList AB_PROVIDER pro  ) 
 

Returns a list of accounts managed by this backend. This is called by AqBanking directly after activating a backend (upon every AB_Banking_Init). AqBanking becomes the new owner of the list returned.

Parameters:
pro backend object

AB_BANKING* AB_Provider_GetBanking const AB_PROVIDER pro  ) 
 

Returns the Banking object that this Provider belongs to.

GWEN_DB_NODE* AB_Provider_GetData AB_PROVIDER pro  ) 
 

Store backend specific data with AqBanking. This data is not specific to an application, it will rather be used with every application (since it doesn't depend on the application but on the backend).

Parameters:
pro pointer to the backend for which the data is to be returned

const char* AB_Provider_GetEscapedName const AB_PROVIDER pro  ) 
 

Returns the escaped name of the backend. This is needed when using the name of the backend to form a file path.

GWEN_TYPE_UINT32 AB_Provider_GetFlags const AB_PROVIDER pro  ) 
 

const char* AB_Provider_GetName const AB_PROVIDER pro  ) 
 

Returns the name of the backend (e.g. "aqhbci").

int AB_Provider_GetUserDataDir const AB_PROVIDER pro,
GWEN_BUFFER *  buf
 

This copies the name of the folder for AqBanking's backend data into the given GWEN_Buffer. This folder is reserved for this backend.

Returns:
0 if ok, error code otherwise (see (Error Codes))
Parameters:
pro pointer to the provider object
buf buffer to append the path name to

int AB_Provider_Init AB_PROVIDER pro  ) 
 

Allow the backend to initialize itself.

Parameters:
pro backend object
dbData GWEN_DB group for the data of the backend (as returned by AB_Provider_GetData). This group MUST NOT be freed or unlinked, it is a group inside AqBankings config database.

int AB_Provider_IsInit const AB_PROVIDER pro  ) 
 

AB_PROVIDER* AB_Provider_new AB_BANKING ab,
const char *  name
 

int AB_Provider_ResetQueue AB_PROVIDER pro  ) 
 

Resets the queue of the backend. After calling this function all jobs are removed from the backend's queue in any case.

Parameters:
pro backend object

void AB_Provider_SetAddAccountFn AB_PROVIDER pro,
AB_PROVIDER_ADDACCOUNT_FN  f
 

void AB_Provider_SetAddJobFn AB_PROVIDER pro,
AB_PROVIDER_ADDJOB_FN  f
 

void AB_Provider_SetExecuteFn AB_PROVIDER pro,
AB_PROVIDER_EXECUTE_FN  f
 

void AB_Provider_SetFiniFn AB_PROVIDER pro,
AB_PROVIDER_FINI_FN  f
 

void AB_Provider_SetGetAccountListFn AB_PROVIDER pro,
AB_PROVIDER_GETACCOUNTLIST_FN  f
 

void AB_Provider_SetInitFn AB_PROVIDER pro,
AB_PROVIDER_INIT_FN  f
 

void AB_Provider_SetResetQueueFn AB_PROVIDER pro,
AB_PROVIDER_RESETQUEUE_FN  f
 

void AB_Provider_SetUpdateAccountFn AB_PROVIDER pro,
AB_PROVIDER_UPDATEACCOUNT_FN  f
 

void AB_Provider_SetUpdateJobFn AB_PROVIDER pro,
AB_PROVIDER_UPDATEJOB_FN  f
 

int AB_Provider_UpdateAccount AB_PROVIDER pro,
AB_ACCOUNT a
 

Gives the backend the opportunity to update account information (such as account name etc).

Parameters:
pro backend object
a account to be updated (AqBanking still remains its owner)

int AB_Provider_UpdateJob AB_PROVIDER pro,
AB_JOB j
 

This function should check for the availability of the given job and prepare it for the next call to AB_PROVIDER_ADDJOB_FN. If the job is available with this backend it should also set the job parameters (such as the maximum number of purpose lines for transfer jobs etc). This function is called from the constructor AB_Job_new() in AqBanking. The value returned here is stored within the job in question and becomes available via AB_Job_CheckAvailability.

Parameters:
pro backend object


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