00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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 }
00266 typedef struct HBCI::InteractorCB HBCI_InteractorCB;
00267
00268 extern "C" {
00269 #else
00270 typedef struct HBCI_InteractorCB HBCI_InteractorCB;
00271 #endif
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
00304
00305
00306 #endif