From 440124eacc9f7fde993e87968ca9e65ffa309f11 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 24 Jun 2009 02:44:07 +0100 Subject: 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. --- src/commodity.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/commodity.h') 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 price_db; + static long download_leeway; + static bool download_quotes; + + static optional parse_commodity_price(char * line); + + optional + download_quote(const optional& 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) { -- cgit v1.2.3