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 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
|
<?xml version="1.0" ?>
<node name="/Protocol"
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">
<tp:added version="0.19.10">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An object representing a protocol for which this <tp:dbus-ref
namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref>
can create <tp:dbus-ref
namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>s.</p>
<p>Each Protocol object has the same well-known bus name as its parent
ConnectionManager. Its object path is formed by taking the
ConnectionManager's object path and appending '/', followed by the
<tp:type>Protocol</tp:type> name with any hyphen/minus '-' converted
to underscores '_'.</p>
<tp:rationale>
<p>This is the same as the representation of protocol names
in Account object paths, and in Connection object paths and bus
names. For instance, telepathy-gabble and telepathy-salut would
implement objects at
<code>/org/freedesktop/Telepathy/ConnectionManager/gabble/jabber</code>
and
<code>/org/freedesktop/Telepathy/ConnectionManager/salut/local_xmpp</code>,
respectively.</p>
</tp:rationale>
<p>If the ConnectionManager has a <tt>.manager</tt> file, each
Protocol's immutable properties must be represented in that file;
the representation is described as part of the documentation for
each property. For instance, a very simple ConnectionManager with one
Protocol might be represented like this:</p>
<pre>
[ConnectionManager]
Interfaces=
[Protocol example]
Interfaces=
ConnectionInterfaces=org.freedesktop.Telepathy.Connection.Interface.Requests;
param-account=s required
param-password=s required secret
RequestableChannelClasses=text;
VCardField=x-example
EnglishName=Example
Icon=im-example
[text]
org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
org.freedesktop.Telepathy.Channel.TargetHandleType u=1
allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
</pre>
</tp:docstring>
<property name="Interfaces" tp:name-for-bindings="Interfaces"
access="read" type="as" tp:type="DBus_Interface[]">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A list of interfaces supported by this Protocol object.</p>
<p>This property is immutable, and should not be confused with
<tp:member-ref>ConnectionInterfaces</tp:member-ref>,
which refers to the interfaces of <em>connections</em> to this
protocol.</p>
<p>Connection managers with a <code>.manager</code> file
(as described as part of the
<tp:dbus-ref namespace="org.freedesktop.Telepathy"
>ConnectionManager</tp:dbus-ref> interface) MUST cache this
property in the protocol's section of the <code>.manager</code>
file, using the key <code>Interfaces</code>. The corresponding value
is a list of D-Bus interface names, each followed by a semicolon.</p>
</tp:docstring>
</property>
<property name="Parameters" tp:name-for-bindings="Parameters"
access="read" type="a(susv)" tp:type="Param_Spec[]">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The parameters which must or may be provided to the
<tp:dbus-ref namespace="org.freedesktop.Telepathy.ConnectionManager"
>RequestConnection</tp:dbus-ref> method when connecting to the
given protocol. This property is immutable.</p>
<p>Connection managers with a <code>.manager</code> file
(as described as part of the
<tp:dbus-ref namespace="org.freedesktop.Telepathy"
>ConnectionManager</tp:dbus-ref> interface) MUST cache this
property in the protocol's section of the <code>.manager</code>
file via keys of the form <code>param-<em>p</em></code> and
<code>default-<em>p</em></code>, as documented in the
<tp:dbus-ref namespace="org.freedesktop.Telepathy"
>ConnectionManager</tp:dbus-ref> interface.</p>
</tp:docstring>
</property>
<property name="ConnectionInterfaces"
tp:name-for-bindings="Connection_Interfaces"
access="read" type="as" tp:type="DBus_Interface[]">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A list of interface names which might be in the
<tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection"
>Interfaces</tp:dbus-ref> property of a
<tp:dbus-ref namespace="org.freedesktop.Telepathy"
>Connection</tp:dbus-ref> to this protocol. Whether a Connection
will have all, some or none of these interfaces depends on server
capabilities.</p>
<p>This property is immutable, and should not be confused with
<tp:member-ref>Interfaces</tp:member-ref>.</p>
<p>Connection managers with a <code>.manager</code> file
MUST cache this property in the protocol's section of the
<code>.manager</code> file, using the key
<code>ConnectionInterfaces</code>. The corresponding value
is a list of D-Bus interface names, each followed by a semicolon.</p>
</tp:docstring>
</property>
<property name="RequestableChannelClasses"
tp:name-for-bindings="Requestable_Channel_Classes"
access="read" type="a(a{sv}as)" tp:type="Requestable_Channel_Class[]">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A list of channel classes which might be requestable from a
<tp:dbus-ref namespace="org.freedesktop.Telepathy"
>Connection</tp:dbus-ref> to this protocol (i.e. they will,
or might, appear in the Connection's <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Connection.Interface.Requests"
>RequestableChannelClasses</tp:dbus-ref> property).</p>
<p>Whether a Connection will have all, some or none of these
requestable channel classes depends on server capabilities;
similarly, individual contacts are not guaranteed to support
all of these channel classes.</p>
<p>This property is immutable.</p>
<p>Connection managers with a <code>.manager</code> file
MUST cache this property in the protocol's section of the
<code>.manager</code> file, using the key
<code>RequestableChannelClasses</code>. The corresponding value
is a list of opaque strings, each followed by a semicolon; each
of those strings is the name of a group in the <code>.manager</code>
file which represents a channel class.</p>
<p>The names of the groups representing channel classes are not
significant, and MUST NOT be interpreted. When writing
<tt>.manager</tt> files, authors MAY choose mnemonic group names,
generate group names mechanically (e.g. with an incrementing
integer), or use some combination of these.</p>
<p>Each group representing a channel class has a key
<code>allowed</code> which is a list of D-Bus property names
representing allowed parameters. Any other keys that do not contain
a space MUST be ignored. Any key containing a space represents
a fixed property; the key has the form
"<code><em>propertyname</em> <em>type</em></code>", and the value
is encoded in the same way as for the <code>default-<em>p</em></code>
keys described in the <tp:dbus-ref
namespace="org.freedesktop.Telepathy"
>ConnectionManager</tp:dbus-ref> documentation.</p>
<p>Connection managers that have channel classes whose fixed
properties are not representable in this form SHOULD NOT have
<code>.manager</code> files.</p>
<p>For instance, this <code>.manager</code> file could represent
a connection manager that supports 1-1 Text messages and
StreamedMedia audio calls:</p>
<pre>[Protocol jabber]
param-account=s required
param-password=s required
RequestableChannelClasses=rcc0;rcc1;
[rcc0]
org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
org.freedesktop.Telepathy.Channel.TargetHandleType u=1
allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
[rcc1]
org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamedMedia
org.freedesktop.Telepathy.Channel.TargetHandleType u=1
allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;org.freedesktop.Telepathy.Channel.Type.StreamedMedia.InitialAudio;
</pre>
</tp:docstring>
</property>
<property name="VCardField" tp:name-for-bindings="VCard_Field"
access="read" type="s">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The name of the most common vCard field used for this protocol's
contact identifiers, normalized to lower case, or the empty string
if there is no such field.</p>
<p>For example, this would be <code>x-jabber</code> for
Jabber/XMPP (including Google Talk), or <code>tel</code> for
the <abbr title="Public Switched Telephone Network">PSTN</abbr>.</p>
<p>A more exhaustive list of addressable vCard fields can be found in
the Protocol's Addressing interface's
<tp:dbus-ref namespace="org.freedesktop.Telepathy.Protocol.Interface.Addressing.DRAFT">AddressableVCardFields</tp:dbus-ref>.</p>
<p>It is not necessarily valid to interpret contacts' identifiers
as values of this vCard field. For instance, telepathy-sofiasip
supports contacts whose identifiers are of the form
sip:jenny@example.com or tel:8675309, which would not normally
both be represented by any single vCard field. Arbitrary
handles/identifiers as vCard fields are represented
through the Connection's
<tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Addressing.DRAFT</tp:dbus-ref>
contact attributes.</p>
<tp:rationale>
<p>This is taken from Mission Control profiles as used on Maemo 5.
One valid use of this field is to answer the question: given a
contact's vCard containing an X-JABBER field, how can you
communicate with the contact? By iterating through protocols
looking for an x-jabber VCardField, one can build up a list of
protocols that handle x-jabber, then offer the user a list of
accounts for those protocols and/or the option to create a new
account for one of those protocols.</p>
</tp:rationale>
<p>Connection managers with a <code>.manager</code> file
MUST cache this property in the protocol's section of the
<code>.manager</code> file if it is non-empty, using the key
<code>VCardField</code>. The corresponding value
is a string, following the syntax of the "localestring" type from
the Desktop Entry Specification.</p>
</tp:docstring>
</property>
<property name="EnglishName" tp:name-for-bindings="English_Name"
access="read" type="s">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The name of the protocol in a form suitable for display to users,
such as "AIM" or "Yahoo!", or the empty string if none is
available.</p>
<p>This is effectively in the C locale (international English);
user interfaces requiring a localized protocol name SHOULD look
one up in their own message catalog based on either the Telepathy
<tp:type>Protocol</tp:type> name or this property, but SHOULD use
this English version as a fallback if no translated version can be
found.</p>
<tp:rationale>
<p>Many protocols are named after a company or product which isn't
translated in non-English locales. This also provides a fallback
display name, for UIs with no prior knowledge of a particular
protocol.</p>
</tp:rationale>
<p>If this property's value is empty, clients MAY fall back to using
the Telepathy <tp:type>Protocol</tp:type> name, possibly with its
capitalization adjusted.</p>
<p>Connection managers with a <code>.manager</code> file
MUST cache this property in the protocol's section of the
<code>.manager</code> file if it is non-empty, using the key
<code>EnglishName</code>. The corresponding value
is a string, following the syntax of the "localestring" type from
the Desktop Entry Specification.</p>
</tp:docstring>
</property>
<property name="Icon" tp:name-for-bindings="Icon"
access="read" type="s">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The name of an icon in the system's icon theme, such as "im-msn", or
the empty string.</p>
<tp:rationale>
<p>This can be used as a default if the <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Account">Icon</tp:dbus-ref>
property is not set on an Account, or used by the <tp:dbus-ref
namespace="org.freedesktop.Telepathy">AccountManager</tp:dbus-ref>
to choose a default icon if none is set during account
creation.</p>
</tp:rationale>
<p>If this property's value is empty, clients MAY fall back to
generating a name based on the <tp:type>Protocol</tp:type> name.</p>
<p>Connection managers with a <code>.manager</code> file
MUST cache this property in the protocol's section of the
<code>.manager</code> file if it is non-empty, using the key
<code>Icon</code>. The corresponding value
is a string, following the syntax of the "localestring" type from
the Desktop Entry Specification.</p>
</tp:docstring>
</property>
<method name="IdentifyAccount"
tp:name-for-bindings="Identify_Account">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Return a string which uniquely identifies the account to which the
given parameters would connect.</p>
<tp:rationale>
<p>For many protocols, this would return the well-known 'account'
parameter. However, for IRC the returned string would be composed
from the 'account' (i.e. nickname) and 'server' parameters.
AccountManager implementations can use this to form the
account-specific part of an Account's object path.</p>
</tp:rationale>
</tp:docstring>
<arg direction="in" name="Parameters"
type="a{sv}" tp:type="String_Variant_Map">
<tp:docstring>
A set of parameters as would be provided to <tp:dbus-ref
namespace="org.freedesktop.Telepathy.ConnectionManager"
>RequestConnection</tp:dbus-ref>
</tp:docstring>
</arg>
<arg direction="out" name="Account_ID" type="s">
<tp:docstring>
<p>An opaque string suitable for use as the account-specific part of
an <tp:dbus-ref namespace="org.freedesktop.Telepathy"
>Account</tp:dbus-ref>'s object path. This is not necessarily
globally unique, but should represent a "best-effort"
identification of the account.</p>
<tp:rationale>
<p>For a pathological case, consider a user signing in as
'me@example.com' with 'server' set to either jabber1.example.com
or jabber2.example.com. Both of these should result in
me@example.com being returned from this method, even if the user
can actually be signed in to those two servers
simultaneously.</p>
</tp:rationale>
</tp:docstring>
</arg>
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
<tp:docstring>
The IdentifyAccount method is not supported by this connection
manager. The caller SHOULD fall back to deriving identification
from the parameters.
</tp:docstring>
</tp:error>
</tp:possible-errors>
</method>
<method name="NormalizeContact"
tp:name-for-bindings="Normalize_Contact">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Attempt to normalize the given contact ID. Where possible, this
SHOULD return the same thing that would be returned by
InspectHandles(RequestHandles(CONTACT, [Contact_ID])) on a connected
<tp:dbus-ref namespace="org.freedesktop.Telepathy"
>Connection</tp:dbus-ref>.</p>
<p>If full normalization requires network activity or is otherwise
impossible to do without a <tp:dbus-ref
namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>,
this method SHOULD perform a best-effort normalization.</p>
<tp:rationale>
<p>One common example of a best-effort offline normalization
differing from the ideal normalization is XMPP.</p>
<p>On XMPP, contacts' JIDs should normally have the resource removed
during normalization, but for contacts in a MUC (chatroom), the
resource is an integral part of the JID - so the contact JID
alice@example.com/Empathy should normalize to alice@example.com,
but the in-MUC JID wonderland@conference.example.com/Alice should
normalize to itself.</p>
<p>While online, the connection manager has enough context to know
which chatrooms the user is in, and can infer from that whether
to remove resources, but the best-effort normalization performed
while offline does not have this context, so the best that can be
done is to remove the resource from all JIDs.</p>
</tp:rationale>
<p>This method MAY simply raise NotImplemented on some protocols.</p>
<tp:rationale>
<p>In link-local XMPP, you can't talk to someone who isn't present
on your local network, so normalizing identifiers in advance is
meaningless.</p>
</tp:rationale>
</tp:docstring>
<arg direction="in" name="Contact_ID" type="s">
<tp:docstring>
The identifier of a contact in this protocol
</tp:docstring>
</arg>
<arg direction="out" name="Normalized_Contact_ID" type="s">
<tp:docstring>
The identifier of a contact in this protocol, normalized as much
as possible
</tp:docstring>
</arg>
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
<tp:docstring>
The NormalizeContact method is not supported by this connection
manager. The caller MAY recover by using the contact ID as-is.
</tp:docstring>
</tp:error>
</tp:possible-errors>
</method>
</interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|