Warning, /utilities/keurocalc/curconvd/API.txt is written in an unsupported language. File is not indexed.

0001                                   D-Bus API
0002 
0003 
0004 -------------------------------------------------------------------------------
0005 
0006                          Object "/CurrencyConverter"
0007 
0008 
0009 DataSources(out ARRAY of STRING sources)
0010 
0011   Returns the available data sources.
0012 
0013   In the case of curconvd, this method returns:
0014      (fixed)
0015      http://www.ecb.int
0016      http://rss.timegenie.com
0017   which stands for:
0018      Fixed rates
0019      European Central Bank
0020      Time Genie
0021 
0022 
0023 RoundingMethods(out ARRAY of STRING sources)
0024 
0025   Lists the available rounding methods.
0026 
0027   In the case of curconvd, this method returns:
0028      none
0029      official rules
0030      smallest coin
0031   which stands for:
0032      No rounding at all
0033      Use the official rules
0034      Round to the nearest smallest coin
0035 
0036 
0037 ReferenceCurrency(in STRING dataSource, out STRING code)
0038 
0039   Gives the reference currency for a given data source.
0040 
0041   In the case of curconvd, this method returns:
0042     EUR
0043   or
0044     USD
0045   which stands for
0046     euro
0047   or
0048     US dollar
0049 
0050 
0051 LoadSource(in STRING source, in STRING method, out STRING tablePath)
0052 
0053   Loads the exchange rates provided by a given data source, planning
0054   to use the given rounding method. This method returns the d-bus object
0055   path of the conversion table. This path can be used in subsequent calls,
0056   to get exchange rates for example.
0057 
0058   The reference data source must be specified using the same names as the ones
0059   returned by the "DataSources()" method. The rounding methods must be
0060   specified using the same names as the ones returned by the "RoundingMethod"
0061   method.
0062 
0063   The table path is guaranteed to be valid at least during one hour after
0064   last access to the table. After that, the table can be removed from memory
0065   at any time without warning. It is better to kindly call "UnloadTable"
0066   when finished, rather than to let tables get unloaded automatically.
0067 
0068   Please notice that the data source might change its rates at any time without
0069   the exchange rates table to be updated. This is intentional, because one might
0070   be able to finish computations with the same old exchange rates.
0071 
0072 TODO : this will be an asynchronous method, explain how to be informed when completed
0073 
0074 
0075 UnloadTable(in UINT32 tableNumber)
0076 
0077   Unloads the data source from memory when it is not needed any more.
0078 
0079 
0080 -------------------------------------------------------------------------------
0081 
0082                                 Table object
0083 
0084 
0085 AvailableCurrencies(out ARRAY of STRING codes)
0086 
0087   Returns the list of currencies provided by the data source that has been
0088   loaded.
0089 
0090   The supported currencies are shown using their three-letter international
0091   code, like:
0092      AUD
0093      BGN
0094      BRL
0095      CAD
0096   which would stand for:
0097      Australian dollar
0098      Bulgarian Lev
0099      Brazilian real
0100      Canadian dollar
0101 
0102   The list for a given data source may vary over time, as this data source may
0103   add or remove currencies.
0104 
0105 
0106 Symbol(in STRING code, out STRING symbol)
0107 
0108   Gives the ordinary symbol for a given currency. For example,
0109   converts "GBP" into "£".
0110 
0111   The "code" is one of the three-letter codes that is available for
0112   that table (see "AvailableCurrencies()" method).
0113 
0114 
0115 Name(in STRING code, out STRING name)
0116 
0117   Gives the long name for a given currency. For example,
0118   converts "GBP" into "Brtisih pound".
0119 
0120   The "code" is one of the three-letter codes that is available for
0121   that table (see "AvailableCurrencies()" method).
0122 
0123 
0124 ConvertFromReference(in STRING code, in DOUBLE amount, out DOUBLE result)
0125 
0126   Converts an amount expressed in the reference currency into
0127   the required currency, and rounds the result according to the
0128   rounding method.
0129 
0130   The "code" is one of the three-letter codes that is available for
0131   that table (see "AvailableCurrencies()" method). The "amount" is
0132   a number with two decimal digits.
0133 
0134 
0135 ConvertToReference(in STRING code, in DOUBLE amount, out DOUBLE result)
0136 
0137   Converts an amount expressed in the required currency into
0138   the reference currency, and rounds the result according to the
0139   rounding method.
0140 
0141   The "code" is one of the three-letter codes that is available for
0142   that table (see "AvailableCurrencies()" method). The "amount" is
0143   a number with two decimal digits.