banking.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id: banking.h 935 2006-02-14 02:11:55Z aquamaniac $
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 
00017 #ifndef AQ_BANKING_CPP_H
00018 #define AQ_BANKING_CPP_H
00019 
00020 
00021 #include <aqbanking/banking.h>
00022 #include <aqbanking/system.h>
00023 #include <list>
00024 #include <string>
00025 
00026 
00027 #ifdef BUILDING_QBANKING
00028 # /* building AqBanking */
00029 # if AQBANKING_SYS_IS_WINDOWS
00030 #   /* for windows */
00031 #   ifdef __declspec
00032 #     define QBANKING_API __declspec (dllexport)
00033 #   else /* if __declspec */
00034 #     define QBANKING_API
00035 #   endif /* if NOT __declspec */
00036 # else
00037 #   /* for non-win32 */
00038 #   ifdef GCC_WITH_VISIBILITY_ATTRIBUTE
00039 #     define QBANKING_API __attribute__((visibility("default")))
00040 #   else
00041 #     define QBANKING_API
00042 #   endif
00043 # endif
00044 #else
00045 # /* not building AqBanking */
00046 # if AQBANKING_SYS_IS_WINDOWS
00047 #   /* for windows */
00048 #   ifdef __declspec
00049 #     define QBANKING_API __declspec (dllimport)
00050 #   else /* if __declspec */
00051 #     define QBANKING_API
00052 #   endif /* if NOT __declspec */
00053 # else
00054 #   /* for non-win32 */
00055 #   define QBANKING_API
00056 # endif
00057 #endif
00058 
00059 #ifdef GCC_WITH_VISIBILITY_ATTRIBUTE
00060 # define QBANKING_EXPORT __attribute__((visibility("default")))
00061 # define QBANKING_NOEXPORT __attribute__((visibility("hidden")))
00062 #else
00063 # define QBANKING_EXPORT
00064 # define QBANKING_NOEXPORT
00065 #endif
00066 
00067 
00068 #define QBANKING_IMPORTER_FLAGS_COMPLETE_DAYS  0x00000001
00069 #define QBANKING_IMPORTER_FLAGS_OVERWRITE_DAYS 0x00000002
00070 #define QBANKING_IMPORTER_FLAGS_ASK_ALL_DUPES  0x00000004
00071 #define QBANKING_IMPORTER_FLAGS_FUZZY          0x00000008
00072 #define QBANKING_IMPORTER_FLAGS_AS_ORDERS      0x00000010
00073 
00074 
00087 class QBANKING_API Banking {
00088   friend class Banking_Linker;
00089 
00090 private:
00091   AB_BANKING *_banking;
00092 
00093 public:
00094   Banking(const char *appname,
00095           const char *fname);
00096   virtual ~Banking();
00097 
00098 
00099   AB_BANKING *getCInterface();
00100 
00101 
00105   int init();
00106 
00110   int fini();
00111 
00112 
00118   AB_PROVIDER *getProvider(const char *name);
00119 
00120 
00124   const char *getAppName();
00125 
00133   std::list<AB_ACCOUNT*> getAccounts();
00134 
00141   AB_ACCOUNT *getAccount(GWEN_TYPE_UINT32 uniqueId);
00142 
00150   std::list<AB_USER*> getUsers();
00151 
00158   GWEN_DB_NODE *getAppData();
00159 
00160   GWEN_DB_NODE *getSharedData(const char *name);
00161 
00162   int getUserDataDir(GWEN_BUFFER *buf) const ;
00163   int getAppUserDataDir(GWEN_BUFFER *buf) const ;
00164 
00165 
00175   std::list<GWEN_PLUGIN_DESCRIPTION*> getProviderDescrs();
00176 
00182   std::list<GWEN_PLUGIN_DESCRIPTION*> getWizardDescrs();
00183 
00190   void clearPluginDescrs(std::list<GWEN_PLUGIN_DESCRIPTION*> &l);
00191 
00192   int activateProvider(const char *pname);
00193   int deactivateProvider(const char *pname);
00194   std::list<std::string> getActiveProviders();
00195 
00196   std::string findWizard(const char *frontends);
00197 
00221   int enqueueJob(AB_JOB *j);
00222 
00228   int dequeueJob(AB_JOB *j);
00229 
00237   virtual int executeQueue(AB_IMEXPORTER_CONTEXT *ctx);
00238 
00243   std::list<AB_JOB*> getEnqueuedJobs();
00254   virtual int messageBox(GWEN_TYPE_UINT32 flags,
00255                          const char *title,
00256                          const char *text,
00257                          const char *b1,
00258                          const char *b2,
00259                          const char *b3);
00260 
00264   virtual int inputBox(GWEN_TYPE_UINT32 flags,
00265                        const char *title,
00266                        const char *text,
00267                        char *buffer,
00268                        int minLen,
00269                        int maxLen);
00270 
00274   virtual GWEN_TYPE_UINT32 showBox(GWEN_TYPE_UINT32 flags,
00275                                    const char *title,
00276                                    const char *text);
00280   virtual void hideBox(GWEN_TYPE_UINT32 id);
00281 
00285   virtual GWEN_TYPE_UINT32 progressStart(const char *title,
00286                                          const char *text,
00287                                          GWEN_TYPE_UINT32 total);
00288 
00292   virtual int progressAdvance(GWEN_TYPE_UINT32 id,
00293                               GWEN_TYPE_UINT32 progress);
00297   virtual int progressLog(GWEN_TYPE_UINT32 id,
00298                           AB_BANKING_LOGLEVEL level,
00299                           const char *text);
00303   virtual int progressEnd(GWEN_TYPE_UINT32 id);
00304 
00305 
00309   virtual int print(const char *docTitle,
00310                     const char *docType,
00311                     const char *descr,
00312                     const char *text);
00313 
00317   virtual bool importContext(AB_IMEXPORTER_CONTEXT *ctx,
00318                              GWEN_TYPE_UINT32 flags);
00319 
00320 };
00321 
00322 
00323 
00324 
00325 #endif /* AQ_BANKING_CPP_H */
00326 
00327 

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