39 #define LIBOFX_MAJOR_VERSION 0 40 #define LIBOFX_MINOR_VERSION 9 41 #define LIBOFX_MICRO_VERSION 15 42 #define LIBOFX_BUILD_VERSION 0 43 #define LIBOFX_VERSION_RELEASE_STRING "0.9.15" 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) 93 #define OFX_CLIENTUID_LENGTH (36 + 1) 103 typedef void * LibofxContextPtr;
119 void libofx_set_dtd_dir(LibofxContextPtr libofx_context,
141 #ifndef OFX_AQUAMANIAC_UGLY_HACK1 145 {
AUTODETECT,
"AUTODETECT",
"AUTODETECT (File format will be automatically detected later)"},
146 {
OFX,
"OFX",
"OFX (Open Financial eXchange (OFX or QFX))"},
147 {
OFC,
"OFC",
"OFC (Microsoft Open Financial Connectivity)"},
148 {
QIF,
"QIF",
"QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
149 {
LAST,
"LAST",
"Not a file format, meant as a loop breaking condition"}
154 {
QIF,
"QIF",
"QIF (Intuit Quicken Interchange Format) NOT IMPLEMENTED"},
155 {
LAST,
"LAST",
"Not a file format, meant as a loop breaking condition"}
193 const char * p_filename,
215 char ofx_element_name[OFX_ELEMENT_NAME_LENGTH];
217 int ofx_element_name_valid;
242 char* server_message;
244 int server_message_valid;
285 char account_id[OFX_ACCOUNT_ID_LENGTH];
292 char account_name[OFX_ACCOUNT_NAME_LENGTH];
293 int account_id_valid;
307 int account_type_valid;
310 char currency[OFX_CURRENCY_LENGTH];
314 char account_number[OFX_ACCTID_LENGTH];
315 int account_number_valid;
318 char bank_id[OFX_BANKID_LENGTH];
321 char broker_id[OFX_BROKERID_LENGTH];
324 char branch_id[OFX_BRANCHID_LENGTH];
361 char unique_id[OFX_UNIQUE_ID_LENGTH];
364 char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];
366 int unique_id_type_valid;
368 char secname[OFX_SECNAME_LENGTH];
376 char ticker[OFX_TICKER_LENGTH];
383 time_t date_unitprice;
384 int date_unitprice_valid;
388 char currency[OFX_CURRENCY_LENGTH];
391 char memo[OFX_MEMO2_LENGTH];
396 char fiid[OFX_FIID_LENGTH];
483 char account_id[OFX_ACCOUNT_ID_LENGTH];
488 int account_id_valid;
490 TransactionType transactiontype;
491 int transactiontype_valid;
496 InvTransactionType invtransactiontype;
497 int invtransactiontype_valid;
531 char unique_id[OFX_UNIQUE_ID_LENGTH];
533 char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH];
535 int unique_id_type_valid;
538 int security_data_valid;
545 int date_posted_valid;
547 time_t date_initiated;
553 int date_initiated_valid;
555 time_t date_funds_available;
558 int date_funds_available_valid;
563 char fi_id_corrected[256];
564 int fi_id_corrected_valid;
568 FiIdCorrectionAction fi_id_correction_action;
569 int fi_id_correction_action_valid;
573 char server_transaction_id[OFX_SVRTID2_LENGTH];
574 int server_transaction_id_valid;
579 char check_number[OFX_CHECK_NUMBER_LENGTH];
580 int check_number_valid;
584 char reference_number[OFX_REFERENCE_NUMBER_LENGTH];
585 int reference_number_valid;
587 long int standard_industrial_code;
589 int standard_industrial_code_valid;
591 char payee_id[OFX_SVRTID2_LENGTH];
594 char name[OFX_TRANSACTION_NAME_LENGTH];
598 char memo[OFX_MEMO2_LENGTH];
602 int commission_valid;
647 char currency[OFX_CURRENCY_LENGTH];
650 char account_id[OFX_ACCOUNT_ID_LENGTH];
654 int account_id_valid;
658 double ledger_balance;
659 int ledger_balance_valid;
661 time_t ledger_balance_date;
662 int ledger_balance_date_valid;
669 double available_balance;
672 int available_balance_valid;
674 time_t available_balance_date;
675 int available_balance_date_valid;
682 int date_start_valid;
693 char marketing_info[OFX_MARKETING_INFO_LENGTH];
694 int marketing_info_valid;
711 char currency[OFX_CURRENCY_LENGTH];
712 double exchange_rate;
772 const char *s,
unsigned int size);
788 char fid[OFX_FID_LENGTH];
789 char org[OFX_ORG_LENGTH];
790 char url[OFX_URL_LENGTH];
808 char fid[OFX_FID_LENGTH];
809 char org[OFX_ORG_LENGTH];
810 char userid[OFX_USERID_LENGTH];
811 char userpass[OFX_USERPASS_LENGTH];
812 char header_version[OFX_HEADERVERSION_LENGTH];
813 char appid[OFX_APPID_LENGTH];
814 char appver[OFX_APPVER_LENGTH];
815 char clientuid[OFX_CLIENTUID_LENGTH];
818 #define OFX_AMOUNT_LENGTH (32 + 1) 819 #define OFX_PAYACCT_LENGTH (32 + 1) 820 #define OFX_STATE_LENGTH (5 + 1) 821 #define OFX_POSTALCODE_LENGTH (11 + 1) 822 #define OFX_NAME_LENGTH (32 + 1) 826 char amount[OFX_AMOUNT_LENGTH];
827 char account[OFX_PAYACCT_LENGTH];
829 char memo[OFX_MEMO_LENGTH];
834 char name[OFX_NAME_LENGTH];
835 char address1[OFX_NAME_LENGTH];
836 char city[OFX_NAME_LENGTH];
837 char state[OFX_STATE_LENGTH];
838 char postalcode[OFX_POSTALCODE_LENGTH];
839 char phone[OFX_NAME_LENGTH];
869 char* libofx_request_payment_status(
const struct OfxFiLogin* login,
const char* transactionid );
890 #if defined(HAVE_GCC_VISIBILITY_EXTS) && defined(IN_LIBOFX) 891 # pragma GCC visibility pop 894 #endif // end of LIBOFX_H int(* LibofxProcStatementCallback)(const struct OfxStatementData data, void *statement_data)
The callback function for the OfxStatementData stucture.
An abstraction of an account.
int libofx_proc_file(LibofxContextPtr libofx_context, const char *p_filename, enum LibofxFileFormat ftype)
libofx_proc_file is the entry point of the library.
void ofx_set_security_cb(LibofxContextPtr ctx, LibofxProcSecurityCallback cb, void *user_data)
int(* LibofxProcStatusCallback)(const struct OfxStatusData data, void *status_data)
The callback function for the OfxStatusData stucture.
void ofx_set_transaction_cb(LibofxContextPtr ctx, LibofxProcTransactionCallback cb, void *user_data)
int libofx_proc_buffer(LibofxContextPtr ctx, const char *s, unsigned int size)
int(* LibofxProcAccountCallback)(const struct OfxAccountData data, void *account_data)
The callback function for the OfxAccountData stucture.
void ofx_set_account_cb(LibofxContextPtr ctx, LibofxProcAccountCallback cb, void *user_data)
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 memo[OFX_MEMO2_LENGTH]
LibofxContextPtr libofx_get_new_context(void)
Initialise the library and return a new context.
void ofx_set_statement_cb(LibofxContextPtr ctx, LibofxProcStatementCallback cb, void *user_data)
int(* LibofxProcSecurityCallback)(const struct OfxSecurityData data, void *security_data)
The callback function for the OfxSecurityData 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.
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.
int(* LibofxProcTransactionCallback)(const struct OfxTransactionData data, void *transaction_data)
The callback function for the OfxTransactionData stucture.
An abstraction of an OFX STATUS element.
int libofx_free_context(LibofxContextPtr)
Free all ressources used by this context.
void ofx_set_status_cb(LibofxContextPtr ctx, LibofxProcStatusCallback cb, void *user_data)
char * libofx_request_accountinfo(const struct OfxFiLogin *login)
Creates an OFX account info (list) request in string form.
Information returned by the OFX Partner Server about a financial institution.
An abstraction of a security, such as a stock, mutual fund, etc.
An abstraction of a transaction in an account.
An abstraction of an account statement.
Information sufficient to log into an financial institution.