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 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853
|
<?xml version="1.0" ?>
<node name="/Channel_Type_Streamed_Media" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2005-2009 Collabora Limited </tp:copyright>
<tp:copyright> Copyright © 2005-2009 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright © 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.Channel.Type.StreamedMedia">
<tp:requires interface="org.freedesktop.Telepathy.Channel"/>
<tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.Group"/>
<tp:enum name="Media_Stream_Type" type="u"
array-name="Media_Stream_Type_List">
<tp:enumvalue suffix="Audio" value="0">
<tp:docstring>An audio stream</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Video" value="1">
<tp:docstring>A video stream</tp:docstring>
</tp:enumvalue>
</tp:enum>
<tp:enum name="Media_Stream_State" type="u">
<tp:enumvalue suffix="Disconnected" value="0">
<tp:docstring>The stream is disconnected.</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Connecting" value="1">
<tp:docstring>The stream is trying to connect.</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Connected" value="2">
<tp:docstring>The stream is connected.</tp:docstring>
</tp:enumvalue>
</tp:enum>
<tp:enum name="Media_Stream_Direction" type="u">
<tp:enumvalue suffix="None" value="0">
<tp:docstring>Media are not being sent or received</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Send" value="1">
<tp:docstring>Media are being sent, but not received</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Receive" value="2">
<tp:docstring>Media are being received, but not sent</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Bidirectional" value="3">
<tp:docstring>Media are being sent and received</tp:docstring>
</tp:enumvalue>
</tp:enum>
<tp:flags name="Media_Stream_Pending_Send" value-prefix="Media_Stream_Pending" type="u">
<tp:flag suffix="Local_Send" value="1">
<tp:docstring>
The local user has been asked to send media by the remote user.
Call <tp:member-ref>RequestStreamDirection</tp:member-ref> to
indicate whether or not this is acceptable.
</tp:docstring>
</tp:flag>
<tp:flag suffix="Remote_Send" value="2">
<tp:docstring>
The remote user has been asked to send media by the local user.
The <tp:member-ref>StreamDirectionChanged</tp:member-ref> signal
will be emitted when the remote user accepts or rejects this
change.
</tp:docstring>
</tp:flag>
</tp:flags>
<tp:struct name="Media_Stream_Info" array-name="Media_Stream_Info_List">
<tp:member type="u" tp:type="Stream_ID" name="Identifier"/>
<tp:member type="u" tp:type="Contact_Handle" name="Contact"/>
<tp:member type="u" tp:type="Media_Stream_Type" name="Type"/>
<tp:member type="u" tp:type="Media_Stream_State" name="State"/>
<tp:member type="u" tp:type="Media_Stream_Direction" name="Direction"/>
<tp:member type="u" tp:type="Media_Stream_Pending_Send"
name="Pending_Send_Flags"/>
</tp:struct>
<tp:simple-type name="Stream_ID" type="u"
array-name="Stream_ID_List">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An unsigned integer identifying a stream within a channel.</p>
</tp:docstring>
</tp:simple-type>
<method name="ListStreams" tp:name-for-bindings="List_Streams">
<arg direction="out" type="a(uuuuuu)" tp:type="Media_Stream_Info[]"
name="Streams">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
An array of structs containing:
<ul>
<li>the stream identifier</li>
<li>the contact handle who the stream is with (or 0 if the stream
represents more than a single member)</li>
<li>the type of the stream</li>
<li>the current stream state</li>
<li>the current direction of the stream</li>
<li>the current pending send flags</li>
</ul>
</tp:docstring>
</arg>
<tp:docstring>
Returns an array of structs representing the streams currently active
within this channel. Each stream is identified by an unsigned integer
which is unique for each stream within the channel.
</tp:docstring>
</method>
<method name="RemoveStreams" tp:name-for-bindings="Remove_Streams">
<arg direction="in" name="Streams" type="au" tp:type="Stream_ID[]">
<tp:docstring>
An array of stream identifiers (as defined in
<tp:member-ref>ListStreams</tp:member-ref>)
</tp:docstring>
</arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request that the given streams are removed. If all streams are
removed, the channel MAY close.</p>
<p>Clients SHOULD NOT attempt to terminate calls by removing all the
streams; instead, clients SHOULD terminate calls by removing the
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface">Group.SelfHandle</tp:dbus-ref>
from the channel, using either
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembers</tp:dbus-ref>
or
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembersWithReason</tp:dbus-ref>.
</p>
</tp:docstring>
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
<tp:docstring>
A stream identifier is unknown
</tp:docstring>
</tp:error>
</tp:possible-errors>
</method>
<method name="RequestStreamDirection"
tp:name-for-bindings="Request_Stream_Direction">
<arg direction="in" name="Stream_ID" type="u">
<tp:docstring>
The stream identifier (as defined in
<tp:member-ref>ListStreams</tp:member-ref>)
</tp:docstring>
</arg>
<arg direction="in" name="Stream_Direction" type="u" tp:type="Media_Stream_Direction">
<tp:docstring>
The desired stream direction (a value of MediaStreamDirection)
</tp:docstring>
</arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request a change in the direction of an existing stream. In particular,
this might be useful to stop sending media of a particular type,
or inform the peer that you are no longer using media that is being
sent to you.</p>
<p>Depending on the protocol, streams which are no longer sending in
either direction should be removed and a
<tp:member-ref>StreamRemoved</tp:member-ref> signal emitted.
Some direction changes can be enforced locally (for example,
BIDIRECTIONAL -> RECEIVE can be achieved by merely stopping sending),
others may not be possible on some protocols, and some need agreement
from the remote end. In this case, the MEDIA_STREAM_PENDING_REMOTE_SEND
flag will be set in the
<tp:member-ref>StreamDirectionChanged</tp:member-ref> signal, and the
signal
emitted again without the flag to indicate the resulting direction when
the remote end has accepted or rejected the change.</p>
</tp:docstring>
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
<tp:docstring>
A stream identifier is unknown
</tp:docstring>
</tp:error>
<tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
<tp:docstring>
The requested direction is not available on this stream
</tp:docstring>
</tp:error>
</tp:possible-errors>
</method>
<method name="RequestStreams" tp:name-for-bindings="Request_Streams">
<arg direction="in" name="Contact_Handle" type="u" tp:type="Contact_Handle">
<tp:docstring>
A contact handle with whom to establish the streams
</tp:docstring>
</arg>
<arg direction="in" name="Types" type="au" tp:type="Media_Stream_Type[]">
<tp:docstring>
An array of stream types (values of MediaStreamType)
</tp:docstring>
</arg>
<arg direction="out" type="a(uuuuuu)" tp:type="Media_Stream_Info[]"
name="Streams">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
An array of structs (in the same order as the given stream types)
containing:
<ul>
<li>the stream identifier</li>
<li>the contact handle who the stream is with (or 0 if the stream
represents more than a single member)</li>
<li>the type of the stream</li>
<li>the current stream state</li>
<li>the current direction of the stream</li>
<li>the current pending send flags</li>
</ul>
</tp:docstring>
</arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request that streams be established to exchange the given types of
media with the given member. In general this will try and establish a
bidirectional stream, but on some protocols it may not be possible to
indicate to the peer that you would like to receive media, so a
send-only stream will be created initially. In the cases where the
stream requires remote agreement (eg you wish to receive media from
them), the <tp:member-ref>StreamDirectionChanged</tp:member-ref> signal
will be emitted with the
MEDIA_STREAM_PENDING_REMOTE_SEND flag set, and the signal emitted again
with the flag cleared when the remote end has replied.</p>
<p>If streams of the requested types already exist, calling this
method results in the creation of additional streams. Accordingly,
clients wishing to have exactly one audio stream or exactly one
video stream SHOULD check for the current streams using
<tp:member-ref>ListStreams</tp:member-ref> before calling this
method.</p>
</tp:docstring>
<tp:changed version="0.17.2">
<p>It is valid to use a handle which is neither
a current nor pending member in this channel's <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface">Group</tp:dbus-ref>
interface. If
so, that handle will be added to the remote-pending set only when
an attempt has actually been made to contact them. For further
call-state notification, use the <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface">CallState</tp:dbus-ref>
interface, if
supported. This usage was not allowed in spec versions below
0.17.2.</p>
</tp:changed>
<tp:possible-errors>
<tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
<tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
<tp:docstring>
A stream type given is invalid.
</tp:docstring>
</tp:error>
<tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
<tp:docstring>
A stream type given is not implemented by the connection manager.
Since 0.17.23, connection managers SHOULD raise this error
in preference to InvalidArgument.
<tp:rationale>
Connection managers can't know whether an unknown number
is a valid stream type that was introduced in a later spec
version.
</tp:rationale>
</tp:docstring>
</tp:error>
<tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
<tp:docstring>
That contact's client does not implement one of the given stream
types. For this method, clients SHOULD consider this error and
NotCapable to be equivalent.
</tp:docstring>
</tp:error>
<tp:error name="org.freedesktop.Telepathy.Error.NotCapable">
<tp:docstring>
That contact's client does not implement one of the given stream
types. Since 0.17.23, connection managers SHOULD raise
this in preference to NotAvailable.
</tp:docstring>
</tp:error>
</tp:possible-errors>
</method>
<signal name="StreamAdded" tp:name-for-bindings="Stream_Added">
<arg name="Stream_ID" type="u">
<tp:docstring>
The stream identifier (as defined in
<tp:member-ref>ListStreams</tp:member-ref>)
</tp:docstring>
</arg>
<arg name="Contact_Handle" type="u" tp:type="Contact_Handle">
<tp:docstring>
The contact handle who the stream is with (or 0 if it
represents more than a single member)
</tp:docstring>
</arg>
<arg name="Stream_Type" type="u" tp:type="Media_Stream_Type">
<tp:docstring>
The stream type (a value from MediaStreamType)
</tp:docstring>
</arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Emitted when a new stream has been added to this channel.
Clients SHOULD assume that the stream's
<tp:type>Media_Stream_State</tp:type> is initially Disconnected.</p>
<p>If a connection manager needs to represent the addition of a stream
whose state is already Connecting or Connected, it MUST do this
by emitting StreamAdded, closely followed by
<tp:member-ref>StreamStateChanged</tp:member-ref> indicating a
change to the appropriate state.</p>
<tp:rationale>
<p>Historically, it was not clear from the StreamAdded signal what
the state of the stream was. telepathy-spec 0.17.22
clarified this.</p>
</tp:rationale>
<p>Similarly, clients SHOULD assume that the initial
<tp:type>Media_Stream_Direction</tp:type> of a newly added stream
is Receive, and that the initial
<tp:type>Media_Stream_Pending_Send</tp:type> is
Pending_Local_Send.</p>
<p>If a connection manager needs to represent the addition of a stream
whose direction or pending-send differs from those initial values,
it MUST do so by emitting StreamAdded, closely followed by
<tp:member-ref>StreamDirectionChanged</tp:member-ref> indicating a
change to the appropriate direction and pending-send state.</p>
<tp:rationale>
<p>StreamAdded doesn't itself indicate the stream's direction; this
is unfortunate, but is preserved for compatibility.</p>
<p>This is the appropriate direction for streams added by a remote
contact on existing connection managers, and does not violate
user privacy by automatically sending audio or video (audio streams
start off muted, video streams start off not sending). For
streams added by the local user using the client receiving the
signal, the true direction can also be determined from the return
value of the <tp:member-ref>RequestStreams</tp:member-ref>
method.</p>
<p>Existing clients typically operate by maintaining a separate
idea of the directions that they would like the streams to have,
and enforcing these intended directions by calling
<tp:member-ref>RequestStreamDirection</tp:member-ref> whenever
needed.</p>
</tp:rationale>
</tp:docstring>
</signal>
<signal name="StreamDirectionChanged"
tp:name-for-bindings="Stream_Direction_Changed">
<arg name="Stream_ID" type="u">
<tp:docstring>
The stream identifier (as defined in <tp:member-ref>ListStreams</tp:member-ref>)
</tp:docstring>
</arg>
<arg name="Stream_Direction" type="u" tp:type="Media_Stream_Direction">
<tp:docstring>
The new stream direction (as defined in ListStreams)
</tp:docstring>
</arg>
<arg name="Pending_Flags" type="u" tp:type="Media_Stream_Pending_Send">
<tp:docstring>
The new pending send flags (as defined in ListStreams)
</tp:docstring>
</arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Emitted when the direction or pending flags of a stream are
changed.</p>
<p>If the MEDIA_STREAM_PENDING_LOCAL_SEND flag is set, the remote user
has requested that we begin sending on this stream.
<tp:member-ref>RequestStreamDirection</tp:member-ref>
should be called to indicate whether or not this change is
acceptable.</p>
<tp:rationale>
<p>This allows for a MSN-style user interface, "Fred has asked you
to enable your webcam. (Accept | Reject)", if desired.</p>
</tp:rationale>
</tp:docstring>
</signal>
<signal name="StreamError" tp:name-for-bindings="Stream_Error">
<arg name="Stream_ID" type="u">
<tp:docstring>
The stream identifier (as defined in
<tp:member-ref>ListStreams</tp:member-ref>)
</tp:docstring>
</arg>
<arg name="Error_Code" type="u" tp:type="Media_Stream_Error">
<tp:docstring>
A stream error number, one of the values of MediaStreamError
</tp:docstring>
</arg>
<arg name="Message" type="s">
<tp:docstring>
A string describing the error (for debugging purposes only)
</tp:docstring>
</arg>
<tp:docstring>
Emitted when a stream encounters an error.
</tp:docstring>
</signal>
<signal name="StreamRemoved" tp:name-for-bindings="Stream_Removed">
<arg name="Stream_ID" type="u">
<tp:docstring>
stream_id - the stream identifier (as defined in
<tp:member-ref>ListStreams</tp:member-ref>)
</tp:docstring>
</arg>
<tp:docstring>
Emitted when a stream has been removed from this channel.
</tp:docstring>
</signal>
<signal name="StreamStateChanged"
tp:name-for-bindings="Stream_State_Changed">
<arg name="Stream_ID" type="u">
<tp:docstring>
The stream identifier (as defined in
<tp:member-ref>ListStreams</tp:member-ref>)
</tp:docstring>
</arg>
<arg name="Stream_State" type="u" tp:type="Media_Stream_State">
<tp:docstring>
The new stream state (as defined in ListStreams)
</tp:docstring>
</arg>
<tp:docstring>
Emitted when a member's stream's state changes.
</tp:docstring>
</signal>
<property name="InitialAudio" tp:name-for-bindings="Initial_Audio"
type="b" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>If set to true in a channel request that will create a new channel,
the connection manager should immediately attempt to establish an
audio stream to the remote contact, making it unnecessary for the
client to call <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Type.StreamedMedia">RequestStreams</tp:dbus-ref>.</p>
<p>If this property, or InitialVideo, is passed to EnsureChannel
(as opposed to CreateChannel), the connection manager SHOULD ignore
these properties when checking whether it can return an existing
channel as suitable; these properties only become significant when
the connection manager has decided to create a new channel.</p>
<p>If true on a requested channel, this indicates that the audio
stream has already been requested and the client does not need to
call RequestStreams, although it MAY still do so.</p>
<p>If true on an unrequested (incoming) channel, this indicates that
the remote contact initially requested an audio stream; this does
not imply that that audio stream is still active (as indicated by
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Type.StreamedMedia">ListStreams</tp:dbus-ref>).</p>
<p>This property is immutable (cannot change), and therefore SHOULD
appear wherever immutable properties are reported, e.g. <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
signals.</p>
<tp:rationale><p>This reduces D-Bus round trips.</p></tp:rationale>
<p>Connection managers capable of signalling audio calls to contacts
SHOULD include a channel class in <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
with <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>
= <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
and <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
= Contact in the fixed properties dictionary, and InitialAudio
(and also InitialVideo, if applicable) in the allowed properties
list. Clients wishing to discover whether a connection manager
can signal audio and/or video calls SHOULD use this information.</p>
<tp:rationale>
<p>Not all protocols support signalling video calls, and it would be
possible (although unlikely) to have a protocol where only video,
and not audio, could be signalled.</p>
</tp:rationale>
<p>Connection managers that support the <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Connection.Interface">ContactCapabilities</tp:dbus-ref>
interface SHOULD represent the capabilities of receiving audio
and/or video calls by including a channel class in
a contact's capabilities with ChannelType = StreamedMedia
in the fixed properties dictionary, and InitialAudio and/or
InitialVideo in the allowed properties list. Clients wishing to
discover whether a particular contact is likely to be able to
receive audio and/or video calls SHOULD use this information.</p>
<tp:rationale>
<p>Not all clients support video calls, and it would also be
possible (although unlikely) to have a client which could only
stream video, not audio.</p>
</tp:rationale>
<p>Clients that are willing to receive audio and/or video calls
SHOULD include the following among their channel classes if
calling <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities">UpdateCapabilities</tp:dbus-ref>
(clients of a <tp:dbus-ref
namespace="org.freedesktop.Telepathy">ChannelDispatcher</tp:dbus-ref>
SHOULD instead arrange for the ChannelDispatcher to do this,
by including the filters in their <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
properties):</p>
<ul>
<li>{ ChannelType = StreamedMedia }</li>
<li>{ ChannelType = StreamedMedia, InitialAudio = true }
if receiving calls with audio is supported</li>
<li>{ ChannelType = StreamedMedia, InitialVideo = true }
if receiving calls with video is supported</li>
</ul>
<tp:rationale>
<p>Connection managers for protocols with capability discovery,
like XMPP, need this information to advertise the appropriate
capabilities for their protocol.</p>
</tp:rationale>
</tp:docstring>
</property>
<property name="InitialVideo" tp:name-for-bindings="Initial_Video"
type="b" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The same as <tp:member-ref>InitialAudio</tp:member-ref>, but for
a video stream. This property is immutable (cannot change).</p>
<p>In particular, note that if this property is false, this does not
imply that an active video stream has not been added, only that no
video stream was active at the time the channel appeared.</p>
<p>This property is the correct way to discover whether connection
managers, contacts etc. support video calls; it appears in
capabilities structures in the same way as InitialAudio.</p>
</tp:docstring>
</property>
<property name="ImmutableStreams" tp:name-for-bindings="Immutable_Streams"
type="b" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>If <tt>True</tt>, once streams have been requested for this channel
(either by setting <tp:member-ref>InitialAudio</tp:member-ref> or
<tp:member-ref>InitialVideo</tp:member-ref> when the channel is
requested, or by calling
<tp:member-ref>RequestStreams</tp:member-ref> on a channel with no
streams), a stream of a different content type cannot be added;
subsequent calls to <tp:member-ref>RequestStreams</tp:member-ref>
that attempt to do so will fail.</p>
<p>If this property is missing, clients SHOULD assume that it is false,
and thus that the channel's streams can be changed once the call has
started.</p>
<p>If this property is present in the "allowed" set in all of the
StreamedMedia entries in a contact's capabilities, then user
interfaces MAY choose to show a separate "call" option for each
class of call.</p>
<tp:rationale>
<p>For example, once an audio-only Google Talk call has started,
it is not possible to add a video stream; both audio and video
must be requested at the start of the call if video is desired.
User interfaces may use this pseudo-capability as a hint to
display separate "Audio call" and "Video call" buttons, rather
than a single "Call" button with the option to add and remove
video once the call has started for contacts without this flag.
</p>
</tp:rationale>
<p>This property is immutable, and therefore SHOULD be announced
in <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">NewChannels</tp:dbus-ref>,
etc.</p>
</tp:docstring>
</property>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel that can send and receive streamed media such as audio or
video. Provides a number of methods for listing and requesting new
streams, and signals to indicate when streams have been added, removed
and changed status. The state of the call (ringing remotely, ringing
locally, answered, missed, etc.) are represented using the properties
and signals of the Group interface.</p>
<p>In general this should be used in conjunction with the <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface">MediaSignalling</tp:dbus-ref>
interface to exchange connection candidates and codec choices with
whichever component is responsible for the streams. However, in certain
applications where no candidate exchange is necessary (eg the streams
are handled by specialised hardware which is controlled directly by the
connection manager), the signalling interface can be omitted and this
channel type used simply to control the streams.</p>
<h4>Outgoing calls</h4>
<p>To make an audio-only call to a contact <tt>foo@example.com</tt>,
clients should call:</p>
<blockquote>
<pre>
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>({
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>: <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>,
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>: Contact,
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>: 'foo@example.com',
<tp:member-ref>InitialAudio</tp:member-ref>: True,
)</pre></blockquote>
<p>As always, <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
may be used in place of TargetID if the contact's handle is already
known. To make an audio-and-video call, the client should also specify
<tp:member-ref>InitialVideo</tp:member-ref>. The connection manager
SHOULD return a channel whose immutable properties contain the local
user as the <tp:dbus-ref namespace='ofdT.Channel'>InitiatorHandle</tp:dbus-ref>,
the remote contact as the <tp:dbus-ref namespace='ofdT.Channel'>TargetHandle</tp:dbus-ref>,
<tp:dbus-ref namespace='ofdT.Channel'>Requested</tp:dbus-ref> = <code>True</code>
(indicating that the call is outgoing); the <tp:dbus-ref
namespace='ofdT.Channel.Interface'>Group</tp:dbus-ref> interface should
initially have the local user in <tp:dbus-ref
namespace='ofdT.Channel.Interface.Group'>Members</tp:dbus-ref> and the remote
contact in <tp:dbus-ref
namespace='ofdT.Channel.Interface.Group'>RemotePendingMembers</tp:dbus-ref>, to
indicate that we are awaiting their response.</p>
<p>The contact answering the call is represented by the CM signalling
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">MembersChanged</tp:dbus-ref>,
moving the remote contact to Members, with the remote contact as the
<var>Actor</var> and <var>Reason</var> <code>None</code>. The contact
rejecting the call is represented by both contacts being removed from
the group, with the remote contact as the <var>Actor</var> and
<var>Reason</var> set appropriately. The local user may hang up at any
time by calling
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembersWithReason</tp:dbus-ref>
to remove themself, with an appropriate reason; the CM SHOULD relay the
reason to the remote contact, and emit MembersChanged removing both
contacts from the group with the self handle as the <var>Actor</var>.</p>
<p>(In the past, several other patterns have been used to place outgoing
calls; see
<a href="http://telepathy.freedesktop.org/wiki/Requesting%20StreamedMedia%20channels">'Requesting StreamedMedia Channels' on the Telepathy wiki</a>
for the details.)</p>
<h4>Incoming calls</h4>
<p>Incoming calls' immutable properties should contain <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
= Contact, both <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref> and
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel">InitiatorHandle</tp:dbus-ref>
set to the remote contact, <tp:dbus-ref
namespace='ofdT.Channel'>Requested</tp:dbus-ref> = <code>False</code>
(indicating that this is an incoming call), and appropriate values of
<tp:member-ref>InitialAudio</tp:member-ref> and
<tp:member-ref>InitialVideo</tp:member-ref>; the Group interface should
initially have the local user in <tp:dbus-ref
namespace="ofdT.Channel.Interface.Group">LocalPendingMembers</tp:dbus-ref>
and the remote contact in <tp:dbus-ref
namespace="ofdT.Channel.Interface.Group">Members</tp:dbus-ref>,
indicating that the contact is awaiting our response.</p>
<p>To accept the call, use <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">AddMembers</tp:dbus-ref>
to move the local user to the group's members. To reject the call, use
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembersWithReason</tp:dbus-ref>
to remove the local member from the group, with an appropriate reason.
If the remote user ends the call before it is answered, this is
represented by <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">MembersChanged</tp:dbus-ref>
removing both parties from the group with the remote contact as the
<var>Actor</var>, and <var>Reason</var> set appropriately.</p>
<p>Note that the call may end with the self handle as the
<var>Actor</var> without the user having chosen to reject the call, as
indicated by the nature of the <var>Reason</var>. Specifically, some
local component may time out the call (indicating this with reason
<code>No_Answer</code>; for example, the CM may have forwarded the call
to another number, as configured using <tp:dbus-ref
namespace='ofdT.Connection.Interface'>Forwarding.DRAFT</tp:dbus-ref>),
or something may have gone wrong with the call
(indicated by reason <code>Error</code>). Such calls SHOULD be
considered missed, just as if the remote contact had hung up before the
local user answered the call.</p>
<tp:rationale>
<p>This is a bit awkward, but these are the best ways we can represent
these situations. It's important to document which calls should be
considered missed, to ensure that the user can be notified.</p>
</tp:rationale>
<p>When the local user accepts an incoming call, the connection manager
SHOULD change the direction of any streams with pending local send
to be sending, without altering whether those streams are
receiving.</p>
<tp:rationale>
<p>This matches existing practice, and means that a client
can answer incoming calls and get an unmuted microphone/activated
webcam without having to take additional action to accept the
stream directions.</p>
<p>It does, however, introduce a race condition: a client believing
that it is accepting an audio-only call by calling AddMembers
can inadvertantly accept an audio + video call (and hence activate
sending from a webcam without the user's permission) if a video
stream is added just before AddMembers is processed. This race
should be removed when this specification is revised.</p>
</tp:rationale>
<h4>During a call</h4>
<p>If <tp:member-ref>ImmutableStreams</tp:member-ref> is
<code>False</code>, new streams may be requested using
<tp:member-ref>RequestStreams</tp:member-ref> (to add video to an
audio-only call, for instance), and existing streams may be removed using
<tp:member-ref>RemoveStreams</tp:member-ref> (for example, to downgrade
an audio-video call to audio-only). The call may be ended by calling
<tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembers</tp:dbus-ref>
or <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembersWithReason</tp:dbus-ref>; the call ending is signalled by the CM emitting <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface.Group">MembersChanged</tp:dbus-ref>,
removing both parties from the group.</p>
<h4>Handler filters</h4>
<p>For historical reasons, handlers must specify more than one filter if
they want to correctly advertise support for audio and/or video calls. If
they can handle channels using the <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface">MediaSignalling</tp:dbus-ref>
interface, they should also advertise various
<tp:type>Handler_Capability_Token</tp:type>s to indicate which codecs and
transports they support. See <tp:member-ref>InitialAudio</tp:member-ref>
and <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Channel.Interface">MediaSignalling/video/h264</tp:dbus-ref>
for the gory details. In summary:</p>
<dl>
<dt>To advertise support for streamed media in general, include the
following filter in <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>:</dt>
<dd><pre>
{ '...Channel.ChannelType': '...Channel.Type.StreamedMedia' ,
'...Channel.TargetHandleType': Contact,
}</pre></dd>
<dt>To advertise support for audio calls, also include the following
filter:</dt>
<dd><pre>
{ '...Channel.ChannelType': '...Channel.Type.StreamedMedia' ,
'...Channel.TargetHandleType': Contact,
'...Channel.Type.StreamedMedia.InitialAudio': True,
}</pre></dd>
<dt>To advertise support for video calls, also include the following
filter:</dt>
<dd><pre>
{ '...Channel.ChannelType': '...Channel.Type.StreamedMedia' ,
'...Channel.TargetHandleType': Contact,
'...Channel.Type.StreamedMedia.InitialVideo': True,
}</pre></dd>
<dt>If you use telepathy-farsight, and have H.264 support, you probably
want these <tp:dbus-ref
namespace="org.freedesktop.Telepathy.Client.Handler">Capabilities</tp:dbus-ref>:</dt>
<dd><pre>
[ "org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/ice-udp",
"org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/gtalk-p2p",
"org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/h264",
]</pre></dd>
</dl>
</tp:docstring>
<tp:flags name="Channel_Media_Capabilities" value-prefix="Channel_Media_Capability" type="u">
<tp:docstring>
The channel-type-specific capability flags used for
Channel.Type.StreamedMedia in the <tp:dbus-ref
namespace="org.freedesktop.Telepathy">Connection.Interface.Capabilities</tp:dbus-ref>
interface. See the <tp:member-ref>InitialAudio</tp:member-ref>
property for details of the mechanisms that will replace this.
</tp:docstring>
<tp:flag suffix="Audio" value="1">
<tp:docstring>
The handle is capable of using audio streams within a media channel.
</tp:docstring>
</tp:flag>
<tp:flag suffix="Video" value="2">
<tp:docstring>
The handle is capable of using video streams within a media channel.
</tp:docstring>
</tp:flag>
<tp:flag suffix="NAT_Traversal_STUN" value="4">
<tp:docstring>
The handle is capable of performing STUN to traverse NATs.
</tp:docstring>
</tp:flag>
<tp:flag suffix="NAT_Traversal_GTalk_P2P" value="8">
<tp:docstring>
The handle is capable of establishing Google Talk peer-to-peer
connections (as implemented in libjingle 0.3) to traverse NATs.
</tp:docstring>
</tp:flag>
<tp:flag suffix="NAT_Traversal_ICE_UDP" value="16">
<tp:docstring>
The handle is capable of establishing ICE UDP peer-to-peer
connections (as defined by the IETF MMUSIC working group) to traverse
NATs.
</tp:docstring>
</tp:flag>
<tp:flag suffix="Immutable_Streams" value="32">
<tp:docstring>
Channels whose target handle is this contact will have
<tp:member-ref>ImmutableStreams</tp:member-ref> = <tt>True</tt>.
</tp:docstring>
</tp:flag>
</tp:flags>
</interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|