LibOFX
ofxdump.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  ofxdump.cpp
3  -------------------
4  copyright : (C) 2002 by Benoit GrĂ©goire
5  email : benoitg@coeus.ca
6 ***************************************************************************/
22 /***************************************************************************
23  * *
24  * This program is free software; you can redistribute it and/or modify *
25  * it under the terms of the GNU General Public License as published by *
26  * the Free Software Foundation; either version 2 of the License, or *
27  * (at your option) any later version. *
28  * *
29  ***************************************************************************/
30 #include <iostream>
31 #include <iomanip>
32 #include <cstdlib>
33 #include <cstring>
34 #include <string>
35 #include "libofx.h"
36 #include <stdio.h> /* for printf() */
37 #include <config.h> /* Include config constants, e.g., VERSION TF */
38 #include <errno.h>
39 
40 #include "cmdline.h" /* Gengetopt generated parser */
41 
42 using namespace std;
43 
44 
45 int ofx_proc_security_cb(struct OfxSecurityData data, void * security_data)
46 {
47  char dest_string[255];
48  cout << "ofx_proc_security():\n";
49  if (data.unique_id_valid == true)
50  {
51  cout << " Unique ID of the security being traded: " << data.unique_id << "\n";
52  }
53  if (data.unique_id_type_valid == true)
54  {
55  cout << " Format of the Unique ID: " << data.unique_id_type << "\n";
56  }
57  if (data.secname_valid == true)
58  {
59  cout << " Name of the security: " << data.secname << "\n";
60  }
61  if (data.ticker_valid == true)
62  {
63  cout << " Ticker symbol: " << data.ticker << "\n";
64  }
65  if (data.unitprice_valid == true)
66  {
67  cout << " Price of each unit of the security: " << data.unitprice << "\n";
68  }
69  if (data.date_unitprice_valid == true)
70  {
71  strftime(dest_string, sizeof(dest_string), "%c %Z", localtime(&(data.date_unitprice)));
72  cout << " Date as of which the unitprice is valid: " << dest_string << "\n";
73  }
74  if (data.currency_valid == true)
75  {
76  cout << " Currency of the unitprice: " << data.currency << "\n";
77  }
78  if (data.memo_valid == true)
79  {
80  cout << " Extra transaction information (memo): " << data.memo << "\n";
81  }
82  cout << "\n";
83  return 0;
84 }
85 
86 int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_data)
87 {
88  char dest_string[255];
89  cout << "ofx_proc_transaction():\n";
90 
91  if (data.account_id_valid == true)
92  {
93  cout << " Account ID : " << data.account_id << "\n";
94  }
95 
96  if (data.transactiontype_valid == true)
97  {
98  if (data.transactiontype == OFX_CREDIT)
99  strncpy(dest_string, "CREDIT: Generic credit", sizeof(dest_string));
100  else if (data.transactiontype == OFX_DEBIT)
101  strncpy(dest_string, "DEBIT: Generic debit", sizeof(dest_string));
102  else if (data.transactiontype == OFX_INT)
103  strncpy(dest_string, "INT: Interest earned or paid (Note: Depends on signage of amount)", sizeof(dest_string));
104  else if (data.transactiontype == OFX_DIV)
105  strncpy(dest_string, "DIV: Dividend", sizeof(dest_string));
106  else if (data.transactiontype == OFX_FEE)
107  strncpy(dest_string, "FEE: FI fee", sizeof(dest_string));
108  else if (data.transactiontype == OFX_SRVCHG)
109  strncpy(dest_string, "SRVCHG: Service charge", sizeof(dest_string));
110  else if (data.transactiontype == OFX_DEP)
111  strncpy(dest_string, "DEP: Deposit", sizeof(dest_string));
112  else if (data.transactiontype == OFX_ATM)
113  strncpy(dest_string, "ATM: ATM debit or credit (Note: Depends on signage of amount)", sizeof(dest_string));
114  else if (data.transactiontype == OFX_POS)
115  strncpy(dest_string, "POS: Point of sale debit or credit (Note: Depends on signage of amount)", sizeof(dest_string));
116  else if (data.transactiontype == OFX_XFER)
117  strncpy(dest_string, "XFER: Transfer", sizeof(dest_string));
118  else if (data.transactiontype == OFX_CHECK)
119  strncpy(dest_string, "CHECK: Check", sizeof(dest_string));
120  else if (data.transactiontype == OFX_PAYMENT)
121  strncpy(dest_string, "PAYMENT: Electronic payment", sizeof(dest_string));
122  else if (data.transactiontype == OFX_CASH)
123  strncpy(dest_string, "CASH: Cash withdrawal", sizeof(dest_string));
124  else if (data.transactiontype == OFX_DIRECTDEP)
125  strncpy(dest_string, "DIRECTDEP: Direct deposit", sizeof(dest_string));
126  else if (data.transactiontype == OFX_DIRECTDEBIT)
127  strncpy(dest_string, "DIRECTDEBIT: Merchant initiated debit", sizeof(dest_string));
128  else if (data.transactiontype == OFX_REPEATPMT)
129  strncpy(dest_string, "REPEATPMT: Repeating payment/standing order", sizeof(dest_string));
130  else if (data.transactiontype == OFX_OTHER)
131  strncpy(dest_string, "OTHER: Other", sizeof(dest_string));
132  else
133  strncpy(dest_string, "Unknown transaction type", sizeof(dest_string));
134  cout << " Transaction type: " << dest_string << "\n";
135  }
136 
137 
138  if (data.date_initiated_valid == true)
139  {
140  strftime(dest_string, sizeof(dest_string), "%c %Z", localtime(&(data.date_initiated)));
141  cout << " Date initiated: " << dest_string << "\n";
142  }
143  if (data.date_posted_valid == true)
144  {
145  strftime(dest_string, sizeof(dest_string), "%c %Z", localtime(&(data.date_posted)));
146  cout << " Date posted: " << dest_string << "\n";
147  }
148  if (data.date_funds_available_valid == true)
149  {
150  strftime(dest_string, sizeof(dest_string), "%c %Z", localtime(&(data.date_funds_available)));
151  cout << " Date funds are available: " << dest_string << "\n";
152  }
153  if (data.amount_valid == true)
154  {
155  cout << " Total money amount: " << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2) << data.amount << "\n";
156  }
157  if (data.units_valid == true)
158  {
159  cout << " # of units: " << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2) << data.units << "\n";
160  }
161  if (data.oldunits_valid == true)
162  {
163  cout << " # of units before split: " << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2) << data.oldunits << "\n";
164  }
165  if (data.newunits_valid == true)
166  {
167  cout << " # of units after split: " << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2) << data.newunits << "\n";
168  }
169  if (data.unitprice_valid == true)
170  {
171  cout << " Unit price: " << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2) << data.unitprice << "\n";
172  }
173  if (data.fees_valid == true)
174  {
175  cout << " Fees: " << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2) << data.fees << "\n";
176  }
177  if (data.commission_valid == true)
178  {
179  cout << " Commission: " << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2) << data.commission << "\n";
180  }
181  if (data.fi_id_valid == true)
182  {
183  cout << " Financial institution's ID for this transaction: " << data.fi_id << "\n";
184  }
185  if (data.fi_id_corrected_valid == true)
186  {
187  cout << " Financial institution ID replaced or corrected by this transaction: " << data.fi_id_corrected << "\n";
188  }
189  if (data.fi_id_correction_action_valid == true)
190  {
191  cout << " Action to take on the corrected transaction: ";
192  if (data.fi_id_correction_action == DELETE)
193  cout << "DELETE\n";
194  else if (data.fi_id_correction_action == REPLACE)
195  cout << "REPLACE\n";
196  else
197  cout << "ofx_proc_transaction(): This should not happen!\n";
198  }
199  if (data.invtransactiontype_valid == true)
200  {
201  cout << " Investment transaction type: ";
202  if (data.invtransactiontype == OFX_BUYDEBT)
203  strncpy(dest_string, "BUYDEBT (Buy debt security)", sizeof(dest_string));
204  else if (data.invtransactiontype == OFX_BUYMF)
205  strncpy(dest_string, "BUYMF (Buy mutual fund)", sizeof(dest_string));
206  else if (data.invtransactiontype == OFX_BUYOPT)
207  strncpy(dest_string, "BUYOPT (Buy option)", sizeof(dest_string));
208  else if (data.invtransactiontype == OFX_BUYOTHER)
209  strncpy(dest_string, "BUYOTHER (Buy other security type)", sizeof(dest_string));
210  else if (data.invtransactiontype == OFX_BUYSTOCK)
211  strncpy(dest_string, "BUYSTOCK (Buy stock))", sizeof(dest_string));
212  else if (data.invtransactiontype == OFX_CLOSUREOPT)
213  strncpy(dest_string, "CLOSUREOPT (Close a position for an option)", sizeof(dest_string));
214  else if (data.invtransactiontype == OFX_INCOME)
215  strncpy(dest_string, "INCOME (Investment income is realized as cash into the investment account)", sizeof(dest_string));
216  else if (data.invtransactiontype == OFX_INVEXPENSE)
217  strncpy(dest_string, "INVEXPENSE (Misc investment expense that is associated with a specific security)", sizeof(dest_string));
218  else if (data.invtransactiontype == OFX_JRNLFUND)
219  strncpy(dest_string, "JRNLFUND (Journaling cash holdings between subaccounts within the same investment account)", sizeof(dest_string));
220  else if (data.invtransactiontype == OFX_MARGININTEREST)
221  strncpy(dest_string, "MARGININTEREST (Margin interest expense)", sizeof(dest_string));
222  else if (data.invtransactiontype == OFX_REINVEST)
223  strncpy(dest_string, "REINVEST (Reinvestment of income)", sizeof(dest_string));
224  else if (data.invtransactiontype == OFX_RETOFCAP)
225  strncpy(dest_string, "RETOFCAP (Return of capital)", sizeof(dest_string));
226  else if (data.invtransactiontype == OFX_SELLDEBT)
227  strncpy(dest_string, "SELLDEBT (Sell debt security. Used when debt is sold, called, or reached maturity)", sizeof(dest_string));
228  else if (data.invtransactiontype == OFX_SELLMF)
229  strncpy(dest_string, "SELLMF (Sell mutual fund)", sizeof(dest_string));
230  else if (data.invtransactiontype == OFX_SELLOPT)
231  strncpy(dest_string, "SELLOPT (Sell option)", sizeof(dest_string));
232  else if (data.invtransactiontype == OFX_SELLOTHER)
233  strncpy(dest_string, "SELLOTHER (Sell other type of security)", sizeof(dest_string));
234  else if (data.invtransactiontype == OFX_SELLSTOCK)
235  strncpy(dest_string, "SELLSTOCK (Sell stock)", sizeof(dest_string));
236  else if (data.invtransactiontype == OFX_SPLIT)
237  strncpy(dest_string, "SPLIT (Stock or mutial fund split)", sizeof(dest_string));
238  else if (data.invtransactiontype == OFX_TRANSFER)
239  strncpy(dest_string, "TRANSFER (Transfer holdings in and out of the investment account)", sizeof(dest_string));
240  else
241  strncpy(dest_string, "ERROR, this investment transaction type is unknown. This is a bug in ofxdump", sizeof(dest_string));
242 
243  cout << dest_string << "\n";
244  }
245  if (data.unique_id_valid == true)
246  {
247  cout << " Unique ID of the security being traded: " << data.unique_id << "\n";
248  }
249  if (data.unique_id_type_valid == true)
250  {
251  cout << " Format of the Unique ID: " << data.unique_id_type << "\n";
252  }
253  if (data.security_data_valid == true)
254  {
255  ofx_proc_security_cb(*(data.security_data_ptr), NULL );
256  }
257 
258  if (data.server_transaction_id_valid == true)
259  {
260  cout << " Server's transaction ID (confirmation number): " << data.server_transaction_id << "\n";
261  }
262  if (data.check_number_valid == true)
263  {
264  cout << " Check number: " << data.check_number << "\n";
265  }
266  if (data.reference_number_valid == true)
267  {
268  cout << " Reference number: " << data.reference_number << "\n";
269  }
270  if (data.standard_industrial_code_valid == true)
271  {
272  cout << " Standard Industrial Code: " << data.standard_industrial_code << "\n";
273  }
274  if (data.payee_id_valid == true)
275  {
276  cout << " Payee_id: " << data.payee_id << "\n";
277  }
278  if (data.name_valid == true)
279  {
280  cout << " Name of payee or transaction description: " << data.name << "\n";
281  }
282  if (data.memo_valid == true)
283  {
284  cout << " Extra transaction information (memo): " << data.memo << "\n";
285  }
286  cout << "\n";
287  return 0;
288 }//end ofx_proc_transaction()
289 
290 int ofx_proc_statement_cb(struct OfxStatementData data, void * statement_data)
291 {
292  char dest_string[255];
293  cout << "ofx_proc_statement():\n";
294  if (data.currency_valid == true)
295  {
296  cout << " Currency: " << data.currency << "\n";
297  }
298  if (data.account_id_valid == true)
299  {
300  cout << " Account ID: " << data.account_id << "\n";
301  }
302  if (data.date_start_valid == true)
303  {
304  strftime(dest_string, sizeof(dest_string), "%c %Z", localtime(&(data.date_start)));
305  cout << " Start date of this statement: " << dest_string << "\n";
306  }
307  if (data.date_end_valid == true)
308  {
309  strftime(dest_string, sizeof(dest_string), "%c %Z", localtime(&(data.date_end)));
310  cout << " End date of this statement: " << dest_string << "\n";
311  }
312  if (data.ledger_balance_valid == true)
313  {
314  cout << " Ledger balance: " << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2) << data.ledger_balance << "\n";
315  }
316  if (data.ledger_balance_date_valid == true)
317  {
318  strftime(dest_string, sizeof(dest_string), "%c %Z", localtime(&(data.ledger_balance_date)));
319  cout << " Ledger balance date: " << dest_string << "\n";
320  }
321  if (data.available_balance_valid == true)
322  {
323  cout << " Available balance: " << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2) << data.available_balance << "\n";
324  }
325  if (data.available_balance_date_valid == true)
326  {
327  strftime(dest_string, sizeof(dest_string), "%c %Z", localtime(&(data.available_balance_date)));
328  cout << " Ledger balance date: " << dest_string << "\n";
329  }
330  if (data.marketing_info_valid == true)
331  {
332  cout << " Marketing information: " << data.marketing_info << "\n";
333  }
334  cout << "\n";
335  return 0;
336 }//end ofx_proc_statement()
337 
338 int ofx_proc_account_cb(struct OfxAccountData data, void * account_data)
339 {
340  cout << "ofx_proc_account():\n";
341  if (data.account_id_valid == true)
342  {
343  cout << " Account ID: " << data.account_id << "\n";
344  cout << " Account name: " << data.account_name << "\n";
345  }
346  if (data.account_type_valid == true)
347  {
348  cout << " Account type: ";
349  switch (data.account_type)
350  {
352  cout << "CHECKING\n";
353  break;
355  cout << "SAVINGS\n";
356  break;
358  cout << "MONEYMRKT\n";
359  break;
361  cout << "CREDITLINE\n";
362  break;
364  cout << "CMA\n";
365  break;
367  cout << "CREDITCARD\n";
368  break;
370  cout << "INVESTMENT\n";
371  break;
372  default:
373  cout << "ofx_proc_account() WRITEME: This is an unknown account type!";
374  }
375  }
376  if (data.currency_valid == true)
377  {
378  cout << " Currency: " << data.currency << "\n";
379  }
380 
381  if (data.bank_id_valid)
382  cout << " Bank ID: " << data.bank_id << endl;;
383 
384  if (data.branch_id_valid)
385  cout << " Branch ID: " << data.branch_id << endl;
386 
387  if (data.account_number_valid)
388  cout << " Account #: " << data.account_number << endl;
389 
390  cout << "\n";
391  return 0;
392 }//end ofx_proc_account()
393 
394 
395 
396 int ofx_proc_status_cb(struct OfxStatusData data, void * status_data)
397 {
398  cout << "ofx_proc_status():\n";
399  if (data.ofx_element_name_valid == true)
400  {
401  cout << " Ofx entity this status is relevent to: " << data.ofx_element_name << " \n";
402  }
403  if (data.severity_valid == true)
404  {
405  cout << " Severity: ";
406  switch (data.severity)
407  {
408  case OfxStatusData::INFO :
409  cout << "INFO\n";
410  break;
411  case OfxStatusData::WARN :
412  cout << "WARN\n";
413  break;
414  case OfxStatusData::ERROR :
415  cout << "ERROR\n";
416  break;
417  default:
418  cout << "WRITEME: Unknown status severity!\n";
419  }
420  }
421  if (data.code_valid == true)
422  {
423  cout << " Code: " << data.code << ", name: " << data.name << "\n Description: " << data.description << "\n";
424  }
425  if (data.server_message_valid == true)
426  {
427  cout << " Server Message: " << data.server_message << "\n";
428  }
429  cout << "\n";
430  return 0;
431 }
432 
433 
434 int main (int argc, char *argv[])
435 {
436  gengetopt_args_info args_info;
437 
438  /* let's call our cmdline parser */
439  if (cmdline_parser (argc, argv, &args_info) != 0)
440  exit(1) ;
441 
442  // if (args_info.msg_parser_given)
443  // cout << "The msg_parser option was given!" << endl;
444 
445  // cout << "The flag is " << ( args_info.msg_parser_flag ? "on" : "off" ) <<
446  // "." << endl ;
447  args_info.msg_parser_flag ? ofx_PARSER_msg = true : ofx_PARSER_msg = false;
448  args_info.msg_debug_flag ? ofx_DEBUG_msg = true : ofx_DEBUG_msg = false;
449  args_info.msg_warning_flag ? ofx_WARNING_msg = true : ofx_WARNING_msg = false;
450  args_info.msg_error_flag ? ofx_ERROR_msg = true : ofx_ERROR_msg = false;
451  args_info.msg_info_flag ? ofx_INFO_msg = true : ofx_INFO_msg = false;
452  args_info.msg_status_flag ? ofx_STATUS_msg = true : ofx_STATUS_msg;
453 
454  bool skiphelp = false;
455 
456  if (args_info.list_import_formats_given)
457  {
458  skiphelp = true;
459  cout << "The supported file formats for the 'input-file-format' argument are:" << endl;
460  for (int i = 0; LibofxImportFormatList[i].format != LAST; i++)
461  {
462  cout << " " << LibofxImportFormatList[i].description << endl;
463  }
464  }
465 
466  LibofxContextPtr libofx_context = libofx_get_new_context();
467 
468  //char **inputs ; /* unamed options */
469  //unsigned inputs_num ; /* unamed options number */
470  if (args_info.inputs_num > 0)
471  {
472  const char* filename = args_info.inputs[0];
473 
474 
475  ofx_set_statement_cb(libofx_context, ofx_proc_statement_cb, 0);
476  ofx_set_account_cb(libofx_context, ofx_proc_account_cb, 0);
477  ofx_set_transaction_cb(libofx_context, ofx_proc_transaction_cb, 0);
478  ofx_set_security_cb(libofx_context, ofx_proc_security_cb, 0);
479  ofx_set_status_cb(libofx_context, ofx_proc_status_cb, 0);
480 
481  enum LibofxFileFormat file_format = libofx_get_file_format_from_str(LibofxImportFormatList, args_info.import_format_arg);
483  if (args_info.inputs_num > 1)
484  {
485  cout << "Sorry, currently, only the first file is processed as the library can't deal with more right now. The following files were ignored:" << endl;
486  for ( unsigned i = 1 ; i < args_info.inputs_num ; ++i )
487  {
488  cout << "file: " << args_info.inputs[i] << endl ;
489  }
490  }
491  libofx_proc_file(libofx_context, args_info.inputs[0], file_format);
492  }
493  else
494  {
495  if ( !skiphelp )
497  }
498  return 0;
499 }
time_t ledger_balance_date
Definition: inc/libofx.h:660
int msg_info_flag
Output informational messages about the progress of the library (default=on).
Definition: cmdline.h:58
An abstraction of an account.
Definition: inc/libofx.h:270
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.
int msg_warning_flag
Output warning messages about abnormal conditions and unknown constructs (default=on).
Definition: cmdline.h:54
char * import_format_arg
Force the file format of the file(s) specified (default='AUTODETECT').
Definition: cmdline.h:46
Where the command line options are stored.
Definition: cmdline.h:42
enum LibofxFileFormat format
Definition: inc/libofx.h:134
char reference_number[OFX_REFERENCE_NUMBER_LENGTH]
Definition: inc/libofx.h:583
double available_balance
Definition: inc/libofx.h:668
char unique_id[OFX_UNIQUE_ID_LENGTH]
Definition: inc/libofx.h:530
char account_id[OFX_ACCOUNT_ID_LENGTH]
Definition: inc/libofx.h:284
const char * description
Definition: inc/libofx.h:136
const char * description
Definition: inc/libofx.h:224
char fi_id_corrected[256]
Definition: inc/libofx.h:562
char currency[OFX_CURRENCY_LENGTH]
Definition: inc/libofx.h:309
char check_number[OFX_CHECK_NUMBER_LENGTH]
Definition: inc/libofx.h:578
char name[OFX_TRANSACTION_NAME_LENGTH]
Definition: inc/libofx.h:593
char marketing_info[OFX_MARKETING_INFO_LENGTH]
Definition: inc/libofx.h:692
char memo[OFX_MEMO2_LENGTH]
Definition: inc/libofx.h:597
FiIdCorrectionAction fi_id_correction_action
Definition: inc/libofx.h:567
int msg_debug_flag
Output messages meant for debuging (default=off).
Definition: cmdline.h:52
unsigned int list_import_formats_given
Whether list-import-formats was given.
Definition: cmdline.h:66
char currency[OFX_CURRENCY_LENGTH]
Definition: inc/libofx.h:387
int ofx_STATUS_msg
Definition: messages.cpp:37
int ofx_WARNING_msg
Definition: messages.cpp:39
LibofxContextPtr libofx_get_new_context()
Initialise the library and return a new context.
Definition: context.cpp:153
int ofx_PARSER_msg
Definition: messages.cpp:30
long int standard_industrial_code
Definition: inc/libofx.h:586
char account_id[OFX_ACCOUNT_ID_LENGTH]
Definition: inc/libofx.h:649
char memo[OFX_MEMO2_LENGTH]
Definition: inc/libofx.h:390
void ofx_set_statement_cb(LibofxContextPtr ctx, LibofxProcStatementCallback cb, void *user_data)
Definition: context.cpp:213
void ofx_set_status_cb(LibofxContextPtr ctx, LibofxProcStatusCallback cb, void *user_data)
Definition: context.cpp:178
void ofx_set_account_cb(LibofxContextPtr ctx, LibofxProcAccountCallback cb, void *user_data)
Definition: context.cpp:186
char account_id[OFX_ACCOUNT_ID_LENGTH]
Definition: inc/libofx.h:482
char unique_id[OFX_UNIQUE_ID_LENGTH]
Definition: inc/libofx.h:360
char account_name[OFX_ACCOUNT_NAME_LENGTH]
Definition: inc/libofx.h:291
char * server_message
Definition: inc/libofx.h:241
time_t date_unitprice
Definition: inc/libofx.h:382
char server_transaction_id[OFX_SVRTID2_LENGTH]
Definition: inc/libofx.h:572
char bank_id[OFX_BANKID_LENGTH]
Definition: inc/libofx.h:317
int msg_error_flag
Output error messages (default=on).
Definition: cmdline.h:56
An abstraction of an OFX STATUS element.
Definition: inc/libofx.h:208
int cmdline_parser(int argc, char **argv, struct gengetopt_args_info *args_info)
Definition: cmdline.c:304
void ofx_set_security_cb(LibofxContextPtr ctx, LibofxProcSecurityCallback cb, void *user_data)
Definition: context.cpp:195
void cmdline_parser_print_help(void)
Definition: cmdline.c:143
double unitprice
Definition: inc/libofx.h:378
unsigned inputs_num
unamed options number
Definition: cmdline.h:75
char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH]
Definition: inc/libofx.h:363
int msg_status_flag
Output status messages (default=on).
Definition: cmdline.h:60
int msg_parser_flag
Output file parsing messages (default=off).
Definition: cmdline.h:50
int ofx_ERROR_msg
Definition: messages.cpp:40
int available_balance_date_valid
Definition: inc/libofx.h:674
char ticker[OFX_TICKER_LENGTH]
Definition: inc/libofx.h:375
char payee_id[OFX_SVRTID2_LENGTH]
Definition: inc/libofx.h:590
An abstraction of a security, such as a stock, mutual fund, etc.
Definition: inc/libofx.h:351
int ofx_element_name_valid
Definition: inc/libofx.h:216
void ofx_set_transaction_cb(LibofxContextPtr ctx, LibofxProcTransactionCallback cb, void *user_data)
Definition: context.cpp:204
int ofx_INFO_msg
Definition: messages.cpp:38
int main(int argc, char *argv[])
Definition: ofxdump.cpp:434
An abstraction of a transaction in an account.
Definition: inc/libofx.h:474
time_t date_funds_available
Definition: inc/libofx.h:554
LibofxFileFormat
Definition: inc/libofx.h:122
The header file for the command line option parser generated by GNU Gengetopt version 2...
int libofx_proc_file(LibofxContextPtr libofx_context, const char *p_filename, enum LibofxFileFormat ftype)
libofx_proc_file is the entry point of the library.
const char * name
Definition: inc/libofx.h:223
char account_number[OFX_ACCTID_LENGTH]
Definition: inc/libofx.h:313
int ofx_DEBUG_msg
Definition: messages.cpp:31
char unique_id_type[OFX_UNIQUE_ID_TYPE_LENGTH]
Definition: inc/libofx.h:532
char currency[OFX_CURRENCY_LENGTH]
Definition: inc/libofx.h:646
double ledger_balance
Definition: inc/libofx.h:657
char ** inputs
unamed options (options without names)
Definition: cmdline.h:74
An abstraction of an account statement.
Definition: inc/libofx.h:636
char secname[OFX_SECNAME_LENGTH]
Definition: inc/libofx.h:367