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

libofx.h File Reference


Detailed Description

Main header file containing the LibOfx API.

This file should be included for all applications who use this API. This header file will work with both C and C++ programs. The entire API is made of the following structures and functions.

All of the following ofx_proc_* functions are callbacks (Except ofx_proc_file which is the entry point). They must be implemented by your program, but can be left empty if not needed. They are called each time the associated structure is filled by the library.

Important note: The variables associated with every data element have a _valid companion. Always check that data_valid == true before using. Not only will you ensure that the data is meaningfull, but also that pointers are valid and strings point to a null terminated string. Elements listed as mandatory are for information purpose only, do not trust the bank not to send you non-conforming data...

Definition in file libofx-0.6.5/inc/libofx.h.

Go to the source code of this file.

Data Structures

struct  OfxAccountData
 An abstraction of an account. More...

struct  OfxCurrency
 NOT YET SUPPORTED. More...

struct  OfxSecurityData
 An abstraction of a security, such as a stock, mutual fund, etc. More...

struct  OfxStatementData
 An abstraction of an account statement. More...

struct  OfxStatusData
 An abstraction of an OFX STATUS element. More...

struct  OfxTransactionData
 An abstraction of a transaction in an account. More...


Defines

#define CFCT
#define true   1
#define false   0
#define OFX_ELEMENT_NAME_LENGTH   100
#define OFX_SVRTID2_LENGTH   36 + 1
#define OFX_CHECK_NUMBER_LENGTH   12 + 1
#define OFX_REFERENCE_NUMBER_LENGTH   32 + 1
#define OFX_FITID_LENGTH   255 + 1
#define OFX_TOKEN2_LENGTH   36 + 1
#define OFX_MEMO2_LENGTH   390 + 1
#define OFX_BALANCE_NAME_LENGTH   32 + 1
#define OFX_BALANCE_DESCRIPTION_LENGTH   80 + 1
#define OFX_CURRENCY_LENGTH   3 + 1
#define OFX_BANKID_LENGTH   9
#define OFX_BRANCHID_LENGTH   22 + 1
#define OFX_ACCTID_LENGTH   22 + 1
#define OFX_ACCTKEY_LENGTH   22 + 1
#define OFX_BROKERID_LENGTH   22 + 1
#define OFX_ACCOUNT_ID_LENGTH   OFX_BANKID_LENGTH + OFX_BRANCHID_LENGTH + OFX_ACCTID_LENGTH + 1
#define OFX_ACCOUNT_NAME_LENGTH   255
#define OFX_MARKETING_INFO_LENGTH   360 + 1
#define OFX_TRANSACTION_NAME_LENGTH   32 + 1
#define OFX_UNIQUE_ID_LENGTH   32 + 1
#define OFX_UNIQUE_ID_TYPE_LENGTH   10 + 1
#define OFX_SECNAME_LENGTH   32 + 1
#define OFX_TICKER_LENGTH   32 + 1

Functions

CFCT int ofx_proc_file (int argc, char *argv[])
 ofx_proc_file is the entry point of the library.

CFCT int ofx_proc_status_cb (const struct OfxStatusData data)
 The callback function for the OfxStatusData stucture.

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

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

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

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


Variables

CFCT void(* OfxCallbackFunc )()


Function Documentation

CFCT 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 221 of file ofx2qif.c.

Referenced by OfxAccountContainer::gen_event().

CFCT int ofx_proc_file int  argc,
char *  argv[]
 

ofx_proc_file is the entry point of the library.

libofx_proc_file must be called by the client, with a list of 1 or more OFX files to be parsed in command line format.

Definition at line 34 of file ofx_preproc.cpp.

Referenced by main().

CFCT 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 71 of file ofx2qif.c.

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

CFCT 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 162 of file ofx2qif.c.

Referenced by OfxStatementContainer::gen_event().

CFCT 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 67 of file ofx2qif.c.

CFCT 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 77 of file ofx2qif.c.

Referenced by OfxTransactionContainer::gen_event().


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