summaryrefslogtreecommitdiff
path: root/spec/Protocol_Interface_Avatars.xml
blob: cd913510da20d60ab4745ed1d5b31ac77f068544 (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
<?xml version="1.0" ?>
<node name="/Protocol_Interface_Avatars"
  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">

  <tp:copyright>Copyright © 2009-2010 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="org.freedesktop.Telepathy.Protocol.Interface.Avatars">
    <tp:added version="0.21.5">(as stable API)</tp:added>
    <tp:requires interface="org.freedesktop.Telepathy.Protocol"/>

    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
      <p>An interface for protocols where it might be possible to set the
        user's avatar, and the expected size limits and supported MIME types
        are known before connecting.</p>

      <tp:rationale>
        <p>If the avatar requirements cannot be discovered while offline,
          it's impossible to avoid setting the <tp:dbus-ref
            namespace="org.freedesktop.Telepathy"
            >Account</tp:dbus-ref>'s <tp:dbus-ref
            namespace="org.freedesktop.Telepathy.Account.Interface.Avatar"
            >Avatar</tp:dbus-ref> property to an unsupported avatar.</p>
      </tp:rationale>

      <p>Each property on this interface SHOULD be cached in the
        <code>.manager</code> file, using a key of the same name as the
        property in the <code>[Protocol <em>proto</em>]</code>
        group. All properties are encoded in ASCII decimal in the obvious
        way, except for
        <tp:member-ref>SupportedAvatarMIMETypes</tp:member-ref> which is
        encoded as a sequence of strings each followed by a semicolon
        (as for the "localestrings" type in the Desktop Entry
        Specification).</p>

      <p>For instance, an XMPP connection manager might have this
        <code>.manager</code> file:</p>

<pre>[Protocol jabber]
Interfaces=org.freedesktop.Telepathy.Protocol.Interface.Avatars;
param-account=s required
param-password=s required
SupportedAvatarMIMETypes=image/png;image/jpeg;image/gif;
MinimumAvatarHeight=32
RecommendedAvatarHeight=64
MaximumAvatarHeight=96
MinimumAvatarWidth=32
RecommendedAvatarWidth=64
MaximumAvatarWidth=96
MaximumAvatarBytes=8192
</pre>
    </tp:docstring>

    <property name="SupportedAvatarMIMETypes"
      tp:name-for-bindings="Supported_Avatar_MIME_Types"
      type="as" access="read">
      <tp:docstring>
        The expected value of the <tp:dbus-ref
          namespace="org.freedesktop.Telepathy"
          >Connection.Interface.Avatars.SupportedAvatarMIMETypes</tp:dbus-ref>
        property on connections to this protocol.
      </tp:docstring>
    </property>

    <property name="MinimumAvatarHeight"
      tp:name-for-bindings="Minimum_Avatar_Height"
      type="u" access="read">
      <tp:docstring>
        The expected value of the <tp:dbus-ref
          namespace="org.freedesktop.Telepathy"
          >Connection.Interface.Avatars.MinimumAvatarHeight</tp:dbus-ref>
        property on connections to this protocol.
</tp:docstring>
    </property>

    <property name="MinimumAvatarWidth"
      tp:name-for-bindings="Minimum_Avatar_Width"
      type="u" access="read">
      <tp:docstring>
        The expected value of the <tp:dbus-ref
          namespace="org.freedesktop.Telepathy"
          >Connection.Interface.Avatars.MinimumAvatarWidth</tp:dbus-ref>
        property on connections to this protocol.
      </tp:docstring>
    </property>

    <property name="RecommendedAvatarHeight"
      tp:name-for-bindings="Recommended_Avatar_Height"
      type="u" access="read">
      <tp:docstring>
        The expected value of the <tp:dbus-ref
          namespace="org.freedesktop.Telepathy"
          >Connection.Interface.Avatars.RecommendedAvatarHeight</tp:dbus-ref>
        property on connections to this protocol.
      </tp:docstring>
    </property>

    <property name="RecommendedAvatarWidth"
      tp:name-for-bindings="Recommended_Avatar_Width"
      type="u" access="read">
      <tp:docstring>
        The expected value of the <tp:dbus-ref
          namespace="org.freedesktop.Telepathy"
          >Connection.Interface.Avatars.RecommendedAvatarWidth</tp:dbus-ref>
        property on connections to this protocol.
      </tp:docstring>
    </property>

    <property name="MaximumAvatarHeight"
      tp:name-for-bindings="Maximum_Avatar_Height"
      type="u" access="read">
      <tp:docstring>
        The expected value of the <tp:dbus-ref
          namespace="org.freedesktop.Telepathy"
          >Connection.Interface.Avatars.MaximumAvatarHeight</tp:dbus-ref>
        property on connections to this protocol.
      </tp:docstring>
    </property>

    <property name="MaximumAvatarWidth"
      tp:name-for-bindings="Maximum_Avatar_Width"
      type="u" access="read">
      <tp:docstring>
        The expected value of the <tp:dbus-ref
          namespace="org.freedesktop.Telepathy"
          >Connection.Interface.Avatars.MaximumAvatarWidth</tp:dbus-ref>
        property on connections to this protocol.
      </tp:docstring>
    </property>

    <property name="MaximumAvatarBytes"
      tp:name-for-bindings="Maximum_Avatar_Bytes"
      type="u" access="read">
      <tp:docstring>
        The expected value of the <tp:dbus-ref
          namespace="org.freedesktop.Telepathy"
          >Connection.Interface.Avatars.MaximumAvatarBytes</tp:dbus-ref>
        property on connections to this protocol.
      </tp:docstring>
    </property>
  </interface>
</node>