Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

HBCI::ProgressMonitorCB Class Reference

Callback based implementation of ProgressMonitor. More...

#include <progressmonitorcb.h>

Inheritance diagram for HBCI::ProgressMonitorCB:

Inheritance graph
[legend]
List of all members.

Public Methods

 ProgressMonitorCB (VoidFuncTyp destrCB, TransStartedFuncTyp transStartedCB, VoidFuncTyp transFinCB, JobStartedFuncTyp jobStartedCB, VoidFuncTyp jobFinCB, ActStartedFuncTyp actStartedCB, VoidFuncTyp actFinCB, LoggingFuncTyp logMessageCB, void *user_data)
 ~ProgressMonitorCB ()
void transactionStarted (TransProgressType type, string const &descr, int jobs)
 This method is called before starting a transaction.

void transactionFinished ()
 This method is called after a transaction has finished.

void jobStarted (JobProgressType type, const string &descr, int actions)
 This method is called before a job starts.

void jobFinished ()
 This method is called after a job finished.

void actionStarted (ActionProgressType type, const string &descr)
 This method is called before an action starts.

void actionFinished ()
 This method is called after an action finshed.

void logMessage (const string &msg)
 DEPRECATED. This method is not used inside OpenHBCI.


Detailed Description

Callback based implementation of ProgressMonitor.

This is an implementation of the ProgressMonitor that has seperate callbacks for each method. Those callbacks can be set individually. This class is especially intended to be used through its C wrappers.

Author:
Christian Stimming <stimming@tuhh.de>


Constructor & Destructor Documentation

HBCI::ProgressMonitorCB::ProgressMonitorCB VoidFuncTyp    destrCB,
TransStartedFuncTyp    transStartedCB,
VoidFuncTyp    transFinCB,
JobStartedFuncTyp    jobStartedCB,
VoidFuncTyp    jobFinCB,
ActStartedFuncTyp    actStartedCB,
VoidFuncTyp    actFinCB,
LoggingFuncTyp    logMessageCB,
void *    user_data
 

Constructor.

This one takes already all callback functions that are used throughout this class. The names show to which member method they belong.

user_data is an arbitrary pointer that will be passed on to each callback function.

Any of the arguments is allowed to be NULL -- in that case, the default implementation of the member method will be used.

Author:
Christian Stimming <stimming@tuhh.de>

HBCI::ProgressMonitorCB::~ProgressMonitorCB  
 


Member Function Documentation

void HBCI::ProgressMonitorCB::actionFinished   [virtual]
 

This method is called after an action finshed.

Tells this class that an action finished, i.e. the current action is done. A derived class can use this to advance the current job's progress bar, or to write the message "done" into the appropriate line of its progress report window.

Author:
Martin Preuss<martin@aquamaniac.de>

Reimplemented from HBCI::ProgressMonitor.

void HBCI::ProgressMonitorCB::actionStarted ActionProgressType    type,
const string &    descr
[virtual]
 

This method is called before an action starts.

Tells this class that an action starts, and what action is to be performed now. A derived class can use this to show what is currently done.

If you do not plan to give any kind of report to the user then you have to overload this method with your version just doing nothing. The default version of this method writes a short description to stderr (for now, I guess I will later make this method do nothing. So it is generally a good idea to overload this method).

Author:
Martin Preuss<martin@aquamaniac.de>
Parameters:
type  Constant describing the type of action that is performed.
descr  short description of what is to be done (like "sending data to server").

Reimplemented from HBCI::ProgressMonitor.

void HBCI::ProgressMonitorCB::jobFinished   [virtual]
 

This method is called after a job finished.

Tells this class that the current job is finished. A derived class can use this to advance the transactions progress bar.

Author:
Martin Preuss<martin@aquamaniac.de>

Reimplemented from HBCI::ProgressMonitor.

void HBCI::ProgressMonitorCB::jobStarted JobProgressType    type,
const string &    descr,
int    actions
[virtual]
 

This method is called before a job starts.

A derived class can use this to show in its progress window what is currently done.

Each job has one or more actions to perform, like sending data to the server, receiving data from the server etc.

If you do not plan to give any kind of report to the user then you have to overload this method with your version just doing nothing. The default version of this method writes a short description to stderr (for now, I guess I will later make this method do nothing. So it is generally a good idea to overload this method).

Author:
Martin Preuss<martin@aquamaniac.de>
Parameters:
type  Constant describing the type of action that is performed.
descr  short description of the job (like "Get Balance")
actions  number of actions this job performs. This might be used to draw a progress bar for a job.

Reimplemented from HBCI::ProgressMonitor.

void HBCI::ProgressMonitorCB::logMessage const string &    msg [virtual]
 

DEPRECATED. This method is not used inside OpenHBCI.

This method was meant to be called to log a message, but it is not used from inside OpenHBCI. It may or may not disappear in future releases.

The only method to log messages in OpenHBCI is the HBCI::Interactor::msgStateResponse() method.

The default version of this method writes a short description to stderr (for now, I guess I will later make this method do nothing.).

Author:
Martin Preuss<martin@aquamaniac.de>
Parameters:
msg  msg to show

Reimplemented from HBCI::ProgressMonitor.

void HBCI::ProgressMonitorCB::transactionFinished   [virtual]
 

This method is called after a transaction has finished.

This method tells this class that the transaction is finished. A derived class can use this to show the message "finished" in the transaction window.

Author:
Martin Preuss<martin@aquamaniac.de>

Reimplemented from HBCI::ProgressMonitor.

void HBCI::ProgressMonitorCB::transactionStarted TransProgressType    type,
string const &    descr,
int    jobs
[virtual]
 

This method is called before starting a transaction.

An example is when the outbox is executed: Before really doing so, the HBCI::API calls this method to give this class the opportunity to initialize a progress report.

If you do not plan to give any kind of report to the user then you have to overload this method with your version just doing nothing. The default version of this method writes a short description to stderr (for now, I guess I will later make this method do nothing. So it is generally a good idea to overload this method).

Author:
Martin Preuss<martin@aquamaniac.de>
Parameters:
type  Constant describing the type of action that is performed.
descr  short description about what is to be done
jobs  number of jobs to be performed. For example API::executeQueue gives here the number of jobs in the outbox plus the number of customers affected multiplied by 2. This is because when connecting to an institute we have two other additional jobs to perform: opening the dialog and closing the dialog.

Reimplemented from HBCI::ProgressMonitor.


The documentation for this class was generated from the following file:
Generated on Mon Jun 23 13:41:17 2003 for openhbci by doxygen1.2.17