This group represents backends. (Don't use in applications)
More...
|
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, AB_IMEXPORTER_CONTEXT *ctx) |
|
typedef int(* | AB_PROVIDER_RESETQUEUE_FN) (AB_PROVIDER *pro) |
|
typedef int(* | AB_PROVIDER_EXTEND_USER_FN) (AB_PROVIDER *pro, AB_USER *u, AB_PROVIDER_EXTEND_MODE um, GWEN_DB_NODE *db) |
|
typedef int(* | AB_PROVIDER_EXTEND_ACCOUNT_FN) (AB_PROVIDER *pro, AB_ACCOUNT *a, AB_PROVIDER_EXTEND_MODE um, GWEN_DB_NODE *db) |
|
typedef int(* | AB_PROVIDER_UPDATE_FN) (AB_PROVIDER *pro, uint32_t lastVersion, uint32_t currentVersion) |
|
typedef GWEN_DIALOG *(* | AB_PROVIDER_GET_NEWUSER_DIALOG_FN) (AB_PROVIDER *pro, int i) |
|
typedef GWEN_DIALOG *(* | AB_PROVIDER_GET_EDITUSER_DIALOG_FN) (AB_PROVIDER *pro, AB_USER *u) |
|
typedef GWEN_DIALOG *(* | AB_PROVIDER_GET_NEWACCOUNT_DIALOG_FN) (AB_PROVIDER *pro) |
|
typedef GWEN_DIALOG *(* | AB_PROVIDER_GET_EDITACCOUNT_DIALOG_FN) (AB_PROVIDER *pro, AB_ACCOUNT *a) |
|
typedef GWEN_DIALOG *(* | AB_PROVIDER_GET_USERTYPE_DIALOG_FN) (AB_PROVIDER *pro) |
|
|
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, AB_IMEXPORTER_CONTEXT *ctx) |
|
int | AB_Provider_ResetQueue (AB_PROVIDER *pro) |
|
int | AB_Provider_ExtendUser (AB_PROVIDER *pro, AB_USER *u, AB_PROVIDER_EXTEND_MODE em, GWEN_DB_NODE *db) |
|
int | AB_Provider_ExtendAccount (AB_PROVIDER *pro, AB_ACCOUNT *a, AB_PROVIDER_EXTEND_MODE em, GWEN_DB_NODE *db) |
|
int | AB_Provider_Update (AB_PROVIDER *pro, uint32_t lastVersion, uint32_t currentVersion) |
|
GWEN_DIALOG * | AB_Provider_GetNewUserDialog (AB_PROVIDER *pro, int i) |
|
GWEN_DIALOG * | AB_Provider_GetEditUserDialog (AB_PROVIDER *pro, AB_USER *u) |
|
GWEN_DIALOG * | AB_Provider_GetNewAccountDialog (AB_PROVIDER *pro) |
|
GWEN_DIALOG * | AB_Provider_GetEditAccountDialog (AB_PROVIDER *pro, AB_ACCOUNT *a) |
|
GWEN_DIALOG * | AB_ProviderGetUserTypeDialog (AB_PROVIDER *pro) |
|
|
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_SetExtendUserFn (AB_PROVIDER *pro, AB_PROVIDER_EXTEND_USER_FN f) |
|
void | AB_Provider_SetExtendAccountFn (AB_PROVIDER *pro, AB_PROVIDER_EXTEND_ACCOUNT_FN f) |
|
void | AB_Provider_SetUpdateFn (AB_PROVIDER *pro, AB_PROVIDER_UPDATE_FN f) |
|
void | AB_Provider_SetGetNewUserDialogFn (AB_PROVIDER *pro, AB_PROVIDER_GET_NEWUSER_DIALOG_FN f) |
|
void | AB_Provider_SetGetEditUserDialogFn (AB_PROVIDER *pro, AB_PROVIDER_GET_EDITUSER_DIALOG_FN f) |
|
void | AB_Provider_SetGetNewAccountDialogFn (AB_PROVIDER *pro, AB_PROVIDER_GET_NEWACCOUNT_DIALOG_FN f) |
|
void | AB_Provider_SetGetEditAccountDialogFn (AB_PROVIDER *pro, AB_PROVIDER_GET_EDITACCOUNT_DIALOG_FN f) |
|
void | AB_Provider_SetGetUserTypeDialogFn (AB_PROVIDER *pro, AB_PROVIDER_GET_USERTYPE_DIALOG_FN f) |
|
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). 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 calls 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. An account stores a reference to its associated provider. When executing AB_Banking_Init AqBanking calls the provider function AB_Provider_ExtendAccount on every account to let the backend initialize the account.
It is the same with AB_USER.
◆ AB_PROVIDER_FLAGS_HAS_EDITACCOUNT_DIALOG
#define AB_PROVIDER_FLAGS_HAS_EDITACCOUNT_DIALOG 0x00000008 |
◆ AB_PROVIDER_FLAGS_HAS_EDITUSER_DIALOG
#define AB_PROVIDER_FLAGS_HAS_EDITUSER_DIALOG 0x00000002 |
◆ AB_PROVIDER_FLAGS_HAS_NEWACCOUNT_DIALOG
#define AB_PROVIDER_FLAGS_HAS_NEWACCOUNT_DIALOG 0x00000004 |
◆ AB_PROVIDER_FLAGS_HAS_NEWUSER_DIALOG
#define AB_PROVIDER_FLAGS_HAS_NEWUSER_DIALOG 0x00000001 |
◆ AB_PROVIDER_FLAGS_HAS_USERTYPE_DIALOG
#define AB_PROVIDER_FLAGS_HAS_USERTYPE_DIALOG 0x00000010 |
◆ AB_PLUGIN_PROVIDER_FACTORY_FN
◆ AB_PROVIDER_ADDJOB_FN
◆ AB_PROVIDER_EXECUTE_FN
◆ AB_PROVIDER_EXTEND_ACCOUNT_FN
◆ AB_PROVIDER_EXTEND_USER_FN
◆ AB_PROVIDER_FINI_FN
typedef int(* AB_PROVIDER_FINI_FN) (AB_PROVIDER *pro, GWEN_DB_NODE *dbData) |
◆ AB_PROVIDER_GET_EDITACCOUNT_DIALOG_FN
◆ AB_PROVIDER_GET_EDITUSER_DIALOG_FN
◆ AB_PROVIDER_GET_NEWACCOUNT_DIALOG_FN
typedef GWEN_DIALOG*(* AB_PROVIDER_GET_NEWACCOUNT_DIALOG_FN) (AB_PROVIDER *pro) |
◆ AB_PROVIDER_GET_NEWUSER_DIALOG_FN
typedef GWEN_DIALOG*(* AB_PROVIDER_GET_NEWUSER_DIALOG_FN) (AB_PROVIDER *pro, int i) |
◆ AB_PROVIDER_GET_USERTYPE_DIALOG_FN
typedef GWEN_DIALOG*(* AB_PROVIDER_GET_USERTYPE_DIALOG_FN) (AB_PROVIDER *pro) |
◆ AB_PROVIDER_INIT_FN
typedef int(* AB_PROVIDER_INIT_FN) (AB_PROVIDER *pro, GWEN_DB_NODE *dbData) |
◆ AB_PROVIDER_RESETQUEUE_FN
typedef int(* AB_PROVIDER_RESETQUEUE_FN) (AB_PROVIDER *pro) |
◆ AB_PROVIDER_UPDATE_FN
typedef int(* AB_PROVIDER_UPDATE_FN) (AB_PROVIDER *pro, uint32_t lastVersion, uint32_t currentVersion) |
◆ AB_PROVIDER_UPDATEJOB_FN
◆ AB_PROVIDER_EXTEND_MODE
This type is used with AB_Provider_ExtendAccount and AB_Provider_ExtendUser.
Enumerator |
---|
AB_ProviderExtendMode_Create | Object to be extended has just been created. For some backends this means that some settings are allowed to be missing at this point.
|
AB_ProviderExtendMode_Extend | Object to be extended has been read from the configuration file
|
AB_ProviderExtendMode_Add | Object to be extended has just been added to internal lists. For the backend this might mean that the object should be completely setup at this point.
|
AB_ProviderExtendMode_Remove | Object to be extended is just about to be removed from the internal list.
|
AB_ProviderExtendMode_Save | This extend mode just lets the backend store data which has not yet been stored into the users/accounts DB. Please note that in this mode the backend might no longer be initialized, so you should not call any other provider function (or call AB_Provider_IsInit to see whether the backend still is initialized).
|
AB_ProviderExtendMode_Reload | This mode tells the backend to reload its configuration from the given DB.
|
Definition at line 49 of file provider_be.h.
◆ AB_Plugin_Provider_Factory()
◆ AB_Plugin_Provider_new()
GWEN_PLUGIN* AB_Plugin_Provider_new |
( |
GWEN_PLUGIN_MANAGER * |
pm, |
|
|
const char * |
name, |
|
|
const char * |
fileName |
|
) |
| |
◆ AB_Plugin_Provider_SetFactoryFn()
◆ AB_Provider_AddFlags()
void AB_Provider_AddFlags |
( |
AB_PROVIDER * |
pro, |
|
|
uint32_t |
fl |
|
) |
| |
◆ AB_Provider_AddJob()
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
-
◆ AB_Provider_Execute()
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 |
ctx | im-/exporter context to receive responses |
◆ AB_Provider_ExtendAccount()
Allows the backend to extend the given account (e.g. load backend-specific data for the given account).
◆ AB_Provider_ExtendUser()
Allows the backend to extend the given user (e.g. load backend-specific data for the given user).
◆ AB_Provider_Fini()
Allow the backend to deinitialize itself.
- Parameters
-
◆ AB_Provider_GetBanking()
Returns the Banking object that this Provider belongs to.
◆ AB_Provider_GetEditAccountDialog()
◆ AB_Provider_GetEditUserDialog()
◆ AB_Provider_GetEscapedName()
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.
◆ AB_Provider_GetFlags()
uint32_t AB_Provider_GetFlags |
( |
const AB_PROVIDER * |
pro | ) |
|
◆ AB_Provider_GetName()
const char* AB_Provider_GetName |
( |
const AB_PROVIDER * |
pro | ) |
|
Returns the name of the backend (e.g. "aqhbci").
◆ AB_Provider_GetNewAccountDialog()
GWEN_DIALOG* AB_Provider_GetNewAccountDialog |
( |
AB_PROVIDER * |
pro | ) |
|
Create a dialog which allows to create a new account. The dialog returned (if any) must be derived via AB_NewAccountDialog_new().
◆ AB_Provider_GetNewUserDialog()
GWEN_DIALOG* AB_Provider_GetNewUserDialog |
( |
AB_PROVIDER * |
pro, |
|
|
int |
i |
|
) |
| |
Create a dialog which allows to create a new user. The dialog returned (if any) must be derived via AB_NewUserDialog_new().
- Parameters
-
pro | pointer to the backend for which a new user is to be created |
i | additional 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). Use value 0 for the generic dialog. |
◆ AB_Provider_GetUserDataDir()
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. Please note that this folder does not necessarily exist, but the backend is free to create it.
- 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 |
◆ AB_Provider_Init()
Allow the backend to initialize itself.
- Parameters
-
◆ AB_Provider_IsInit()
- Returns
- 0 if the backend is not initialized, !=0 if it is
◆ AB_Provider_new()
◆ AB_Provider_ResetQueue()
Resets the queue of the backend. After calling this function all jobs are removed from the backend's queue in any case.
- Parameters
-
◆ AB_Provider_SetAddJobFn()
◆ AB_Provider_SetExecuteFn()
◆ AB_Provider_SetExtendAccountFn()
◆ AB_Provider_SetExtendUserFn()
◆ AB_Provider_SetFiniFn()
◆ AB_Provider_SetGetEditAccountDialogFn()
◆ AB_Provider_SetGetEditUserDialogFn()
◆ AB_Provider_SetGetNewAccountDialogFn()
◆ AB_Provider_SetGetNewUserDialogFn()
◆ AB_Provider_SetGetUserTypeDialogFn()
◆ AB_Provider_SetInitFn()
◆ AB_Provider_SetResetQueueFn()
◆ AB_Provider_SetUpdateFn()
◆ AB_Provider_SetUpdateJobFn()
◆ AB_Provider_Update()
int AB_Provider_Update |
( |
AB_PROVIDER * |
pro, |
|
|
uint32_t |
lastVersion, |
|
|
uint32_t |
currentVersion |
|
) |
| |
Allows the backend to update AqBanking data. This function is called for each active provider after all backends, users and accounts have been loaded and initialised but before loading the outbox jobs.
◆ AB_Provider_UpdateJob()
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 |
j | job to update |
◆ AB_ProviderGetUserTypeDialog()
GWEN_DIALOG* AB_ProviderGetUserTypeDialog |
( |
AB_PROVIDER * |
pro | ) |
|