Skip to content

Develop a unified interface for Contacts and Rooms picture requests #18

@Kaffeine

Description

@Kaffeine

Connection.Interface.PeerPicture

The new interface supersedes Connection.Interface.Avatars and Channel.Interface.Picture1.

The new design has some advantages:

  1. Can work with both Contacts and Rooms,
  2. It does not require a channel to get a picture for dialog/contact/room list
  3. Add a new capability to Contact avatars (timestamp)

Objects implementing this interface must also implement: Connection.

Methods

  • GetKnownPictureTokens (u: Handle_Type, au: Handles) -> a{us}: Tokens
  • RequestPictures (u: Handle_Type, au: Handles) -> nothing
  • SetPicture (u: Handle_Type, u: Handle, ay: Picture, s: MIME_Type) -> s: Token
  • ClearPicture (u: Handle_Type, u: Handle) -> nothing

Signals

  • PictureUpdated (u: Handle_Type, u: Handle, s: New_Picture_Token)
  • PictureRetrieved (u: Handle_Type, u: Handle, s: New_Picture_Token, ay: Picture, s: Type)

Properties

  • SupportedMimeTypes — as (Read only, Immutable)
  • MinimumHeight — u (Read only, Immutable)
  • MinimumWidth — u (Read only, Immutable)
  • RecommendedHeight — u (Read only, Immutable)
  • RecommendedWidth — u (Read only, Immutable)
  • MaximumHeight — u (Read only, Immutable)
  • MaximumWidth — u (Read only, Immutable)
  • MaximumBytes — u (Read only, Immutable)

Peer Attributes

  • org.freedesktop.Telepathy.Connection.Interface.PeerPicture/token — s (Picture_Token)

The same string that would be returned by GetKnownPictureTokens (omitted from the result if the peer's picture token is not known, present as an empty string if the peer is known not to have a picture).

  • org.freedesktop.Telepathy.Connection.Interface.PeerPicture/timestamp — x (Unix_Timestamp64)

A unix timestamp indicating when the picture was last modified. Should be omitted if unknown.

  • org.freedesktop.Telepathy.Connection.Interface.PeerPicture/can-set — b

If implementations are unsure of what this value should be it SHOULD still be set to what it believes the value is. The value should be omitted if false. Clients should be aware that SetPicture can still fail even with this property set to TRUE.

Room-specific:

  • org.freedesktop.Telepathy.Connection.Interface.PeerPicture/actor — s (Identifier)

The normalized contact ID representing who last modified the picture. Should be omitted if it is not known or there is no picture.

  • org.freedesktop.Telepathy.Connection.Interface.PeerPicture/actor-handle — u (Contact_Handle)

A contact handle representing who last modified the picture. Should be omitted if it is not known or there is no picture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions