2
<node name="/Connection_Interface_Balance"
3
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
4
<tp:copyright>Copyright © 2009 Collabora Ltd.</tp:copyright>
5
<tp:copyright>Copyright © 2009 Nokia Corporation</tp:copyright>
6
<tp:license xmlns="http://www.w3.org/1999/xhtml">
7
<p>This library is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Lesser General Public
9
License as published by the Free Software Foundation; either
10
version 2.1 of the License, or (at your option) any later version.</p>
12
<p>This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Lesser General Public License for more details.</p>
17
<p>You should have received a copy of the GNU Lesser General Public
18
License along with this library; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22
<interface name="org.freedesktop.Telepathy.Connection.Interface.Balance">
23
<tp:requires interface="org.freedesktop.Telepathy.Connection"/>
24
<tp:added version="0.19.0">(as stable API)</tp:added>
26
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
27
<p>In many real-time communication services the user can pay for certain
28
services, typically calls to the
29
<abbr title="Public Switched Telephone Network">PSTN</abbr>,
30
in advance. In (at least) Skype, it's possible to query the current
31
balance in a machine-readable way.</p>
34
<tp:struct name="Currency_Amount">
35
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
36
<p>An amount of money in a specified currency. For example,
37
3.21 British pounds would conventionally be represented by
38
(Amount = 321, Scale = 2, Currency = "GBP"), but could be
39
represented by (Amount = 3210, Scale = 3, Currency = "GBP")
40
in a service that records balance in units of 0.001 pounds.</p>
42
<p>As a special case, if Amount = 0, Scale = 2**32 - 1 (i.e.
43
the largest possible 32-bit unsigned integer) and Currency = "",
44
this indicates an unknown amount.</p>
47
<tp:member type="i" name="Amount">
48
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
49
<p>The amount, expressed as a fixed-point number with decimal scale
50
defined by the Scale property; for instance, an Amount value of
51
1234 with Scale of 2 represents 12.34 in the currency unit given
55
<tp:member type="u" name="Scale">
56
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
57
<p>The decimal scale for the fixed point value of the Amount
58
property, defining the number of rightmost decimal digits from
59
the integer value which form the fractional part of the resulting
62
<p>As well as defining the interpretation of Amount, user interfaces
63
may use this value to determine the precision with which to display
67
<tp:member type="s" name="Currency">
69
The currency code represented by this amount, which SHOULD be an
70
international currency code such as "EUR", "USD", or "JPY" if
71
possible. An empty string can be used to indicate that the currency
77
<property name="AccountBalance" tp:name-for-bindings="Account_Balance"
78
access="read" type="(ius)" tp:type="Currency_Amount">
79
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
80
<p>The user's balance on the account corresponding to this Connection.
81
A negative amount may be possible on some services, and indicates
82
that the user owes money to the service provider.</p>
84
<p>On initial connection, this property may have an unknown
85
value, represented by Amount = 0, Scale = 2**32 - 1 (the largest
86
possible 32-bit unsigned integer) and Currency = "".</p>
90
<signal name="BalanceChanged" tp:name-for-bindings="Balance_Changed">
91
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
92
<p>Emitted when the user's balance has changed.</p>
95
<arg name="Balance" type="(ius)" tp:type="Currency_Amount">
96
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
97
<p>The new value of the <tp:member-ref>AccountBalance</tp:member-ref>
105
<!-- vim:set sw=2 sts=2 et ft=xml: -->