From 9df40694cc7926ec5cf6cb2a89efa5df42504b40 Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Mon, 7 Nov 2011 17:41:30 +1100 Subject: [PATCH] New iface: Channel.Interface.Picture Lets the users set/get the picture for a chatroom. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=42653 --- spec/Channel_Interface_Picture.xml | 198 ++++++++++++++++++++++++++++++++++++ spec/all.xml | 1 + 2 files changed, 199 insertions(+), 0 deletions(-) create mode 100644 spec/Channel_Interface_Picture.xml diff --git a/spec/Channel_Interface_Picture.xml b/spec/Channel_Interface_Picture.xml new file mode 100644 index 0000000..883878e --- /dev/null +++ b/spec/Channel_Interface_Picture.xml @@ -0,0 +1,198 @@ + + + + Copyright © 2010–2011 Collabora Ltd. + +

This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version.

+ +

This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details.

+ +

You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA.

+
+ + + + + + + +

An interface channels can implement to support a picture. Most + of the time this will be implemented by channels implementing + the Room2 + interface. Note that this interface is not restricted to + Text channels, and can also be used on Call channels.

+ + + This is a separate interface from + RoomConfig1 + because (a) it's possible some protocol might support pictures for + 1:1 chats; and (b) it avoids downloading an unwanted picture in a + GetAll request. + +
+ + + + The new picture. + + + The MIME type. + + +

Set the room's picture. Clients SHOULD look at the picture + flags before calling this method as the user might not have + permission to set the picture.

+ +

A successful return of this method indicates a successful + change in picture, but clients should still listen for changes + to the Picture property for + further changes by other users or the server.

+
+ + + + + Picture is somehow invalid: e.g. unsupported MIME type, + too big, etc. + + + + +
+ + + +

The picture representing this channel.

+ +

This property may change during the lifetime of the channel and + MUST not be included in a channel request.

+
+
+ + + +

The normalized contact ID representing who last modified + the picture, or the empty string if it is not known.

+
+
+ + + +

The handle corresponding to Actor, + or 0 if the Actor is unknown.

+
+
+ + + +

A unix timestamp indicating when the picture was last + modified, or INT_MAX64 if unknown.

+
+
+ + + +

TRUE if the Picture property + can be set by the user by calling + SetPicture, otherwise + FALSE.

+ +

If implementations are unsure of what this value should be + it SHOULD still be set to what it believes the value + is. As a result, clients should be aware that + SetPicture can still fail + even with this property set to TRUE.

+
+
+ + + + An array of supported MIME types (e.g. "image/jpeg"). + Clients MAY assume that the first type in this array is preferred. + + + + + + The minimum height in pixels of the picture, which MAY be 0. + + + + + + The minimum width in pixels of the picture, which MAY be 0. + + + + + + The recommended height in pixels of the picture, or 0 if + there is no preferred height. + + + + + + The recommended width in pixels of the picture, or 0 if + there is no preferred width. + + + + + + The maximum height in pixels of the picture, or 0 if + there is no limit. + + + + + + The maximum width in pixels of the picture, or 0 if + there is no limit. + + + + + + The maximum size in bytes of the picture, or 0 if + there is no limit. + + + +
+
+ diff --git a/spec/all.xml b/spec/all.xml index 4a2ab14..dfa1cb4 100644 --- a/spec/all.xml +++ b/spec/all.xml @@ -171,6 +171,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + -- 1.7.5.4