Banking Class Reference

#include <banking.h>

Inheritance diagram for Banking:

QBanking KBanking

Detailed Description

A C++ binding for the C module AB_BANKING.

This class simply is a C++ binding for the C module AB_BANKING. It redirects C callbacks used by AB_BANKING to virtual functions in this class. It als transforms some return values inconveniant for C++ into STL objects (such as "list<T>").

Author:
Martin Preuss<martin@aquamaniac.de>

Definition at line 87 of file qbanking/banking.h.

Public Member Functions

 Banking (const char *appname, const char *fname)
virtual ~Banking ()
AB_BANKINGgetCInterface ()
int init ()
int fini ()
AB_PROVIDERgetProvider (const char *name)
const char * getAppName ()
std::list< AB_ACCOUNT * > getAccounts ()
AB_ACCOUNTgetAccount (GWEN_TYPE_UINT32 uniqueId)
std::list< AB_USER * > getUsers ()
GWEN_DB_NODE * getAppData ()
GWEN_DB_NODE * getSharedData (const char *name)
int getUserDataDir (GWEN_BUFFER *buf) const
int getAppUserDataDir (GWEN_BUFFER *buf) const
Plugin Handling
std::list< GWEN_PLUGIN_DESCRIPTION * > getProviderDescrs ()
std::list< GWEN_PLUGIN_DESCRIPTION * > getWizardDescrs ()
void clearPluginDescrs (std::list< GWEN_PLUGIN_DESCRIPTION * > &l)
int activateProvider (const char *pname)
int deactivateProvider (const char *pname)
std::list< std::string > getActiveProviders ()
std::string findWizard (const char *frontends)
Enqueueing, Dequeueing and Executing Jobs
Enqueued jobs are preserved across shutdowns. As soon as a job has been sent to the appropriate backend it will be removed from the queue. Only those jobs are saved/reloaded which have been enqueued but never presented to the backend. This means after calling AB_Banking_ExecuteQueue only those jobs are still in the queue which have not been processed (e.g. because they belonged to a second backend but the user aborted while the jobs for a first backend were in process).

int enqueueJob (AB_JOB *j)
int dequeueJob (AB_JOB *j)
virtual int executeQueue (AB_IMEXPORTER_CONTEXT *ctx)
std::list< AB_JOB * > getEnqueuedJobs ()
User Interaction
virtual int messageBox (GWEN_TYPE_UINT32 flags, const char *title, const char *text, const char *b1, const char *b2, const char *b3)
virtual int inputBox (GWEN_TYPE_UINT32 flags, const char *title, const char *text, char *buffer, int minLen, int maxLen)
virtual GWEN_TYPE_UINT32 showBox (GWEN_TYPE_UINT32 flags, const char *title, const char *text)
virtual void hideBox (GWEN_TYPE_UINT32 id)
virtual GWEN_TYPE_UINT32 progressStart (const char *title, const char *text, GWEN_TYPE_UINT32 total)
virtual int progressAdvance (GWEN_TYPE_UINT32 id, GWEN_TYPE_UINT32 progress)
virtual int progressLog (GWEN_TYPE_UINT32 id, AB_BANKING_LOGLEVEL level, const char *text)
virtual int progressEnd (GWEN_TYPE_UINT32 id)
virtual int print (const char *docTitle, const char *docType, const char *descr, const char *text)
virtual bool importContext (AB_IMEXPORTER_CONTEXT *ctx, GWEN_TYPE_UINT32 flags)

Friends

class Banking_Linker


Constructor & Destructor Documentation

Banking::Banking ( const char *  appname,
const char *  fname 
)

virtual Banking::~Banking (  )  [virtual]


Member Function Documentation

AB_BANKING* Banking::getCInterface (  ) 

int Banking::init (  ) 

See AB_Banking_Init

Reimplemented in KBanking, and QBanking.

int Banking::fini (  ) 

See AB_Banking_Fini

Reimplemented in KBanking, and QBanking.

AB_PROVIDER* Banking::getProvider ( const char *  name  ) 

Loads a backend with the given name. You can use AB_Banking_GetProviderDescrs to retrieve a list of available backends. Such a backend can then be asked to return an account list.

const char* Banking::getAppName (  ) 

Returns the application name as given to AB_Banking_new.

std::list<AB_ACCOUNT*> Banking::getAccounts (  ) 

Returns a list of pointers to currently known accounts. Please note that the pointers in this list are still owned by AqBanking, so you MUST NOT free them. However, destroying the list will not free the accounts, so it is safe to do that.

AB_ACCOUNT* Banking::getAccount ( GWEN_TYPE_UINT32  uniqueId  ) 

This function does an account lookup based on the given unique id. This id is assigned by AqBanking when an account is created. The pointer returned is still owned by AqBanking, so you MUST NOT free it.

std::list<AB_USER*> Banking::getUsers (  ) 

Returns a list of pointers to currently known users. Please note that the pointers in this list are still owned by AqBanking, so you MUST NOT free them. However, destroying the list will not free the users, so it is safe to do that.

GWEN_DB_NODE* Banking::getAppData (  ) 

Returns a GWEN_DB_NODE which can be used to store/retrieve data for the currently running application. The group returned MUST NOT be freed. AqBanking is able to separate and store the data for every application.

GWEN_DB_NODE* Banking::getSharedData ( const char *  name  ) 

int Banking::getUserDataDir ( GWEN_BUFFER *  buf  )  const

int Banking::getAppUserDataDir ( GWEN_BUFFER *  buf  )  const

std::list<GWEN_PLUGIN_DESCRIPTION*> Banking::getProviderDescrs (  ) 

Returns a list of provider descriptions. You must free the contents of the list after using it via clearPluginDescrs() before deleting the list itself.

std::list<GWEN_PLUGIN_DESCRIPTION*> Banking::getWizardDescrs (  ) 

Returns a list of wizard descriptions. You must free the contents of the list after using it via clearPluginDescrs() before deleting the list itself.

void Banking::clearPluginDescrs ( std::list< GWEN_PLUGIN_DESCRIPTION * > &  l  ) 

Frees all plugin descriptions whose pointers are stored inside the given list. Please note that this methode renders the list useless, so it should be the last method called on that list before destroying it.

int Banking::activateProvider ( const char *  pname  ) 

int Banking::deactivateProvider ( const char *  pname  ) 

std::list<std::string> Banking::getActiveProviders (  ) 

std::string Banking::findWizard ( const char *  frontends  ) 

int Banking::enqueueJob ( AB_JOB j  ) 

Enqueues a job. This function does not take over the ownership of the job. However, this function makes sure that the job will not be deleted as long as it is in the queue (by calling AB_Job_Attach). So it is safe for you to call AB_Job_free on an enqueued job directly after enqueuing it (but it doesn't make much sense since you would not be able to check for a result).

Reimplemented in QBanking.

int Banking::dequeueJob ( AB_JOB j  ) 

Removes a job from the queue. This function does not free the given job, the caller still is the owner. Dequeued jobs however are NOT preserved across shutdowns.

Reimplemented in QBanking.

virtual int Banking::executeQueue ( AB_IMEXPORTER_CONTEXT ctx  )  [virtual]

This function sends all jobs in the queue to their corresponding backends and allows that backend to process it. If the user did not abort or there was no fatal error the queue is empty upon return. You can verify this by calling AB_Banking_GetEnqueuedJobs.

Reimplemented in KBanking, and QBanking.

std::list<AB_JOB*> Banking::getEnqueuedJobs (  ) 

Returns the list of currently enqueued jobs. If the queue is empty NULL is returned.

virtual int Banking::messageBox ( GWEN_TYPE_UINT32  flags,
const char *  title,
const char *  text,
const char *  b1,
const char *  b2,
const char *  b3 
) [virtual]

See AB_Banking_MessageBox

Reimplemented in QBanking.

virtual int Banking::inputBox ( GWEN_TYPE_UINT32  flags,
const char *  title,
const char *  text,
char *  buffer,
int  minLen,
int  maxLen 
) [virtual]

See AB_Banking_InputBox

Reimplemented in QBanking.

virtual GWEN_TYPE_UINT32 Banking::showBox ( GWEN_TYPE_UINT32  flags,
const char *  title,
const char *  text 
) [virtual]

See AB_Banking_ShowBox

Reimplemented in QBanking.

virtual void Banking::hideBox ( GWEN_TYPE_UINT32  id  )  [virtual]

See AB_Banking_HideBox

Reimplemented in QBanking.

virtual GWEN_TYPE_UINT32 Banking::progressStart ( const char *  title,
const char *  text,
GWEN_TYPE_UINT32  total 
) [virtual]

See AB_Banking_ProgressStart

Reimplemented in QBanking.

virtual int Banking::progressAdvance ( GWEN_TYPE_UINT32  id,
GWEN_TYPE_UINT32  progress 
) [virtual]

See AB_Banking_ProgressAdvance

Reimplemented in QBanking.

virtual int Banking::progressLog ( GWEN_TYPE_UINT32  id,
AB_BANKING_LOGLEVEL  level,
const char *  text 
) [virtual]

See AB_Banking_ProgressLog

Reimplemented in QBanking.

virtual int Banking::progressEnd ( GWEN_TYPE_UINT32  id  )  [virtual]

See AB_Banking_ProgressEnd

Reimplemented in QBanking.

virtual int Banking::print ( const char *  docTitle,
const char *  docType,
const char *  descr,
const char *  text 
) [virtual]

See AB_Banking_Print

Reimplemented in QBanking.

virtual bool Banking::importContext ( AB_IMEXPORTER_CONTEXT ctx,
GWEN_TYPE_UINT32  flags 
) [virtual]

Let the application import a given statement context.

Reimplemented in KBanking, and QBanking.


Friends And Related Function Documentation

friend class Banking_Linker [friend]

Definition at line 88 of file qbanking/banking.h.


The documentation for this class was generated from the following file:
Generated on Sun Apr 29 17:23:06 2007 for aqbanking by  doxygen 1.5.1