39 #define LIBOFX_MAJOR_VERSION 0 
   40 #define LIBOFX_MINOR_VERSION 9 
   41 #define LIBOFX_MICRO_VERSION 10 
   42 #define LIBOFX_BUILD_VERSION 0 
   43 #define LIBOFX_VERSION_RELEASE_STRING "0.9.10" 
   47 #  ifdef HAVE_GCC_VISIBILITY_EXTS 
   48 #    pragma GCC visibility push(default) 
   59 #define OFX_ELEMENT_NAME_LENGTH         100 
   60 #define OFX_SVRTID2_LENGTH             (36 + 1) 
   61 #define OFX_CHECK_NUMBER_LENGTH        (12 + 1) 
   62 #define OFX_REFERENCE_NUMBER_LENGTH    (32 + 1) 
   63 #define OFX_FITID_LENGTH               (255 + 1) 
   64 #define OFX_TOKEN2_LENGTH              (36 + 1) 
   65 #define OFX_MEMO_LENGTH                (255 + 1) 
   66 #define OFX_FIID_LENGTH                (32 + 1) 
   67 #define OFX_MEMO2_LENGTH               (390 + 1) 
   68 #define OFX_BALANCE_NAME_LENGTH        (32 + 1) 
   69 #define OFX_BALANCE_DESCRIPTION_LENGTH (80 + 1) 
   70 #define OFX_CURRENCY_LENGTH            (3 + 1)  
   71 #define OFX_BANKID_LENGTH              (9 + 1) 
   72 #define OFX_BRANCHID_LENGTH            (22 + 1) 
   73 #define OFX_ACCTID_LENGTH              (22 + 1) 
   74 #define OFX_ACCTKEY_LENGTH             (22 + 1) 
   75 #define OFX_BROKERID_LENGTH            (22 + 1) 
   77 #define OFX_ACCOUNT_ID_LENGTH (OFX_BANKID_LENGTH + OFX_BRANCHID_LENGTH + OFX_ACCTID_LENGTH + 1) 
   78 #define OFX_ACCOUNT_NAME_LENGTH        255 
   79 #define OFX_MARKETING_INFO_LENGTH      (360 + 1) 
   80 #define OFX_TRANSACTION_NAME_LENGTH    (96 + 1) 
   81 #define OFX_UNIQUE_ID_LENGTH           (32 + 1) 
   82 #define OFX_UNIQUE_ID_TYPE_LENGTH      (10 + 1) 
   83 #define OFX_SECNAME_LENGTH             (32 + 1) 
   84 #define OFX_TICKER_LENGTH              (32 + 1) 
   85 #define OFX_ORG_LENGTH                 (32 + 1) 
   86 #define OFX_FID_LENGTH                 (32 + 1) 
   87 #define OFX_USERID_LENGTH              (32 + 1) 
   88 #define OFX_USERPASS_LENGTH            (32 + 1) 
   89 #define OFX_URL_LENGTH                 (500 + 1) 
   90 #define OFX_APPID_LENGTH               (32) 
   91 #define OFX_APPVER_LENGTH              (32) 
   92 #define OFX_HEADERVERSION_LENGTH       (32) 
  102   typedef void * LibofxContextPtr;
 
  118   void libofx_set_dtd_dir(LibofxContextPtr libofx_context,
 
  140 #ifndef OFX_AQUAMANIAC_UGLY_HACK1 
  144     {
AUTODETECT, 
"AUTODETECT", 
"AUTODETECT (File format will be automatically detected later)"},
 
  145     {
OFX, 
"OFX", 
"OFX (Open Financial eXchange (OFX or QFX))"},
 
  146     {
OFC, 
"OFC", 
"OFC (Microsoft Open Financial Connectivity)"},
 
  147     {
QIF, 
"QIF", 
"QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
 
  148     {
LAST, 
"LAST", 
"Not a file format, meant as a loop breaking condition"}
 
  153     {
QIF, 
"QIF", 
"QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
 
  154     {
LAST, 
"LAST", 
"Not a file format, meant as a loop breaking condition"}
 
  192                        const char * p_filename,
 
  214     char ofx_element_name[OFX_ELEMENT_NAME_LENGTH];
 
  243     int server_message_valid;
 
  292     int account_id_valid;
 
  306     int account_type_valid;
 
  314     int account_number_valid;
 
  320     char broker_id[OFX_BROKERID_LENGTH];
 
  323     char branch_id[OFX_BRANCHID_LENGTH];
 
  365     int unique_id_type_valid;
 
  383     int date_unitprice_valid;
 
  487     int account_id_valid;
 
  496     int  invtransactiontype_valid;
 
  534     int unique_id_type_valid;
 
  544     int date_posted_valid;
 
  552     int date_initiated_valid;
 
  557     int date_funds_available_valid;
 
  563     int fi_id_corrected_valid;
 
  568     int fi_id_correction_action_valid;
 
  573     int server_transaction_id_valid;
 
  579     int check_number_valid;
 
  584     int reference_number_valid;
 
  588     int standard_industrial_code_valid;
 
  593     char name[OFX_TRANSACTION_NAME_LENGTH];
 
  601     int commission_valid;
 
  653     int account_id_valid;
 
  658     int ledger_balance_valid;
 
  661     int ledger_balance_date_valid;
 
  671     int available_balance_valid;
 
  673     time_t available_balance_date;
 
  681     int date_start_valid;
 
  693     int marketing_info_valid;
 
  771                          const char *s, 
unsigned int size);
 
  787     char fid[OFX_FID_LENGTH];
 
  788     char org[OFX_ORG_LENGTH];
 
  789     char url[OFX_URL_LENGTH];
 
  807     char fid[OFX_FID_LENGTH];
 
  808     char org[OFX_ORG_LENGTH];
 
  809     char userid[OFX_USERID_LENGTH];
 
  810     char userpass[OFX_USERPASS_LENGTH];
 
  811     char header_version[OFX_HEADERVERSION_LENGTH];
 
  812     char appid[OFX_APPID_LENGTH];
 
  813     char appver[OFX_APPVER_LENGTH];
 
  816 #define OFX_AMOUNT_LENGTH (32 + 1) 
  817 #define OFX_PAYACCT_LENGTH (32 + 1) 
  818 #define OFX_STATE_LENGTH (5 + 1) 
  819 #define OFX_POSTALCODE_LENGTH (11 + 1) 
  820 #define OFX_NAME_LENGTH (32 + 1) 
  824     char amount[OFX_AMOUNT_LENGTH];
 
  825     char account[OFX_PAYACCT_LENGTH];
 
  827     char memo[OFX_MEMO_LENGTH];
 
  832     char name[OFX_NAME_LENGTH];
 
  833     char address1[OFX_NAME_LENGTH];
 
  834     char city[OFX_NAME_LENGTH];
 
  835     char state[OFX_STATE_LENGTH];
 
  836     char postalcode[OFX_POSTALCODE_LENGTH];
 
  837     char phone[OFX_NAME_LENGTH];
 
  867   char* libofx_request_payment_status( 
const struct OfxFiLogin* login, 
const char* transactionid );
 
  888 #if defined(HAVE_GCC_VISIBILITY_EXTS) && defined(IN_LIBOFX) 
  889 #  pragma GCC visibility pop 
  892 #endif // end of LIBOFX_H 
time_t ledger_balance_date
An abstraction of an account. 
enum LibofxFileFormat libofx_get_file_format_from_str(const struct LibofxFileFormatInfo format_list[], const char *file_type_string)
libofx_get_file_type returns a proper enum from a file type string. 
char reference_number[OFX_REFERENCE_NUMBER_LENGTH]
int(* LibofxProcAccountCallback)(const struct OfxAccountData data, void *account_data)
The callback function for the OfxAccountData stucture. 
char * libofx_request_statement(const struct OfxFiLogin *fi, const struct OfxAccountData *account, time_t date_from)
Creates an OFX statement request in string form. 
char unique_id[OFX_UNIQUE_ID_LENGTH]
char account_id[OFX_ACCOUNT_ID_LENGTH]
char fi_id_corrected[256]
int(* LibofxProcTransactionCallback)(const struct OfxTransactionData data, void *transaction_data)
The callback function for the OfxTransactionData stucture. 
char currency[OFX_CURRENCY_LENGTH]
char check_number[OFX_CHECK_NUMBER_LENGTH]
int transactiontype_valid
char name[OFX_TRANSACTION_NAME_LENGTH]
char marketing_info[OFX_MARKETING_INFO_LENGTH]
char memo[OFX_MEMO2_LENGTH]
FiIdCorrectionAction fi_id_correction_action
char currency[OFX_CURRENCY_LENGTH]
char * libofx_request_accountinfo(const struct OfxFiLogin *login)
Creates an OFX account info (list) request in string form. 
int(* LibofxProcSecurityCallback)(const struct OfxSecurityData data, void *security_data)
The callback function for the OfxSecurityData stucture. 
LibofxContextPtr libofx_get_new_context()
Initialise the library and return a new context. 
const char * libofx_get_file_format_description(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)
get_file_format_description returns a string description of a LibofxFileType. 
long int standard_industrial_code
char account_id[OFX_ACCOUNT_ID_LENGTH]
char memo[OFX_MEMO2_LENGTH]
void ofx_set_statement_cb(LibofxContextPtr ctx, LibofxProcStatementCallback cb, void *user_data)
char fiid[OFX_FIID_LENGTH]
void ofx_set_status_cb(LibofxContextPtr ctx, LibofxProcStatusCallback cb, void *user_data)
void ofx_set_account_cb(LibofxContextPtr ctx, LibofxProcAccountCallback cb, void *user_data)
char currency[OFX_CURRENCY_LENGTH]
char account_id[OFX_ACCOUNT_ID_LENGTH]
char unique_id[OFX_UNIQUE_ID_LENGTH]
char account_name[OFX_ACCOUNT_NAME_LENGTH]
struct OfxAccountData * account_ptr
int libofx_proc_buffer(LibofxContextPtr ctx, const char *s, unsigned int size)
char server_transaction_id[OFX_SVRTID2_LENGTH]
struct OfxAccountData * account_ptr
char bank_id[OFX_BANKID_LENGTH]
int(* LibofxProcStatusCallback)(const struct OfxStatusData data, void *status_data)
The callback function for the OfxStatusData stucture. 
An abstraction of an OFX STATUS element. 
void ofx_set_security_cb(LibofxContextPtr ctx, LibofxProcSecurityCallback cb, void *user_data)
char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH]
int available_balance_date_valid
char ticker[OFX_TICKER_LENGTH]
Information returned by the OFX Partner Server about a financial institution. 
char payee_id[OFX_SVRTID2_LENGTH]
An abstraction of a security, such as a stock, mutual fund, etc. 
int ofx_element_name_valid
void ofx_set_transaction_cb(LibofxContextPtr ctx, LibofxProcTransactionCallback cb, void *user_data)
int(* LibofxProcStatementCallback)(const struct OfxStatementData data, void *statement_data)
The callback function for the OfxStatementData stucture. 
An abstraction of a transaction in an account. 
time_t date_funds_available
int libofx_proc_file(LibofxContextPtr libofx_context, const char *p_filename, enum LibofxFileFormat ftype)
libofx_proc_file is the entry point of the library. 
char account_number[OFX_ACCTID_LENGTH]
char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH]
char currency[OFX_CURRENCY_LENGTH]
int libofx_free_context(LibofxContextPtr)
Free all ressources used by this context. 
An abstraction of an account statement. 
char secname[OFX_SECNAME_LENGTH]
Information sufficient to log into an financial institution.