00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
#ifndef CONTEXT_H
00015
#define CONTEXT_H
00016
#include <string.h>
00017
#include <time.h>
00018
#include "libofx.h"
00019
#include "ParserEventGeneratorKit.h"
00020
00021
using namespace std;
00022
class LibofxContext {
00023
private:
00024
LibofxFileFormat _current_file_type;
00025
00026
LibofxProcStatusCallback _statusCallback;
00027
LibofxProcAccountCallback _accountCallback;
00028
LibofxProcSecurityCallback _securityCallback;
00029
LibofxProcTransactionCallback _transactionCallback;
00030
LibofxProcStatementCallback _statementCallback;
00031
00032
void * _statementData;
00033
void * _accountData;
00034
void * _transactionData;
00035
void * _securityData;
00036
void * _statusData;
00037
00038
public:
00039 LibofxContext();
00040 ~LibofxContext();
00041
00042
LibofxFileFormat currentFileType() const;
00043
void setCurrentFileType(LibofxFileFormat t);
00044
00045
int statementCallback(const struct
OfxStatementData data);
00046
int accountCallback(const struct
OfxAccountData data);
00047
int transactionCallback(const struct
OfxTransactionData data);
00048
int securityCallback(const struct
OfxSecurityData data);
00049
int statusCallback(const struct
OfxStatusData data);
00050
00051
void setStatusCallback(LibofxProcStatusCallback cb,
void *user_data);
00052
void setAccountCallback(LibofxProcAccountCallback cb,
void *user_data);
00053
void setSecurityCallback(LibofxProcSecurityCallback cb,
void *user_data);
00054
void setTransactionCallback(LibofxProcTransactionCallback cb,
void *user_data);
00055
void setStatementCallback(LibofxProcStatementCallback cb,
void *user_data);
00056
00057
00058 };
00059
00060
00061
00062
00063 #endif