~ubuntu-branches/ubuntu/maverick/telepathy-glib/maverick

« back to all changes in this revision

Viewing changes to spec/Connection_Interface_Balance.xml

  • Committer: Bazaar Package Importer
  • Author(s): Simon McVittie
  • Date: 2010-05-10 17:59:54 UTC
  • mfrom: (1.6.1 upstream) (27.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100510175954-bxvqq3xx0sy4itmp
Tags: 0.11.5-1
New upstream version with new API/ABI

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" ?>
 
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>
 
11
 
 
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>
 
16
 
 
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,
 
20
      USA.</p>
 
21
  </tp:license>
 
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>
 
25
 
 
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>
 
32
    </tp:docstring>
 
33
 
 
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>
 
41
 
 
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>
 
45
      </tp:docstring>
 
46
 
 
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
 
52
            by the Currency.</p>
 
53
        </tp:docstring>
 
54
      </tp:member>
 
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
 
60
            currency value.</p>
 
61
 
 
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
 
64
            the amount.</p>
 
65
        </tp:docstring>
 
66
      </tp:member>
 
67
      <tp:member type="s" name="Currency">
 
68
        <tp:docstring>
 
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
 
72
          is not known.
 
73
        </tp:docstring>
 
74
      </tp:member>
 
75
    </tp:struct>
 
76
 
 
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>
 
83
 
 
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>
 
87
      </tp:docstring>
 
88
    </property>
 
89
 
 
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>
 
93
      </tp:docstring>
 
94
 
 
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>
 
98
            property.</p>
 
99
        </tp:docstring>
 
100
      </arg>
 
101
    </signal>
 
102
 
 
103
  </interface>
 
104
</node>
 
105
<!-- vim:set sw=2 sts=2 et ft=xml: -->