Chan.I.Password — Telepathy D-Bus Interface Specification

# Interface Channel.Interface.Password

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

### Methods

GetPasswordFlags | () | → | u: Password_Flags |
ProvidePassword | (s: Password) | → | b: Correct |

### Signals

PasswordFlagsChanged | (u: Added, u: Removed) |

### Types

Channel_Password_Flags | Flags | u |

Objects implementing this interface must also implement:

- org.freedesktop.Telepathy.Channel

### Description

Interface for channels that may have a password set that users need to provide before being able to join. The GetPasswordFlags method and the associated PasswordFlagsChanged signal indicate whether the user must now provide a password to join the channel.

Once the user has joined the channel, the current password-protectedness of the room can be checked (and possibly modified) using the RoomConfig1 interface, if implemented.

# Methods

(Permalink)

## GetPasswordFlags () → u: Password_Flags

### Returns

- Password_Flags — u (Channel_Password_Flags)
An integer with the logical OR of all the flags set (values of ChannelPasswordFlags)

Returns the bitwise-OR of the flags relevant to the password on this channel. The user interface can use this to present information about which operations are currently valid.

### Possible Errors

- Disconnected
The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.

##### Rationale:

The second usage corresponds to None in the Connection_Status_Reason enum; if a better reason is available, the corresponding error should be used instead.
- Network Error
Raised when there is an error reading from or writing to the network.

(Permalink)

## ProvidePassword (s: Password) → b: Correct

### Parameters

- Password — s
The password

### Returns

- Correct — b
A boolean indicating whether or not the password was correct

Provide the password so that the channel can be joined. Must be called with the correct password in order for channel joining to proceed if the 'provide' password flag is set.

### Possible Errors

- Disconnected
The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.

##### Rationale:

The second usage corresponds to None in the Connection_Status_Reason enum; if a better reason is available, the corresponding error should be used instead.
- Network Error
Raised when there is an error reading from or writing to the network.
- Invalid Argument
Raised when one of the provided arguments is invalid.

# Signals

(Permalink)

## PasswordFlagsChanged (u: Added, u: Removed)

### Parameters

- Added — u (Channel_Password_Flags)
A bitwise OR of the flags which have been set
- Removed — u (Channel_Password_Flags)
A bitwise OR of the flags which have been cleared

Emitted when the flags as returned by GetPasswordFlags are changed. The user interface should be updated as appropriate.

# Types

Flags (Permalink)

## Channel_Password_Flags — u

- Provide (8)
The ProvidePassword method must be called now for the user to join the channel
- Hint (4)
Added in 0.25.0.
The RoomConfig1.PasswordHint contains a hint for the password.