lib/context.hh
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef CONTEXT_H
#define CONTEXT_H
#include <string.h>
#include <time.h> // for time_t
#include "libofx.h"
#include "ParserEventGeneratorKit.h"
#include <string>
using namespace std;
class LibofxContext
{
private:
LibofxFileFormat _current_file_type;
LibofxProcStatusCallback _statusCallback;
LibofxProcAccountCallback _accountCallback;
LibofxProcSecurityCallback _securityCallback;
LibofxProcTransactionCallback _transactionCallback;
LibofxProcStatementCallback _statementCallback;
LibofxProcPositionCallback _positionCallback;
void * _statementData;
void * _accountData;
void * _transactionData;
void * _securityData;
void * _statusData;
void * _positionData;
std::string _dtdDir;
public:
LibofxContext();
~LibofxContext();
LibofxFileFormat currentFileType() const;
void setCurrentFileType(LibofxFileFormat t);
const std::string &dtdDir() const
{
return _dtdDir;
};
void setDtdDir(const std::string &s)
{
_dtdDir = s;
};
int statementCallback(const struct OfxStatementData data);
int accountCallback(const struct OfxAccountData data);
int transactionCallback(const struct OfxTransactionData data);
int securityCallback(const struct OfxSecurityData data);
int statusCallback(const struct OfxStatusData data);
int positionCallback(const struct OfxPositionData data);
void setStatusCallback(LibofxProcStatusCallback cb, void *user_data);
void setAccountCallback(LibofxProcAccountCallback cb, void *user_data);
void setSecurityCallback(LibofxProcSecurityCallback cb, void *user_data);
void setTransactionCallback(LibofxProcTransactionCallback cb, void *user_data);
void setStatementCallback(LibofxProcStatementCallback cb, void *user_data);
void setPositionCallback(LibofxProcPositionCallback cb, void *user_data);
};//End class LibofxContext
#endif
OfxAccountData
An abstraction of an account.
Definition: inc/libofx.h:276
OfxPositionData
An abstraction of a security position held in an account.
Definition: inc/libofx.h:1161
std
LibofxContext
Definition: build/libofx-0.10.0/lib/context.hh:25
LibofxProcAccountCallback
int(* LibofxProcAccountCallback)(const struct OfxAccountData data, void *account_data)
The callback function for the OfxAccountData stucture.
Definition: inc/libofx.h:349
LibofxProcStatementCallback
int(* LibofxProcStatementCallback)(const struct OfxStatementData data, void *statement_data)
The callback function for the OfxStatementData stucture.
Definition: inc/libofx.h:1142
LibofxProcTransactionCallback
int(* LibofxProcTransactionCallback)(const struct OfxTransactionData data, void *transaction_data)
The callback function for the OfxTransactionData stucture.
Definition: inc/libofx.h:1046
LibofxProcPositionCallback
int(* LibofxProcPositionCallback)(const struct OfxPositionData data, void *position_data)
The callback function for the OfxPositionData stucture.
Definition: inc/libofx.h:1270
OfxStatusData
An abstraction of an OFX STATUS element.
Definition: inc/libofx.h:214
OfxSecurityData
An abstraction of a security, such as a stock, mutual fund, etc.
Definition: inc/libofx.h:358
LibofxProcSecurityCallback
int(* LibofxProcSecurityCallback)(const struct OfxSecurityData data, void *security_data)
The callback function for the OfxSecurityData stucture.
Definition: inc/libofx.h:620
LibofxProcStatusCallback
int(* LibofxProcStatusCallback)(const struct OfxStatusData data, void *status_data)
The callback function for the OfxStatusData stucture.
Definition: inc/libofx.h:263
OfxTransactionData
An abstraction of a transaction in an account.
Definition: inc/libofx.h:682
LibofxFileFormat
LibofxFileFormat
Definition: inc/libofx.h:126
OfxStatementData
An abstraction of an account statement.
Definition: inc/libofx.h:1057