context.hh

00001 
00005 /***************************************************************************
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  ***************************************************************************/
00013 
00014 #ifndef CONTEXT_H
00015 #define CONTEXT_H
00016 #include <string.h>
00017 #include <time.h>               // for time_t
00018 #include "libofx.h"
00019 #include "ParserEventGeneratorKit.h"
00020 
00021 #include <string>
00022 
00023 
00024 using namespace std;
00025 class LibofxContext {
00026 private:
00027   LibofxFileFormat _current_file_type;
00028 
00029   LibofxProcStatusCallback _statusCallback;
00030   LibofxProcAccountCallback _accountCallback;
00031   LibofxProcSecurityCallback _securityCallback;
00032   LibofxProcTransactionCallback _transactionCallback;
00033   LibofxProcStatementCallback _statementCallback;
00034 
00035   void * _statementData;
00036   void * _accountData;
00037   void * _transactionData;
00038   void * _securityData;
00039   void * _statusData;
00040 
00041   std::string _dtdDir;
00042 
00043 public:
00044   LibofxContext();
00045   ~LibofxContext();
00046 
00047   LibofxFileFormat currentFileType() const;
00048   void setCurrentFileType(LibofxFileFormat t);
00049 
00050   const std::string &dtdDir() const { return _dtdDir;};
00051   void setDtdDir(const std::string &s) {_dtdDir=s;};
00052 
00053   int statementCallback(const struct OfxStatementData data);
00054   int accountCallback(const struct OfxAccountData data);
00055   int transactionCallback(const struct OfxTransactionData data);
00056   int securityCallback(const struct OfxSecurityData data);
00057   int statusCallback(const struct OfxStatusData data);
00058 
00059   void setStatusCallback(LibofxProcStatusCallback cb, void *user_data);
00060   void setAccountCallback(LibofxProcAccountCallback cb, void *user_data);
00061   void setSecurityCallback(LibofxProcSecurityCallback cb, void *user_data);
00062   void setTransactionCallback(LibofxProcTransactionCallback cb, void *user_data);
00063   void setStatementCallback(LibofxProcStatementCallback cb, void *user_data);
00064 
00065 
00066 };//End class LibofxContext
00067 
00068 
00069 
00070 
00071 #endif

Generated on Mon Feb 9 21:21:59 2009 for LibOFX by  doxygen 1.5.0