~ubuntu-branches/ubuntu/oneiric/libtelepathy/oneiric

« back to all changes in this revision

Viewing changes to spec/Channel_Type_Text.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sjoerd Simons
  • Date: 2007-03-12 11:43:26 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20070312114326-v4aezxb6sr8utds1
Tags: 0.0.51-2
Bump shlibs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" ?>
 
2
<node name="/Channel_Type_Text" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
 
3
  <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
 
4
  <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
 
5
  <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
 
6
  <tp:license xmlns="http://www.w3.org/1999/xhtml">
 
7
    <p>This library is free software; you can redistribute it and/or
 
8
modify it under the terms of the GNU Lesser General Public
 
9
License as published by the Free Software Foundation; either
 
10
version 2.1 of the License, or (at your option) any later version.</p>
 
11
 
 
12
<p>This library is distributed in the hope that it will be useful,
 
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
Library General Public License for more details.</p>
 
16
 
 
17
<p>You should have received a copy of the GNU Lesser General Public
 
18
License along with this library; if not, write to the Free Software
 
19
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</p>
 
20
  </tp:license>
 
21
  <interface name="org.freedesktop.Telepathy.Channel.Type.Text">
 
22
    <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
 
23
    <method name="AcknowledgePendingMessages">
 
24
      <arg direction="in" name="ids" type="au">
 
25
        <tp:docstring>
 
26
          The IDs of the messages to acknowledge
 
27
        </tp:docstring>
 
28
      </arg>
 
29
      <tp:docstring>
 
30
        Inform the channel that you have handled messages by displaying them to
 
31
        the user (or equivalent), so they can be removed from the pending queue.
 
32
      </tp:docstring>
 
33
      <tp:possible-errors>
 
34
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
 
35
          A given message ID was not found, so no action was taken
 
36
        </tp:error>
 
37
      </tp:possible-errors>
 
38
    </method>
 
39
    <method name="GetMessageTypes">
 
40
      <arg direction="out" type="au">
 
41
        <tp:docstring>
 
42
          An array of integer message types (ChannelTextMessageType)
 
43
        </tp:docstring>
 
44
      </arg>
 
45
      <tp:docstring>
 
46
        Return an array indicating which types of message may be sent on this
 
47
        channel.
 
48
      </tp:docstring>
 
49
    </method>
 
50
    <method name="ListPendingMessages">
 
51
      <arg direction="in" name="clear" type="b">
 
52
        <tp:docstring>
 
53
          If true, remove all messages from the queue
 
54
        </tp:docstring>
 
55
      </arg>
 
56
      <arg direction="out" type="a(uuuuus)">
 
57
        <tp:docstring>
 
58
          An array of structs representing the pending queue. Each contains:
 
59
          <ul>
 
60
            <li>a numeric identifier</li>
 
61
            <li>a Unix timestamp indicating when the message was received</li>
 
62
            <li>the contact handle for the contact who sent the message</li>
 
63
            <li>the message type, taken from ChannelTextMessageType</li>
 
64
            <li>the bitwise-OR of the message flags from ChannelTextMessageFlags</li>
 
65
            <li>the text of the message</li>
 
66
          </ul>
 
67
        </tp:docstring>
 
68
      </arg>
 
69
      <tp:docstring>
 
70
        List the messages currently in the pending queue, and optionally
 
71
        remove then all.
 
72
      </tp:docstring>
 
73
    </method>
 
74
    <signal name="LostMessage">
 
75
      <tp:docstring>
 
76
        This signal is emitted to indicate that an incoming message was
 
77
        not able to be stored and forwarded by the connection manager
 
78
        due to lack of memory.
 
79
      </tp:docstring>
 
80
    </signal>
 
81
    <signal name="Received">
 
82
      <arg name="id" type="u">
 
83
        <tp:docstring>
 
84
          A numeric identifier for acknowledging the message
 
85
        </tp:docstring>
 
86
      </arg>
 
87
      <arg name="timestamp" type="u">
 
88
        <tp:docstring>
 
89
          A Unix timestamp indicating when the message was received
 
90
        </tp:docstring>
 
91
      </arg>
 
92
      <arg name="sender" type="u">
 
93
        <tp:docstring>
 
94
          The handle of the contact who sent the message
 
95
        </tp:docstring>
 
96
      </arg>
 
97
      <arg name="type" type="u">
 
98
        <tp:docstring>
 
99
          The type of the message (normal, action, notice, etc), from
 
100
          ChannelTextMessageType
 
101
        </tp:docstring>
 
102
      </arg>
 
103
      <arg name="flags" type="u">
 
104
        <tp:docstring>
 
105
          A bitwise OR of the message flags as defined by ChannelTextMessageFlags
 
106
        </tp:docstring>
 
107
      </arg>
 
108
      <arg name="text" type="s">
 
109
        <tp:docstring>
 
110
          The text of the message
 
111
        </tp:docstring>
 
112
      </arg>
 
113
      <tp:docstring>
 
114
        Signals that a message with the given id, timestamp, sender, type
 
115
        and text has been received on this channel. Applications that catch
 
116
        this signal and reliably inform the user of the message should
 
117
        acknowledge that they have dealt with the message with the
 
118
        AcknowledgePendingMessage method.
 
119
      </tp:docstring>
 
120
    </signal>
 
121
    <method name="Send">
 
122
      <arg direction="in" name="type" type="u">
 
123
        <tp:docstring>
 
124
          An integer indicating the type of the message, from
 
125
          ChannelTextMessageType
 
126
        </tp:docstring>
 
127
      </arg>
 
128
      <arg direction="in" name="text" type="s">
 
129
        <tp:docstring>
 
130
          The message to send
 
131
        </tp:docstring>
 
132
      </arg>
 
133
      <tp:docstring>
 
134
        Request that a message be sent on this channel. The Sent signal will be
 
135
        emitted when the message has been sent, and this method will return.
 
136
      </tp:docstring>
 
137
      <tp:possible-errors>
 
138
        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
 
139
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
 
140
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
 
141
        <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
 
142
      </tp:possible-errors>
 
143
    </method>
 
144
    <tp:enum name="Channel_Text_Send_Error">
 
145
      <tp:enumvalue suffix="Unknown" value="0">
 
146
        <tp:docstring>
 
147
        An unknown error occurred
 
148
        </tp:docstring>
 
149
      </tp:enumvalue>
 
150
      <tp:enumvalue suffix="Offline" value="1">
 
151
        <tp:docstring>
 
152
        The requested contact was offline
 
153
        </tp:docstring>
 
154
      </tp:enumvalue>
 
155
      <tp:enumvalue suffix="Invalid_Contact" value="2">
 
156
        <tp:docstring>
 
157
        The requested contact is not valid
 
158
        </tp:docstring>
 
159
      </tp:enumvalue>
 
160
      <tp:enumvalue suffix="Permission_Denied" value="3">
 
161
        <tp:docstring>
 
162
        The user does not have permission to speak on this channel
 
163
        </tp:docstring>
 
164
      </tp:enumvalue>
 
165
      <tp:enumvalue suffix="Too_Long" value="4">
 
166
        <tp:docstring>
 
167
        The outgoing message was too long and was rejected by the server
 
168
        </tp:docstring>
 
169
      </tp:enumvalue>
 
170
      <tp:enumvalue suffix="Not_Implemented" value="5">
 
171
        <tp:docstring>
 
172
        The channel doesn't support sending text messages to the requested
 
173
        contact
 
174
        </tp:docstring>
 
175
      </tp:enumvalue>
 
176
    </tp:enum>
 
177
    <signal name="SendError">
 
178
      <arg name="error" type="u">
 
179
        <tp:docstring>
 
180
          One of the values of ChannelTextSendError
 
181
        </tp:docstring>
 
182
      </arg>
 
183
      <arg name="timestamp" type="u">
 
184
        <tp:docstring>
 
185
          The Unix timestamp indicating when the message was sent
 
186
        </tp:docstring>
 
187
      </arg>
 
188
      <arg name="type" type="u">
 
189
        <tp:docstring>
 
190
          The message type from ChannelTextMessageType
 
191
        </tp:docstring>
 
192
      </arg>
 
193
      <arg name="text" type="s">
 
194
        <tp:docstring>
 
195
          The text of the message
 
196
        </tp:docstring>
 
197
      </arg>
 
198
      <tp:docstring>
 
199
        Signals that an outgoing message has failed to send. The error
 
200
        will be one of the values from ChannelTextSendError.
 
201
      </tp:docstring>
 
202
    </signal>
 
203
    <signal name="Sent">
 
204
      <arg name="timestamp" type="u">
 
205
        <tp:docstring>
 
206
          Unix timestamp indicating when the message was sent
 
207
        </tp:docstring>
 
208
      </arg>
 
209
      <arg name="type" type="u">
 
210
        <tp:docstring>
 
211
          The message type (normal, action, notice, etc) from
 
212
          ChannelTextMessageType
 
213
        </tp:docstring>
 
214
      </arg>
 
215
      <arg name="text" type="s">
 
216
        <tp:docstring>
 
217
          The text of the message
 
218
        </tp:docstring>
 
219
      </arg>
 
220
      <tp:docstring>
 
221
        Signals that a message has been sent on this channel.
 
222
      </tp:docstring>
 
223
    </signal>
 
224
    <tp:enum name="Channel_Text_Message_Type">
 
225
      <tp:enumvalue suffix="Normal" value="0">
 
226
        <tp:docstring>
 
227
        A standard message
 
228
        </tp:docstring>
 
229
      </tp:enumvalue>
 
230
      <tp:enumvalue suffix="Action" value="1">
 
231
        <tp:docstring>
 
232
        An action which might be presented to the user as
 
233
        "* &lt;sender&gt; &lt;action&gt;"
 
234
        </tp:docstring>
 
235
      </tp:enumvalue>
 
236
      <tp:enumvalue suffix="Notice" value="2">
 
237
        <tp:docstring>
 
238
        A one-off or automated message not necessarily expecting a reply
 
239
        </tp:docstring>
 
240
      </tp:enumvalue>
 
241
      <tp:enumvalue suffix="Auto_Reply" value="3">
 
242
        <tp:docstring>
 
243
        An automatically-generated reply message
 
244
        </tp:docstring>
 
245
      </tp:enumvalue>
 
246
    </tp:enum>
 
247
    <tp:flags name="Channel_Text_Message_Flags" value-prefix="Channel_Text_Message_Flag">
 
248
      <tp:flag suffix="Truncated" value="1">
 
249
        <tp:docstring>
 
250
        The incoming message was truncated to a shorter length by the
 
251
        server or the connection manager.
 
252
        </tp:docstring>
 
253
      </tp:flag>
 
254
    </tp:flags>
 
255
    <tp:property name="anonymous" type="b">
 
256
      <tp:docstring>
 
257
      True if people may join the channel without other members being made
 
258
      aware of their identity.
 
259
      </tp:docstring>
 
260
    </tp:property>
 
261
    <tp:property name="invite-only" type="b">
 
262
      <tp:docstring>
 
263
      True if people may not join the channel until they have been invited.
 
264
      </tp:docstring>
 
265
    </tp:property>
 
266
    <tp:property name="limit" type="u">
 
267
      <tp:docstring>
 
268
      The limit to the number of members, if limited is true.
 
269
      </tp:docstring>
 
270
    </tp:property>
 
271
    <tp:property name="limited" type="b">
 
272
      <tp:docstring>
 
273
      True if there is a limit to the number of channel members.
 
274
      </tp:docstring>
 
275
    </tp:property>
 
276
    <tp:property name="moderated" type="b">
 
277
      <tp:docstring>
 
278
      True if channel membership is not sufficient to allow participation.
 
279
      </tp:docstring>
 
280
    </tp:property>
 
281
    <tp:property name="name" type="s">
 
282
      <tp:docstring>
 
283
      A human-visible name for the channel, if it differs from the string
 
284
      version of the channel's handle.
 
285
      </tp:docstring>
 
286
    </tp:property>
 
287
    <tp:property name="description" type="s">
 
288
      <tp:docstring>
 
289
      A human-readable description of the channel's overall purpose.
 
290
      </tp:docstring>
 
291
    </tp:property>
 
292
    <tp:property name="password" type="s">
 
293
      <tp:docstring>
 
294
      The password required to enter the channel if password-required is true.
 
295
      </tp:docstring>
 
296
    </tp:property>
 
297
    <tp:property name="password-required" type="b">
 
298
      <tp:docstring>
 
299
      True if a password must be provided to enter the channel.
 
300
      </tp:docstring>
 
301
    </tp:property>
 
302
    <tp:property name="persistent" type="b">
 
303
      <tp:docstring>
 
304
      True if the channel will remain in existence on the server after all
 
305
      members have left it.
 
306
      </tp:docstring>
 
307
    </tp:property>
 
308
    <tp:property name="private" type="b">
 
309
      <tp:docstring>
 
310
      True if the channel is not visible to non-members.
 
311
      </tp:docstring>
 
312
    </tp:property>
 
313
    <tp:property name="subject" type="s">
 
314
      <tp:docstring>
 
315
      A human-readable description of the current subject of conversation in
 
316
      the channel, similar to /topic in IRC.
 
317
      </tp:docstring>
 
318
    </tp:property>
 
319
    <tp:property name="subject-contact" type="u">
 
320
      <tp:docstring>
 
321
      A contact handle representing who last modified the subject.
 
322
      </tp:docstring>
 
323
    </tp:property>
 
324
    <tp:property name="subject-timestamp" type="u">
 
325
      <tp:docstring>
 
326
      A unix timestamp indicating when the subject was last modified.
 
327
      </tp:docstring>
 
328
    </tp:property>
 
329
    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
330
      <p>A channel type for sending and receiving messages in plain text, with no
 
331
        formatting.</p>
 
332
 
 
333
      <p>When a message is received, an identifier is assigned and a Received signal
 
334
      emitted, and the message placed in a pending queue which can be inspected
 
335
      with ListPendingMessages. A client which has handled the message by showing
 
336
      it to the user (or equivalent) should acknowledge the receipt using the
 
337
      AcknowledgePendingMessage method, and the message will then be removed from
 
338
      the pending queue. Numeric identifiers for received messages may be reused
 
339
      over the lifetime of the channel.</p>
 
340
 
 
341
      <p>Each message has an associated 'type' value, which should be one of the
 
342
      values allowed by ChannelTextMessageType.</p>
 
343
 
 
344
      <p>Each message also has a flags value, which is a bitwise OR of the
 
345
      flags given in ChannelTextMessageFlags.</p>
 
346
 
 
347
      <p>Sending messages can be requested using the Send method, which will return
 
348
      and cause the Sent signal to be emitted when the message has been delivered
 
349
      to the server, or SendError if there is a failure.</p>
 
350
    </tp:docstring>
 
351
  </interface>
 
352
</node>
 
353
<!-- vim:set sw=2 sts=2 et ft=xml: -->