Commit 6b005f6c authored by Simon McVittie's avatar Simon McVittie

Use telepathy-glib for FileTransfer.FileCollection

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=26609Reviewed-by: Guillaume Desmottes's avatarGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
parent 6d577b4f
<?xml version="1.0" ?>
<node name="/Channel_Type_FileTransfer_Future"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 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.Channel.Type.FileTransfer.FUTURE"
tp:causes-havoc="a staging area for future File Transfer Channel functionality">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface contains functionality which we intend to incorporate
into the File Transfer Channel interface in future.
It should be considered to be conceptually part of the core
File Transfer Channel interface, but without API or ABI guarantees.</p>
<tp:rationale>
<p>If we add new functionality to the Channel interface, libraries
that use generated code (notably telepathy-glib) will have it as
part of their ABI forever, meaning we can't make incompatible
changes. By using this interface as a staging area for future
Channel functionality, we can try out new properties, signals
and methods as application-specific extensions, then merge them
into the core Channel interface when we have enough implementation
experience to declare them to be stable.</p>
<p>The name is by analogy to Python's <code>__future__</code>
pseudo-module.</p>
</tp:rationale>
</tp:docstring>
<property name="FileCollection" tp:name-for-bindings="FileCollection"
type="s" access="read">
<tp:added version="0.19.2">(in Channel.Type.FileTransfer.FUTURE
pseudo-interface)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The FileCollection to which this channel belongs.</p>
<p>A channel's FileCollection property can never change.</p>
<p>At least on GTalk and apparently also on iChat the user can
send a set of files to a contact and that contact can then
pick and choose which files to actually receive.
The CM should emit all new FT channels belonging to one collection
at the same time, UIs supporting this feature can then
bundle all these channels together in some way and show a
nice UI. UIs not supporting it will treat them as seperate
transfers, which is not great but a reasonable fallback</p>
</tp:docstring>
</property>
</interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
......@@ -2,7 +2,6 @@ tools_dir = $(top_srcdir)/tools
EXTRA_DIST = \
all.xml \
Channel_Type_FileTransfer_Future.xml \
Connection_Future.xml \
Connection_Interface_Gabble_Decloak.xml \
Gabble_Plugin_Console.xml \
......
......@@ -36,7 +36,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</p>
<xi:include href="OLPC_Buddy_Info.xml"/>
<xi:include href="OLPC_Activity_Properties.xml"/>
<xi:include href="Channel_Type_FileTransfer_Future.xml"/>
<xi:include href="Connection_Interface_Gabble_Decloak.xml"/>
<xi:include href="Connection_Future.xml"/>
......
......@@ -65,8 +65,6 @@ G_DEFINE_TYPE_WITH_CODE (GabbleFileTransferChannel, gabble_file_transfer_channel
TP_TYPE_BASE_CHANNEL,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_FILE_TRANSFER,
file_transfer_iface_init);
G_IMPLEMENT_INTERFACE (GABBLE_TYPE_SVC_CHANNEL_TYPE_FILETRANSFER_FUTURE,
NULL);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA,
NULL);
);
......@@ -96,7 +94,6 @@ enum
PROP_BYTESTREAM,
#ifdef ENABLE_JINGLE_FILE_TRANSFER
/* Chan.Type.FileTransfer.FUTURE */
PROP_GTALK_FILE_COLLECTION,
#endif
......@@ -521,7 +518,7 @@ gabble_file_transfer_channel_fill_immutable_properties (TpBaseChannel *chan,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "AvailableSocketTypes",
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "TransferredBytes",
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "InitialOffset",
GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE, "FileCollection",
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, "FileCollection",
TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA, "ServiceName",
TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA, "Metadata",
NULL);
......@@ -548,7 +545,6 @@ gabble_file_transfer_channel_get_interfaces (TpBaseChannel *base)
interfaces = TP_BASE_CHANNEL_CLASS (
gabble_file_transfer_channel_parent_class)->get_interfaces (base);
g_ptr_array_add (interfaces, GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE);
g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA);
return interfaces;
......@@ -577,10 +573,6 @@ gabble_file_transfer_channel_class_init (
{ "InitialOffset", "initial-offset", NULL },
{ "Date", "date", NULL },
{ "URI", "uri", NULL },
{ NULL }
};
static TpDBusPropertiesMixinPropImpl file_future_props[] = {
{ "FileCollection", "file-collection", NULL },
{ NULL }
};
......@@ -597,11 +589,6 @@ gabble_file_transfer_channel_class_init (
file_transfer_channel_properties_setter,
file_props
},
{ GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE,
tp_dbus_properties_mixin_getter_gobject_properties,
NULL,
file_future_props
},
{ TP_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA,
tp_dbus_properties_mixin_getter_gobject_properties,
NULL,
......
......@@ -366,7 +366,7 @@ FT_DATE = CHANNEL_TYPE_FILE_TRANSFER + '.Date'
FT_AVAILABLE_SOCKET_TYPES = CHANNEL_TYPE_FILE_TRANSFER + '.AvailableSocketTypes'
FT_TRANSFERRED_BYTES = CHANNEL_TYPE_FILE_TRANSFER + '.TransferredBytes'
FT_INITIAL_OFFSET = CHANNEL_TYPE_FILE_TRANSFER + '.InitialOffset'
FT_FILE_COLLECTION = CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE.FileCollection'
FT_FILE_COLLECTION = CHANNEL_TYPE_FILE_TRANSFER + '.FileCollection'
FT_URI = CHANNEL_TYPE_FILE_TRANSFER + '.URI'
FT_SERVICE_NAME = CHANNEL_IFACE_FILE_TRANSFER_METADATA + '.ServiceName'
FT_METADATA = CHANNEL_IFACE_FILE_TRANSFER_METADATA + '.Metadata'
......
......@@ -220,7 +220,6 @@ class ReceiveFileTest(FileTransferTest):
assert props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_FILE_TRANSFER
assertSameSets(
[ cs.CHANNEL_IFACE_FILE_TRANSFER_METADATA,
cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE',
], props[cs.INTERFACES])
assert props[cs.TARGET_HANDLE] == self.handle
assert props[cs.TARGET_ID] == self.contact_name
......@@ -412,7 +411,6 @@ class SendFileTest(FileTransferTest):
assertEquals(cs.CHANNEL_TYPE_FILE_TRANSFER, props[cs.CHANNEL_TYPE])
assertSameSets(
[ cs.CHANNEL_IFACE_FILE_TRANSFER_METADATA,
cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE',
], props[cs.INTERFACES])
assertEquals(self.handle, props[cs.TARGET_HANDLE])
assertEquals(self.contact_name, props[cs.TARGET_ID])
......
......@@ -270,7 +270,6 @@ class ReceiveFileTest(FileTransferTest):
assert props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_FILE_TRANSFER, props
assertSameSets(
[ cs.CHANNEL_IFACE_FILE_TRANSFER_METADATA,
cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE',
], props[cs.INTERFACES])
assert props[cs.TARGET_HANDLE] == self.handle, props
assert props[cs.TARGET_ID] == self.target, props
......@@ -425,7 +424,6 @@ class SendFileTest(FileTransferTest):
assert props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_FILE_TRANSFER
assertSameSets(
[ cs.CHANNEL_IFACE_FILE_TRANSFER_METADATA,
cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE',
], props[cs.INTERFACES])
assert props[cs.TARGET_HANDLE] == self.handle
assert props[cs.TARGET_ID] == self.target
......
......@@ -118,7 +118,6 @@ def test(q, bus, conn, stream):
assert props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_FILE_TRANSFER, props
assertSameSets(
[ cs.CHANNEL_IFACE_FILE_TRANSFER_METADATA,
cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE',
], props[cs.INTERFACES])
assert props[cs.TARGET_HANDLE] == 2L, props
assert props[cs.TARGET_ID] == contact.replace("/Resource", ""), props
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment