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

progressmonitorcb.h

Go to the documentation of this file.
00001 /* progressmonitorcb.h
00002     copyright   : (C) 2002 by Christian Stimming
00003     email       : 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 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     /*ProgressMonitorCB(void *user_data);*/
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     /*void setDestr(VoidFuncTyp destrCB)
00116       { _destrCB = destrCB; };*/
00117     
00118     void transactionStarted(TransProgressType type,
00119                             string const &descr, 
00120                             int jobs);
00121 /*     void setTransStarted(TransStartedFuncTyp transStartedCB) */
00122 /*      { _transStartedCB = transStartedCB; }; */
00123             
00124     void transactionFinished();
00125 /*     void setTransFin(VoidFuncTyp transFinCB) */
00126 /*      { _transFinCB = transFinCB; }; */
00127         
00128     void jobStarted(JobProgressType type,
00129                     const string &descr, 
00130                     int actions);
00131 /*     void setJobStarted(JobStartedFuncTyp jobStartedCB) */
00132 /*      { _jobStartedCB = jobStartedCB; }; */
00133 
00134     void jobFinished();
00135     /*    void setJobFin(VoidFuncTyp jobFinCB)*/
00136     /*  { _jobFinCB = jobFinCB; };*/
00137 
00138     void actionStarted(ActionProgressType type,
00139                        const string &descr);
00140 /*     void setActStarted(ActStartedFuncTyp actStartedCB) */
00141 /*      { _actStartedCB = actStartedCB; }; */
00142 
00143     void actionFinished();
00144 /*     void setActFin(VoidFuncTyp actFinCB) */
00145 /*      { _actFinCB = actFinCB; }; */
00146 
00147     void logMessage(const string &msg);
00148 /*     void setLogMessage(LoggingFuncTyp logMessageCB) */
00149 /*      { _logMessageCB = logMessageCB; }; */
00150 };
00151 
00152 } /* namespace HBCI */
00153 typedef struct HBCI::ProgressMonitorCB HBCI_ProgressMonitorCB;
00154 
00155 extern "C" {
00156 #else /* __cplusplus */
00157 typedef struct HBCI_ProgressMonitorCB HBCI_ProgressMonitorCB;
00158 #endif /* __cplusplus */
00159 
00160 /*     extern HBCI_ProgressMonitorCB * */
00161 /*     HBCI_ProgressMonitorCB_new(void *user_data); */
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     /*extern void 
00177     HBCI_ProgressMonitorCB_setDestr(HBCI_ProgressMonitorCB *p, 
00178                                     VoidFuncTyp destrCB);
00179     extern void 
00180     HBCI_ProgressMonitorCB_setTransStarted(HBCI_ProgressMonitorCB *p, 
00181                                            TransStartedFuncTyp transStartedCB);
00182     extern void 
00183     HBCI_ProgressMonitorCB_setTransFin(HBCI_ProgressMonitorCB *p, 
00184                                        VoidFuncTyp transFinCB);
00185     extern void 
00186     HBCI_ProgressMonitorCB_setJobStarted(HBCI_ProgressMonitorCB *p, 
00187                                          JobStartedFuncTyp jobStartedCB);
00188     extern void 
00189     HBCI_ProgressMonitorCB_setJobFin(HBCI_ProgressMonitorCB *p, 
00190                                      VoidFuncTyp jobFinCB);
00191     extern void 
00192     HBCI_ProgressMonitorCB_setActStarted(HBCI_ProgressMonitorCB *p, 
00193                                          ActStartedFuncTyp actStartedCB);
00194     extern void 
00195     HBCI_ProgressMonitorCB_setActFin(HBCI_ProgressMonitorCB *p, 
00196                                      VoidFuncTyp actFinCB);
00197     extern void 
00198     HBCI_ProgressMonitorCB_setLogMessage(HBCI_ProgressMonitorCB *p, 
00199     LoggingFuncTyp logMessageCB);*/
00200     
00201 
00202 #ifdef __cplusplus
00203 }
00204 #endif /* __cplusplus */
00205 #endif

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