45 message_out(
INFO,
"Created OfxDummyContainer to hold unsupported aggregate " + para_tag_identifier);
76 memset(&data, 0,
sizeof(data));
78 if (parentcontainer != NULL)
80 strncpy(data.ofx_element_name, parentcontainer->
tag_identifier.c_str(), OFX_ELEMENT_NAME_LENGTH);
81 data.ofx_element_name_valid =
true;
85 OfxStatusContainer::~OfxStatusContainer()
89 libofx_context->statusCallback(data);
91 if ( data.server_message_valid )
92 delete [] data.server_message;
99 if ( identifier ==
"CODE")
101 data.
code = atoi(value.c_str());
103 data.name = error_msg.name;
104 data.description = error_msg.description;
105 data.code_valid =
true;
107 else if (identifier ==
"SEVERITY")
109 data.severity_valid =
true;
114 else if (value ==
"WARN")
118 else if (value ==
"ERROR")
125 data.severity_valid =
false;
128 else if ((identifier ==
"MESSAGE") || (identifier ==
"MESSAGE2"))
130 data.server_message =
new char[value.length() + 1];
131 strcpy(data.server_message, value.c_str());
132 data.server_message_valid =
true;
150 amount_valid =
false;
152 margin_balance_valid =
false;
153 short_balance_valid =
false;
154 buying_power_valid =
false;
158 OfxBalanceContainer::~OfxBalanceContainer()
160 if (parentcontainer->
type ==
"STATEMENT")
166 message_out (
ERROR,
"I completed a " +
type +
" element, but I haven't found a suitable parent to save it");
171 if (identifier ==
"BALAMT" ||
172 identifier ==
"AVAILCASH" ||
173 identifier ==
"CASHBAL")
178 else if (identifier ==
"MARGINBALANCE")
181 margin_balance_valid =
true;
183 else if (identifier ==
"SHORTBALANCE")
186 short_balance_valid =
true;
188 else if (identifier ==
"BUYPOWER")
191 buying_power_valid =
true;
193 else if (identifier ==
"DTASOF")
216 message_out(
INFO,
"Created OfxInv401kContainer to hold unsupported aggregate " + para_tag_identifier);
220 if (identifier ==
"DTSTART" || identifier ==
"DTEND" || identifier ==
"DTASOF")
double ofxamount_to_double(const string ofxamount)
Convert OFX amount of money to double float.
void add_attribute(const string identifier, const string value)
Add data to a container object.
A generic container for an OFX SGML element. Every container inherits from OfxGenericContainer.
Various simple functions for type conversion & al.
virtual void add_attribute(const string identifier, const string value)
Add data to a container object.
time_t ofxdate_to_time_t(const string ofxdate)
Convert a C++ string containing a time in OFX format to a C time_t.
void add_attribute(const string identifier, const string value)
Add data to a container object.
int message_out(OfxMsgType error_type, const string message)
Message output function.
LibOFX internal object code.
Represents a statement for either a bank account or a credit card account.
Message IO functionality.
void add_attribute(const string identifier, const string value)
Add data to a container object.
void add_attribute(const string identifier, const string value)
Add data to a container object.
const ErrorMsg find_error_msg(int param_code)
Retreive error code descriptions.
An abstraction of an OFX error code sent by an OFX server.
OFX error code management functionnality.
The root container. Created by the <OFX> OFX element or by the export functions.
void add_attribute(const string identifier, const string value)
Add data to a container object.