org.freedesktop.Telepathy.Connection.Interface.Balance

# Interface org.freedesktop.Telepathy.Connection.Interface.Balance

Interface Index (Compact) | Summary | Description | Signals | Properties | Types

### Signals

BalanceChanged | ((ius): Balance) |

### Properties

AccountBalance | (ius) (Currency_Amount) | Read only |

### Types

Currency_Amount | Struct | (ius) |

Added in 0.19.0. (as stable API)
Objects implementing this interface must also implement:

- org.freedesktop.Telepathy.Connection

### Description

In many real-time communication services the user can pay for certain services, typically calls to the PSTN, in advance. In (at least) Skype, it's possible to query the current balance in a machine-readable way.

# Signals

(Permalink)

## BalanceChanged ((ius): Balance)

### Parameters

- Balance — (ius) (Currency_Amount)

The new value of the AccountBalance property.

Emitted when the user's balance has changed.

# Properties

Accessed using the org.freedesktop.DBus.Properties interface.
(Permalink)

## AccountBalance — (ius) (Currency_Amount)

Read only

The user's balance on the account corresponding to this Connection. A negative amount may be possible on some services, and indicates that the user owes money to the service provider.

On initial connection, this property may have an unknown value, represented by Amount = 0, Scale = 2**32 - 1 (the largest possible 32-bit unsigned integer) and Currency = "".

# Types

Struct (Permalink)

## Currency_Amount — (ius)

An amount of money in a specified currency. For example, 3.21 British pounds would conventionally be represented by (Amount = 321, Scale = 2, Currency = "GBP"), but could be represented by (Amount = 3210, Scale = 3, Currency = "GBP") in a service that records balance in units of 0.001 pounds.

As a special case, if Amount = 0, Scale = 2**32 - 1 (i.e. the largest possible 32-bit unsigned integer) and Currency = "", this indicates an unknown amount.

- Amount — i

The amount, expressed as a fixed-point number with decimal scale defined by the Scale property; for instance, an Amount value of 1234 with Scale of 2 represents 12.34 in the currency unit given by the Currency.

- Scale — u

The decimal scale for the fixed point value of the Amount property, defining the number of rightmost decimal digits from the integer value which form the fractional part of the resulting currency value.

As well as defining the interpretation of Amount, user interfaces may use this value to determine the precision with which to display the amount.

- Currency — s
The currency code represented by this amount, which SHOULD be an international currency code such as "EUR", "USD", or "JPY" if possible. An empty string can be used to indicate that the currency is not known.