Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ofxdump.cpp File Reference


Detailed Description

Code for ofxdump utility. C++ example code.

ofxdump prints to stdout, in human readable form, everything the library understands about a particular ofx response file, and sends errors to stderr. To know exactly what the library understands about of a particular ofx response file, just call ofxdump on that file.

ofxdump is meant as both a C++ code example and a developper/debuging tool. It uses every function and every structure of the LibOFX API. By default, WARNING, INFO, ERROR and STATUS messages are enabled. You can change these defaults at the top of ofxdump.cpp

usage: ofxdump path_to_ofx_file/ofx_filename

Definition in file ofxdump.cpp.

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
int special_options (char *argv[])
int ofx_proc_status_cb (struct OfxStatusData data)
 The callback function for the OfxStatusData stucture.

int ofx_proc_security_cb (struct OfxSecurityData data)
 The callback function for the OfxSecurityData stucture.

int ofx_proc_transaction_cb (struct OfxTransactionData data)
 The callback function for the OfxTransactionData stucture.

int ofx_proc_statement_cb (struct OfxStatementData data)
 The callback function for the OfxStatementData stucture.

int ofx_proc_account_cb (struct OfxAccountData data)
 The callback function for the OfxAccountData stucture.


Function Documentation

int main int  argc,
char *  argv[]
 

Tell ofxdump what you want it to send to stderr. See messages.cpp for more details

Definition at line 41 of file ofxdump.cpp.

int ofx_proc_account_cb const struct OfxAccountData  data  ) 
 

The callback function for the OfxAccountData stucture.

The ofx_proc_account_cb event is always generated first, to allow the application to create accounts or ask the user to match an existing account before the ofx_proc_statement and ofx_proc_transaction event are received. An OfxAccountData is passed to this event.

Note however that this OfxAccountData structure will also be available as part of OfxStatementData structure passed to ofx_proc_statement event.

Definition at line 407 of file ofxdump.cpp.

Referenced by OfxAccountContainer::gen_event().

int ofx_proc_security_cb const struct OfxSecurityData  data  ) 
 

The callback function for the OfxSecurityData stucture.

An ofx_proc_security_cb event is generated for any securities listed in the ofx file. It is generated after ofx_proc_statement but before ofx_proc_transaction. It is meant to be used to allow the client to create a new commodity or security (such as a new stock type). Please note however that this information is usually also available as part of each OfxtransactionData. An OfxSecurityData structure is passed to this event.

Definition at line 163 of file ofxdump.cpp.

Referenced by OfxSecurityContainer::gen_event(), and ofx_proc_transaction_cb().

int ofx_proc_statement_cb const struct OfxStatementData  data  ) 
 

The callback function for the OfxStatementData stucture.

The ofx_proc_statement_cb event is sent after all ofx_proc_transaction events have been sent. An OfxStatementData is passed to this event.

Definition at line 368 of file ofxdump.cpp.

Referenced by OfxStatementContainer::gen_event().

int ofx_proc_status_cb const struct OfxStatusData  data  ) 
 

The callback function for the OfxStatusData stucture.

An ofx_proc_status_cb event is sent everytime the server has generated a OFX STATUS element. As such, it could be received at any time(but not during other events). An OfxStatusData structure is passed to this even.

Definition at line 135 of file ofxdump.cpp.

int ofx_proc_transaction_cb const struct OfxTransactionData  data  ) 
 

The callback function for the OfxTransactionData stucture.

An ofx_proc_transaction_cb event is generated for every transaction in the ofx response, after ofx_proc_statement (and possibly ofx_proc_security is generated. An OfxTransactionData structure is passed to this event.

Definition at line 196 of file ofxdump.cpp.

Referenced by OfxTransactionContainer::gen_event().


Generated on Fri Sep 12 00:35:47 2003 for LibOFX by doxygen 1.3.3