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

HBCI::Interactor Class Reference

Interface class to provide methods for every user interaction that is needed by the core OpenHBCI. More...

#include <interactor.h>

Inheritance diagram for HBCI::Interactor:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual bool msgInputPin (Pointer< User > user, string &pin, int minsize, bool newPin)
virtual void msgStartInputPinViaKeypad (Pointer< User > user)
virtual void msgFinishedInputPinViaKeypad (Pointer< User > user)
virtual bool msgInsertMediumOrAbort (Pointer< User > user, MediumType t)
virtual bool msgInsertCorrectMediumOrAbort (Pointer< User > user, MediumType t)
virtual void msgStateResponse (const string &msg)
virtual bool keepAlive ()
void abort (bool a=true)
bool aborted () const
 Interactor ()
virtual ~Interactor ()

Detailed Description

Interface class to provide methods for every user interaction that is needed by the core OpenHBCI.

The default implementation for every method does nothing, i.e. if you don't provide your own derived class OpenHBCI is unable to do any user interaction at all. You have to derive this class and overload all methods so that you offer customized user interaction in your application.

Again, there is no other user interaction in the core OpenHBCI except through the methods in this class. Note, however, that the non-core class API in fact does provide further user interaction for progress bar support through means of the ProgressMonitor class.

Author:
Martin Preuss<martin@libchipcard.de>


Constructor & Destructor Documentation

HBCI::Interactor::Interactor  
 

virtual HBCI::Interactor::~Interactor   [virtual]
 


Member Function Documentation

void HBCI::Interactor::abort bool    a = true [inline]
 

Sets an abort flag which is queried by the default implementation of the keepAlive() method. This might be called to signal that the user wants to abort the ongoing action. A call to this method might result from the user pressing an "abort" button.

Author:
Martin Preuss<openhbci@aquamaniac.de>
Parameters:
a  if true then the next call to keepAlive() will return false

bool HBCI::Interactor::aborted   const [inline]
 

Returns the abort flag set by abort(). This is used by the default implementation of the keepAlive() method. This flag probably tells you if the user wants to abort the ongoing transaction.

Author:
Martin Preuss<openhbci@aquamaniac.de>
Returns :
returns the flag set through abort().

virtual bool HBCI::Interactor::keepAlive   [virtual]
 

During actions which take a long time to perform (some seconds or minutes) this method is called by OpenHBCI every once in a while.

You can override this method to let your program do some GUI update stuff. Also, if this method returns "false", then the long term action will be aborted. Otherwise the action simply continues.

The default implementation of the Interactor returns the variable set by abort() which is accessible also by aborted(). Thus the Interactor offery you the convenience of only using abort() instead of deriving your own Interactor. If you overload this method, you probably should take the value of aborted() into account to comply to that default behaviour.

Author:
Martin Preuss<openhbci@aquamaniac.de>
Returns :
false if user wants the action to be aborted, false otherwise

Reimplemented in HBCI::InteractorCB.

virtual void HBCI::Interactor::msgFinishedInputPinViaKeypad Pointer< User   user [virtual]
 

This method is called directly after the secure pin verification (via the card readers keypad) is finished. A graphical applicatition most likely closes the notification window opened at msgStartInputPinViaKeypad(). (new since 0.9.5)

Author:
Martin Preuss<martin@libchipcard.de>
Parameters:
user  user for whom the pin is to be asked for. Please note that this pointer may be invalid.

Reimplemented in HBCI::InteractorCB.

virtual bool HBCI::Interactor::msgInputPin Pointer< User   user,
string &    pin,
int    minsize,
bool    newPin
[virtual]
 

Ask the user for the pin of a security medium. This method is called by the default Authentifikator. The default implementation does nothing and returns false.

Author:
Martin Preuss<martin@libchipcard.de>
Returns :
true if ok, false if the user aborted
Parameters:
user  user for whom the pin is to be asked for. Please note that this pointer may be invalid.
pin  reference to a variable to receive the pin
minsize  minimum size of the pin.
newPin  if true then the user should be asked for a new pin. Most implementations will ask the user for the pin and then ask him to confirm it (thus making the user doubly enter the pin).

Reimplemented in HBCI::InteractorCB.

virtual bool HBCI::Interactor::msgInsertCorrectMediumOrAbort Pointer< User   user,
MediumType    t
[virtual]
 

Tell the user that:

  • the currently inserted chip card is not the right one and
  • he/she should now insert the correct card
The default implementation does nothing and returns false.

Author:
Martin Preuss<martin@libchipcard.de>
Parameters:
t  The MediumType of the medium that should be inserted.
Returns :
true if ok, false if user wants to abort.
Parameters:
user  user for whom the card is to be inserted. Please note that this pointer may be invalid.

Reimplemented in HBCI::InteractorCB.

virtual bool HBCI::Interactor::msgInsertMediumOrAbort Pointer< User   user,
MediumType    t
[virtual]
 

Tell the user to insert a chip card. The default implementation does nothing and returns false.

Parameters:
user  user for whom the card is to be inserted. Please note that this pointer may be invalid.
t  The MediumType of the medium that should be inserted.
Author:
Martin Preuss<martin@libchipcard.de>
Returns :
true if ok, false if user wants to abort.

Reimplemented in HBCI::InteractorCB.

virtual void HBCI::Interactor::msgStartInputPinViaKeypad Pointer< User   user [virtual]
 

This method is called directly before the user is supposed to enter the pin into the keypad of a card reader. This is used to inform the user that OpenHBCI started secure pin verification. A graphical application might want to open a window that tells the user about this. (new since 0.9.5)

Author:
Martin Preuss<martin@libchipcard.de>
Parameters:
user  user for whom the pin is to be asked for. Please note that this pointer may be invalid.

Reimplemented in HBCI::InteractorCB.

virtual void HBCI::Interactor::msgStateResponse const string &    msg [virtual]
 

Prints a message that might be used for logging purpose. Does not require interaction. The default implementation does nothing and discards the message. This method should be overwritten by your application.

Parameters:
msg  the message to show

Reimplemented in HBCI::InteractorCB.


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