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

interactorcb.h

Go to the documentation of this file.
00001 /*
00002   hbciinteractorcb.h
00003   (C) 2002 by Christian Stimming <stimming@tuhh.de>
00004 
00005  ***************************************************************************
00006  *                                                                         *
00007  *   This library is free software; you can redistribute it and/or         *
00008  *   modify it under the terms of the GNU Lesser General Public            *
00009  *   License as published by the Free Software Foundation; either          *
00010  *   version 2.1 of the License, or (at your option) any later version.    *
00011  *                                                                         *
00012  *   This library is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00015  *   Lesser General Public License for more details.                       *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU Lesser General Public      *
00018  *   License along with this library; if not, write to the Free Software   *
00019  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00020  *   MA  02111-1307  USA                                                   *
00021  *                                                                         *
00022  ***************************************************************************/
00023 
00024 #ifndef HBCIINTERACTORCB_H
00025 #define HBCIINTERACTORCB_H
00026 
00032 #include <openhbci/dllimport.h>
00033 #include <openhbci/pointer.h>
00034 #include <openhbci/user.h>
00035 #include <openhbci/interactor.h>
00036 
00058 typedef int (*InputPinFuncTyp) (const HBCI_User *user, 
00059                                 char **pin, 
00060                                 int minsize, 
00061                                 int newPin,
00062                                 void *user_data);
00075 typedef int (*InputUserFuncTyp) (const HBCI_User *user,
00076                                  MediumType type,
00077                                  void *user_data);
00085 typedef void (*LoggingFuncTyp) (const char *msg,
00086                                 void *user_data);
00093 typedef int (*BoolFuncTyp) (void *user_data);
00094 
00099 typedef void (*VoidFuncTyp) (void *user_data);
00100 
00107 typedef void (*VoidUserFuncTyp) (const HBCI_User *user, 
00108                                  void *user_data);
00109 
00110 
00111 #ifdef __cplusplus
00112 
00113 namespace HBCI {
00128 class DLLIMPORT InteractorCB : public Interactor {
00129 private:
00130     VoidFuncTyp _destrCB;
00131     InputPinFuncTyp _msgInputPinCB;
00132     InputUserFuncTyp _msgInsertMediumOrAbortCB;
00133     InputUserFuncTyp _msgInsertCorrectMediumOrAbortCB;
00134     LoggingFuncTyp _msgStateResponseCB;
00135     BoolFuncTyp _keepAliveCB;
00136     VoidUserFuncTyp _msgStartInputPinViaKeypadCB;
00137     VoidUserFuncTyp _msgFinishedInputPinViaKeypadCB;
00138     void *_user_data;
00139 
00140 public:
00149     InteractorCB(VoidFuncTyp destrCB,
00150                  InputPinFuncTyp msgInputPinCB,
00151                  InputUserFuncTyp msgInsertMediumOrAbortCB,
00152                  InputUserFuncTyp msgInsertCorrectMediumOrAbortCB,
00153                  LoggingFuncTyp msgStateResponseCB,
00154                  BoolFuncTyp keepAliveCB,
00155                  VoidUserFuncTyp msgStartInputPinViaKeypadCB,
00156                  VoidUserFuncTyp msgFinishedInputPinViaKeypadCB,
00157                  void *user_data);
00158 
00164     ~InteractorCB();
00165             
00179     bool msgInputPin(Pointer<User> user,
00180                      string &pin,
00181                      int minsize,
00182                      bool newPin);
00183 
00193     bool msgInsertMediumOrAbort(Pointer<User> user,
00194                                 MediumType t);
00195 
00208     bool msgInsertCorrectMediumOrAbort(Pointer<User> user,
00209                                        MediumType t);
00210 
00217     void msgStateResponse(const string &msg);
00218 
00238     bool keepAlive();
00239 
00250     virtual void msgStartInputPinViaKeypad(Pointer<User> user);
00251 
00262     virtual void msgFinishedInputPinViaKeypad(Pointer<User> user);
00263 };
00264 
00265 } /* namespace HBCI */
00266 typedef struct HBCI::InteractorCB HBCI_InteractorCB;
00267 
00268 extern "C" {
00269 #else /* __cplusplus */
00270   typedef struct HBCI_InteractorCB HBCI_InteractorCB;
00271 #endif /* __cplusplus */
00272 
00276     extern HBCI_InteractorCB* HBCI_InteractorCB_new2(
00277         VoidFuncTyp destrCB,
00278         InputPinFuncTyp msgInputPinCB,
00279         InputUserFuncTyp msgInsertMediumOrAbortCB,
00280         InputUserFuncTyp msgInsertCorrectMediumOrAbortCB,
00281         LoggingFuncTyp msgStateResponseCB,
00282         BoolFuncTyp keepAliveCB,
00283         VoidUserFuncTyp msgStartInputPinViaKeypadCB,
00284         VoidUserFuncTyp msgFinishedInputPinViaKeypadCB,
00285         void *user_data);
00286 
00288     extern HBCI_InteractorCB* HBCI_InteractorCB_new(
00289         VoidFuncTyp destrCB,
00290         InputPinFuncTyp msgInputPinCB,
00291         InputUserFuncTyp msgInsertMediumOrAbortCB,
00292         InputUserFuncTyp msgInsertCorrectMediumOrAbortCB,
00293         LoggingFuncTyp msgStateResponseCB,
00294         BoolFuncTyp keepAliveCB,
00295         void *user_data);
00296 
00298     extern HBCI_Interactor* 
00299     HBCI_InteractorCB_Interactor(HBCI_InteractorCB *h);
00300 
00301 #ifdef __cplusplus
00302 }
00303 #endif /* __cplusplus */
00304 
00305 
00306 #endif

Generated on Mon Jun 23 13:41:07 2003 for openhbci by doxygen1.2.17