diff options
author | Dioksin <dioksin@ua.fm> | 2018-07-24 17:51:36 +0300 |
---|---|---|
committer | Dioksin <dioksin@ua.fm> | 2018-07-24 17:51:36 +0300 |
commit | c40552cd30b3e028abda8e01d9c0dd2ed6a03455 (patch) | |
tree | 92c3dfb834c28851201e709b35bc5a2b2fc01e86 /plugins | |
parent | 93286531b37b67dbbad71509e429ba2a1a9158e9 (diff) |
Quotes plugin redesign to use only exchange rates
Diffstat (limited to 'plugins')
29 files changed, 11 insertions, 3429 deletions
diff --git a/plugins/Quotes/docs/Utility/DukasCopy.py b/plugins/Quotes/docs/Utility/DukasCopy.py deleted file mode 100644 index 2d12d1c4ec..0000000000 --- a/plugins/Quotes/docs/Utility/DukasCopy.py +++ /dev/null @@ -1,48 +0,0 @@ -from html.parser import HTMLParser
-import sys
-
-class MyHTMLParser(HTMLParser):
- def __init__(self, in_fn,out_fn):
- HTMLParser.__init__(self)
- f_in = open(in_fn,'r')
- self.quote = 0
- self.descr = ''
- self.f_out = open(out_fn,'w')
- self.feed(f_in.read())
- f_in.close()
- self.f_out.close()
-
- def handle_starttag(self, tag, attrs):
- #print ("start of a %s" % tag)
- #print (attrs)
- self.start = 1
- if tag == 'input':
- self.f_out.write('\n<quote>')
- for k in attrs:
- if k[0] == 'stname':
- self.f_out.write('\n\t<symbol>%s</symbol>'%k[1])
- if k[0] == 'stid':
- self.f_out.write('\n\t<id>%s</id>'%k[1])
- self.quote = 1
-
-
- def handle_endtag(self, tag):
- self.start = 0
- if tag == 'tr' and self.quote == 1:
- if self.descr:
- self.f_out.write('\n\t<description>%s</description>'%self.descr)
- self.f_out.write('\n</quote>')
- self.quote = 0
- self.descr = 1
- #print ("end of a %s" % tag)
-
- def handle_data(self, data):
- if self.start == 1:
- self.descr = data
- #print ("Data %s" % self.descr)
-
-
-
-parser = MyHTMLParser(sys.argv[1],sys.argv[2])
-parser.close()
-
\ No newline at end of file diff --git a/plugins/Quotes/docs/Utility/Dukascopy.xml b/plugins/Quotes/docs/Utility/Dukascopy.xml deleted file mode 100644 index 92890888b9..0000000000 --- a/plugins/Quotes/docs/Utility/Dukascopy.xml +++ /dev/null @@ -1,1635 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-
-<Provider>
- <name>Dukascopy Swiss Forex Group</name>
- <ref>http://www.dukascopy.com</ref>
- <url>http://freeserv.dukascopy.com/qt/?&STOCKS=</url>
-
- <!--European Stocks-->
-
- <section>
- <name>European Stocks</name>
-
-<quote>
- <id>127</id>
- <symbol>BA</symbol>
- <description>BAE Systems</description>
-</quote>
-<quote>
- <id>130</id>
- <symbol>BKIR</symbol>
- <description>Bank of Ireland</description>
-</quote>
-<quote>
- <id>131</id>
- <symbol>BP</symbol>
- <description>British Petroleum</description>
-</quote>
-<quote>
- <id>138</id>
- <symbol>SBRY</symbol>
- <description>Sainsbury</description>
-</quote>
-<quote>
- <id>142</id>
- <symbol>AZN</symbol>
- <description>Astrazeneca</description>
-</quote>
-<quote>
- <id>145</id>
- <symbol>CNA</symbol>
- <description>Centrica</description>
-</quote>
-<quote>
- <id>153</id>
- <symbol>MKS</symbol>
- <description> Spencer</description>
-</quote>
-<quote>
- <id>155</id>
- <symbol>RTR</symbol>
- <description>Reuters Group</description>
-</quote>
-<quote>
- <id>156</id>
- <symbol>RR</symbol>
- <description>Rolls Royce</description>
-</quote>
-<quote>
- <id>158</id>
- <symbol>TSCO</symbol>
- <description>Tesco</description>
-</quote>
-<quote>
- <id>165</id>
- <symbol>ALV</symbol>
- <description>Alliaz AG</description>
-</quote>
-<quote>
- <id>167</id>
- <symbol>BAY</symbol>
- <description>Bayer AG</description>
-</quote>
-<quote>
- <id>169</id>
- <symbol>CBK</symbol>
- <description>Commerzbank AG</description>
-</quote>
-<quote>
- <id>171</id>
- <symbol>DBK</symbol>
- <description>Deutsche Bank AG</description>
-</quote>
-<quote>
- <id>177</id>
- <symbol>SIE</symbol>
- <description>Siemens AG</description>
-</quote>
-<quote>
- <id>178</id>
- <symbol>TKA</symbol>
- <description>Thyssenkrupp AG</description>
-</quote>
-<quote>
- <id>179</id>
- <symbol>VOW</symbol>
- <description>Volkswagen AG</description>
-</quote>
-<quote>
- <id>183</id>
- <symbol>FTE</symbol>
- <description>France Telecom</description>
-</quote>
-<quote>
- <id>191</id>
- <symbol>OR</symbol>
- <description>LOreal</description>
-</quote>
-<quote>
- <id>192</id>
- <symbol>ML</symbol>
- <description>Michelin</description>
-</quote>
-<quote>
- <id>193</id>
- <symbol>RNO</symbol>
- <description>Renault</description>
-</quote>
-<quote>
- <id>195</id>
- <symbol>UG</symbol>
- <description>Peugeot SA</description>
-</quote>
-<quote>
- <id>198</id>
- <symbol>LG</symbol>
- <description>Lafarge</description>
-</quote>
-<quote>
- <id>206</id>
- <symbol>PIN</symbol>
- <description>Pinguin</description>
-</quote>
-<quote>
- <id>213</id>
- <symbol>RBACW</symbol>
- <description>Rabo Agaath Bank</description>
-</quote>
-<quote>
- <id>221</id>
- <symbol>ABBN</symbol>
- <description>ABB Finance</description>
-</quote>
-<quote>
- <id>222</id>
- <symbol>ADEN</symbol>
- <description>Adecco SA</description>
-</quote>
-<quote>
- <id>224</id>
- <symbol>RUKN</symbol>
- <description>Swiss Reinsurance</description>
-</quote>
-<quote>
- <id>232</id>
- <symbol>GFC</symbol>
- <description>Gecina</description>
-</quote>
-<quote>
- <id>234</id>
- <symbol>VK</symbol>
- <description>Vallourec</description>
-</quote>
-<quote>
- <id>235</id>
- <symbol>FLE</symbol>
- <description>Fleury Michon</description>
-</quote>
-<quote>
- <id>242</id>
- <symbol>NEX</symbol>
- <description>National Express Group</description>
-</quote>
-<quote>
- <id>245</id>
- <symbol>IMT</symbol>
- <description>Imperial Tobacco</description>
-</quote>
-<quote>
- <id>338</id>
- <symbol>Pseudo</symbol>
- <description>Pseudo</description>
-</quote>
-<quote>
- <id>340</id>
- <symbol>Pseudo1</symbol>
- <description>Pseudo1</description>
-</quote>
-<quote>
- <id>321</id>
- <symbol>ROS</symbol>
- <description>OAO Rostelecom</description>
-</quote>
-<quote>
- <id>325</id>
- <symbol>FIA</symbol>
- <description>Fiat S.p.A.</description>
-</quote>
-<quote>
- <id>326</id>
- <symbol>E</symbol>
- <description>Eni S.p.A.</description>
-</quote>
-<quote>
- <id>327</id>
- <symbol>EN</symbol>
- <description>Enel S.p.A.</description>
-</quote>
-<quote>
- <id>152</id>
- <symbol>LLOY</symbol>
- <description>Lloyds TSB Bank</description>
-</quote>
-<quote>
- <id>226</id>
- <symbol>AKZA</symbol>
- <description>Akzo Nobel NV</description>
-</quote>
-<quote>
- <id>135</id>
- <symbol>BSY</symbol>
- <description>British Sky Broadcast</description>
-</quote>
-<quote>
- <id>144</id>
- <symbol>CW</symbol>
- <description> Wireless</description>
-</quote>
-<quote>
- <id>146</id>
- <symbol>GSK</symbol>
- <description>Glaxosmithkline</description>
-</quote>
-<quote>
- <id>149</id>
- <symbol>HSBA</symbol>
- <description>HSBC Bank</description>
-</quote>
-<quote>
- <id>151</id>
- <symbol>KGF</symbol>
- <description>Kingfisher</description>
-</quote>
-<quote>
- <id>166</id>
- <symbol>BAS</symbol>
- <description>BASF AG</description>
-</quote>
-<quote>
- <id>172</id>
- <symbol>DPW</symbol>
- <description>Deutsche Post AG</description>
-</quote>
-<quote>
- <id>173</id>
- <symbol>DTE</symbol>
- <description>Deutsche Telecom</description>
-</quote>
-<quote>
- <id>249</id>
- <symbol>CA</symbol>
- <description>Carrefour</description>
-</quote>
-<quote>
- <id>218</id>
- <symbol>NESN</symbol>
- <description>Nestle SA</description>
-</quote>
-<quote>
- <id>219</id>
- <symbol>UBSN</symbol>
- <description>UBS AG</description>
-</quote>
-<quote>
- <id>229</id>
- <symbol>DIE</symbol>
- <description>DIeteren Trading</description>
-</quote>
-<quote>
- <id>237</id>
- <symbol>GAM</symbol>
- <description>Gaumont</description>
-</quote>
-<quote>
- <id>238</id>
- <symbol>AGE</symbol>
- <description>AGFA Gevaert NV</description>
-</quote>
-<quote>
- <id>243</id>
- <symbol>CBRY</symbol>
- <description>Cadbury Schweppes</description>
-</quote>
-<quote>
- <id>246</id>
- <symbol>MLW</symbol>
- <description>Merrill Lynch World</description>
-</quote>
-<quote>
- <id>248</id>
- <symbol>MASN</symbol>
- <description>Micronas Semiconductors</description>
-</quote>
-<quote>
- <id>255</id>
- <symbol>ARE</symbol>
- <description>Groupe Ares</description>
-</quote>
-<quote>
- <id>200</id>
- <symbol>DELB</symbol>
- <description>Delhaize Group</description>
-</quote>
-<quote>
- <id>215</id>
- <symbol>PHIA</symbol>
- <description>Philips Electronics</description>
-</quote>
-<quote>
- <id>216</id>
- <symbol>CSGN</symbol>
- <description>Credit Suisse Groupe CAP</description>
-</quote>
-<quote>
- <id>772</id>
- <symbol>VOD</symbol>
- <description>VODAFONE </description>
-</quote>
-<quote>
- <id>773</id>
- <symbol>BA</symbol>
- <description>British Airways</description>
-</quote>
-
- </section>
-
- <!--US Stocks-->
-
- <section>
- <name>US Stocks</name>
-
-
-<quote>
- <id>99</id>
- <symbol>INTC</symbol>
- <description>Intel Corp.</description>
-</quote>
-<quote>
- <id>98</id>
- <symbol>QCOM</symbol>
- <description>QUALCOMM Incorporated</description>
-</quote>
-<quote>
- <id>97</id>
- <symbol>CSCO</symbol>
- <description>Cisco Systems, Inc.</description>
-</quote>
-<quote>
- <id>96</id>
- <symbol>AMGN</symbol>
- <description>Amgen Inc.</description>
-</quote>
-<quote>
- <id>94</id>
- <symbol>ORCL</symbol>
- <description>Oracle Corp.</description>
-</quote>
-<quote>
- <id>92</id>
- <symbol>MXIM</symbol>
- <description>Maxim Integrated Products, Inc.</description>
-</quote>
-<quote>
- <id>85</id>
- <symbol>SBUX</symbol>
- <description>Starbucks Corp.</description>
-</quote>
-<quote>
- <id>82</id>
- <symbol>CTAS</symbol>
- <description>Cintas Corp.</description>
-</quote>
-<quote>
- <id>81</id>
- <symbol>BMET</symbol>
- <description>Biomet, Inc.</description>
-</quote>
-<quote>
- <id>80</id>
- <symbol>PAYX</symbol>
- <description>Paychex, Inc</description>
-</quote>
-<quote>
- <id>79</id>
- <symbol>XLNX</symbol>
- <description>Xilinx, Inc.</description>
-</quote>
-<quote>
- <id>75</id>
- <symbol>FISV</symbol>
- <description>Fiserv, Inc.</description>
-</quote>
-<quote>
- <id>69</id>
- <symbol>COST</symbol>
- <description>Costco Wholesale Corp.</description>
-</quote>
-<quote>
- <id>64</id>
- <symbol>PCAR</symbol>
- <description>PACCAR Inc.</description>
-</quote>
-<quote>
- <id>62</id>
- <symbol>ADBE</symbol>
- <description>Adobe Systems Incorporated</description>
-</quote>
-<quote>
- <id>61</id>
- <symbol>SPLS</symbol>
- <description>Staples, Inc.</description>
-</quote>
-<quote>
- <id>33</id>
- <symbol>T</symbol>
- <description>T Corp.</description>
-</quote>
-<quote>
- <id>31</id>
- <symbol>AA</symbol>
- <description>Alcoa</description>
-</quote>
-<quote>
- <id>32</id>
- <symbol>AXP</symbol>
- <description>American Express Co.</description>
-</quote>
-<quote>
- <id>34</id>
- <symbol>BA</symbol>
- <description>The Boeing Co.</description>
-</quote>
-<quote>
- <id>35</id>
- <symbol>CAT</symbol>
- <description>Caterpillar Inc.</description>
-</quote>
-<quote>
- <id>36</id>
- <symbol>C</symbol>
- <description>Citigroup, Inc.</description>
-</quote>
-<quote>
- <id>37</id>
- <symbol>KO</symbol>
- <description>The Coca-Cola Co.</description>
-</quote>
-<quote>
- <id>40</id>
- <symbol>EK</symbol>
- <description>Eastman Kodak Co.</description>
-</quote>
-<quote>
- <id>43</id>
- <symbol>GM</symbol>
- <description>General Motors Corp.</description>
-</quote>
-<quote>
- <id>49</id>
- <symbol>JNJ</symbol>
- <description> Johnson</description>
-</quote>
-<quote>
- <id>50</id>
- <symbol>MCD</symbol>
- <description>McDonald's Corp.</description>
-</quote>
-<quote>
- <id>51</id>
- <symbol>MRK</symbol>
- <description>Merck Company, Inc.</description>
-</quote>
-<quote>
- <id>52</id>
- <symbol>MMM</symbol>
- <description>Manufacturing Co.</description>
-</quote>
-<quote>
- <id>53</id>
- <symbol>JPM</symbol>
- <description>J.P. Morgan Company Inc.</description>
-</quote>
-<quote>
- <id>57</id>
- <symbol>UTX</symbol>
- <description>United Technologies Corp.</description>
-</quote>
-<quote>
- <id>58</id>
- <symbol>WMT</symbol>
- <description>Wal-Mart Stores, Inc.</description>
-</quote>
-<quote>
- <id>104</id>
- <symbol>CDWC</symbol>
- <description>CDW Computer Centers, Inc.</description>
-</quote>
-<quote>
- <id>116</id>
- <symbol>SGA</symbol>
- <description>Saga Communications, Inc.</description>
-</quote>
-<quote>
- <id>118</id>
- <symbol>MPP</symbol>
- <description>Medical Technology System</description>
-</quote>
-<quote>
- <id>119</id>
- <symbol>ACU</symbol>
- <description>Acme United Corp.</description>
-</quote>
-<quote>
- <id>128</id>
- <symbol>BAL</symbol>
- <description>Barclays</description>
-</quote>
-<quote>
- <id>141</id>
- <symbol>RBS</symbol>
- <description>Royal Bank of Scotland</description>
-</quote>
-<quote>
- <id>250</id>
- <symbol>BMO</symbol>
- <description>Bank of Montreal</description>
-</quote>
-<quote>
- <id>254</id>
- <symbol>TRP</symbol>
- <description>TransCanada PipeLines Ltd</description>
-</quote>
-<quote>
- <id>329</id>
- <symbol>QQQQ</symbol>
- <description>TransCanada PipeLines Ltd</description>
-</quote>
-<quote>
- <id>330</id>
- <symbol>DIA</symbol>
- <description>TransCanada PipeLines Ltd</description>
-</quote>
-<quote>
- <id>332</id>
- <symbol>SMH</symbol>
- <description>TransCanada PipeLines Ltd</description>
-</quote>
-<quote>
- <id>122</id>
- <symbol>DW</symbol>
- <description>Drew Industries, Inc.</description>
-</quote>
-<quote>
- <id>123</id>
- <symbol>FPU</symbol>
- <description>Florida Public Utilities</description>
-</quote>
-<quote>
- <id>280</id>
- <symbol>NOK</symbol>
- <description>Nokia</description>
-</quote>
-<quote>
- <id>281</id>
- <symbol>UPM</symbol>
- <description>UPM-Kymmene OYJ</description>
-</quote>
-<quote>
- <id>282</id>
- <symbol>SEO</symbol>
- <description>Stora Enso OYJ</description>
-</quote>
-<quote>
- <id>287</id>
- <symbol>BEAS</symbol>
- <description>BEA System INC.</description>
-</quote>
-<quote>
- <id>288</id>
- <symbol>BRCD</symbol>
- <description>Brocade Communication System Inc.</description>
-</quote>
-<quote>
- <id>291</id>
- <symbol>CEPH</symbol>
- <description>Cephalon Inc.</description>
-</quote>
-<quote>
- <id>292</id>
- <symbol>CIEN</symbol>
- <description>Ciena Corp.</description>
-</quote>
-<quote>
- <id>293</id>
- <symbol>CHKP</symbol>
- <description>Checkpoint Software</description>
-</quote>
-<quote>
- <id>295</id>
- <symbol>DISH</symbol>
- <description>Echostar Communications</description>
-</quote>
-<quote>
- <id>100</id>
- <symbol>MSFT</symbol>
- <description>Microsoft Corp.</description>
-</quote>
-<quote>
- <id>95</id>
- <symbol>DELL</symbol>
- <description>Dell Computer Corp.</description>
-</quote>
-<quote>
- <id>91</id>
- <symbol>EBAY</symbol>
- <description>eBay Inc.</description>
-</quote>
-<quote>
- <id>88</id>
- <symbol>BBBY</symbol>
- <description>Beyond Inc.</description>
-</quote>
-<quote>
- <id>87</id>
- <symbol>LLTC</symbol>
- <description>Linear Technology Corp.</description>
-</quote>
-<quote>
- <id>84</id>
- <symbol>IACI</symbol>
- <description>USA Interactive</description>
-</quote>
-<quote>
- <id>76</id>
- <symbol>KLAC</symbol>
- <description>KLA-Tencor Corp.</description>
-</quote>
-<quote>
- <id>70</id>
- <symbol>APOL</symbol>
- <description>Apollo Group, Inc.</description>
-</quote>
-<quote>
- <id>68</id>
- <symbol>TEVA</symbol>
- <description>Teva Pharmaceutical Industries Limited</description>
-</quote>
-<quote>
- <id>65</id>
- <symbol>ALTR</symbol>
- <description>Altera Corp.</description>
-</quote>
-<quote>
- <id>63</id>
- <symbol>SYMC</symbol>
- <description>Symantec Corp.</description>
-</quote>
-<quote>
- <id>42</id>
- <symbol>GE</symbol>
- <description>General Electric Co.</description>
-</quote>
-<quote>
- <id>44</id>
- <symbol>HPQ</symbol>
- <description>Hewlett-Packard Co.</description>
-</quote>
-<quote>
- <id>46</id>
- <symbol>HON</symbol>
- <description>Honeywell International Inc.</description>
-</quote>
-<quote>
- <id>47</id>
- <symbol>IBM</symbol>
- <description>International Business Machines Corp.</description>
-</quote>
-<quote>
- <id>54</id>
- <symbol>MO</symbol>
- <description>Morris Companies, Inc.</description>
-</quote>
-<quote>
- <id>55</id>
- <symbol>PG</symbol>
- <description>Gamble Co.</description>
-</quote>
-<quote>
- <id>103</id>
- <symbol>FLEX</symbol>
- <description>Flextronics International Ltd.</description>
-</quote>
-<quote>
- <id>115</id>
- <symbol>OHB</symbol>
- <description>Orleans Homebuilders</description>
-</quote>
-<quote>
- <id>251</id>
- <symbol>BNS</symbol>
- <description>Bank of Nova Scotia</description>
-</quote>
-<quote>
- <id>252</id>
- <symbol>BCE</symbol>
- <description>BCE, Inc.</description>
-</quote>
-<quote>
- <id>331</id>
- <symbol>SPY</symbol>
- <description>BCE, Inc.</description>
-</quote>
-<quote>
- <id>286</id>
- <symbol>AMCC</symbol>
- <description>Applied Micro Circuit Corp.</description>
-</quote>
-<quote>
- <id>294</id>
- <symbol>CTXS</symbol>
- <description>Citrix Systems</description>
-</quote>
-<quote>
- <id>738</id>
- <symbol>MCHP</symbol>
- <description>Microchip Technology</description>
-</quote>
-<quote>
- <id>747</id>
- <symbol>NTE</symbol>
- <description>NAM TAI Electronics</description>
-</quote>
-<quote>
- <id>759</id>
- <symbol>TTWO</symbol>
- <description>Take-Two Interactive Software</description>
-</quote>
-<quote>
- <id>700</id>
- <symbol>ADI </symbol>
- <description>Analog Devices </description>
-</quote>
-<quote>
- <id>701</id>
- <symbol>ADTN</symbol>
- <description>Adtran </description>
-</quote>
-<quote>
- <id>702</id>
- <symbol>AIG</symbol>
- <description>American International Group</description>
-</quote>
-<quote>
- <id>703</id>
- <symbol>APA</symbol>
- <description>Apache Corp</description>
-</quote>
-<quote>
- <id>704</id>
- <symbol>BAC</symbol>
- <description>Bank of America Corp</description>
-</quote>
-<quote>
- <id>705</id>
- <symbol>BBY</symbol>
- <description>Best Buy Co </description>
-</quote>
-<quote>
- <id>706</id>
- <symbol>BIIB</symbol>
- <description>Biogen Idec </description>
-</quote>
-<quote>
- <id>707</id>
- <symbol>BOBJ</symbol>
- <description>Business Objects SA</description>
-</quote>
-<quote>
- <id>708</id>
- <symbol>BRCM</symbol>
- <description>Broadcom Corp</description>
-</quote>
-<quote>
- <id>709</id>
- <symbol>CALM</symbol>
- <description>Cal-Maine Foods </description>
-</quote>
-<quote>
- <id>710</id>
- <symbol>CCU</symbol>
- <description>Clear Channel Communications </description>
-</quote>
-<quote>
- <id>711</id>
- <symbol>COF</symbol>
- <description>Capital One Financial Corp</description>
-</quote>
-<quote>
- <id>714</id>
- <symbol>DLTR</symbol>
- <description>Dollar Tree Stores </description>
-</quote>
-<quote>
- <id>716</id>
- <symbol>FITB</symbol>
- <description>Fifth Third Bancorp</description>
-</quote>
-<quote>
- <id>717</id>
- <symbol>FNM</symbol>
- <description>Fannie Mae</description>
-</quote>
-<quote>
- <id>718</id>
- <symbol>FRE</symbol>
- <description>Freddie Mac</description>
-</quote>
-<quote>
- <id>719</id>
- <symbol>FRX</symbol>
- <description>Forest Laboratories </description>
-</quote>
-<quote>
- <id>720</id>
- <symbol>GCI</symbol>
- <description>Gannett Co </description>
-</quote>
-<quote>
- <id>721</id>
- <symbol>GD</symbol>
- <description>General Dynamics Corp</description>
-</quote>
-<quote>
- <id>724</id>
- <symbol>GS</symbol>
- <description>Goldman Sachs Group </description>
-</quote>
-<quote>
- <id>726</id>
- <symbol>HOV</symbol>
- <description>Hovnanian Enterprises </description>
-</quote>
-<quote>
- <id>727</id>
- <symbol>ICOS</symbol>
- <description>ICOS Corp</description>
-</quote>
-<quote>
- <id>728</id>
- <symbol>IMCL</symbol>
- <description>ImClone Systems</description>
-</quote>
-<quote>
- <id>731</id>
- <symbol>KSS</symbol>
- <description>Kohl's Corp</description>
-</quote>
-<quote>
- <id>732</id>
- <symbol>LEH</symbol>
- <description>Lehman Brothers Holdings Inc</description>
-</quote>
-<quote>
- <id>734</id>
- <symbol>LLY</symbol>
- <description> Co</description>
-</quote>
-<quote>
- <id>737</id>
- <symbol>LXK</symbol>
- <description>Lexmark International</description>
-</quote>
-<quote>
- <id>743</id>
- <symbol>NEM</symbol>
- <description>Newmont Mining Corp</description>
-</quote>
-<quote>
- <id>744</id>
- <symbol>NFLX</symbol>
- <description>NetFlix</description>
-</quote>
-<quote>
- <id>745</id>
- <symbol>NOC</symbol>
- <description>Northrop Grumman Corp</description>
-</quote>
-<quote>
- <id>748</id>
- <symbol>NTES</symbol>
- <description>Netease.com</description>
-</quote>
-<quote>
- <id>749</id>
- <symbol>NVLS</symbol>
- <description>Novellus Systems</description>
-</quote>
-<quote>
- <id>750</id>
- <symbol>OVTI</symbol>
- <description>Omnivision Technologies</description>
-</quote>
-<quote>
- <id>753</id>
- <symbol>RMBS</symbol>
- <description>Rambus</description>
-</quote>
-<quote>
- <id>755</id>
- <symbol>SINA</symbol>
- <description>Sina Corp</description>
-</quote>
-<quote>
- <id>756</id>
- <symbol>SNDK</symbol>
- <description>Sandisk Corp</description>
-</quote>
-<quote>
- <id>757</id>
- <symbol>SNPS</symbol>
- <description>Synopsys</description>
-</quote>
-<quote>
- <id>758</id>
- <symbol>SOHU</symbol>
- <description>Sohu.com</description>
-</quote>
-<quote>
- <id>760</id>
- <symbol>UTSI</symbol>
- <description>Utstarcom</description>
-</quote>
-<quote>
- <id>762</id>
- <symbol>WLP</symbol>
- <description>WellPoint Health Networks</description>
-</quote>
-<quote>
- <id>763</id>
- <symbol>WY</symbol>
- <description>Weyerhaeuser Co</description>
-</quote>
-<quote>
- <id>764</id>
- <symbol>XMSR</symbol>
- <description>XM Satellite Radio Holdings</description>
-</quote>
-<quote>
- <id>765</id>
- <symbol>YHOO</symbol>
- <description>Yahoo! </description>
-</quote>
-<quote>
- <id>38</id>
- <symbol>DIS</symbol>
- <description>The Walt Disney Co.</description>
-</quote>
-<quote>
- <id>39</id>
- <symbol>DD</symbol>
- <description>E.I. duPont de Nemours Co.</description>
-</quote>
-<quote>
- <id>78</id>
- <symbol>ERTS</symbol>
- <description>Electronic Arts Inc.</description>
-</quote>
-<quote>
- <id>77</id>
- <symbol>GENZ</symbol>
- <description>Genzyme General</description>
-</quote>
-<quote>
- <id>766</id>
- <symbol>GOOGL</symbol>
- <description>Google!</description>
-</quote>
-<quote>
- <id>45</id>
- <symbol>HD</symbol>
- <description>Home Depot Inc.</description>
-</quote>
-<quote>
- <id>48</id>
- <symbol>IP</symbol>
- <description>International Paper Co.</description>
-</quote>
-<quote>
- <id>121</id>
- <symbol>DLA</symbol>
- <description>Delta Apparel Inc.</description>
-</quote>
-<quote>
- <id>86</id>
- <symbol>AMAT</symbol>
- <description>Applied Materials, Inc.</description>
-</quote>
-<quote>
- <id>41</id>
- <symbol>XOM</symbol>
- <description>Exxon Mobil Corp.</description>
-</quote>
-<quote>
- <id>102</id>
- <symbol>AMZN</symbol>
- <description>Amazon.com, Inc.</description>
-</quote>
-<quote>
- <id>729</id>
- <symbol>IVGN</symbol>
- <description>Invitrogen Corp</description>
-</quote>
-<quote>
- <id>736</id>
- <symbol>LRCX</symbol>
- <description>Lam Research Corp</description>
-</quote>
-<quote>
- <id>712</id>
- <symbol>CTSH</symbol>
- <description>Cognizant Technology Solutions Corp</description>
-</quote>
-<quote>
- <id>713</id>
- <symbol>DHI</symbol>
- <description>DR Horton </description>
-</quote>
-<quote>
- <id>740</id>
- <symbol>MNST</symbol>
- <description>Monster Worldwide</description>
-</quote>
-
- </section>
-
-
- <!--Indices-->
-
- <section>
- <name>Indices</name>
- <!--on the basis of US Indices-->
- <section>
- <name>on the basis of US Indices</name>
-
-<quote>
- <id>22</id>
- <symbol>SandP-500</symbol>
- <description>P 500</description>
-</quote>
-<quote>
- <id>23</id>
- <symbol>NQ-100</symbol>
- <description>CFD statistics for Nasdaq 100</description>
-</quote>
-<quote>
- <id>28</id>
- <symbol>Nyssee-comp</symbol>
- <description>CFD statistics for NYSE Composite</description>
-</quote>
-<quote>
- <id>21</id>
- <symbol>D&J-Ind</symbol>
- <description>CFD statistics for Dow Jones Industrial Average</description>
-</quote>
-<quote>
- <id>26</id>
- <symbol>NQ-comp</symbol>
- <description>CFD statistics for Nasdaq Composite</description>
-</quote>
-<quote>
- <id>27</id>
- <symbol>AMMEKS</symbol>
- <description>CFD statistics for AMEX</description>
-</quote>
-<quote>
- <id>768</id>
- <symbol>VIXX</symbol>
- <description>Volatility Index</description>
-</quote>
-<quote>
- <id>769</id>
- <symbol>10Y note</symbol>
- <description>10Y note yield</description>
-</quote>
-<quote>
- <id>770</id>
- <symbol>5Y note</symbol>
- <description>5Y note yield</description>
-</quote>
-<quote>
- <id>771</id>
- <symbol>ST note</symbol>
- <description>Short term note yield</description>
-</quote>
-
- </section>
- <!--on the basis of European Indices-->
- <section>
- <name>on the basis of European Indices</name>
-
-<quote>
- <id>24</id>
- <symbol>CAAC-40</symbol>
- <description>CFD statistics for CAC 40</description>
-</quote>
-<quote>
- <id>25</id>
- <symbol>DAAX</symbol>
- <description>CFD statistics for XETRA DAX</description>
-</quote>
-<quote>
- <id>225</id>
- <symbol>SWMI</symbol>
- <description>CFD statistics for SMI</description>
-</quote>
-<quote>
- <id>345</id>
- <symbol>Futsee-100</symbol>
- <description>CFD statistics for FTSE</description>
-</quote>
-<quote>
- <id>503</id>
- <symbol>DJE50XX</symbol>
- <description>CFD statistics for DJ Euro Stoxx50</description>
-</quote>
-
- </section>
- <!--on the basis of Asian Indices-->
- <section>
- <name>on the basis of Asian Indices</name>
-
- <quote>
- <id>500</id>
- <symbol>N225Jap</symbol>
- <description>CFD statistics for Nikkei 225</description>
-</quote>
-<quote>
- <id>501</id>
- <symbol>SC-Korea</symbol>
- <description>CFD statistics for KOSPI</description>
-</quote>
-<quote>
- <id>502</id>
- <symbol>H-Kong</symbol>
- <description>CFD statistics for Hang Seng</description>
-</quote>
-
- </section>
- </section>
-
- <!--FOREX-->
- <section>
- <name>FOREX</name>
- <!--Major-->
- <section>
- <name>Major</name>
-
- <quote>
- <id>3</id>
- <symbol>USD/CHF</symbol>
- <description>USD/CHF</description>
-</quote>
-<quote>
- <id>9</id>
- <symbol>USD/CAD</symbol>
- <description>USD/CAD</description>
-</quote>
-<quote>
- <id>10</id>
- <symbol>AUD/USD</symbol>
- <description>AUD/USD</description>
-</quote>
-<quote>
- <id>11</id>
- <symbol>NZD/USD</symbol>
- <description>NZD/USD</description>
-</quote>
-<quote>
- <id>1</id>
- <symbol>EUR/USD</symbol>
- <description>EUR/USD</description>
-</quote>
-<quote>
- <id>2</id>
- <symbol>GBP/USD</symbol>
- <description>GBP/USD</description>
-</quote>
-
- </section>
- <!--Other Currencies-->
- <section>
- <name>Other Currencies</name>
-
-
-<quote>
- <id>12</id>
- <symbol>USD/NOK</symbol>
- <description>USD/NOK</description>
-</quote>
-<quote>
- <id>13</id>
- <symbol>USD/DKK</symbol>
- <description>USD/DKK</description>
-</quote>
-<quote>
- <id>14</id>
- <symbol>USD/SEK</symbol>
- <description>USD/SEK</description>
-</quote>
-<quote>
- <id>15</id>
- <symbol>USD/SAR</symbol>
- <description>USD/SAR</description>
-</quote>
-<quote>
- <id>507</id>
- <symbol>USD/EUR</symbol>
- <description>USD/EUR</description>
-</quote>
-<quote>
- <id>508</id>
- <symbol>USD/GBP</symbol>
- <description>USD/GBP</description>
-</quote>
-<quote>
- <id>512</id>
- <symbol>JPY/USD</symbol>
- <description>JPY/USD</description>
-</quote>
-<quote>
- <id>513</id>
- <symbol>JPY/EUR</symbol>
- <description>JPY/EUR</description>
-</quote>
-<quote>
- <id>516</id>
- <symbol>GBP/EUR</symbol>
- <description>GBP/EUR</description>
-</quote>
-<quote>
- <id>519</id>
- <symbol>CHF/USD</symbol>
- <description>CHF/USD</description>
-</quote>
-<quote>
- <id>521</id>
- <symbol>CHF/JPY</symbol>
- <description>CHF/JPY</description>
-</quote>
-<quote>
- <id>514</id>
- <symbol>JPY/GBP</symbol>
- <description>JPY/GBP</description>
-</quote>
-<quote>
- <id>515</id>
- <symbol>JPY/CHF</symbol>
- <description>JPY/CHF</description>
-</quote>
-<quote>
- <id>520</id>
- <symbol>CHF/EUR</symbol>
- <description>CHF/EUR</description>
-</quote>
-<quote>
- <id>522</id>
- <symbol>CHF/GBP</symbol>
- <description>CHF/GBP</description>
-</quote>
-<quote>
- <id>74</id>
- <symbol>USD/ZAR</symbol>
- <description>USD/ZAR</description>
-</quote>
-<quote>
- <id>30</id>
- <symbol>USD/SGD</symbol>
- <description>USD/SGD</description>
-</quote>
-<quote>
- <id>29</id>
- <symbol>EUR/SEK</symbol>
- <description>EUR/SEK</description>
-</quote>
- </section>
- <!--Crosses-->
- <section>
- <name>Crosses</name>
-
-
-<quote>
- <id>509</id>
- <symbol>EUR/JPY</symbol>
- <description>EUR/JPY</description>
-</quote>
-<quote>
- <id>510</id>
- <symbol>EUR/GBP</symbol>
- <description>EUR/GBP</description>
-</quote>
-<quote>
- <id>511</id>
- <symbol>EUR/CHF</symbol>
- <description>EUR/CHF</description>
-</quote>
-<quote>
- <id>517</id>
- <symbol>GBP/JPY</symbol>
- <description>GBP/JPY</description>
-</quote>
-<quote>
- <id>518</id>
- <symbol>GBP/CHF</symbol>
- <description>GBP/CHF</description>
-</quote>
-<quote>
- <id>60</id>
- <symbol>AUD/JPY</symbol>
- <description>AUD/JPY</description>
-</quote>
-<quote>
- <id>767</id>
- <symbol>CAD/JPY</symbol>
- <description>CAD/JPY</description>
-</quote>
- </section>
- <!--Other Arab Currencies-->
- <section>
- <name>Other Arab Currencies</name>
-
-
-<quote>
- <id>4</id>
- <symbol>USD/JPY</symbol>
- <description>USD/JPY</description>
-</quote>
-<quote>
- <id>5</id>
- <symbol>USD/EGP</symbol>
- <description>USD/EGP</description>
-</quote>
-<quote>
- <id>6</id>
- <symbol>USD/JOD</symbol>
- <description>USD/JOD</description>
-</quote>
-<quote>
- <id>7</id>
- <symbol>USD/QAR</symbol>
- <description>USD/QAR</description>
-</quote>
-<quote>
- <id>16</id>
- <symbol>USD/TND</symbol>
- <description>USD/TND</description>
-</quote>
-<quote>
- <id>17</id>
- <symbol>EUR/EGP</symbol>
- <description>EUR/EGP</description>
-</quote>
-<quote>
- <id>18</id>
- <symbol>EUR/JOD</symbol>
- <description>EUR/JOD</description>
-</quote>
-<quote>
- <id>19</id>
- <symbol>EUR/QAR</symbol>
- <description>EUR/QAR</description>
-</quote>
-<quote>
- <id>59</id>
- <symbol>EUR/TND</symbol>
- <description>EUR/TND</description>
-</quote>
-<quote>
- <id>523</id>
- <symbol>EGP/USD</symbol>
- <description>EGP/USD</description>
-</quote>
-<quote>
- <id>524</id>
- <symbol>EGP/EUR</symbol>
- <description>EGP/EUR</description>
-</quote>
-<quote>
- <id>527</id>
- <symbol>EGP/CHF</symbol>
- <description>EGP/CHF</description>
-</quote>
-<quote>
- <id>528</id>
- <symbol>JOD/USD</symbol>
- <description>JOD/USD</description>
-</quote>
-<quote>
- <id>529</id>
- <symbol>JOD/EUR</symbol>
- <description>JOD/EUR</description>
-</quote>
-<quote>
- <id>530</id>
- <symbol>JOD/JPY</symbol>
- <description>JOD/JPY</description>
-</quote>
-<quote>
- <id>531</id>
- <symbol>JOD/GBP</symbol>
- <description>JOD/GBP</description>
-</quote>
-<quote>
- <id>533</id>
- <symbol>JOD/CHF</symbol>
- <description>JOD/CHF</description>
-</quote>
-<quote>
- <id>534</id>
- <symbol>QAR/EUR</symbol>
- <description>QAR/EUR</description>
-</quote>
-<quote>
- <id>535</id>
- <symbol>QAR/USD</symbol>
- <description>QAR/USD</description>
-</quote>
-<quote>
- <id>536</id>
- <symbol>QAR/JPY</symbol>
- <description>QAR/JPY</description>
-</quote>
-<quote>
- <id>537</id>
- <symbol>QAR/GBP</symbol>
- <description>QAR/GBP</description>
-</quote>
-<quote>
- <id>538</id>
- <symbol>QAR/CHF</symbol>
- <description>QAR/CHF</description>
-</quote>
-<quote>
- <id>539</id>
- <symbol>SAR/USD</symbol>
- <description>SAR/USD</description>
-</quote>
-<quote>
- <id>540</id>
- <symbol>SAR/EUR</symbol>
- <description>SAR/EUR</description>
-</quote>
-<quote>
- <id>541</id>
- <symbol>SAR/JPY</symbol>
- <description>SAR/JPY</description>
-</quote>
-<quote>
- <id>542</id>
- <symbol>SAR/GBP</symbol>
- <description>SAR/GBP</description>
-</quote>
-<quote>
- <id>543</id>
- <symbol>GBP/SAR</symbol>
- <description>GBP/SAR</description>
-</quote>
-<quote>
- <id>544</id>
- <symbol>SAR/CHF</symbol>
- <description>SAR/CHF</description>
-</quote>
-<quote>
- <id>545</id>
- <symbol>TND/USD</symbol>
- <description>TND/USD</description>
-</quote>
-<quote>
- <id>546</id>
- <symbol>TND/EUR</symbol>
- <description>TND/EUR</description>
-</quote>
-<quote>
- <id>547</id>
- <symbol>TND/JPY</symbol>
- <description>TND/JPY</description>
-</quote>
-<quote>
- <id>548</id>
- <symbol>TND/GBP</symbol>
- <description>TND/GBP</description>
-</quote>
-<quote>
- <id>549</id>
- <symbol>TND/CHF</symbol>
- <description>TND/CHF</description>
-</quote>
-<quote>
- <id>20</id>
- <symbol>EUR/SAR</symbol>
- <description>EUR/SAR</description>
-</quote>
-<quote>
- <id>525</id>
- <symbol>EGP/JPY</symbol>
- <description>EGP/JPY</description>
-</quote>
-<quote>
- <id>526</id>
- <symbol>EGP/GBP</symbol>
- <description>EGP/GBP</description>
-</quote>
-<quote>
- <id>532</id>
- <symbol>GBP/JOD</symbol>
- <description>GBP/JOD</description>
-</quote>
-
- </section>
- </section>
-
- <!--Asian Stocks-->
- <section>
- <name>Asian Stocks</name>
-
-
-<quote>
- <id>307</id>
- <symbol>TSM</symbol>
- <description>Taiwan Semiconductor Mfg</description>
-</quote>
-<quote>
- <id>308</id>
- <symbol>SNE</symbol>
- <description>Sony Corp.</description>
-</quote>
-<quote>
- <id>310</id>
- <symbol>MITSY</symbol>
- <description>Mitsui Co., Ltd.</description>
-</quote>
-<quote>
- <id>314</id>
- <symbol>NSANY</symbol>
- <description>Nissan Motor Co., Ltd.</description>
-</quote>
-<quote>
- <id>317</id>
- <symbol>CAJ</symbol>
- <description>Canon, Inc.</description>
-</quote>
-<quote>
- <id>323</id>
- <symbol>CHL</symbol>
- <description>China Mobile Limited</description>
-</quote>
-<quote>
- <id>324</id>
- <symbol>SNP</symbol>
- <description>Chemical Corp.</description>
-</quote>
-<quote>
- <id>313</id>
- <symbol>HMC</symbol>
- <description>Honda Motor Co., Ltd.</description>
-</quote>
-<quote>
- <id>315</id>
- <symbol>MC</symbol>
- <description>Matsushita Electric Ind.</description>
-</quote>
-<quote>
- <id>311</id>
- <symbol>NTT</symbol>
- <description> Telephone</description>
-</quote>
-<quote>
- <id>312</id>
- <symbol>HIT</symbol>
- <description>Hitachi, Ltd.</description>
-</quote>
-
- </section>
-
- <!--Commodities-->
- <section>
- <name>Commodities</name>
-
-
-<quote>
- <id>333</id>
- <symbol>XAU/USD</symbol>
- <description>XAU/USD</description>
-</quote>
-<quote>
- <id>334</id>
- <symbol>XAG/USD</symbol>
- <description>XAG/USD</description>
-</quote>
-<quote>
- <id>335</id>
- <symbol>Platinum</symbol>
- <description>Platinum</description>
-</quote>
-<quote>
- <id>336</id>
- <symbol>Palladium</symbol>
- <description>Palladium</description>
-</quote>
-<quote>
- <id>504</id>
- <symbol>Light</symbol>
- <description>Light</description>
-</quote>
-<quote>
- <id>505</id>
- <symbol>Brent</symbol>
- <description>Brent</description>
-</quote>
-<quote>
- <id>506</id>
- <symbol>Copper</symbol>
- <description>Copper</description>
-</quote>
-
- </section>
-</Provider>
diff --git a/plugins/Quotes/docs/Utility/GoogleFinance.xml b/plugins/Quotes/docs/Utility/GoogleFinance.xml deleted file mode 100644 index 031afbcdd5..0000000000 --- a/plugins/Quotes/docs/Utility/GoogleFinance.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-
-<Provider>
- <name>Google Finance</name>
- <ref>http://www.google.com</ref>
- <url>http://www.google.com/finance</url>
-</Provider>
\ No newline at end of file diff --git a/plugins/Quotes/docs/Utility/Quotes_Readme.txt b/plugins/Quotes/docs/Utility/Quotes_Readme.txt deleted file mode 100644 index 7c0bf2ca10..0000000000 --- a/plugins/Quotes/docs/Utility/Quotes_Readme.txt +++ /dev/null @@ -1,112 +0,0 @@ -Quotes version 0.0.24.0 plugin for Miranda
-
-This plugin displays periodically updated economic quotes, currency exchanges and different economic and financial indexes in Miranda contact list.
-
-Author: Dioksin.
-You can always contact me via email dioksin@ua.fm
-
-How to install:
-unpack zip archive;
-copy quotes.dll and Quotes subdirectory from Plugins folder to miranda plugins floder.
-copy proto_Quotes.dll from Icons folder to miranda icons folder
-
-[2011-10-24] Changelog Release 0.0.24.0
-1. Tendency calculation for Yahoo was fixed
-
-[2011-10-18] Changelog Release 0.0.23.0
-1. Previous Close and Change values were added to YAHOO
-2. If there is no xml file corresponding options page is not show in properties window
-
-[2011-10-14] Changelog Release 0.0.22.0
-1. Supports YAHOO
-2. Options location was moved from "Plugins\Quotes" to "Network\Quotes"
-
-[2011-08-19] Changelog Release 0.0.21.0
-1. Tendency format specification
-2. Main icon was changed
-3. Currency converter icon was changed
-4. Popup plugin support
-5. Per-contact options
-6. Menu redesign
-7. Import/export from/to xml file
-
-[2011-08-14] Changelog Release 0.0.20.0
-1. Updation of code to use new format of Google finance HTML page
-
-[2010-09-26] Changelog Release 0.0.19.0
-1. Currency converter shown values in the sientific format
-2. Currency converter didn't convert big values
-3. Currency converter output is formatted with user-defined locale preferences
-4. Swap button in the currency converter has an icon
-5. Big icon is set for the currency converter to correct show in ALT+TAB dialog
-
-[2010-09-19] Changelog Release 0.0.18.0
-1. Thousand separator error for non USA locale in Google Finance
-
-Changelog Release 0.0.17.0
-1. The percent change with respecto to yesterday close variable was added to the Google Finance
-2. The Vietnamese Dong was added to the Currency Converter
-
-Changelog Release 0.0.16.0
-1. It was impossible to get quotes from google finance on non-USA locale
-
-Changelog Release 0.0.15.0
-1. Crash if invalid display name format was used
-
-Changelog Release 0.0.14.0
-1. References to Microsoft's XML parser were removed.
-
-Changelog Release 0.0.12.0
-1. The Swap button had been added to the Currency Converter
-
-Changelog Release 0.0.11.0
-1. Google finance is supported
-2. Occupied status was made optionally (To use it's necessary to set the 'ExtendedStatus' option in the Miranda's database).
-
-Changelog Release 0.0.9.981
-1. Currency converter
-2. Refresh all Quotes\Rates
-3. Refresh particular Quote\Rate
-2. Minor fixings to better support national language pack
-
-Changelog Release 0.0.0.8
-1. Minor changing in logic of status
-2. Minor resource modification to better support national language pack
-
-Changelog Release 0.0.0.7
-1. Status message may be set on per contact basis (second line in contact list)
-2. Two new modes were added. Occupied - it's set if error occurred during rate/quote updation. DND - it's set if updation is in progress.
-3. Open Log File menu item was added and Quotes related menu items are grouped in Quotes popup menu.
-4. Several new variables were added: previous rate, fetch date, fetch time.
-5. New empty icon was added. This icon is used when rate/quote was not changed.
-6. Quotes\rate info page was changed to show both current and previous rates.
-7. Database ForceToAddArrowToNick setting was added. This value governs an up\down arrow appearance in contact name. If it's equal 0 (default value) - arrows will be added only if extraicons were set . It it' equal 1 - arrows will be shown always and if it's equal 2 - arrows will be never shown.
-
-Changelog Release 0.0.0.6
-1. Change to log and to history only if rate (quote) value changed option has been added
-2. Several minor bugs were fixed
-
-Changelog Release 0.0.0.5
-1. Extraicons supporting
-2. Ability to change name in contact list with variables
-3. Log to file
-4. Log to Miranda's history
-5. Proxy server supporting
-6. Protocol icons were changes and removed to separate dll
-
-Changelog Release 0.0.0.4
-1. It is possible to get currency exchange rates from Google site
-2. Unicode supporting was improved
-3. User info page was modified
-4. Option pages were moved under Plugin section
-
-Changelog Release 0.0.0.3
-1. Fix bug when decimal separator was not dot
-2. User info page was added
-
-Changelog Release 0.0.0.2
-1. The size of plugin was reduced
-2. The plugin was statically link with CRT library to resolve some dependencies to system modules
-3. The updater plugin is supported now.
-
-
diff --git a/plugins/Quotes/docs/Utility/Yahoo.xml b/plugins/Quotes/docs/Utility/Yahoo.xml deleted file mode 100644 index 1c2a156d89..0000000000 --- a/plugins/Quotes/docs/Utility/Yahoo.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-
-<Provider>
- <name>Yahoo</name>
- <ref>http://finance.yahoo.com/</ref>
- <url>http://finance.yahoo.com/d/</url>
-</Provider>
\ No newline at end of file diff --git a/plugins/Quotes/res/Forex.rc b/plugins/Quotes/res/Forex.rc index 451b780d9d..ec4b7943d5 100644 --- a/plugins/Quotes/res/Forex.rc +++ b/plugins/Quotes/res/Forex.rc @@ -208,27 +208,6 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,167,139,50,14
END
-IDD_DIALOG_ECONOMIC_RATES DIALOGEX 0, 0, 310, 230
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- LTEXT "&Choose Quotes to watch in contact list:",IDC_STATIC,7,7,298,8
- CONTROL "",IDC_TREE_ECONOMIC_RATES,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_CHECKBOXES | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,21,18,284,126
- LTEXT "&Refresh Quotes Every:",IDC_STATIC,7,150,108,8
- EDITTEXT IDC_EDIT_REFRESH_RATE,118,148,40,12,ES_AUTOHSCROLL
- CONTROL "",IDC_SPIN_REFRESH_RATE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_HOTTRACK,230,147,11,14
- COMBOBOX IDC_COMBO_REFRESH_RATE,161,148,69,59,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "&Display in Contact List as:",IDC_STATIC,7,165,109,8
- EDITTEXT IDC_EDIT_CONTACT_LIST_FORMAT,118,162,120,12,ES_AUTOHSCROLL
- PUSHBUTTON "&Variables...",IDC_BUTTON_DESCRIPTION,240,162,65,12
- LTEXT "&Status Message:",IDC_STATIC,7,178,107,8
- EDITTEXT IDC_EDIT_STATUS_MESSAGE_FORMAT,118,176,120,12,ES_AUTOHSCROLL
- LTEXT "&Tendency:",IDC_STATIC,7,192,102,8
- EDITTEXT IDC_EDIT_TENDENCY_FORMAT,118,190,120,12,ES_AUTOHSCROLL
- PUSHBUTTON "&Advanced Settings...",IDC_BUTTON_ADVANCED_SETTINGS,103,208,110,14
-END
-
IDD_DIALOG_QUOTE_INFO DIALOGEX 0, 0, 222, 132
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -286,31 +265,6 @@ BEGIN PUSHBUTTON "Close",IDOK,85,122,50,14
END
-IDD_DIALOG_OPT_FINANCE DIALOGEX 0, 0, 310, 232
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- LTEXT "Type &Stock Name or Symbol:",IDC_STATIC,7,10,96,8
- EDITTEXT IDC_EDIT_QUOTE,106,7,143,14,ES_AUTOHSCROLL
- PUSHBUTTON "&Add",IDC_BUTTON_ADD,255,7,50,14
- LTEXT "&Watched Quotes:",IDC_STATIC,7,23,110,8
- LISTBOX IDC_LIST_RATES,19,35,231,112,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "&Remove",IDC_BUTTON_REMOVE,255,35,50,14
- LTEXT "&Refresh Rates Every:",IDC_STATIC,7,153,107,8
- EDITTEXT IDC_EDIT_REFRESH_RATE,117,151,40,12,ES_AUTOHSCROLL
- CONTROL "",IDC_SPIN_REFRESH_RATE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_HOTTRACK,234,150,11,14
- COMBOBOX IDC_COMBO_REFRESH_RATE,160,151,69,59,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "&Display in Contact List as:",IDC_STATIC,7,168,107,8
- EDITTEXT IDC_EDIT_CONTACT_LIST_FORMAT,117,165,120,12,ES_AUTOHSCROLL
- PUSHBUTTON "&Variables...",IDC_BUTTON_DESCRIPTION,240,165,65,12
- LTEXT "Status &Message:",IDC_STATIC,7,181,108,8
- EDITTEXT IDC_EDIT_STATUS_MESSAGE_FORMAT,117,179,120,12,ES_AUTOHSCROLL
- LTEXT "&Tendency:",IDC_STATIC,7,195,102,8
- EDITTEXT IDC_EDIT_TENDENCY_FORMAT,117,193,120,12,ES_AUTOHSCROLL
- PUSHBUTTON "&Advanced Settings...",IDC_BUTTON_ADVANCED_SETTINGS,99,210,110,14
-END
-
/////////////////////////////////////////////////////////////////////////////
//
@@ -360,14 +314,6 @@ BEGIN BOTTOMMARGIN, 153
END
- IDD_DIALOG_ECONOMIC_RATES, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 305
- TOPMARGIN, 7
- BOTTOMMARGIN, 222
- END
-
IDD_DIALOG_QUOTE_INFO, DIALOG
BEGIN
LEFTMARGIN, 7
@@ -392,15 +338,6 @@ BEGIN TOPMARGIN, 7
BOTTOMMARGIN, 135
END
-
- IDD_DIALOG_OPT_FINANCE, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 305
- VERTGUIDE, 249
- TOPMARGIN, 7
- BOTTOMMARGIN, 224
- END
END
#endif // APSTUDIO_INVOKED
diff --git a/plugins/Quotes/src/EconomicRateInfo.h b/plugins/Quotes/src/EconomicRateInfo.h index 73e269619c..af881c7bff 100644 --- a/plugins/Quotes/src/EconomicRateInfo.h +++ b/plugins/Quotes/src/EconomicRateInfo.h @@ -3,7 +3,7 @@ #define QUOTES_PROTOCOL_NAME "Quotes"// protocol name
-#define QUOTES_MODULE_NAME QUOTES_PROTOCOL_NAME // db settings module path
+#define QUOTES_MODULE_NAME "Quotes" // db settings module path
enum ERefreshRateType
{
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 2ee56b9554..a951a5667c 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -63,7 +63,7 @@ void InitMenu() {
CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
- mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Quotes"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Currency rates"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "B474F556-22B6-42A1-A91E-22FE4F671388");
SET_UID(mi, 0x9de6716, 0x3591, 0x48c4, 0x9f, 0x64, 0x1b, 0xfd, 0xc6, 0xd1, 0x34, 0x97);
@@ -76,7 +76,7 @@ void InitMenu() UpdateMenu(g_bAutoUpdate);
SET_UID(mi, 0x91cbabf6, 0x5073, 0x4a78, 0x84, 0x8, 0x34, 0x61, 0xc1, 0x8a, 0x34, 0xd9);
- mi.name.w = LPGENW("Refresh All Quotes\\Rates");
+ mi.name.w = LPGENW("Refresh All Rates");
mi.position = 20100001;
mi.hIcolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
mi.pszService = "Quotes/RefreshAll";
@@ -92,7 +92,7 @@ void InitMenu() CreateServiceFunction(mi.pszService, QuotesMenu_CurrencyConverter);
SET_UID(mi, 0x7cca4fd9, 0x903f, 0x4b7d, 0x93, 0x7a, 0x18, 0x63, 0x23, 0xd4, 0xa9, 0xa9);
- mi.name.w = LPGENW("Export All Quotes");
+ mi.name.w = LPGENW("Export All Currency Rates");
mi.hIcolibItem = Quotes_GetIconHandle(IDI_ICON_EXPORT);
mi.pszService = "Quotes/ExportAll";
mi.position = 20100003;
@@ -100,7 +100,7 @@ void InitMenu() CreateServiceFunction(mi.pszService, QuotesMenu_ExportAll);
SET_UID(mi, 0xa994d3b, 0x77c2, 0x4612, 0x8d, 0x5, 0x6a, 0xae, 0x8c, 0x21, 0xbd, 0xc9);
- mi.name.w = LPGENW("Import All Quotes");
+ mi.name.w = LPGENW("Import All Currency Rates");
mi.hIcolibItem = Quotes_GetIconHandle(IDI_ICON_IMPORT);
mi.pszService = "Quotes/ImportAll";
mi.position = 20100004;
@@ -153,10 +153,10 @@ void InitMenu() int Quotes_OnToolbarLoaded(WPARAM, LPARAM)
{
TTBButton ttb = {};
- ttb.name = LPGEN("Enable/Disable Quotes Auto Update");
+ ttb.name = LPGEN("Enable/Disable Currency Rates Auto Update");
ttb.pszService = g_pszAutoUpdateCmd;
- ttb.pszTooltipUp = LPGEN("Quotes Auto Update Enabled");
- ttb.pszTooltipDn = LPGEN("Quotes Auto Update Disabled");
+ ttb.pszTooltipUp = LPGEN("Currency Rates Auto Update Enabled");
+ ttb.pszTooltipDn = LPGEN("Currency Rates Auto Update Disabled");
ttb.hIconHandleUp = Quotes_GetIconHandle(IDI_ICON_MAIN);
ttb.hIconHandleDn = Quotes_GetIconHandle(IDI_ICON_DISABLED);
ttb.dwFlags = ((g_bAutoUpdate) ? 0 : TTBBF_PUSHED) | TTBBF_ASPUSHBUTTON | TTBBF_VISIBLE;
@@ -226,7 +226,7 @@ INT_PTR QuoteProtoFunc_GetCaps(WPARAM wParam, LPARAM) {
switch (wParam) {
case PFLAG_UNIQUEIDTEXT:
- return (INT_PTR)Translate("Quote Symbol");
+ return (INT_PTR)Translate("Currency Symbol");
}
return 0;
diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp index 564fb7b960..c3d5cada0b 100644 --- a/plugins/Quotes/src/ImportExport.cpp +++ b/plugins/Quotes/src/ImportExport.cpp @@ -463,14 +463,6 @@ bool get_contact_state(const IXMLNode::TXMLNodePtr& pXmlContact, CContactState& MCONTACT GetContact()const { return m_hContact; }
private:
- virtual void Visit(const CQuotesProviderDukasCopy& rProvider)override
- {
- tstring sQuoteID = GetXMLNodeValue(DB_STR_QUOTE_ID);
- if (false == sQuoteID.empty()) {
- m_hContact = rProvider.GetContactByQuoteID(sQuoteID);
- }
- }
-
virtual void Visit(const CQuotesProviderCurrencyConverter& rProvider)override
{
static const tstring g_sFromID = quotes_a2t(DB_STR_FROM_ID);//A2CT(DB_STR_FROM_ID);
@@ -497,14 +489,6 @@ bool get_contact_state(const IXMLNode::TXMLNodePtr& pXmlContact, CContactState& }
}
- virtual void Visit(const CQuotesProviderFinance& rProvider)override
- {
- tstring sQuoteID = GetXMLNodeValue(DB_STR_QUOTE_ID);
- if (false == sQuoteID.empty()) {
- m_hContact = rProvider.GetContactByQuoteID(sQuoteID);
- }
- }
-
tstring GetXMLNodeValue(const char* pszXMLNodeName)const
{
tstring sXMLNodeName = quotes_a2t(pszXMLNodeName);
diff --git a/plugins/Quotes/src/OptionDukasCopy.cpp b/plugins/Quotes/src/OptionDukasCopy.cpp deleted file mode 100644 index 3d7a226cc5..0000000000 --- a/plugins/Quotes/src/OptionDukasCopy.cpp +++ /dev/null @@ -1,319 +0,0 @@ -#include "StdAfx.h"
-
-enum ETreeCheckBoxState
-{
- // tree check box state
- TCBS_NOSTATEBOX = 0,
- TCBS_UNCHECKED = 1,
- TCBS_CHECKED = 2,
-};
-
-enum
-{
- TREE_VIEW_CHECK_STATE_CHANGE = WM_USER + 100,
- IMAGE_INDEX_SECTION = 0,
- IMAGE_INDEX_QUOTE = 1
-};
-
-HTREEITEM tree_insert_item(HWND hwndTree,
- const tstring& rsName,
- HTREEITEM htiParent,
- int nImage,
- LPARAM lp = 0)
-{
- TVINSERTSTRUCT tvi = {};
- tvi.hParent = htiParent;
- tvi.hInsertAfter = TVI_LAST;
- tvi.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvi.item.pszText = const_cast<LPTSTR>(rsName.c_str());//name;
- tvi.item.lParam = lp;
- tvi.item.iImage = nImage;
- tvi.item.iSelectedImage = nImage;
- return TreeView_InsertItem(hwndTree, &tvi);
-}
-
-bool add_quote_to_tree(const CQuotesProviderDukasCopy::CQuote& q, HWND hwndTree, HTREEITEM htiParent, const CQuotesProviderDukasCopy* pQuotesProvier)
-{
- bool bChecked = pQuotesProvier->IsQuoteWatched(q);
- HTREEITEM hti = tree_insert_item(hwndTree, ((false == q.GetName().empty()) ? q.GetName() : q.GetSymbol()), htiParent, IMAGE_INDEX_QUOTE);
- if (hti && bChecked) {
- HWND hDlg = ::GetParent(hwndTree);
- assert(::IsWindow(hDlg));
- ::PostMessage(hDlg, TREE_VIEW_CHECK_STATE_CHANGE, MAKEWPARAM(0, TCBS_CHECKED), reinterpret_cast<LPARAM>(hti));
- }
-
- return (nullptr != hti && bChecked);
-}
-
-void add_section_to_tree(const CQuotesProviderDukasCopy::CQuoteSection& qs,
- HWND hwndTree,
- HTREEITEM htiParent,
- const CQuotesProviderDukasCopy* pQuotesProvier,
- bool& rbIsChecked,
- bool& rbIsExpended,
- bool bExpand = false)
-{
- rbIsChecked = false;
- rbIsExpended = false;
- HTREEITEM hti = tree_insert_item(hwndTree, qs.GetName(), htiParent, IMAGE_INDEX_SECTION);
-
- size_t cCheckedItems = 0;
- size_t cSection = qs.GetSectionCount();
- for (size_t i = 0; i < cSection; ++i) {
- bool bIsChecked = false;
- bool bIsExpanded = false;
- CQuotesProviderDukasCopy::CQuoteSection other = qs.GetSection(i);
- add_section_to_tree(other, hwndTree, hti, pQuotesProvier, bIsChecked, bIsExpanded);
-
- if (bIsChecked)
- ++cCheckedItems;
-
- if (bIsExpanded)
- bExpand = true;
- }
-
- size_t cQuotes = qs.GetQuoteCount();
- for (size_t i = 0; i < cQuotes; ++i) {
- CQuotesProviderDukasCopy::CQuote q = qs.GetQuote(i);
- if (true == add_quote_to_tree(q, hwndTree, hti, pQuotesProvier))
- ++cCheckedItems;
- }
-
- if (bExpand || cCheckedItems > 0) {
- rbIsExpended = true;
- TreeView_Expand(hwndTree, hti, TVE_EXPAND);
- }
-
- if (cCheckedItems == (cSection + cQuotes)) {
- rbIsChecked = true;
- HWND hDlg = ::GetParent(hwndTree);
- assert(::IsWindow(hDlg));
- ::PostMessage(hDlg, TREE_VIEW_CHECK_STATE_CHANGE, MAKEWPARAM(0, TCBS_CHECKED), reinterpret_cast<LPARAM>(hti));
- }
-}
-
-void add_provider_to_tree(const CQuotesProviderDukasCopy* pQuotesProvier, HWND hwndTree)
-{
- CQuotesProviderDukasCopy::CQuoteSection qs = pQuotesProvier->GetQuotes();
- bool bIsChecked = false;
- bool bIsExpanded = false;
- add_section_to_tree(qs, hwndTree, TVI_ROOT, pQuotesProvier, bIsChecked, bIsExpanded, true);
-}
-
-inline HTREEITEM tree_get_child_item(HWND hwndTree, HTREEITEM hti)
-{
- return reinterpret_cast<HTREEITEM>(::SendMessage(hwndTree, TVM_GETNEXTITEM, TVGN_CHILD, reinterpret_cast<LPARAM>(hti)));
-}
-
-inline HTREEITEM tree_get_next_sibling_item(HWND hwndTree, HTREEITEM hti)
-{
- return reinterpret_cast<HTREEITEM>(::SendMessage(hwndTree, TVM_GETNEXTITEM, TVGN_NEXT, reinterpret_cast<LPARAM>(hti)));
-}
-
-inline ETreeCheckBoxState tree_get_state_image(HWND hwndTree, HTREEITEM hti)
-{
- TVITEM tvi;
- tvi.hItem = hti;
- tvi.mask = TVIF_STATE | TVIF_HANDLE;
- tvi.stateMask = TVIS_STATEIMAGEMASK;
- if (TRUE == ::SendMessage(hwndTree, TVM_GETITEM, 0, reinterpret_cast<LPARAM>(&tvi))) {
- UINT nState = (tvi.state >> 12);
- return static_cast<ETreeCheckBoxState>(nState);
- }
-
- return TCBS_UNCHECKED;
-}
-
-void tree_do_set_item_state(HWND hwndTree, HTREEITEM hti, ETreeCheckBoxState nState)
-{
- TVITEM tvi = {};
- tvi.mask = TVIF_STATE | TVIF_HANDLE;
- tvi.hItem = hti;
- tvi.stateMask = TVIS_STATEIMAGEMASK;
- tvi.state = INDEXTOSTATEIMAGEMASK(nState);
- ::SendMessage(hwndTree, TVM_SETITEM, 0, reinterpret_cast<LPARAM>(&tvi));
-}
-
-void tree_set_item_state(HWND hwndTree, HTREEITEM hti, ETreeCheckBoxState nState, bool bRecursively)
-{
- if (true == bRecursively) {
- for (hti = tree_get_child_item(hwndTree, hti); hti; hti = tree_get_next_sibling_item(hwndTree, hti)) {
- tree_do_set_item_state(hwndTree, hti, nState);
- tree_set_item_state(hwndTree, hti, nState, bRecursively);
- }
- }
- else tree_do_set_item_state(hwndTree, hti, nState);
-}
-
-void save_quote_selection(HWND hwndTree, HTREEITEM h, const CQuotesProviderDukasCopy::CQuote& q, CQuotesProviderDukasCopy* pQuotesProvier)
-{
- ETreeCheckBoxState nState = tree_get_state_image(hwndTree, h);
- pQuotesProvier->WatchForQuote(q, (TCBS_CHECKED == nState));
-}
-
-void recursive_save_quote_section_selection(HWND hwndTree, HTREEITEM h, const CQuotesProviderDukasCopy::CQuoteSection& qs, CQuotesProviderDukasCopy* pQuotesProvier)
-{
- size_t cSection = qs.GetSectionCount();
- h = tree_get_child_item(hwndTree, h);
- for (size_t i = 0; h && (i < cSection); ++i, h = tree_get_next_sibling_item(hwndTree, h)) {
- CQuotesProviderDukasCopy::CQuoteSection other = qs.GetSection(i);
- recursive_save_quote_section_selection(hwndTree, h, other, pQuotesProvier);
- }
-
- size_t cQuotes = qs.GetQuoteCount();
- for (size_t i = 0; h && (i < cQuotes); ++i, h = tree_get_next_sibling_item(hwndTree, h)) {
- CQuotesProviderDukasCopy::CQuote q = qs.GetQuote(i);
- save_quote_selection(hwndTree, h, q, pQuotesProvier);
- }
-}
-
-void recursive_save_selection(HWND hwndTree, CQuotesProviderDukasCopy* pQuotesProvider)
-{
- CQuotesProviderDukasCopy::CQuoteSection qs = pQuotesProvider->GetQuotes();
- recursive_save_quote_section_selection(hwndTree, tree_get_child_item(hwndTree, TVI_ROOT), qs, pQuotesProvider);
-}
-
-class CImageListWrapper
-{
-public:
- CImageListWrapper()
- : m_hImageList(ImageList_Create(::GetSystemMetrics(SM_CXSMICON),
- ::GetSystemMetrics(SM_CYSMICON),
- ILC_COLOR24 | ILC_MASK, 2, 0))
- {
- if (m_hImageList) {
- ImageList_AddIcon(m_hImageList, Quotes_LoadIconEx(IDI_ICON_SECTION));
- ImageList_AddIcon(m_hImageList, Quotes_LoadIconEx(IDI_ICON_QUOTE));
- }
- }
-
- ~CImageListWrapper()
- {
- if (m_hImageList)
- ImageList_Destroy(m_hImageList);
- }
-
- operator HIMAGELIST()const
- {
- return m_hImageList;
- }
-
-private:
- HIMAGELIST m_hImageList;
-};
-
-HIMAGELIST get_image_list()
-{
- static CImageListWrapper wrapper;
- return wrapper;
-}
-
-CQuotesProviderDukasCopy* get_dukas_copy_provider()
-{
- CModuleInfo::TQuotesProvidersPtr pProviders = CModuleInfo::GetQuoteProvidersPtr();
- const CQuotesProviders::TQuotesProviders& rapQuotesProviders = pProviders->GetProviders();
- for (CQuotesProviders::TQuotesProviders::const_iterator i = rapQuotesProviders.begin(); i != rapQuotesProviders.end(); ++i) {
- const CQuotesProviders::TQuotesProviderPtr& pProvider = *i;
- CQuotesProviderDukasCopy* pDukas = dynamic_cast<CQuotesProviderDukasCopy*>(pProvider.get());
- if (pDukas)
- return pDukas;
- }
-
- assert(!"We should never get here!");
- return nullptr;
-}
-
-INT_PTR CALLBACK EconomicRatesDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
- CCommonDlgProcData d(get_dukas_copy_provider());
- CommonOptionDlgProc(hdlg, message, wParam, lParam, d);
-
- switch (message) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hdlg);
- {
- HWND hwndTree = ::GetDlgItem(hdlg, IDC_TREE_ECONOMIC_RATES);
- HIMAGELIST hImage = get_image_list();
- if (hImage) {
- TreeView_SetImageList(hwndTree, hImage, TVSIL_NORMAL);
- }
-
- const CQuotesProviderDukasCopy* pDukasProvider = get_dukas_copy_provider();
- if (pDukasProvider)
- add_provider_to_tree(pDukasProvider, hwndTree);
- }
- return TRUE;
-
- case WM_NOTIFY:
- {
- LPNMHDR pNMHDR = reinterpret_cast<LPNMHDR>(lParam);
- switch (pNMHDR->code) {
- case TVN_KEYDOWN:
- if (IDC_TREE_ECONOMIC_RATES == wParam) {
- LPNMTVKEYDOWN pKeyDown = reinterpret_cast<LPNMTVKEYDOWN>(lParam);
- if (VK_SPACE == pKeyDown->wVKey) {
- HTREEITEM hti = TreeView_GetSelection(::GetDlgItem(hdlg, IDC_TREE_ECONOMIC_RATES));
- ::PostMessage(hdlg, TREE_VIEW_CHECK_STATE_CHANGE, MAKEWPARAM(1, 0), reinterpret_cast<LPARAM>(hti));
- PropSheet_Changed(::GetParent(hdlg), hdlg);
- }
- }
- break;
-
- case NM_CLICK:
- if (IDC_TREE_ECONOMIC_RATES == wParam) {
- DWORD pos = ::GetMessagePos();
-
- HWND hwndTree = ::GetDlgItem(hdlg, IDC_TREE_ECONOMIC_RATES);
-
- TVHITTESTINFO tvhti;
- tvhti.pt.x = LOWORD(pos);
- tvhti.pt.y = HIWORD(pos);
- ::ScreenToClient(hwndTree, &(tvhti.pt));
-
- HTREEITEM hti = reinterpret_cast<HTREEITEM>(::SendMessage(hwndTree, TVM_HITTEST, 0, reinterpret_cast<LPARAM>(&tvhti)));
- if (hti && (tvhti.flags&TVHT_ONITEMSTATEICON)) {
- ::PostMessage(hdlg, TREE_VIEW_CHECK_STATE_CHANGE, MAKEWPARAM(1, 0), reinterpret_cast<LPARAM>(hti));
- PropSheet_Changed(::GetParent(hdlg), hdlg);
- }
- }
- break;
-
- case PSN_APPLY:
- CQuotesProviderDukasCopy* pDukasProvider = get_dukas_copy_provider();
- if (pDukasProvider) {
- recursive_save_selection(::GetDlgItem(hdlg, IDC_TREE_ECONOMIC_RATES), pDukasProvider);
- pDukasProvider->RefreshSettings();
- }
- break;
- }
- }
- return TRUE;
-
- case TREE_VIEW_CHECK_STATE_CHANGE:
- HWND hwndTree = ::GetDlgItem(hdlg, IDC_TREE_ECONOMIC_RATES);
- HTREEITEM hti = reinterpret_cast<HTREEITEM>(lParam);
-
- ETreeCheckBoxState nState;
-
- bool bRecursively = 1 == LOWORD(wParam);
- if (bRecursively)
- nState = tree_get_state_image(hwndTree, hti);
- else
- nState = static_cast<ETreeCheckBoxState>(HIWORD(wParam));
-
- tree_set_item_state(hwndTree, hti, nState, bRecursively);
- break;
- }
-
- return FALSE;
-}
-
-void ShowDukasCopyPropPage(CQuotesProviderDukasCopy* pProvider, WPARAM wp, OPTIONSDIALOGPAGE& odp)
-{
- const IQuotesProvider::CProviderInfo& pi = pProvider->GetInfo();
-
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG_ECONOMIC_RATES);
- odp.pfnDlgProc = EconomicRatesDlgProc;
- odp.szTab.w = const_cast<LPTSTR>(pi.m_sName.c_str());
- g_plugin.addOptions(wp, &odp);
-}
diff --git a/plugins/Quotes/src/OptionDukasCopy.h b/plugins/Quotes/src/OptionDukasCopy.h deleted file mode 100644 index 617d370f3b..0000000000 --- a/plugins/Quotes/src/OptionDukasCopy.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __60a5d152_872c_4bc4_b9ae_cd561d110b2dOptionDukasCopy_h__
-#define __60a5d152_872c_4bc4_b9ae_cd561d110b2dOptionDukasCopy_h__
-
-class CQuotesProviderDukasCopy;
-
-void ShowDukasCopyPropPage(CQuotesProviderDukasCopy* pProvider, WPARAM wp, OPTIONSDIALOGPAGE& odp);
-
-#endif //__60a5d152_872c_4bc4_b9ae_cd561d110b2dOptionDukasCopy_h__
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp deleted file mode 100644 index 064ce9dcec..0000000000 --- a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp +++ /dev/null @@ -1,226 +0,0 @@ -#include "StdAfx.h"
-
-CQuotesProviderDukasCopy::CQuotesProviderDukasCopy()
-{
-}
-
-CQuotesProviderDukasCopy::~CQuotesProviderDukasCopy()
-{
-}
-
-inline tstring get_quote_id(MCONTACT hContact)
-{
- return Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_ID);
-}
-
-inline bool is_quote_id_equal(MCONTACT hContact, const tstring& sID)
-{
- return sID == get_quote_id(hContact);
-}
-
-bool CQuotesProviderDukasCopy::IsQuoteWatched(const CQuote& rQuote)const
-{
- return m_aContacts.end() != std::find_if(m_aContacts.begin(), m_aContacts.end(),
- boost::bind(is_quote_id_equal, _1, rQuote.GetID()));
-}
-
-bool CQuotesProviderDukasCopy::WatchForQuote(const CQuote& rQuote, bool bWatch)
-{
- const tstring& sQuoteID = rQuote.GetID();
- TContracts::iterator i =
- std::find_if(m_aContacts.begin(), m_aContacts.end(),
- boost::bind(is_quote_id_equal, _1, sQuoteID));
-
- if ((false == bWatch) && (i != m_aContacts.end())) {
- MCONTACT hContact = *i;
- {// for CCritSection
- mir_cslock lck(m_cs);
- m_aContacts.erase(i);
- }
-
- db_delete_contact(hContact);
- return true;
- }
- else if ((true == bWatch) && (i == m_aContacts.end())) {
- MCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
- if (hContact) {
- db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_ID, sQuoteID.c_str());
- if (false == rQuote.GetName().empty()) {
- db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_DESCRIPTION, rQuote.GetName().c_str());
- }
-
- return true;
- }
-
- }
- return false;
-}
-
-tstring CQuotesProviderDukasCopy::BuildHTTPURL()const
-{
- tostringstream sURL;
- sURL << GetURL();
-
- {
- mir_cslock lck(m_cs);
- for (TContracts::const_iterator i = m_aContacts.begin(); i != m_aContacts.end(); ++i) {
- MCONTACT hContact = *i;
- tstring sID = get_quote_id(hContact);
- if (false == sID.empty())
- sURL << sID << L",";
- }
- }
-
- return sURL.str();
-}
-
-struct CEconomicRateInfo
-{
- CEconomicRateInfo() : m_dCurRate(0.0), m_dPrevRate(0.0) {}
- tstring m_sName;
- double m_dCurRate;
- double m_dPrevRate;
- tstring m_sID;
-};
-
-typedef std::vector<CEconomicRateInfo> TEconomicRates;
-typedef IHTMLNode::THTMLNodePtr THTMLNodePtr;
-
-bool string2double(const wchar_t* pszText, double& rValue)
-{
- assert(pszText);
- try {
- rValue = boost::lexical_cast<double>(pszText);
- }
- catch (boost::bad_lexical_cast &) {
- return false;
- }
-
- return true;
-}
-
-
-void parse_row(const THTMLNodePtr& pRow, TEconomicRates& raRates)
-{
- CEconomicRateInfo ri;
- ri.m_sID = pRow->GetAttribute(L"sid");
- if (false == ri.m_sID.empty()) {
- unsigned short cColsHandled = 0;
- tostringstream sSidID;
- sSidID << L"id" << ri.m_sID;
- size_t cNodes = pRow->GetChildCount();
- for (size_t i = 0; i < cNodes && cColsHandled < 2; ++i) {
- THTMLNodePtr pCol = pRow->GetChildPtr(i);
- if (pCol) {
- tstring sColID = pCol->GetAttribute(L"id");
- if (false == sColID.empty()) {
- if (0 == mir_wstrcmpi(sColID.c_str(), L"stock")) {
- ri.m_sName = pCol->GetText();
- if (false == ri.m_sName.empty()) {
- ++cColsHandled;
- }
- }
- else if (0 == mir_wstrcmpi(sSidID.str().c_str(), sColID.c_str())) {
- tstring sRate = pCol->GetText();
- if ((false == sRate.empty()) && (true == string2double(sRate.c_str(), ri.m_dCurRate))) {
- ri.m_dPrevRate = ri.m_dCurRate;
- ++cColsHandled;
- tstring sOldRate = pCol->GetAttribute(L"oldPrice");
- if (false == sOldRate.empty()) {
- string2double(sOldRate.c_str(), ri.m_dPrevRate);
- }
- }
- }
- }
- }
- }
-
- if (2 == cColsHandled)
- raRates.push_back(ri);
- }
-}
-
-void parser_html_node(const THTMLNodePtr& pNode, TEconomicRates& raRates)
-{
- size_t cNodes = pNode->GetChildCount();
- for (size_t i = 0; i < cNodes; ++i) {
- THTMLNodePtr pChild = pNode->GetChildPtr(i);
- if (pChild && pChild->Is(IHTMLNode::TableRow))
- parse_row(pChild, raRates);
- }
-}
-
-bool parse_HTML(const tstring& sHTML, TEconomicRates& raRates)
-{
- IHTMLEngine::THTMLParserPtr pHTMLParser = CModuleInfo::GetHTMLEngine()->GetParserPtr();
- THTMLNodePtr pRoot = pHTMLParser->ParseString(sHTML);
- if (pRoot) {
- parser_html_node(pRoot, raRates);
- return true;
- }
-
- return false;
-}
-
-
-void CQuotesProviderDukasCopy::RefreshQuotes(TContracts& anContacts)
-{
- tstring sURL = BuildHTTPURL();
-
- CHTTPSession http;
- // LogIt(Info,sURL);
- if (true == http.OpenURL(sURL)) {
- // if(true == IsOnline())
- {
- tstring sHTML;
- if (true == http.ReadResponce(sHTML)) {
- // LogIt(Info,sHTML);
- // if(true == IsOnline())
- {
- TEconomicRates aRates;
- if (true == parse_HTML(sHTML, aRates)
- && (true == IsOnline())) {
- for (TEconomicRates::const_iterator it = aRates.begin(); (it != aRates.end()) && (true == IsOnline()); ++it) {
- const CEconomicRateInfo& ri = *it;
-
- TContracts::iterator i = std::find_if(anContacts.begin(), anContacts.end(),
- boost::bind(is_quote_id_equal, _1, ri.m_sID));
- if (i != anContacts.end() && (true == IsOnline())) {
- MCONTACT hContact = *i;
- anContacts.erase(i);
-
- WriteContactRate(hContact, ri.m_dCurRate, ri.m_sName);
- }
- }
- }
- }
- }
- }
- }
-
- std::for_each(anContacts.begin(), anContacts.end(),
- boost::bind(&SetContactStatus, _1, ID_STATUS_NA));
-}
-
-void CQuotesProviderDukasCopy::ShowPropertyPage(WPARAM wp, OPTIONSDIALOGPAGE& odp)
-{
- ShowDukasCopyPropPage(this, wp, odp);
-}
-
-void CQuotesProviderDukasCopy::Accept(CQuotesProviderVisitor& visitor)const
-{
- CQuotesProviderBase::Accept(visitor);
- visitor.Visit(*this);
-}
-
-MCONTACT CQuotesProviderDukasCopy::GetContactByQuoteID(const tstring& rsQuoteID)const
-{
- mir_cslock lck(m_cs);
-
- TContracts::const_iterator i = std::find_if(m_aContacts.begin(), m_aContacts.end(),
- boost::bind(std::equal_to<tstring>(), rsQuoteID, boost::bind(get_quote_id, _1)));
- if (i != m_aContacts.end())
- return *i;
-
- return NULL;
-}
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.h b/plugins/Quotes/src/QuotesProviderDukasCopy.h deleted file mode 100644 index 596c6bb79e..0000000000 --- a/plugins/Quotes/src/QuotesProviderDukasCopy.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef __93121758_68c7_4836_b571_da84dfe82b84_QuotesProviderDukasCopy_h__
-#define __93121758_68c7_4836_b571_da84dfe82b84_QuotesProviderDukasCopy_h__
-
-#define DB_STR_REFRESH_RATE_TYPE "RefreshRateType"
-#define DB_STR_REFRESH_RATE_VALUE "RefreshRateValue"
-#define DB_STR_DC_DISPLAY_NAME_FORMAT "DC_DisplayNameFormat"
-// #define DB_STR_DC_LOG_FILE_FORMAT "DC_LogFileFormat"
-// #define DB_STR_DC_HISTORY_FORMAT "DC_HistoryFormat"
-
-class CQuotesProviderDukasCopy : public CQuotesProviderBase
-{
-public:
- CQuotesProviderDukasCopy();
- ~CQuotesProviderDukasCopy();
-
- bool WatchForQuote(const CQuote& rQuote, bool bWatch);
- bool IsQuoteWatched(const CQuote& rQuote)const;
-
- MCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
- // #ifdef CHART_IMPLEMENT
- // bool Chart(MCONTACT hContact,const tstring& url)const;
- // #endif
-
-private:
- //IQuotesProvider implementation
- virtual void RefreshQuotes(TContracts& anContacts);
- virtual void ShowPropertyPage(WPARAM wp, OPTIONSDIALOGPAGE& odp);
- virtual void Accept(CQuotesProviderVisitor& visitor)const;
-
-private:
- tstring BuildHTTPURL()const;
-
-};
-
-#endif //__93121758_68c7_4836_b571_da84dfe82b84_QuotesProviderDukasCopy_h__
diff --git a/plugins/Quotes/src/QuotesProviderFinance.cpp b/plugins/Quotes/src/QuotesProviderFinance.cpp deleted file mode 100644 index c80559a6b6..0000000000 --- a/plugins/Quotes/src/QuotesProviderFinance.cpp +++ /dev/null @@ -1,265 +0,0 @@ -#include "stdafx.h"
-
-void CQuotesProviderFinance::GetWatchedQuotes(TQuotes& raQuotes)const
-{
- raQuotes.clear();
- BOOST_FOREACH(MCONTACT hContact, m_aContacts)
- {
- tstring sID = Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_ID);
- tstring sSymbol = Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_SYMBOL, sID.c_str());
- tstring sDescr = Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION);
- CQuotesProviderBase::CQuote quote(sID, sSymbol, sDescr);
-
- raQuotes.push_back(quote);
- }
-}
-
-inline tstring get_quote_id(MCONTACT hContact)
-{
- return Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_ID);
-}
-
-inline bool is_quote_id_equal(MCONTACT hContact, const tstring& sID)
-{
- return sID == get_quote_id(hContact);
-}
-
-bool CQuotesProviderFinance::WatchForQuote(const CQuote& rQuote, bool bWatch)
-{
- const tstring& sQuoteID = rQuote.GetID();
- TContracts::iterator i = std::find_if(m_aContacts.begin(), m_aContacts.end(),
- boost::bind(is_quote_id_equal, _1, sQuoteID));
-
- if (!bWatch && i != m_aContacts.end()) {
- MCONTACT hContact = *i;
- {
- mir_cslock lck(m_cs);
- m_aContacts.erase(i);
- }
-
- db_delete_contact(hContact);
- return true;
- }
-
- if (bWatch && i == m_aContacts.end()) {
- MCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
- if (hContact) {
- db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_ID, sQuoteID.c_str());
- if (false == rQuote.GetName().empty())
- db_set_ws(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_DESCRIPTION, rQuote.GetName().c_str());
-
- return true;
- }
- }
-
- return false;
-}
-
-MCONTACT CQuotesProviderFinance::GetContactByQuoteID(const tstring& rsQuoteID)const
-{
- mir_cslock lck(m_cs);
-
- TContracts::const_iterator i = std::find_if(m_aContacts.begin(), m_aContacts.end(),
- boost::bind(std::equal_to<tstring>(), rsQuoteID, boost::bind(get_quote_id, _1)));
- if (i != m_aContacts.end())
- return *i;
-
- return NULL;
-}
-
-void CQuotesProviderFinance::Accept(CQuotesProviderVisitor& visitor)const
-{
- CQuotesProviderBase::Accept(visitor);
- visitor.Visit(*this);
-}
-
-namespace
-{
- inline tstring make_quote_name(const CQuotesProviderBase::CQuote& rQuote)
- {
- const tstring &rsDesc = rQuote.GetName();
- return((false == rsDesc.empty()) ? rsDesc : rQuote.GetSymbol());
- }
-
- int add_quote_to_wnd(const CQuotesProviderBase::CQuote& rQuote, HWND hwnd)
- {
- tstring sName = make_quote_name(rQuote);
- int nIndex = ::SendMessage(hwnd, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(sName.c_str()));
- if (nIndex >= 0) {
- CQuotesProviderBase::CQuote* pQuote = new CQuotesProviderBase::CQuote(rQuote);
- if (LB_ERR == ::SendMessage(hwnd, LB_SETITEMDATA, nIndex, reinterpret_cast<LPARAM>(pQuote))) {
- delete pQuote;
- }
- }
- return nIndex;
- }
-
- CQuotesProviderBase::CQuote* get_quote_ptr_from_lb_index(HWND hwndListBox, int nIndex)
- {
- LRESULT lResult = ::SendMessage(hwndListBox, LB_GETITEMDATA, nIndex, 0);
- return (((LB_ERR != lResult) && (0 != lResult)) ? (reinterpret_cast<CQuotesProviderBase::CQuote*>(lResult)) : nullptr);
- }
-
- int is_quote_added(HWND hwndList, const tstring& rsQuoteID)
- {
- int cItems = ::SendMessage(hwndList, LB_GETCOUNT, 0, 0);
- for (int i = 0; i < cItems; ++i) {
- const CQuotesProviderBase::CQuote* pQuote = get_quote_ptr_from_lb_index(hwndList, i);
- if ((nullptr != pQuote)
- && ((0 == mir_wstrcmpi(rsQuoteID.c_str(), pQuote->GetID().c_str()))
- || (0 == mir_wstrcmpi(rsQuoteID.c_str(), pQuote->GetName().c_str()))
- || (0 == mir_wstrcmpi(rsQuoteID.c_str(), pQuote->GetSymbol().c_str())))) {
- return i;
- }
- }
- return LB_ERR;
- }
-
- INT_PTR CALLBACK GoogleFinanceOptDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
- {
- CQuotesProviderFinance* pProvider = nullptr;
- if (WM_INITDIALOG == message) {
- pProvider = reinterpret_cast<CQuotesProviderFinance*>(lParam);
- SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
- }
- else pProvider = reinterpret_cast<CQuotesProviderFinance*>(GetWindowLongPtr(hDlg, GWLP_USERDATA));
-
- CCommonDlgProcData d(pProvider);
- CommonOptionDlgProc(hDlg, message, wParam, lParam, d);
-
- switch (message) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hDlg);
- {
- CQuotesProviderFinance::TQuotes aQuotes;
- pProvider->GetWatchedQuotes(aQuotes);
-
- HWND hwndList = GetDlgItem(hDlg, IDC_LIST_RATES);
- std::for_each(aQuotes.begin(), aQuotes.end(),
- boost::bind(add_quote_to_wnd, _1, hwndList));
-
- ::EnableWindow(::GetDlgItem(hDlg, IDC_BUTTON_ADD), FALSE);
- ::EnableWindow(::GetDlgItem(hDlg, IDC_BUTTON_REMOVE), FALSE);
- }
- return TRUE;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDC_EDIT_QUOTE:
- if (EN_CHANGE == HIWORD(wParam)) {
- ::EnableWindow(::GetDlgItem(hDlg, IDC_BUTTON_ADD), GetWindowTextLength(GetDlgItem(hDlg, IDC_EDIT_QUOTE)) > 0);
- }
- return TRUE;
- case IDC_BUTTON_ADD:
- if (BN_CLICKED == HIWORD(wParam)) {
- HWND hEdit = GetDlgItem(hDlg, IDC_EDIT_QUOTE);
- tstring sQuoteSymbol = get_window_text(hEdit);
- assert(false == sQuoteSymbol.empty());
- HWND hwndList = GetDlgItem(hDlg, IDC_LIST_RATES);
- if (LB_ERR == is_quote_added(hwndList, sQuoteSymbol)) {
- CQuotesProviderBase::CQuote quote(sQuoteSymbol, sQuoteSymbol);
- if (add_quote_to_wnd(quote, hwndList) >= 0) {
- SetDlgItemText(hDlg, IDC_EDIT_QUOTE, L"");
- SetFocus(hEdit);
- PropSheet_Changed(::GetParent(hDlg), hDlg);
- }
- else {
- ::MessageBeep(MB_ICONERROR);
- }
- }
- }
- return TRUE;
- case IDC_BUTTON_REMOVE:
- if (BN_CLICKED == HIWORD(wParam)) {
- HWND hWnd = ::GetDlgItem(hDlg, IDC_LIST_RATES);
- int nSel = ::SendMessage(hWnd, LB_GETCURSEL, 0, 0);
- if (LB_ERR != nSel) {
- CQuotesProviderBase::CQuote* pQuote = get_quote_ptr_from_lb_index(hWnd, nSel);
- delete pQuote;
- if (LB_ERR != ::SendMessage(hWnd, LB_DELETESTRING, nSel, 0)) {
- PropSheet_Changed(::GetParent(hDlg), hDlg);
- }
- }
-
- nSel = ::SendMessage(hWnd, LB_GETCURSEL, 0, 0);
- ::EnableWindow(::GetDlgItem(hDlg, IDC_BUTTON_REMOVE), (LB_ERR != nSel));
- }
- return TRUE;
- case IDC_LIST_RATES:
- if (CBN_SELCHANGE == HIWORD(wParam)) {
- int nSel = ::SendDlgItemMessage(hDlg, IDC_LIST_RATES, LB_GETCURSEL, 0, 0);
- ::EnableWindow(::GetDlgItem(hDlg, IDC_BUTTON_REMOVE), (LB_ERR != nSel));
- }
- return TRUE;
- }
- return FALSE;
-
- case WM_NOTIFY:
- {
- LPNMHDR pNMHDR = reinterpret_cast<LPNMHDR>(lParam);
- switch (pNMHDR->code) {
- case PSN_APPLY:
- if (pProvider) {
- CQuotesProviderFinance::TQuotes aTemp;
- pProvider->GetWatchedQuotes(aTemp);
-
- typedef std::vector<const CQuotesProviderBase::CQuote*> TQuotesPtr;
- TQuotesPtr apCurrent;
- HWND hwndListBox = GetDlgItem(hDlg, IDC_LIST_RATES);
- int cItems = ::SendMessage(hwndListBox, LB_GETCOUNT, 0, 0);
- for (int i = 0; i < cItems; ++i) {
- const CQuotesProviderBase::CQuote* pQuote = get_quote_ptr_from_lb_index(hwndListBox, i);
- if (pQuote) {
- apCurrent.push_back(pQuote);
- }
- }
-
- std::for_each(aTemp.begin(), aTemp.end(),
- [&apCurrent, pProvider](const CQuotesProviderBase::CQuote& quote)
- {
- if (apCurrent.end() == std::find_if(apCurrent.begin(), apCurrent.end(),
- ["e](const CQuotesProviderBase::CQuote* pQuote) { return 0 == mir_wstrcmpi(pQuote->GetID().c_str(), quote.GetID().c_str()); })) {
- pProvider->WatchForQuote(quote, false);
- }
- });
-
- std::for_each(apCurrent.begin(), apCurrent.end(),
- [&aTemp, pProvider](const CQuotesProviderBase::CQuote* pQuote)
- {
- if (aTemp.end() ==
- std::find_if(aTemp.begin(), aTemp.end(),
- [pQuote](const CQuotesProviderBase::CQuote& quote) { return 0 == mir_wstrcmpi(pQuote->GetID().c_str(), quote.GetID().c_str()); })) {
- pProvider->WatchForQuote(*pQuote, true);
- }
-
- });
-
- pProvider->RefreshSettings();
- }
-
- return TRUE;
- }
- }
- return FALSE;
-
- case WM_DESTROY:
- HWND hwndListBox = GetDlgItem(hDlg, IDC_LIST_RATES);
- int cItems = ::SendMessage(hwndListBox, LB_GETCOUNT, 0, 0);
- for (int i = 0; i < cItems; ++i) {
- const CQuotesProviderBase::CQuote* pQuote = get_quote_ptr_from_lb_index(hwndListBox, i);
- delete pQuote;
- }
- return FALSE;
- }
- return FALSE;
- }
-}
-
-void CQuotesProviderFinance::ShowPropertyPage(WPARAM wp, OPTIONSDIALOGPAGE &odp)
-{
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG_OPT_FINANCE);
- odp.pfnDlgProc = GoogleFinanceOptDlgProc;
- odp.dwInitParam = LPARAM(this);
- odp.szTab.w = const_cast<LPTSTR>(GetInfo().m_sName.c_str());
- g_plugin.addOptions(wp, &odp);
-}
diff --git a/plugins/Quotes/src/QuotesProviderFinance.h b/plugins/Quotes/src/QuotesProviderFinance.h deleted file mode 100644 index d50d459640..0000000000 --- a/plugins/Quotes/src/QuotesProviderFinance.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef __95A13A68_0DF0_43FA_B6C1_81D83AED59AA_QuotesProviderFinance_h__
-#define __95A13A68_0DF0_43FA_B6C1_81D83AED59AA_QuotesProviderFinance_h__
-
-class CQuotesProviderFinance : public CQuotesProviderBase
-{
-public:
- typedef std::vector<CQuotesProviderBase::CQuote> TQuotes;
-
-public:
- void GetWatchedQuotes(TQuotes& raQuotes)const;
- bool WatchForQuote(const CQuote& rQuote, bool bWatch);
- MCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
-
-protected:
- virtual void ShowPropertyPage(WPARAM wp, OPTIONSDIALOGPAGE& odp);
- virtual void Accept(CQuotesProviderVisitor& visitor)const;
-};
-
-#endif //__95A13A68_0DF0_43FA_B6C1_81D83AED59AA_QuotesProviderFinance_h__
\ No newline at end of file diff --git a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp deleted file mode 100644 index dcda584269..0000000000 --- a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp +++ /dev/null @@ -1,283 +0,0 @@ -#include "StdAfx.h"
-
-CQuotesProviderGoogleFinance::CQuotesProviderGoogleFinance()
-{
-}
-
-CQuotesProviderGoogleFinance::~CQuotesProviderGoogleFinance()
-{
-}
-
-static tstring build_url(MCONTACT hContact, const tstring& rsURL)
-{
- tostringstream o;
- o << rsURL << L"?q=" << Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_ID);
- return o.str();
-}
-
-struct CGoogleInfo
-{
- enum
- {
- giRate = 0x0001,
- giOpen = 0x0002,
- giPercentChangeAfterHours = 0x0004,
- giPercentChangeToYesterdayClose = 0x0008
- };
-
- CGoogleInfo()
- : m_dRate(0.0), m_dOpenValue(0.0), m_dPercentChangeAfterHours(0.0), m_dPercentChangeToYersterdayClose(0.0), m_nFlags(0)
- {
- }
-
- tstring m_sCmpName;
- double m_dRate;
- double m_dOpenValue;
- double m_dPercentChangeAfterHours;
- double m_dPercentChangeToYersterdayClose;
- byte m_nFlags;
-};
-
-tstring make_rate_id_value(const tstring& rsCmpID, int nFlags)
-{
- tostringstream o;
- o << L"ref_" << rsCmpID;
- switch (nFlags) {
- default:
- assert(!"Unknown type of value");
- case CGoogleInfo::giRate:
- o << L"_l";
- break;
- case CGoogleInfo::giPercentChangeAfterHours:
- o << L"_ecp";
- break;
- case CGoogleInfo::giPercentChangeToYesterdayClose:
- o << L"_cp";
- break;
- }
-
- return o.str();
-}
-
-tstring get_var_value(const tstring& rsHTML, LPCTSTR pszVarName, size_t cVarNameLength)
-{
- tstring sResult;
- tstring::size_type n = rsHTML.find(pszVarName);
- if (tstring::npos != n) {
- size_t cLengthHTML = rsHTML.size();
- for (size_t i = n + cVarNameLength; i < cLengthHTML; ++i) {
- wchar_t c = rsHTML[i];
- if (';' == c)
- break;
-
- sResult.push_back(c);
- }
- }
-
- return sResult;
-}
-
-tstring get_company_id(const tstring& rsHTML)
-{
- static LPCTSTR pszVarName = L"setCompanyId(";
- static size_t cVarNameLength = mir_wstrlen(pszVarName);
-
- tstring sResult;
- tstring::size_type n = rsHTML.find(pszVarName);
- if (tstring::npos != n) {
- size_t cLengthHTML = rsHTML.size();
- for (size_t i = n + cVarNameLength; i < cLengthHTML; ++i) {
- wchar_t c = rsHTML[i];
- if (')' == c)
- break;
-
- sResult.push_back(c);
- }
- }
- return sResult;
-}
-
-tstring get_company_name(const tstring& rsHTML)
-{
- static LPCTSTR pszVarName = L"var _companyName = ";
- static size_t cVarNameLength = mir_wstrlen(pszVarName);
-
- tstring s = get_var_value(rsHTML, pszVarName, cVarNameLength);
- if (s.size() > 0 && '\'' == s[0])
- s.erase(s.begin());
-
- if (s.size() > 0 && '\'' == s[s.size() - 1])
- s.erase(s.rbegin().base() - 1);
-
- return s;
-}
-
-bool get_double_value(const tstring& rsText, double& rdValue)
-{
- tistringstream input(rsText);
- input.imbue(std::locale("English_United States.1252"));
- input >> rdValue;
-
- if ((true == input.bad()) || (true == input.fail())) {
- tistringstream inputSys(rsText);
- input.imbue(GetSystemLocale());
- input >> rdValue;
- return (false == inputSys.bad()) && (false == inputSys.fail());
- }
-
- return true;
-}
-
-bool get_rate(const IHTMLNode::THTMLNodePtr& pRate, CGoogleInfo& rInfo)
-{
- tstring sRate = pRate->GetText();
-
- if (true == get_double_value(sRate, rInfo.m_dRate)) {
- rInfo.m_nFlags |= CGoogleInfo::giRate;
- return true;
- }
-
- return false;
-}
-
-bool get_inline_data(const IHTMLNode::THTMLNodePtr& pNode, CGoogleInfo& rInfo)
-{
- size_t cChild = pNode->GetChildCount();
- for (size_t i = 0; i < cChild; ++i) {
- IHTMLNode::THTMLNodePtr pChild = pNode->GetChildPtr(i);
- size_t c = pChild->GetChildCount();
- assert(2 == c);
- if (c >= 2) {
- IHTMLNode::THTMLNodePtr pName = pChild->GetChildPtr(0);
-
- tstring sName = pName->GetText();
- if (0 == mir_wstrcmpi(sName.c_str(), L"Open")) {
- IHTMLNode::THTMLNodePtr pValue = pChild->GetChildPtr(1);
- tstring sValue = pValue->GetText();
- if (true == get_double_value(sValue, rInfo.m_dOpenValue)) {
- rInfo.m_nFlags |= CGoogleInfo::giOpen;
- }
- return true;
- }
- }
- }
-
- return false;
-}
-
-bool get_dif_value(const IHTMLNode::THTMLNodePtr& pNode, CGoogleInfo& rInfo, int nItem)
-{
- tstring sDiff = pNode->GetText();
- // this value is in brackets and it has percentage sign.
- // Remove these symbols.
- for (tstring::iterator i = sDiff.begin(); i != sDiff.end();) {
- wchar_t s = *i;
- if ('(' == s || ')' == s || '%' == s)
- i = sDiff.erase(i);
- else
- ++i;
- }
-
- double* pValue = nullptr;
- switch (nItem) {
- case CGoogleInfo::giPercentChangeAfterHours:
- pValue = &rInfo.m_dPercentChangeAfterHours;
- break;
- case CGoogleInfo::giPercentChangeToYesterdayClose:
- pValue = &rInfo.m_dPercentChangeToYersterdayClose;
- break;
- }
-
- assert(pValue);
-
- if ((pValue) && (true == get_double_value(sDiff, *pValue))) {
- rInfo.m_nFlags |= nItem;
- return true;
- }
-
- return false;
-}
-
-bool parse_responce(const tstring& rsHTML, CGoogleInfo& rInfo)
-{
- IHTMLEngine::THTMLParserPtr pHTMLParser = CModuleInfo::GetHTMLEngine()->GetParserPtr();
- IHTMLNode::THTMLNodePtr pRoot = pHTMLParser->ParseString(rsHTML);
- if (pRoot) {
- tstring sCmpID = get_company_id(rsHTML);
- if (false == sCmpID.empty()) {
- tstring sRateID = make_rate_id_value(sCmpID, CGoogleInfo::giRate);
- IHTMLNode::THTMLNodePtr pRate = pRoot->GetElementByID(sRateID);
- if (pRate && get_rate(pRate, rInfo)) {
- rInfo.m_sCmpName = get_company_name(rsHTML);
-
- IHTMLNode::THTMLNodePtr pInline = pRoot->GetElementByID(L"snap-data");
- if (pInline) {
- get_inline_data(pInline, rInfo);
- }
-
- tstring sDiffID = make_rate_id_value(sCmpID, CGoogleInfo::giPercentChangeAfterHours);
- IHTMLNode::THTMLNodePtr pDiff = pRoot->GetElementByID(sDiffID);
- if (pDiff) {
- get_dif_value(pDiff, rInfo, CGoogleInfo::giPercentChangeAfterHours);
- }
-
- sDiffID = make_rate_id_value(sCmpID, CGoogleInfo::giPercentChangeToYesterdayClose);
- pDiff = pRoot->GetElementByID(sDiffID);
- if (pDiff) {
- get_dif_value(pDiff, rInfo, CGoogleInfo::giPercentChangeToYesterdayClose);
- }
-
- return true;
- }
- }
- }
-
- return false;
-}
-
-void CQuotesProviderGoogleFinance::RefreshQuotes(TContracts& anContacts)
-{
- CHTTPSession http;
- tstring sURL = GetURL();
-
- for (TContracts::const_iterator i = anContacts.begin(); i != anContacts.end() && IsOnline(); ++i) {
- MCONTACT hContact = *i;
-
- tstring sFullURL = build_url(hContact, sURL);
-
- if ((true == http.OpenURL(sFullURL)) && (true == IsOnline())) {
- tstring sHTML;
- if ((true == http.ReadResponce(sHTML)) && (true == IsOnline())) {
- CGoogleInfo Info;
- parse_responce(sHTML, Info);
- if (true == IsOnline()) {
- if (Info.m_nFlags&CGoogleInfo::giRate) {
- if (Info.m_nFlags&CGoogleInfo::giOpen) {
- Quotes_DBWriteDouble(hContact, QUOTES_MODULE_NAME, DB_STR_GOOGLE_FINANCE_OPEN_VALUE, Info.m_dOpenValue);
- }
- if (Info.m_nFlags&CGoogleInfo::giPercentChangeAfterHours) {
- Quotes_DBWriteDouble(hContact, QUOTES_MODULE_NAME, DB_STR_GOOGLE_FINANCE_DIFF, Info.m_dPercentChangeAfterHours);
- }
- if (Info.m_nFlags&CGoogleInfo::giPercentChangeToYesterdayClose) {
- Quotes_DBWriteDouble(hContact, QUOTES_MODULE_NAME, DB_STR_GOOGLE_FINANCE_PERCENT_CHANGE_TO_YERSTERDAY_CLOSE, Info.m_dPercentChangeToYersterdayClose);
- }
- if (false == Info.m_sCmpName.empty()) {
- db_set_ws(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION, Info.m_sCmpName.c_str());
- }
-
- WriteContactRate(hContact, Info.m_dRate);
- continue;
- }
- }
- }
- }
-
- SetContactStatus(hContact, ID_STATUS_NA);
- }
-}
-
-void CQuotesProviderGoogleFinance::Accept(CQuotesProviderVisitor& visitor)const
-{
- CQuotesProviderFinance::Accept(visitor);
- visitor.Visit(*this);
-}
diff --git a/plugins/Quotes/src/QuotesProviderGoogleFinance.h b/plugins/Quotes/src/QuotesProviderGoogleFinance.h deleted file mode 100644 index de419225c9..0000000000 --- a/plugins/Quotes/src/QuotesProviderGoogleFinance.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __89D3CC58_7DED_484f_AA25_62BDBB57E18B_QuotesProvider_Google_Finance_h__
-#define __89D3CC58_7DED_484f_AA25_62BDBB57E18B_QuotesProvider_Google_Finance_h__
-
-#define DB_STR_GOOGLE_FINANCE_OPEN_VALUE "OpenQuotePrice"
-#define DB_STR_GOOGLE_FINANCE_DIFF "DifferentFromStartOfDay"
-#define DB_STR_GOOGLE_FINANCE_PERCENT_CHANGE_TO_YERSTERDAY_CLOSE "PercentChangeToYersterdayClose"
-
-// #define DB_STR_GOOGLE_FINANCE_COMP_NAME "CompanyName"
-
-
-class CQuotesProviderGoogleFinance : public CQuotesProviderFinance
-{
-
-public:
- CQuotesProviderGoogleFinance();
- ~CQuotesProviderGoogleFinance();
-
-private:
- virtual void RefreshQuotes(TContracts& anContacts);
- virtual void Accept(CQuotesProviderVisitor& visitor)const;
-};
-
-#endif //__89D3CC58_7DED_484f_AA25_62BDBB57E18B_QuotesProvider_Google_Finance_h__
diff --git a/plugins/Quotes/src/QuotesProviderVisitorDbSettings.cpp b/plugins/Quotes/src/QuotesProviderVisitorDbSettings.cpp index 2208d7561f..d7d9055d33 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorDbSettings.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorDbSettings.cpp @@ -41,89 +41,6 @@ void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderBase&/* rProvi m_pszDefPopupFormat = L"\\nCurrent = %r\\nPrevious = %p";
}
-void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderDukasCopy&/* rProvider*/)
-{
- m_pszDbRefreshRateType = DB_STR_REFRESH_RATE_TYPE;
- m_pszDbRefreshRateValue = DB_STR_REFRESH_RATE_VALUE;
- m_pszDbDisplayNameFormat = DB_STR_DC_DISPLAY_NAME_FORMAT;
- m_pszDefDisplayFormat = L"%s %r";
- m_pszXMLIniFileName = L"Dukascopy.xml";
- m_pszDbStatusMsgFormat = "DC_StatusMessageFormat";
-
- m_pszDbLogMode = "DC_LogMode";
- m_pszDbHistoryFormat = "DC_HistoryFormat";
- m_pszDbHistoryCondition = "DC_AddToHistoryOnlyIfValueIsChanged";
- m_pszDbLogFile = "DC_LogFile";
- m_pszDbLogFormat = "DC_LogFileFormat";
- m_pszDbLogCondition = "DC_AddToLogOnlyIfValueIsChanged";
- m_pszDbPopupFormat = "DC_PopupFormat";
- m_pszDbPopupCondition = "DC_ShowPopupOnlyIfValueChanged";
-
- m_pszDbPopupColourMode = "DC_PopupColourMode";
- m_pszDbPopupBkColour = "DC_PopupColourBk";
- m_pszDbPopupTextColour = "DC_PopupColourText";
- m_pszDbPopupDelayMode = "DC_PopupDelayMode";
- m_pszDbPopupDelayTimeout = "DC_PopupDelayTimeout";
- m_pszDbPopupHistoryFlag = "DC_PopupHistoryFlag";
- m_pszDbTendencyFormat = "DC_TendencyFormat";
-}
-
-void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderGoogleFinance&/* rProvider*/)
-{
- m_pszDbRefreshRateType = "GoogleFinance_RefreshRateType";
- m_pszDbRefreshRateValue = "GoogleFinance_RefreshRateValue";
- m_pszDbDisplayNameFormat = "GoogleFinance_DspNameFrmt";
- m_pszDefDisplayFormat = L"%s %r";
- m_pszXMLIniFileName = L"GoogleFinance.xml";
- m_pszDbStatusMsgFormat = "GoogleFinance_StatusMessageFormat";
-
- m_pszDbLogMode = "GoogleFinance_LogMode";
- m_pszDbHistoryFormat = "GoogleFinance_HistoryFormat";
- m_pszDbHistoryCondition = "GoogleFinance_AddToHistoryOnlyIfValueIsChanged";
- m_pszDbLogFile = "GoogleFinance_LogFile";
- m_pszDbLogFormat = "GoogleFinance_LogFileFormat";
- m_pszDbLogCondition = "GoogleFinance_AddToLogOnlyIfValueIsChanged";
- m_pszDbPopupFormat = "GoogleFinance_PopupFormat";
- m_pszDbPopupCondition = "GoogleFinance_ShowPopupOnlyIfValueChanged";
-
- m_pszDbPopupColourMode = "GoogleFinance_PopupColourMode";
- m_pszDbPopupBkColour = "GoogleFinance_PopupColourBk";
- m_pszDbPopupTextColour = "GoogleFinance_PopupColourText";
- m_pszDbPopupDelayMode = "GoogleFinance_PopupDelayMode";
- m_pszDbPopupDelayTimeout = "GoogleFinance_PopupDelayTimeout";
- m_pszDbPopupHistoryFlag = "GoogleFinance_PopupHistoryFlag";
-
- m_pszDbTendencyFormat = "GoogleFinance_TendencyFormat";
-}
-
-void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderYahoo&)
-{
- m_pszDbRefreshRateType = "Yahoo_RefreshRateType";
- m_pszDbRefreshRateValue = "Yahoo_RefreshRateValue";
- m_pszDbDisplayNameFormat = "Yahoo_DspNameFrmt";
- m_pszDefDisplayFormat = L"%s %r";
- m_pszXMLIniFileName = L"Yahoo.xml";
- m_pszDbStatusMsgFormat = "Yahoo_StatusMessageFormat";
-
- m_pszDbLogMode = "Yahoo_LogMode";
- m_pszDbHistoryFormat = "Yahoo_HistoryFormat";
- m_pszDbHistoryCondition = "Yahoo_AddToHistoryOnlyIfValueIsChanged";
- m_pszDbLogFile = "Yahoo_LogFile";
- m_pszDbLogFormat = "Yahoo_LogFileFormat";
- m_pszDbLogCondition = "Yahoo_AddToLogOnlyIfValueIsChanged";
- m_pszDbPopupFormat = "Yahoo_PopupFormat";
- m_pszDbPopupCondition = "Yahoo_ShowPopupOnlyIfValueChanged";
-
- m_pszDbPopupColourMode = "Yahoo_PopupColourMode";
- m_pszDbPopupBkColour = "Yahoo_PopupColourBk";
- m_pszDbPopupTextColour = "Yahoo_PopupColourText";
- m_pszDbPopupDelayMode = "Yahoo_PopupDelayMode";
- m_pszDbPopupDelayTimeout = "Yahoo_PopupDelayTimeout";
- m_pszDbPopupHistoryFlag = "Yahoo_PopupHistoryFlag";
-
- m_pszDbTendencyFormat = "Yahoo_TendencyFormat";
-}
-
void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderCurrencyConverter&)
{
m_pszDbRefreshRateType = "CC_RefreshRateType";
diff --git a/plugins/Quotes/src/QuotesProviderVisitorDbSettings.h b/plugins/Quotes/src/QuotesProviderVisitorDbSettings.h index 12ce87ee14..8c7003303e 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorDbSettings.h +++ b/plugins/Quotes/src/QuotesProviderVisitorDbSettings.h @@ -9,9 +9,6 @@ public: private:
virtual void Visit(const CQuotesProviderBase& rProvider)override;
- virtual void Visit(const CQuotesProviderDukasCopy& rProvider)override;
- virtual void Visit(const CQuotesProviderGoogleFinance& rProvider)override;
- virtual void Visit(const CQuotesProviderYahoo& rProvider)override;
virtual void Visit(const CQuotesProviderCurrencyConverter& rProvider)override;
public:
LPCSTR m_pszDbRefreshRateType;
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp index f6af082980..462776a5b7 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp @@ -17,12 +17,6 @@ const tstring& CQuotesProviderVisitorFormater::GetResult()const return m_sResult;
}
-void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderDukasCopy&)
-{
- if ('d' == m_chr || 'D' == m_chr)
- m_sResult = Quotes_DBGetStringT(m_hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION);
-}
-
static bool get_fetch_time(MCONTACT hContact, time_t& rTime)
{
DBVARIANT dbv;
@@ -85,23 +79,6 @@ void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderBase& rProvider) }
}
-void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderGoogleFinance&/* rProvider*/)
-{
- switch (m_chr) {
- case 'o':
- FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_OPEN_VALUE);
- break;
- case 'd':
- FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_DIFF, L"0");
- break;
- case 'y':
- FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_PERCENT_CHANGE_TO_YERSTERDAY_CLOSE, L"0");
- break;
- case 'n':
- m_sResult = Quotes_DBGetStringT(m_hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION);
- break;
- }
-}
tstring format_double(double dValue, int nWidth)
{
@@ -126,30 +103,6 @@ void CQuotesProviderVisitorFormater::FormatDoubleHelper(LPCSTR pszDbSet, m_sResult = sInvalid;
}
-void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderYahoo&)
-{
- switch (m_chr) {
- case 'o':
- FormatDoubleHelper(DB_STR_YAHOO_OPEN_VALUE);
- break;
- case 'h':
- FormatDoubleHelper(DB_STR_YAHOO_DAY_HIGH);
- break;
- case 'P':
- FormatDoubleHelper(DB_STR_YAHOO_PREVIOUS_CLOSE);
- break;
- case 'c':
- FormatDoubleHelper(DB_STR_YAHOO_CHANGE);
- break;
- case 'g':
- FormatDoubleHelper(DB_STR_YAHOO_DAY_LOW);
- break;
- case 'n':
- m_sResult = Quotes_DBGetStringT(m_hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION);
- break;
- }
-}
-
void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderCurrencyConverter&)
{
switch (m_chr) {
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormater.h b/plugins/Quotes/src/QuotesProviderVisitorFormater.h index 5017edd33b..b3c55f7108 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormater.h +++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.h @@ -10,10 +10,7 @@ public: const tstring& GetResult()const;
private:
- virtual void Visit(const CQuotesProviderDukasCopy& rProvider)override;
virtual void Visit(const CQuotesProviderBase& rProvider)override;
- virtual void Visit(const CQuotesProviderGoogleFinance& rProvider)override;
- virtual void Visit(const CQuotesProviderYahoo& rProvider)override;
virtual void Visit(const CQuotesProviderCurrencyConverter& rProvider)override;
private:
diff --git a/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp b/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp index 1e6d4fe384..1ebe6d7c0c 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp @@ -18,42 +18,6 @@ void CQuotesProviderVisitorTendency::Visit(const CQuotesProviderBase&) }
}
-void CQuotesProviderVisitorTendency::Visit(const CQuotesProviderGoogleFinance&)
-{
- switch (m_chr) {
- case 'o':
- GetValue(DB_STR_GOOGLE_FINANCE_OPEN_VALUE);
- break;
- case 'd':
- GetValue(DB_STR_GOOGLE_FINANCE_DIFF);
- break;
- case 'y':
- GetValue(DB_STR_GOOGLE_FINANCE_PERCENT_CHANGE_TO_YERSTERDAY_CLOSE);
- break;
- }
-}
-
-void CQuotesProviderVisitorTendency::Visit(const CQuotesProviderYahoo&)
-{
- switch (m_chr) {
- case 'o':
- GetValue(DB_STR_YAHOO_OPEN_VALUE);
- break;
- case 'h':
- GetValue(DB_STR_YAHOO_DAY_HIGH);
- break;
- case 'P':
- GetValue(DB_STR_YAHOO_PREVIOUS_CLOSE);
- break;
- case 'c':
- GetValue(DB_STR_YAHOO_CHANGE);
- break;
- case 'g':
- GetValue(DB_STR_YAHOO_DAY_LOW);
- break;
- }
-}
-
void CQuotesProviderVisitorTendency::GetValue(LPCSTR pszDbKeyName)
{
m_bValid = Quotes_DBReadDouble(m_hContact, QUOTES_MODULE_NAME, pszDbKeyName, m_dResult);
diff --git a/plugins/Quotes/src/QuotesProviderVisitorTendency.h b/plugins/Quotes/src/QuotesProviderVisitorTendency.h index 537f8bd0a6..7567bb65c6 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorTendency.h +++ b/plugins/Quotes/src/QuotesProviderVisitorTendency.h @@ -11,8 +11,6 @@ public: private:
virtual void Visit(const CQuotesProviderBase& rProvider);
- virtual void Visit(const CQuotesProviderGoogleFinance& rProvider);
- virtual void Visit(const CQuotesProviderYahoo& rProvider);
private:
void GetValue(LPCSTR pszDbKeyName);
diff --git a/plugins/Quotes/src/QuotesProviderYahoo.cpp b/plugins/Quotes/src/QuotesProviderYahoo.cpp deleted file mode 100644 index c08a7c1ce8..0000000000 --- a/plugins/Quotes/src/QuotesProviderYahoo.cpp +++ /dev/null @@ -1,149 +0,0 @@ -#include "stdafx.h"
-
-void remove_quotes(tstring& s)
-{
- if (*s.begin() == '"')
- s.erase(s.begin());
-
- if (*s.rbegin() == '"') {
- tstring::iterator i(s.begin());
- std::advance(i, s.size() - 1);
- s.erase(i);
- }
-}
-
-void remove_end_of_line(tstring& s)
-{
- if (*s.rbegin() == '\n') {
- tstring::iterator i(s.begin());
- std::advance(i, s.size() - 1);
- s.erase(i);
- }
- if (*s.rbegin() == '\r') {
- tstring::iterator i(s.begin());
- std::advance(i, s.size() - 1);
- s.erase(i);
- }
-}
-
-bool t2d(const tstring& s, double& d)
-{
- tistringstream stream(s);
- stream >> d;
- return ((false == stream.fail()) && (false == stream.bad()));
-}
-
-typedef std::vector<tstring> TStrings;
-
-bool get_double_from_parsed_line(MCONTACT hContact, const TStrings& rasParsedLine, size_t nIndex, const char* pszDbName)
-{
- if (rasParsedLine.size() > nIndex) {
- double d = 0.0;
- if (true == t2d(rasParsedLine[nIndex], d))
- return Quotes_DBWriteDouble(hContact, QUOTES_MODULE_NAME, pszDbName, d);
- }
-
- db_set_ws(hContact, QUOTES_MODULE_NAME, pszDbName, L"");
- return false;
-}
-
-void CQuotesProviderYahoo::RefreshQuotes(TContracts& anContacts)
-{
- tstring sURL = GetURL();
-
- typedef std::map<tstring, MCONTACT> TQuoteID2ContractHandles;
- TQuoteID2ContractHandles aQuoteID2Handles;
- tostringstream oURL;
- oURL << sURL << L"dioksin.txt?s=";
- for (TContracts::const_iterator i = anContacts.begin(); i != anContacts.end() && IsOnline(); ++i) {
- MCONTACT hContact = *i;
-
- tstring sQuoteID = Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_ID);
- aQuoteID2Handles[sQuoteID] = hContact;
- if (i != anContacts.begin())
- oURL << L"+";
-
- oURL << sQuoteID;
- }
-
- if (true == IsOnline()) {
- oURL << L"&f=snl1ohgpc1";
- CHTTPSession http;
- if ((true == http.OpenURL(oURL.str())) && (true == IsOnline())) {
- tstring sFile;
- if ((true == http.ReadResponce(sFile)) && (true == IsOnline())) {
- tistringstream out_str(sFile.c_str());
- while (false == out_str.eof()) {
- tstring sLine;
- std::getline(out_str, sLine);
- if (false == sLine.empty()) {
- remove_end_of_line(sLine);
-
- TStrings asStrings;
- for (tstring::size_type nPos = sLine.find(','); nPos != tstring::npos; nPos = sLine.find(',')) {
- tstring::iterator i(sLine.begin());
- std::advance(i, nPos);
- tstring s(sLine.begin(), i);
- remove_quotes(s);
- asStrings.push_back(s);
-
- if (i != sLine.end()) {
- std::advance(i, 1);
- }
- sLine.erase(sLine.begin(), i);
- }
-
- if (false == sLine.empty()) {
- remove_quotes(sLine);
-
- if (false == sLine.empty())
- asStrings.push_back(sLine);
- }
-
- size_t cItems = asStrings.size();
- if (cItems >= 3) {
- enum
- {
- indexSymbol = 0,
- indexName,
- indexLastTrade,
- indexOpen,
- indexDayHigh,
- indexDayLow,
- indexPreviousClose,
- indexChange
- };
- auto it3 = aQuoteID2Handles.find(asStrings[indexSymbol]);
- if (it3 != aQuoteID2Handles.end()) {
- MCONTACT hContact = it3->second;
- double dRate = 0.0;
- if (true == t2d(asStrings[indexLastTrade], dRate)) {
- db_set_ws(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION, asStrings[indexName].c_str());
-
- get_double_from_parsed_line(hContact, asStrings, indexOpen, DB_STR_YAHOO_OPEN_VALUE);
- get_double_from_parsed_line(hContact, asStrings, indexDayHigh, DB_STR_YAHOO_DAY_HIGH);
- get_double_from_parsed_line(hContact, asStrings, indexDayLow, DB_STR_YAHOO_DAY_LOW);
- get_double_from_parsed_line(hContact, asStrings, indexPreviousClose, DB_STR_YAHOO_PREVIOUS_CLOSE);
- get_double_from_parsed_line(hContact, asStrings, indexChange, DB_STR_YAHOO_CHANGE);
- WriteContactRate(hContact, dRate);
- aQuoteID2Handles.erase(it3);
- }
- }
- }
- }
- }
- }
- }
-
- if (true == IsOnline()) {
- std::for_each(aQuoteID2Handles.begin(), aQuoteID2Handles.end(),
- [](const TQuoteID2ContractHandles::value_type& pair) { SetContactStatus(pair.second, ID_STATUS_NA); });
- }
- }
-}
-
-void CQuotesProviderYahoo::Accept(CQuotesProviderVisitor& visitor)const
-{
- CQuotesProviderFinance::Accept(visitor);
- visitor.Visit(*this);
-}
diff --git a/plugins/Quotes/src/QuotesProviderYahoo.h b/plugins/Quotes/src/QuotesProviderYahoo.h deleted file mode 100644 index a5209c504a..0000000000 --- a/plugins/Quotes/src/QuotesProviderYahoo.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __E927F394_5452_458E_AF48_71E44F9EE793_QuotesProviderYahoo_h__
-#define __E927F394_5452_458E_AF48_71E44F9EE793_QuotesProviderYahoo_h__
-
-#define DB_STR_YAHOO_OPEN_VALUE "OpenQuotePrice"
-#define DB_STR_YAHOO_DAY_HIGH "DayHigh"
-#define DB_STR_YAHOO_DAY_LOW "DayLow"
-#define DB_STR_YAHOO_PREVIOUS_CLOSE "PreviousClose"
-#define DB_STR_YAHOO_CHANGE "Change"
-
-class CQuotesProviderYahoo : public CQuotesProviderFinance
-{
-private:
- virtual void RefreshQuotes(TContracts& anContacts);
- virtual void Accept(CQuotesProviderVisitor& visitor)const;
-};
-
-#endif //__E927F394_5452_458E_AF48_71E44F9EE793_QuotesProviderYahoo_h__
diff --git a/plugins/Quotes/src/QuotesProviders.cpp b/plugins/Quotes/src/QuotesProviders.cpp index c9bb5fc045..e8c202e3af 100644 --- a/plugins/Quotes/src/QuotesProviders.cpp +++ b/plugins/Quotes/src/QuotesProviders.cpp @@ -27,9 +27,6 @@ template<class T>void create_provider(CQuotesProviders::TQuotesProviders& apProv void CQuotesProviders::CreateProviders()
{
- create_provider<CQuotesProviderDukasCopy>(m_apProviders);
- create_provider<CQuotesProviderGoogleFinance>(m_apProviders);
- create_provider<CQuotesProviderYahoo>(m_apProviders);
create_provider<CQuotesProviderCurrencyConverter>(m_apProviders);
}
diff --git a/plugins/Quotes/src/resource.h b/plugins/Quotes/src/resource.h index c0154194f1..0cbfb68af1 100644 --- a/plugins/Quotes/src/resource.h +++ b/plugins/Quotes/src/resource.h @@ -2,7 +2,6 @@ // Microsoft Visual C++ generated include file.
// Used by C:\Code\miranda-ng-from-github\plugins\Quotes\res\Forex.rc
//
-#define IDD_DIALOG_ECONOMIC_RATES 101
#define IDI_ICON_MAIN 102
#define IDD_DIALOG_QUOTE_INFO 102
#define IDD_DIALOG_OPT_GOOGLE 103
@@ -16,7 +15,6 @@ #define IDI_ICON_CURRENCY_CONVERTER 117
#define IDD_DIALOG_QUOTE_INFO_1 118
#define IDI_ICON_REFRESH 118
-#define IDD_DIALOG_OPT_FINANCE 119
#define IDI_ICON_IMPORT 119
#define IDI_ICON_EXPORT 120
#define IDD_PROVIDER_ADV_SETTINGS 120
@@ -25,7 +23,6 @@ #define IDI_ICON_MAIN1 122
#define IDI_ICON_DISABLED 122
#define IDD_DIALOG_VARIABLE_LIST 123
-#define IDC_TREE_ECONOMIC_RATES 1001
#define IDC_EDIT_REFRESH_RATE 1002
#define IDC_SPIN_REFRESH_RATE 1003
#define IDC_COMBO_REFRESH_RATE 1004
@@ -69,7 +66,6 @@ #define IDC_BUTTON_LOG_FILE_DESCRIPTION2 1037
#define IDC_BUTTON_POPUP_FORMAT_DESCRIPTION 1037
#define IDC_EDIT_RESULT 1039
-#define IDC_EDIT_QUOTE 1059
#define IDC_BUTTON_SWAP 1060
#define IDC_BUTTON_ADVANCED_SETTINGS 1061
#define IDC_BUTTON_POPUP_SETTINGS 1061
diff --git a/plugins/Quotes/src/stdafx.h b/plugins/Quotes/src/stdafx.h index 4c2eb96152..fe54397d9f 100644 --- a/plugins/Quotes/src/stdafx.h +++ b/plugins/Quotes/src/stdafx.h @@ -91,14 +91,9 @@ inline tstring quotes_a2t(const char* s) #include "Locale.h"
#include "ExtraImages.h"
#include "IsWithinAccuracy.h"
-#include "OptionDukasCopy.h"
#include "IQuotesProvider.h"
#include "QuotesProviders.h"
#include "QuotesProviderBase.h"
-#include "QuotesProviderFinance.h"
-#include "QuotesProviderYahoo.h"
-#include "QuotesProviderDukasCopy.h"
-#include "QuotesProviderGoogleFinance.h"
#include "QuotesProviderVisitor.h"
#include "QuotesProviderVisitorDbSettings.h"
#include "QuotesProviderVisitorFormater.h"
diff --git a/plugins/Quotes/src/version.h b/plugins/Quotes/src/version.h index b153c00a64..94b91a4834 100644 --- a/plugins/Quotes/src/version.h +++ b/plugins/Quotes/src/version.h @@ -5,9 +5,9 @@ #include <stdver.h>
-#define __PLUGIN_NAME "Quotes"
+#define __PLUGIN_NAME "Currency Rates"
#define __FILENAME "Quotes.dll"
-#define __DESCRIPTION "Shows currency rates and economic quotes."
+#define __DESCRIPTION "Shows currency rates."
#define __AUTHOR "Dioksin"
#define __AUTHORWEB "https://miranda-ng.org/p/Quotes/"
#define __COPYRIGHT ""
|