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 PROGRESSMONITORCB_H
00025 #define PROGRESSMONITORCB_H
00026
00032 #include <openhbci/dllimport.h>
00033 #include <openhbci/progressmonitor.h>
00034 #include <openhbci/interactorcb.h>
00035
00042 typedef void (*TransStartedFuncTyp) (TransProgressType type,
00043 int jobs,
00044 void *user_data);
00051 typedef void (*JobStartedFuncTyp) (JobProgressType type,
00052 int actions,
00053 void *user_data);
00059 typedef void (*ActStartedFuncTyp) (ActionProgressType type,
00060 void *user_data);
00061
00062 #ifdef __cplusplus
00063
00064 namespace HBCI {
00065
00076 class DLLIMPORT ProgressMonitorCB : public ProgressMonitor {
00077 private:
00078 VoidFuncTyp _destrCB;
00079 TransStartedFuncTyp _transStartedCB;
00080 VoidFuncTyp _transFinCB;
00081 JobStartedFuncTyp _jobStartedCB;
00082 VoidFuncTyp _jobFinCB;
00083 ActStartedFuncTyp _actStartedCB;
00084 VoidFuncTyp _actFinCB;
00085 LoggingFuncTyp _logMessageCB;
00086 void *_user_data;
00087
00088 public:
00089
00103 ProgressMonitorCB(VoidFuncTyp destrCB,
00104 TransStartedFuncTyp transStartedCB,
00105 VoidFuncTyp transFinCB,
00106 JobStartedFuncTyp jobStartedCB,
00107 VoidFuncTyp jobFinCB,
00108 ActStartedFuncTyp actStartedCB,
00109 VoidFuncTyp actFinCB,
00110 LoggingFuncTyp logMessageCB,
00111 void *user_data);
00112
00113 ~ProgressMonitorCB();
00114
00115
00116
00117
00118 void transactionStarted(TransProgressType type,
00119 string const &descr,
00120 int jobs);
00121
00122
00123
00124 void transactionFinished();
00125
00126
00127
00128 void jobStarted(JobProgressType type,
00129 const string &descr,
00130 int actions);
00131
00132
00133
00134 void jobFinished();
00135
00136
00137
00138 void actionStarted(ActionProgressType type,
00139 const string &descr);
00140
00141
00142
00143 void actionFinished();
00144
00145
00146
00147 void logMessage(const string &msg);
00148
00149
00150 };
00151
00152 }
00153 typedef struct HBCI::ProgressMonitorCB HBCI_ProgressMonitorCB;
00154
00155 extern "C" {
00156 #else
00157 typedef struct HBCI_ProgressMonitorCB HBCI_ProgressMonitorCB;
00158 #endif
00159
00160
00161
00162 extern HBCI_ProgressMonitorCB *
00163 HBCI_ProgressMonitorCB_new(VoidFuncTyp destrCB,
00164 TransStartedFuncTyp transStartedCB,
00165 VoidFuncTyp transFinCB,
00166 JobStartedFuncTyp jobStartedCB,
00167 VoidFuncTyp jobFinCB,
00168 ActStartedFuncTyp actStartedCB,
00169 VoidFuncTyp actFinCB,
00170 LoggingFuncTyp logMessageCB,
00171 void *user_data);
00173 extern HBCI_ProgressMonitor *
00174 HBCI_ProgressMonitorCB_ProgressMonitor(HBCI_ProgressMonitorCB *p);
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202 #ifdef __cplusplus
00203 }
00204 #endif
00205 #endif