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
|
<?xml version="1.0" ?>
<node name="/Channel_Type_File_Transfer1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>
Copyright © 2008-2009 Collabora Limited
</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
Library 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="im.telepathy1.Channel.Type.FileTransfer1">
<tp:requires interface="im.telepathy1.Channel"/>
<tp:added version="0.17.18">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel type for transferring files. The
transmission of data between contacts is achieved by reading from
or writing to a socket. The type of the socket (local Unix, IPv4,
etc.) is decided on when the file transfer is offered or accepted.</p>
<p>A socket approach is used to make the transfer less dependent on both
client and connection manager knowing the same protocols. As an example,
when browsing an SMB share in a file manager, one selects "Send file"
and chooses a contact. Instead of passing a URL which would then require
the connection manager to connect to the SMB share itself, the client
passes a stream from which the connection manager reads, requiring no
further connection to the share. It also allows connection managers to
be more restricted in their access to the system, allowing tighter
security policies with e.g. SELinux, or more flexible deployments which
cross user or system boundaries.</p>
<p>The Telepathy client should connect to the socket or address that
the connection manager has set up and provided back to the clients
through the two methods.</p>
<p>The FileTransfer channel type may be requested for handles of type
<tp:value-ref type="Handle_Type">Contact</tp:value-ref>. If the
channel is requested for any other handle type then the
behaviour is undefined.</p>
<p>Connection managers SHOULD NOT advertise support for file transfer to
other contacts unless it has been indicated by a call to
<tp:dbus-ref
namespace="im.telepathy1.Connection.Interface.ContactCapabilities1">UpdateCapabilities</tp:dbus-ref>.
</p>
<tp:rationale>
<p>People would send us files, and it would always fail. That would be silly.</p>
</tp:rationale>
<h4>Sending a file</h4>
<ol><li>A client should request a FileTransfer channel to a
contact, including at least the mandatory properties. For
example:</li>
<blockquote><pre>{
<tp:dbus-ref namespace="imt1.Channel">ChannelType</tp:dbus-ref>: <tp:dbus-ref namespace="imt1.Channel.Type">FileTransfer1</tp:dbus-ref>,
<tp:dbus-ref namespace="imt1.Channel">TargetHandleType</tp:dbus-ref>: <tp:value-ref type="Handle_Type">Contact</tp:value-ref>,
<tp:dbus-ref namespace="imt1.Channel">TargetID</tp:dbus-ref>: "foo@bar.com",
<tp:dbus-ref namespace="imt1.Channel.Type.FileTransfer1">Filename</tp:dbus-ref>: "wickedparty.jpg",
<tp:dbus-ref namespace="imt1.Channel.Type.FileTransfer1">Size</tp:dbus-ref>: 1020357
}</pre></blockquote>
<li>The channel is returned and if hashing information is to be
sent, it is calculated now. Note that if the client who
requested the channel isn't the channel handler, the
<tp:member-ref>URI</tp:member-ref> property should be set in the
channel request.
<tp:rationale>If the handler didn't request the file, it will
not know what file to actually send over the socket to the
connection manager.</tp:rationale>
The handler can update the
<tp:member-ref>ContentHashType</tp:member-ref> and
<tp:member-ref>ContentHash</tp:member-ref> properties
appropriately using the D-Bus properties' Set method.</li>
<li>The handler calls <tp:member-ref>ProvideFile</tp:member-ref>
to configure the socket that will be used to transfer the
file. At this point, the file transfer invitation is actually
sent to the other contact by the CM and the
<tp:member-ref>ContentHashType</tp:member-ref>,
<tp:member-ref>ContentHash</tp:member-ref>, and
<tp:member-ref>URI</tp:member-ref> properties are now
immutable.</li>
<li>The transfer <tp:member-ref>State</tp:member-ref> changes to
<tp:value-ref type="File_Transfer_State">Pending</tp:value-ref>
as the recipient decides whether to accept the transfer.</li>
<li>If the transfer is accepted, the
<tp:member-ref>State</tp:member-ref> changes to <tp:value-ref
type="File_Transfer_State">Open</tp:value-ref> and the handler
must then start sending the file to the CM using the socket
previously set up in the
<tp:member-ref>ProvideFile</tp:member-ref> call.</li>
</ol>
<h4>Receiving a file</h4>
<ol><li>A wild FileTransfer channel appears.</li>
<li>The <tp:member-ref>URI</tp:member-ref> property MAY be set
by the channel handler before calling
<tp:member-ref>AcceptFile</tp:member-ref> to inform observers
where the file will be saved. If the property is set by an
approver, the channel handler MUST save the file to that
location.</li>
<li>The handler then calls
<tp:member-ref>AcceptFile</tp:member-ref> to configure the
socket that will be used to receive the file.</li>
<li>When the transfer <tp:member-ref>State</tp:member-ref>
changes to <tp:value-ref
type="File_Transfer_State">Open</tp:value-ref>, the handler
MUST check the <tp:member-ref>InitialOffset</tp:member-ref>
property to see if it differs from the value given in
<tp:member-ref>AcceptFile</tp:member-ref> and act accordingly.</li>
<li>The handler can now start receiving the file from the CM
using the socket previously set up in the
<tp:member-ref>AcceptFile</tp:member-ref> call.</li></ol>
<h4>During a file transfer</h4>
<p>To reject an incoming file transfer, or to cancel an ongoing
transfer, handlers should call <tp:dbus-ref
namespace="imt1">Channel.Close</tp:dbus-ref>.</p>
</tp:docstring>
<property name="State" type="u" tp:type="File_Transfer_State"
access="read" tp:name-for-bindings="State">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The state of the file transfer as described by the
<tp:type>File_Transfer_State</tp:type> enum.</p>
</tp:docstring>
</property>
<property name="ContentType" type="s" access="read"
tp:name-for-bindings="Content_Type" tp:immutable="yes" tp:requestable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The file's MIME type. Protocols which do not have a "content
type" property with file transfers should set this value to
<tt>application/octet-stream</tt>.</p>
<p>This property is mandatory when requesting a file transfer
channel.</p>
</tp:docstring>
</property>
<property name="Filename" type="s" access="read"
tp:name-for-bindings="Filename" tp:immutable="yes" tp:requestable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The name of the file on the sender's side. This is
therefore given as a suggested filename for the receiver.</p>
<p>This property should be the basename of the file being
sent. For example, if the sender sends the file
<tt>/home/user/monkey.pdf</tt> then this property should be set to
<tt>monkey.pdf</tt>.</p>
<p>This property is mandatory when requesting a file transfer
channel; it cannot be empty and MUST be set to a sensible
value.</p>
</tp:docstring>
</property>
<property name="Size" type="t" access="read"
tp:name-for-bindings="Size" tp:immutable="yes" tp:requestable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The size of the file.</p>
<p>For outgoing transfers, the value of this property MUST be
in bytes, and accurate to the nearest byte. For incoming
transfers, the value of this property MUST be in bytes but
clients SHOULD NOT treat it as accurate to the nearest
byte.</p>
<p>This property is mandatory when requesting a file transfer
channel. If this information isn't provided in the protocol,
connection managers MUST set it to UINT64_MAX.</p>
</tp:docstring>
</property>
<property name="ContentHashType" type="u" tp:type="File_Hash_Type"
access="readwrite" tp:name-for-bindings="Content_Hash_Type"
tp:immutable="sometimes" tp:requestable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The type of the <tp:member-ref>ContentHash</tp:member-ref>
property.</p>
<p>For outgoing file transfers, this property is mutable until
<tp:member-ref>ProvideFile</tp:member-ref> has been
called. The property, along with
<tp:member-ref>ContentHash</tp:member-ref>, can be updated
using the D-Bus properties interface. Its value MUST
correspond to the appropriate type of the
<tp:member-ref>ContentHash</tp:member-ref> property.</p>
<p>For incoming file transfers, this property is always
immutable.</p>
<p>For each supported hash type, implementations SHOULD
include an entry in <tp:dbus-ref
namespace="imt1.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
with this property fixed to that hash type. If the protocol
supports offering a file without a content hash,
implementations SHOULD list this property in Allowed in a
requestable channel class, mapping hash types they don't
understand to <tp:value-ref
type="File_Hash_Type">None</tp:value-ref>.</p>
<p>This property is optional when requesting file transfer
channels. Its default value is <tp:value-ref
type="File_Hash_Type">None</tp:value-ref>.</p>
</tp:docstring>
</property>
<property name="ContentHash" type="s" access="readwrite"
tp:name-for-bindings="Content_Hash" tp:immutable="sometimes"
tp:requestable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Hash of the contents of the file transfer, of type
described by the value of the
<tp:member-ref>ContentHashType</tp:member-ref> property.</p>
<p>For outgoing file transfers, this property is mutable until
<tp:member-ref>ProvideFile</tp:member-ref> has been
called. The property, along with
<tp:member-ref>ContentHashType</tp:member-ref>, can be updated
using the D-Bus properties interface. Its value MUST
correspond to the appropriate type of the
<tp:member-ref>ContentHashType</tp:member-ref> property. If
the <tp:member-ref>ContentHashType</tp:member-ref> property is
not set, or set to <tp:value-ref
type="File_Hash_Type">None</tp:value-ref>, then this property
should not be set.</p>
<p>For incoming file transfers, this property is always
immutable.</p>
<p>This property is optional when requesting file transfer
channels. Its default value is the empty string.</p>
</tp:docstring>
</property>
<property name="Description" type="s" access="read"
tp:name-for-bindings="Description" tp:immutable="yes" tp:requestable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Description of the file transfer.</p>
<p>This property is optional when requesting a file transfer
channel. If this property was not provided by the remote
party, connection managers MUST set it to the empty
string.</p>
</tp:docstring>
</property>
<property name="Date" type="x" access="read"
tp:type="Unix_Timestamp64" tp:name-for-bindings="Date" tp:immutable="yes"
tp:requestable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The last modification time of the file being transferred.</p>
<p>This property is optional when requesting a file transfer
channel.</p>
</tp:docstring>
</property>
<property name="AvailableSocketTypes" type="a{uau}"
tp:type="Supported_Socket_Map" access="read"
tp:name-for-bindings="Available_Socket_Types"
tp:immutable="yes" tp:requestable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A mapping from address types (members of
<tp:type>Socket_Address_Type</tp:type>) to arrays of access
control type (members of
<tp:type>Socket_Access_Control</tp:type>) that the connection
manager supports for sockets with that address type. For
simplicity, if a CM supports offering a particular type of
file transfer, it is assumed to support accepting
it. Connection Managers MUST support at least <tp:value-ref
type="Socket_Address_Type">IPv4</tp:value-ref>.</p>
<p>A typical value for a host without IPv6 support:</p>
<pre>
{
Socket_Address_Type_IPv4:
[Socket_Access_Control_Localhost, Socket_Access_Control_Port,
Socket_Access_Control_Netmask],
Socket_Address_Type_Unix:
[Socket_Access_Control_Localhost, Socket_Access_Control_Credentials]
}
</pre>
</tp:docstring>
</property>
<property name="TransferredBytes" type="t" access="read"
tp:name-for-bindings="Transferred_Bytes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The number of bytes that have been transferred at the time of
requesting the property. This will be updated as the file transfer
continues.</p>
</tp:docstring>
</property>
<property name="InitialOffset" type="t" access="read"
tp:name-for-bindings="Initial_Offset" tp:requestable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The offset in bytes from where the file should be sent. This MUST
be respected by both the receiver and the sender after the state
becomes Open, but before any data is sent or received. Until the
<tp:member-ref>InitialOffsetDefined</tp:member-ref> signal
is emitted, this property is undefined.</p>
<p>Before setting the <tp:member-ref>State</tp:member-ref> property to
Open, the connection manager MUST set the InitialOffset property,
possibly to 0.</p>
<p>This property MUST NOT change after the
<tp:member-ref>State</tp:member-ref> of the transfer has
changed to <tp:value-ref
type="File_Transfer_State">Open</tp:value-ref>.</p>
</tp:docstring>
</property>
<property name="URI" type="s" access="readwrite"
tp:name-for-bindings="URI" tp:immutable="sometimes" tp:requestable="yes">
<tp:added version="0.21.9"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>For outgoing file transfers, this requestable property allows the channel
requester to inform observers (and the handler, if it is not the requester
itself) of the URI of the file being transferred. Note that the
connection manager SHOULD NOT read this file directly; the handler
streams the file into the CM through the socket negotiated using
<tp:member-ref>ProvideFile</tp:member-ref>.</p>
<p>On outgoing file transfers, this property MUST NOT change after the channel
is requested.</p>
<p>For incoming file transfers, this property MAY be set by the channel
handler before calling <tp:member-ref>AcceptFile</tp:member-ref> to
inform observers where the incoming file will be saved. If set by an
approver, the handler MUST save the file to that location.
Setting this property once <tp:member-ref>AcceptFile</tp:member-ref>
has been called MUST fail. Once this property has been set
<tp:member-ref>URIDefined</tp:member-ref> is emitted.</p>
<p>If set, this URI SHOULD generally point to a file on the local system, as
defined by <a href='http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.10'>
RFC 1738 §3.10</a>; that is, it should be of the form
<tt>file:///path/to/file</tt> or <tt>file://localhost/path/to/file</tt>.
For outgoing files, this URI MAY use a different scheme, such as
<tt>http:</tt>, if a remote resource is being transferred
to a contact.</p>
</tp:docstring>
</property>
<tp:enum name="File_Transfer_State" type="u">
<tp:enumvalue suffix="None" value="0">
<tp:docstring>
An invalid state type used as a null value. This value MUST
NOT appear in the <tp:member-ref>State</tp:member-ref>
property.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Pending" value="1">
<tp:docstring>
The file transfer is waiting to be accepted or rejected by
the recipient. If incoming, the handler should accept the
file by calling <tp:member-ref>AcceptFile</tp:member-ref>,
wait for the <tp:member-ref>State</tp:member-ref> to change
to <tp:value-ref
type="File_Transfer_State">Open</tp:value-ref> and check the
<tp:member-ref>InitialOffset</tp:member-ref> value.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Open" value="2">
<tp:docstring>
The file transfer is open for traffic.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Completed" value="3">
<tp:docstring>
The file transfer has been completed successfully.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Cancelled" value="4">
<tp:docstring>
The file transfer has been cancelled.
</tp:docstring>
</tp:enumvalue>
</tp:enum>
<tp:enum name="File_Transfer_State_Change_Reason" type="u">
<tp:enumvalue suffix="None" value="0">
<tp:docstring>
No reason was specified.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Requested" value="1">
<tp:docstring>
The change in state was requested.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Local_Stopped" value="2">
<tp:docstring>
The file transfer was cancelled by the local user.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Remote_Stopped" value="3">
<tp:docstring>
The file transfer was cancelled by the remote user.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Local_Error" value="4">
<tp:docstring>
The file transfer was cancelled because of a local error.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Remote_Error" value="5">
<tp:docstring>
The file transfer was cancelled because of a remote error.
</tp:docstring>
</tp:enumvalue>
</tp:enum>
<tp:enum name="File_Hash_Type" type="u">
<tp:enumvalue suffix="None" value="0">
<tp:docstring>
No hash.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="MD5" value="1">
<tp:docstring>
MD5 digest as a string of 32 ASCII hex digits.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="SHA1" value="2">
<tp:docstring>
SHA1 digest as a string of ASCII hex digits.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="SHA256" value="3">
<tp:docstring>
SHA256 digest as a string of ASCII hex digits.
</tp:docstring>
</tp:enumvalue>
</tp:enum>
<method name="AcceptFile" tp:name-for-bindings="Accept_File">
<tp:docstring>
Accept a file transfer that's in the <tp:value-ref
type="File_Transfer_State">Pending</tp:value-ref> state. The
CM MUST then emit
<tp:member-ref>InitialOffsetDefined</tp:member-ref> and change
the <tp:member-ref>State</tp:member-ref> to <tp:value-ref
type="File_Transfer_State">Open</tp:value-ref> before the
handler writes to the
socket. <tp:member-ref>InitialOffset</tp:member-ref> should be
respected in case its value differs from the offset that was
specified as an argument to this method.
</tp:docstring>
<arg direction="in" name="Address_Type" type="u" tp:type="Socket_Address_Type">
<tp:docstring>
The type of address the connection manager should listen on.
</tp:docstring>
</arg>
<arg direction="in" name="Access_Control" type="u" tp:type="Socket_Access_Control">
<tp:docstring>
The type of access control the connection manager should apply to
the socket.
</tp:docstring>
</arg>
<arg direction="in" name="Access_Control_Param" type="v">
<tp:docstring>
A parameter for the access control type, to be interpreted
as specified in the documentation for the
<tp:type>Socket_Access_Control</tp:type> enum.
</tp:docstring>
</arg>
<arg direction="in" name="Offset" type="t">
<tp:docstring>
The desired offset in bytes where the file transfer should start.
The offset is taken from the beginning of the file. Specifying an
offset of zero will start the transfer from the beginning of the
file. The offset that is actually given in the
<tp:member-ref>InitialOffset</tp:member-ref> property can differ
from this argument where the requested offset is not supported.
(For example, some protocols do not support offsets at all so
the InitialOffset property will always be 0.)
</tp:docstring>
</arg>
<arg direction="out" name="Address" type="v">
<tp:docstring>
The address on which the connection manager will listen for
connections for this file transfer.
</tp:docstring>
</arg>
<tp:possible-errors>
<tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The given address type or access-control mechanism is not supported.
</tp:docstring>
</tp:error>
<tp:error name="im.telepathy1.Error.NetworkError"/>
<tp:error name="im.telepathy1.Error.InvalidArgument"/>
<tp:docstring>
The address type, access control, access control parameter,
offset, or a combination of all four is invalid.
</tp:docstring>
<tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The file transfer is not in the Pending state or there was
a local error with acquiring a socket.
</tp:docstring>
</tp:error>
</tp:possible-errors>
</method>
<method name="ProvideFile" tp:name-for-bindings="Provide_File">
<tp:docstring>
Provide the file for an outgoing file transfer. Opens a socket
that the handler can use to send the file to the connection
manager. The channel MUST have been requested, and will
change state to <tp:value-ref
type="File_Transfer_State">Open</tp:value-ref>.
</tp:docstring>
<arg direction="in" name="Address_Type" type="u" tp:type="Socket_Address_Type">
<tp:docstring>
The type of address the connection manager should listen on.
</tp:docstring>
</arg>
<arg direction="in" name="Access_Control" type="u" tp:type="Socket_Access_Control">
<tp:docstring>
The type of access control the connection manager should
apply to the socket.
</tp:docstring>
</arg>
<arg direction="in" name="Access_Control_Param" type="v">
<tp:docstring>
A parameter for the access control type, to be interpreted
as specified in the documentation for the
<tp:type>Socket_Access_Control</tp:type> enum.
</tp:docstring>
</arg>
<arg direction="out" name="Address" type="v">
<tp:docstring>
The address on which the connection manager will listen for
connections for this file transfer.
</tp:docstring>
</arg>
<tp:possible-errors>
<tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The given address type or access-control mechanism is not
supported.
</tp:docstring>
</tp:error>
<tp:error name="im.telepathy1.Error.InvalidArgument"/>
<tp:docstring>
The address type, access control, access control
parameter, or a combination of all three is invalid.
</tp:docstring>
<tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The channel is not outgoing,
<tp:member-ref>ProvideFile</tp:member-ref> has already
been called, or there was a local error acquiring the
socket.
</tp:docstring>
</tp:error>
</tp:possible-errors>
</method>
<signal name="FileTransferStateChanged"
tp:name-for-bindings="File_Transfer_State_Changed">
<tp:docstring>
Emitted when the state of a file transfer changes.
</tp:docstring>
<arg name="State" type="u" tp:type="File_Transfer_State">
<tp:docstring>
The new state of the file transfer.
</tp:docstring>
</arg>
<arg name="Reason" type="u" tp:type="File_Transfer_State_Change_Reason">
<tp:docstring>
The reason for the state change. The value will always be
<tp:value-ref
type="File_Transfer_State_Change_Reason">None</tp:value-ref>,
except when changing state to <tp:value-ref
type="File_Transfer_State">Cancelled</tp:value-ref>.
</tp:docstring>
</arg>
</signal>
<signal name="TransferredBytesChanged"
tp:name-for-bindings="Transferred_Bytes_Changed">
<tp:docstring>
<p>Emitted when the
<tp:member-ref>TransferredBytes</tp:member-ref> property
changes. This signal SHOULD NOT be emitted for every byte
transferred; instead it should be signalled a maximum of once
a second.</p>
<tp:rationale>This would flood the bus with useless signal
emissions.</tp:rationale>
<p>The <tp:member-ref>TransferredBytes</tp:member-ref>
property SHOULD NOT be polled.</p>
</tp:docstring>
<arg name="Count" type="t">
<tp:docstring>
The new <tp:member-ref>TransferredBytes</tp:member-ref>
property value.
</tp:docstring>
</arg>
</signal>
<signal name="InitialOffsetDefined"
tp:name-for-bindings="Initial_Offset_Defined">
<tp:docstring>
Emitted when the value of the
<tp:member-ref>InitialOffset</tp:member-ref> property has been
negotiated. This signal MUST be emitted before the channel
becomes <tp:value-ref
type="File_Transfer_State">Open</tp:value-ref>. Clients must
use this offset when transferring files.
</tp:docstring>
<arg name="InitialOffset" type="t">
<tp:docstring>
The value of the
<tp:member-ref>InitialOffset</tp:member-ref> property.
</tp:docstring>
</arg>
</signal>
<signal name="URIDefined"
tp:name-for-bindings="URI_Defined">
<tp:added version="0.21.9"/>
<tp:docstring>
Emitted when the value of the <tp:member-ref>URI</tp:member-ref>
property has been set. This signal MUST only be emitted on
incoming file transfers, and only if the handler sets the
<tp:member-ref>URI</tp:member-ref> property before
accepting the file.
</tp:docstring>
<arg name="URI" type="s">
<tp:docstring>
The value of the <tp:member-ref>URI</tp:member-ref> property.
</tp:docstring>
</arg>
</signal>
</interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|