summaryrefslogtreecommitdiff
path: root/spec/Channel_Interface_DTMF.xml
blob: 7545ff6f392f15f1b388ee4538dcb15fefd7cf27 (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
<?xml version="1.0" ?>
<node name="/Channel_Interface_DTMF" 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.Channel.Interface.DTMF">
    <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.StreamedMedia"/>

    <method name="StartTone" tp:name-for-bindings="Start_Tone">
      <arg direction="in" name="Stream_ID" type="u" tp:type="Stream_ID">
        <tp:docstring>A stream ID as defined in the StreamedMedia channel type.</tp:docstring>
      </arg>
      <arg direction="in" name="Event" type="y" tp:type="DTMF_Event">
        <tp:docstring>A numeric event code from the DTMF_Event enum.</tp:docstring>
      </arg>
      <tp:docstring>
        Start sending a DTMF tone on this stream. Where possible, the tone
        will continue until <tp:member-ref>StopTone</tp:member-ref> is called.
        On certain protocols, it may
        only be possible to send events with a predetermined length. In this
        case, the implementation may emit a fixed-length tone, and the StopTone
        method call should return NotAvailable.
      </tp:docstring>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
          <tp:docstring>
            The given stream ID was invalid.
          </tp:docstring>
        </tp:error>
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
          <tp:docstring>
            The requested event is not available on this stream.
          </tp:docstring>
        </tp:error>
      </tp:possible-errors>
    </method>

    <method name="StopTone" tp:name-for-bindings="Stop_Tone">
      <arg direction="in" name="Stream_ID" type="u" tp:type="Stream_ID">
        <tp:docstring>A stream ID as defined in the StreamedMedia channel type.</tp:docstring>
      </arg>
      <tp:docstring>
        Stop sending any DTMF tone which has been started using the
        <tp:member-ref>StartTone</tp:member-ref>
        method. If there is no current tone, this method will do nothing.
      </tp:docstring>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
          <tp:docstring>
            The given stream ID was invalid.
          </tp:docstring>
        </tp:error>
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
          <tp:docstring>
            Continuous tones are not supported by this stream.
          </tp:docstring>
        </tp:error>
      </tp:possible-errors>
    </method>

    <tp:enum name="DTMF_Event" type="y">
      <tp:enumvalue suffix="Digit_0" value="0">
        <tp:docstring>0</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Digit_1" value="1">
        <tp:docstring>1</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Digit_2" value="2">
        <tp:docstring>2</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Digit_3" value="3">
        <tp:docstring>3</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Digit_4" value="4">
        <tp:docstring>4</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Digit_5" value="5">
        <tp:docstring>5</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Digit_6" value="6">
        <tp:docstring>6</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Digit_7" value="7">
        <tp:docstring>7</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Digit_8" value="8">
        <tp:docstring>8</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Digit_9" value="9">
        <tp:docstring>9</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Asterisk" value="10">
        <tp:docstring>*</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Hash" value="11">
        <tp:docstring>#</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Letter_A" value="12">
        <tp:docstring>A</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Letter_B" value="13">
        <tp:docstring>B</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Letter_C" value="14">
        <tp:docstring>C</tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Letter_D" value="15">
        <tp:docstring>D</tp:docstring>
      </tp:enumvalue>
    </tp:enum>

    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
      An interface that gives a Channel the ability to send DTMF events over
      audio streams which have been established using the StreamedMedia channel
      type. The event codes used are in common with those defined in <a
      href="http://www.rfc-editor.org/rfc/rfc4733.txt">RFC4733</a>, and are
      listed in the <tp:type>DTMF_Event</tp:type> enumeration.
    </tp:docstring>

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