qbwaitcallback.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id: qbwaitcallback.h 764 2006-01-13 14:00:00Z cstim $
00005     begin       : Mon Mar 01 2004
00006     copyright   : (C) 2004 by Martin Preuss
00007     email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *          Please see toplevel file COPYING for license details           *
00011  ***************************************************************************/
00012 
00013 
00014 #ifndef QBANKING_WAIT_CALLBACK_H
00015 #define QBANKING_WAIT_CALLBACK_H
00016 
00017 #include <gwenhywfar/gwenhywfarapi.h>
00018 #include <gwenhywfar/waitcallback.h>
00019 #include <gwenhywfar/misc.h>
00020 
00021 
00026 class QBWaitCallback {
00027 private:
00028   GWEN_WAITCALLBACK *_ctx;
00029 
00030   static GWEN_WAITCALLBACK *_instantiate(GWEN_WAITCALLBACK *ctx);
00031   static GWEN_WAITCALLBACK_RESULT _checkAbort(GWEN_WAITCALLBACK *ctx,
00032                                               unsigned int level);
00033   static void _log(GWEN_WAITCALLBACK *ctx,
00034                    unsigned int level,
00035                    GWEN_LOGGER_LEVEL logLevel,
00036                    const char *s);
00037   static void _freeData(void *bp, void *p);
00038 
00039 protected:
00040   GWEN_WAITCALLBACK *cCallback();
00041 
00042 public:
00049   GWEN_TYPE_UINT64 getProgressPos() const;
00050 
00057   GWEN_TYPE_UINT64 getProgressTotal() const;
00058 
00063   time_t lastCalled() const;
00064 
00069   time_t lastEntered() const;
00070 
00076   void setDistance(int d);
00077 
00078   int nestingLevel() const;
00079 
00080   GWEN_TYPE_UINT32 flags() const;
00081 
00090 
00096   virtual QBWaitCallback *instantiate();
00097 
00098 
00109   virtual GWEN_WAITCALLBACK_RESULT checkAbort(unsigned int level);
00110 
00122   virtual void log(unsigned int level,
00123                    GWEN_LOGGER_LEVEL loglevel,
00124                    const char *s);
00125 
00131   QBWaitCallback(const char *id);
00132   virtual ~QBWaitCallback();
00133 
00134 public:
00135 
00144   int registerCallback();
00145 
00150   int unregisterCallback();
00151 
00155   const char *getId() const;
00156 
00157   const char *getText() const;
00158 
00159   const char *getUnits() const;
00160 
00163   int getDistance() const;
00164 
00165 
00166 };
00167 
00168 
00169 #endif /* QBANKING_WAIT_CALLBACK_H */
00170 
00171 

Generated on Wed Oct 18 16:17:27 2006 for aqbanking by  doxygen 1.4.7