summaryrefslogtreecommitdiff
path: root/spec/Channel_Interface_Picture.xml
blob: ba8f1d63b2e44644a7ec15e5703edd96feacf6b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?xml version="1.0" ?>
<node name="/Channel_Interface_Picture"
  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">

  <tp:copyright>Copyright © 2011 Collabora Ltd.</tp:copyright>
  <tp:license xmlns="http://www.w3.org/1999/xhtml">
    <p>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.</p>

    <p>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.</p>

    <p>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.</p>
  </tp:license>

  <interface name="im.telepathy1.Channel.Interface.Picture1"
             tp:causes-havoc="draft">
    <tp:requires interface="im.telepathy1.Channel"/>
    <tp:added version="0.25.0"/>
    <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal"
                value="true"/>

    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
      <p>An interface channels can implement to support a picture. Most
        of the time this will be implemented by channels implementing
        the <tp:dbus-ref
        namespace="imt1.Channel.Interface">Room1</tp:dbus-ref>
        interface. Note that this interface is not restricted to
        Text channels, and can also be used on Call channels.</p>

      <tp:rationale>
        This is a separate interface from
        <tp:dbus-ref namespace="imt1.Channel.Interface">RoomConfig1</tp:dbus-ref>
        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.
      </tp:rationale>
    </tp:docstring>

    <method name="SetPicture" tp:name-for-bindings="Set_Picture">
      <arg direction="in" type="ay" name="Picture">
        <tp:docstring>The new picture.</tp:docstring>
      </arg>
      <arg direction="in" type="s" name="MIME_Type">
        <tp:docstring>The MIME type.</tp:docstring>
      </arg>
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>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.</p>

        <p>A successful return of this method indicates a successful
          change in picture, but clients should still listen for changes
          to the <tp:member-ref>Picture</tp:member-ref> property for
          further changes by other users or the server.</p>
      </tp:docstring>
      <tp:possible-errors>
        <tp:error name="im.telepathy1.Error.NotImplemented"/>
        <tp:error name="im.telepathy1.Error.InvalidArgument">
          <tp:docstring>
            Picture is somehow invalid: e.g. unsupported MIME type,
            too big, etc.
          </tp:docstring>
        </tp:error>
        <tp:error name="im.telepathy1.Error.PermissionDenied"/>
      </tp:possible-errors>
    </method>

    <property name="Picture" tp:name-for-bindings="Picture"
              type="(ays)" tp:type="Avatar" access="read">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>The picture representing this channel.</p>

        <p>This property may change during the lifetime of the channel and
          MUST not be included in a channel request.</p>
      </tp:docstring>
    </property>

    <property name="Actor" tp:name-for-bindings="Actor"
              type="s" access="read">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>The normalized contact ID representing who last modified
          the picture, or the empty string if it is not known.</p>
      </tp:docstring>
    </property>

    <property name="ActorHandle" tp:name-for-bindings="Actor_Handle"
              type="u" tp:type="Contact_Handle" access="read">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>The handle corresponding to <tp:member-ref>Actor</tp:member-ref>,
        or 0 if the <tp:member-ref>Actor</tp:member-ref> is unknown.</p>
      </tp:docstring>
    </property>

    <property name="Timestamp" tp:name-for-bindings="Timestamp"
              type="x" tp:type="Unix_Timestamp64" access="read">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>A unix timestamp indicating when the picture was last
         modified, or <code>INT_MAX64</code> if unknown.</p>
      </tp:docstring>
    </property>

    <property name="CanSet" tp:name-for-bindings="Can_Set"
              type="b" access="read">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>TRUE if the <tp:member-ref>Picture</tp:member-ref> property
          can be set by the user by calling
          <tp:member-ref>SetPicture</tp:member-ref>, otherwise
          FALSE.</p>

        <p>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
          <tp:member-ref>SetPicture</tp:member-ref> can still fail
          even with this property set to TRUE.</p>
      </tp:docstring>
    </property>

    <property name="SupportedMIMETypes"
      tp:name-for-bindings="Supported_MIME_Types"
      type="as" access="read" tp:immutable="yes">
      <tp:docstring>
        An array of supported MIME types (e.g. "image/jpeg").
        Clients MAY assume that the first type in this array is preferred.
      </tp:docstring>
    </property>

    <property name="MinimumHeight"
      tp:name-for-bindings="Minimum_Height"
      type="u" access="read" tp:immutable="yes">
      <tp:docstring>
        The minimum height in pixels of the picture, which MAY be 0.
      </tp:docstring>
    </property>

    <property name="MinimumWidth"
      tp:name-for-bindings="Minimum_Width"
      type="u" access="read" tp:immutable="yes">
      <tp:docstring>
        The minimum width in pixels of the picture, which MAY be 0.
      </tp:docstring>
    </property>

    <property name="RecommendedHeight"
      tp:name-for-bindings="Recommended_Height"
      type="u" access="read" tp:immutable="yes">
      <tp:docstring>
        The recommended height in pixels of the picture, or 0 if
        there is no preferred height.
      </tp:docstring>
    </property>

    <property name="RecommendedWidth"
      tp:name-for-bindings="Recommended_Width"
      type="u" access="read" tp:immutable="yes">
      <tp:docstring>
        The recommended width in pixels of the picture, or 0 if
        there is no preferred width.
      </tp:docstring>
    </property>

    <property name="MaximumHeight"
      tp:name-for-bindings="Maximum_Height"
      type="u" access="read" tp:immutable="yes">
      <tp:docstring>
        The maximum height in pixels of the picture, or 0 if
        there is no limit.
      </tp:docstring>
    </property>

    <property name="MaximumWidth"
      tp:name-for-bindings="Maximum_Width"
      type="u" access="read" tp:immutable="yes">
      <tp:docstring>
        The maximum width in pixels of the picture, or 0 if
        there is no limit.
      </tp:docstring>
    </property>

    <property name="MaximumBytes"
      tp:name-for-bindings="Maximum_Bytes"
      type="u" access="read" tp:immutable="yes">
      <tp:docstring>
        The maximum size in bytes of the picture, or 0 if
        there is no limit.
      </tp:docstring>
    </property>

  </interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->