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
|
<?xml version="1.0" ?>
<node name="/Connection_Interface_Aliasing" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
<tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright (C) 2006 INdT </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.Connection.Interface.Aliasing">
<tp:requires interface="org.freedesktop.Telepathy.Connection"/>
<tp:mapping name="Alias_Map" array-name="">
<tp:docstring>A dictionary whose keys are contact handles and whose
values are aliases.</tp:docstring>
<tp:member type="u" tp:type="Contact_Handle" name="Handle"/>
<tp:member type="s" name="Alias"/>
</tp:mapping>
<tp:struct name="Alias_Pair" array-name="Alias_Pair_List">
<tp:docstring>
A pair (contact handle, alias) as seen in the
<tp:member-ref>AliasesChanged</tp:member-ref> signal.
</tp:docstring>
<tp:member type="u" tp:type="Contact_Handle" name="Handle"/>
<tp:member type="s" name="Alias"/>
</tp:struct>
<signal name="AliasesChanged" tp:name-for-bindings="Aliases_Changed">
<arg name="Aliases" type="a(us)" tp:type="Alias_Pair[]">
<!-- FIXME: if we break API, this could be an Alias_Map, a{us} -->
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
An array containing structs of:
<ul>
<li>the handle representing the contact</li>
<li>the new alias</li>
</ul>
</tp:docstring>
</arg>
<tp:docstring>
Signal emitted when a contact's alias (or that of the user) is changed.
</tp:docstring>
</signal>
<tp:flags name="Connection_Alias_Flags" value-prefix="Connection_Alias_Flag" type="u">
<tp:flag suffix="User_Set" value="1">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The aliases of contacts on this connection may be changed by the
user of the service, not just by the contacts themselves. This is
the case on Jabber, for instance.</p>
<p>It is possible that aliases can be changed by the contacts too -
which alias takes precedence is not defined by this
specification, and depends on the server and/or connection manager
implementation.</p>
<p>This flag only applies to the aliases of "globally valid" contact
handles. At this time, clients should not expect to be able to
change the aliases corresponding to any channel-specific
handles. If this becomes possible in future, a new flag will
be defined.</p>
</tp:docstring>
</tp:flag>
</tp:flags>
<method name="GetAliasFlags" tp:name-for-bindings="Get_Alias_Flags">
<arg direction="out" type="u" tp:type="Connection_Alias_Flags">
<tp:docstring>
An integer with a bitwise OR of flags from ConnectionAliasFlags
</tp:docstring>
</arg>
<tp:docstring>
Return a bitwise OR of flags detailing the behaviour of aliases on this
connection.
</tp:docstring>
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
</tp:possible-errors>
</method>
<method name="RequestAliases" tp:name-for-bindings="Request_Aliases">
<arg direction="in" name="Contacts" type="au" tp:type="Contact_Handle[]">
<tp:docstring>
An array of handles representing contacts
</tp:docstring>
</arg>
<arg direction="out" type="as">
<tp:docstring>
A list of aliases in the same order as the contact handles
</tp:docstring>
</arg>
<tp:docstring>
Request the value of several contacts' aliases at once.
</tp:docstring>
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
<tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
<tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
<tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
</tp:possible-errors>
</method>
<method name="GetAliases" tp:name-for-bindings="Get_Aliases">
<arg direction="in" name="Contacts" type="au" tp:type="Contact_Handle[]">
<tp:docstring>
An array of handles representing contacts
</tp:docstring>
</arg>
<arg direction="out" type="a{us}" tp:type="Alias_Map">
<tp:docstring>
A dictionary mapping contact handles to aliases
</tp:docstring>
</arg>
<tp:docstring>
Request the value of several contacts' aliases at once. This SHOULD
only return cached aliases, falling back on the handle name if none is
present. Also if there was no cached alias, a request SHOULD be started
of which the result is later signalled by
<tp:member-ref>AliasesChanged</tp:member-ref>.
</tp:docstring>
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
<tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
</tp:possible-errors>
</method>
<method name="SetAliases" tp:name-for-bindings="Set_Aliases">
<arg direction="in" name="Aliases" type="a{us}" tp:type="Alias_Map">
<tp:docstring>
A dictionary mapping integer handles of contacts
to strings of the new alias to set.
</tp:docstring>
</arg>
<tp:docstring>
Request that the alias of the given contact be changed. Success will be
indicated by emitting an <tp:member-ref>AliasesChanged</tp:member-ref>
signal. On connections where the CONNECTION_ALIAS_FLAG_USER_SET flag is
not set, this method will only ever succeed if the contact is the
user's own handle (as returned by <tp:dbus-ref
namespace="org.freedesktop.Telepathy">Connection.GetSelfHandle</tp:dbus-ref>).
</tp:docstring>
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
<tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
<tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
<tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
<tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface on connections to support protocols where contacts have an
alias which they can change at will. Provides a method for the user to set
their own alias, and a signal which should be emitted when a contact's
alias is changed or first discovered.</p>
<p>On connections where the user is allowed to set aliases for contacts and
store them on the server, the <tp:member-ref>GetAliasFlags</tp:member-ref>
method will have the CONNECTION_ALIAS_FLAG_USER_SET flag set, and the
<tp:member-ref>SetAliases</tp:member-ref> method may be called on contact
handles other than the user themselves.</p>
<p>Aliases are intended to be used as the main displayed name for the
contact, where available.</p>
</tp:docstring>
</interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|