Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

qbanking.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: qbanking.h,v $
00003                              -------------------
00004     cvs         : $Id: qbanking.h,v 1.4 2005/08/18 14:17:39 cstim Exp $
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 #ifndef QBANKING_BANKING_H
00014 #define QBANKING_BANKING_H
00015 
00016 
00017 #include <aqbanking/banking.h>
00018 #include <aqbanking/accstatus.h>
00019 
00020 #include <gwenhywfar/nettransportssl.h>
00021 
00022 #include <qobject.h>
00023 #include <qdatetime.h>
00024 #include <qstring.h>
00025 #include <qguardedptr.h>
00026 
00027 #include <list>
00028 
00029 class QTranslator;
00030 
00031 class QBanking;
00032 
00033 #include <qbanking/banking.h>
00034 #include <qbanking/qbflagstaff.h>
00035 
00036 
00037 class QBProgress;
00038 class QBSimpleBox;
00039 class QBWaitCallback;
00040 
00041 
00042 class QBanking: public Banking {
00043   friend class QBanking_Linker;
00044 private:
00045   QGuardedPtr<QWidget> _parentWidget;
00046   GWEN_TYPE_UINT32 _lastWidgetId;
00047   AB_BANKING_LOGLEVEL _logLevel;
00048   std::list<QBProgress*> _progressWidgets;
00049   std::list<QBSimpleBox*> _simpleBoxWidgets;
00050   QBFlagStaff *_flagStaff;
00051   QTranslator *_translator;
00052 
00053   QBWaitCallback *_simpleCallback;
00054   QBWaitCallback *_fastCallback;
00055 
00056   QBProgress *_findProgressWidget(GWEN_TYPE_UINT32 id);
00057   void _cleanupProgressWidgets();
00058 
00059   AB_ACCOUNT *_getAccount(const char *accountId);
00060   static int _extractHTML(const char *text, GWEN_BUFFER *buf);
00061 
00062 public:
00063   QBanking(const char *appname,
00064            const char *fname=0);
00065   virtual ~QBanking();
00066 
00067   int init();
00068   int fini();
00069 
00070   virtual int messageBox(GWEN_TYPE_UINT32 flags,
00071                          const char *title,
00072                          const char *text,
00073                          const char *b1,
00074                          const char *b2,
00075                          const char *b3);
00076 
00077   virtual int inputBox(GWEN_TYPE_UINT32 flags,
00078                        const char *title,
00079                        const char *text,
00080                        char *buffer,
00081                        int minLen,
00082                        int maxLen);
00083 
00084   virtual GWEN_TYPE_UINT32 showBox(GWEN_TYPE_UINT32 flags,
00085                                    const char *title,
00086                                    const char *text);
00087   virtual void hideBox(GWEN_TYPE_UINT32 id);
00088 
00089   virtual GWEN_TYPE_UINT32 progressStart(const char *title,
00090                                          const char *text,
00091                                          GWEN_TYPE_UINT32 total);
00092 
00100   virtual int progressAdvance(GWEN_TYPE_UINT32 id,
00101                               GWEN_TYPE_UINT32 progress);
00102   virtual int progressLog(GWEN_TYPE_UINT32 id,
00103                           AB_BANKING_LOGLEVEL level,
00104                           const char *text);
00105   virtual int progressEnd(GWEN_TYPE_UINT32 id);
00106 
00107   virtual int print(const char *docTitle,
00108                     const char *docType,
00109                     const char *descr,
00110                     const char *text);
00111 
00112   virtual QBFlagStaff *flagStaff();
00113 
00114   void setParentWidget(QWidget *w);
00115   QWidget *getParentWidget();
00116 
00117   int enqueueJob(AB_JOB *j);
00118   int dequeueJob(AB_JOB *j);
00119   int executeQueue();
00120 
00121   void setAccountAlias(AB_ACCOUNT *a, const char *alias);
00122 
00123   void accountsUpdated();
00124   void outboxCountChanged(int count);
00125   void statusMessage(const QString &s);
00126 
00127   virtual void invokeHelp(const char *subject);
00128 
00129   virtual bool mapAccount(const AB_ACCOUNT *a);
00130 
00131   bool askMapAccount(const char *id,
00132                      const char *bankCode,
00133                      const char *accountId);
00134 
00135 
00136   virtual bool addTransaction(const AB_ACCOUNT *a, const AB_TRANSACTION *t);
00137   virtual bool setAccountStatus(const AB_ACCOUNT *a,
00138                                 const AB_ACCOUNT_STATUS *ast);
00139 
00140   bool requestBalance(const char *accountId);
00141   bool requestTransactions(const char *accountId,
00142                            const QDate &fromDate,
00143                            const QDate &toDate);
00144 
00145   virtual bool importContext(AB_IMEXPORTER_CONTEXT *ctx,
00146                              GWEN_TYPE_UINT32 flags);
00147 
00148   virtual bool importAccountInfo(AB_IMEXPORTER_ACCOUNTINFO *ai,
00149                                  GWEN_TYPE_UINT32 flags);
00150 
00151   virtual bool interactiveImport();
00152 
00174   AB_BANKINFO *selectBank(QWidget* parent=0,
00175                           const QString &title="",
00176                           const QString &country="de",
00177                           const QString &bankCode="",
00178                           const QString &swiftCode="",
00179                           const QString &bankName="",
00180                           const QString &location="");
00181 
00182   static std::string QStringToUtf8String(const QString &qs);
00183 
00184   static std::string guiString(const char *s);
00185 
00186 };
00187 
00188 
00189 
00190 
00191 #endif /* QBANKING_BANKING_H */
00192 
00193 

Generated on Thu Oct 6 14:49:08 2005 for aqbanking by  doxygen 1.4.4