Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Kaffeine opened this issue Jun 22, 2017 · 0 comments
Open

Comments

@Kaffeine
Copy link
Member

Kaffeine commented Jun 22, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant