diff options
author | John Wiegley <johnw@newartisans.com> | 2009-06-24 02:44:07 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-06-24 02:44:07 +0100 |
commit | 440124eacc9f7fde993e87968ca9e65ffa309f11 (patch) | |
tree | c86839186bee5c4951ad98491d02625e9c276669 /src/commodity.h | |
parent | 72a2eaa38e68b886a567da2afda8f08b1929e3b6 (diff) | |
download | fork-ledger-440124eacc9f7fde993e87968ca9e65ffa309f11.tar.gz fork-ledger-440124eacc9f7fde993e87968ca9e65ffa309f11.tar.bz2 fork-ledger-440124eacc9f7fde993e87968ca9e65ffa309f11.zip |
Restored --download, although not done yet
The problem at this point is that it's recording prices in the price
database multiple times; it should only need to download a price for
each commodity once per day.
Diffstat (limited to 'src/commodity.h')
-rw-r--r-- | src/commodity.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/commodity.h b/src/commodity.h index c15a32f0..c678293e 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -86,7 +86,6 @@ public: struct history_t { history_map prices; - ptime last_lookup; void add_price(commodity_t& source, const datetime_t& date, @@ -332,6 +331,15 @@ public: // Methods related to parsing, reading, writing, etc., the commodity // itself. + static optional<path> price_db; + static long download_leeway; + static bool download_quotes; + + static optional<price_point_t> parse_commodity_price(char * line); + + optional<price_point_t> + download_quote(const optional<commodity_t&>& commodity = none) const; + static void parse_symbol(std::istream& in, string& symbol); static void parse_symbol(char *& p, string& symbol); static string parse_symbol(std::istream& in) { |