summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-01-26 13:21:02 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-01-26 13:26:04 +0100
commit2e81e67ff0275827a27b0f4273174b88194b015a (patch)
treed224e27f07bf829282f11fbd1beb4d4ec04d5408
parentf57a533dd60c0e6adb05400ec020e701ee43d5a2 (diff)
FileURI has been renamed to URI
-rw-r--r--extensions/Channel_Type_FileTransfer_Future.xml19
-rw-r--r--src/ft-channel.c48
-rw-r--r--src/ft-channel.h2
-rw-r--r--src/ft-manager.c4
-rw-r--r--tests/twisted/caps_helper.py2
-rw-r--r--tests/twisted/constants.py2
-rw-r--r--tests/twisted/file-transfer/file_transfer_helper.py24
-rw-r--r--tests/twisted/jingle-share/file_transfer_helper.py4
8 files changed, 52 insertions, 53 deletions
diff --git a/extensions/Channel_Type_FileTransfer_Future.xml b/extensions/Channel_Type_FileTransfer_Future.xml
index bf91acd65..17c2ff23a 100644
--- a/extensions/Channel_Type_FileTransfer_Future.xml
+++ b/extensions/Channel_Type_FileTransfer_Future.xml
@@ -62,8 +62,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
</property>
- <property name="FileURI" type="s" access="readwrite"
- tp:name-for-bindings="File_URI" tp:immutable="sometimes" tp:requestable="yes">
+ <property name="URI" type="s" access="readwrite"
+ tp:name-for-bindings="URI" tp:immutable="sometimes" tp:requestable="yes">
<tp:added version="0.21.UNRELEASED"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>For outgoing file transfers, this requestable property allows the channel
@@ -81,22 +81,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
inform observers where the incoming file will be saved.
Setting this property once AcceptFile
has been called MUST fail. Once this property has been set
- FileURIDefined is fired.</p>
+ URIDefined is fired.</p>
</tp:docstring>
</property>
- <signal name="FileURIDefined"
- tp:name-for-bindings="File_URI_Defined">
+ <signal name="URIDefined"
+ tp:name-for-bindings="URI_Defined">
<tp:added version="0.21.UNRELEASED"/>
<tp:docstring>
- Emitted when the value of the FileURI
+ Emitted when the value of the URI
property has been set. This signal MAY only be fired on incoming file
- transfers if the handler had set a value to
- FileURI before accepting the file.
+ transfers if the handler had set a value to URI before accepting the file.
</tp:docstring>
- <arg name="File_URI" type="s">
+ <arg name="URI" type="s">
<tp:docstring>
- The value of the FileURI property.
+ The value of the URI property.
</tp:docstring>
</arg>
</signal>
diff --git a/src/ft-channel.c b/src/ft-channel.c
index b5e6a3f87..a24756989 100644
--- a/src/ft-channel.c
+++ b/src/ft-channel.c
@@ -118,7 +118,7 @@ enum
PROP_INITIAL_OFFSET,
PROP_RESUME_SUPPORTED,
PROP_FILE_COLLECTION,
- PROP_FILE_URI,
+ PROP_URI,
PROP_CONNECTION,
PROP_BYTESTREAM,
@@ -159,7 +159,7 @@ struct _GabbleFileTransferChannelPrivate {
guint64 initial_offset;
guint64 date;
gchar *file_collection;
- gchar *file_uri;
+ gchar *uri;
gboolean channel_opened;
};
@@ -282,9 +282,9 @@ gabble_file_transfer_channel_get_property (GObject *object,
case PROP_FILE_COLLECTION:
g_value_set_string (value, self->priv->file_collection);
break;
- case PROP_FILE_URI:
+ case PROP_URI:
g_value_set_string (value,
- self->priv->file_uri != NULL ? self->priv->file_uri: "");
+ self->priv->uri != NULL ? self->priv->uri: "");
break;
case PROP_CHANNEL_DESTROYED:
g_value_set_boolean (value, self->priv->closed);
@@ -319,11 +319,11 @@ gabble_file_transfer_channel_get_property (GObject *object,
GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE, "FileCollection",
NULL);
- /* FileURI is immutable only for outgoing transfers */
+ /* URI is immutable only for outgoing transfers */
if (self->priv->initiator == base_conn->self_handle)
{
tp_dbus_properties_mixin_fill_properties_hash (object, props,
- GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE, "FileURI",
+ GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE, "URI",
NULL);
}
@@ -412,9 +412,9 @@ gabble_file_transfer_channel_set_property (GObject *object,
g_free (self->priv->file_collection);
self->priv->file_collection = g_value_dup_string (value);
break;
- case PROP_FILE_URI:
- g_assert (self->priv->file_uri == NULL); /* construct only */
- self->priv->file_uri = g_value_dup_string (value);
+ case PROP_URI:
+ g_assert (self->priv->uri == NULL); /* construct only */
+ self->priv->uri = g_value_dup_string (value);
break;
case PROP_RESUME_SUPPORTED:
self->priv->resume_supported = g_value_get_boolean (value);
@@ -551,8 +551,8 @@ gabble_file_transfer_channel_constructor (GType type,
self->priv->filename, self->priv->size);
if (self->priv->initiator != base_conn->self_handle)
- /* Incoming transfer, FileURI has to be set by the handler */
- g_assert (self->priv->file_uri == NULL);
+ /* Incoming transfer, URI has to be set by the handler */
+ g_assert (self->priv->uri == NULL);
return obj;
}
@@ -577,15 +577,15 @@ file_transfer_channel_properties_setter (GObject *object,
/* There is only one property with write access. So TpDBusPropertiesMixin
* already checked this. */
- g_assert (name == g_quark_from_static_string ("FileURI"));
+ g_assert (name == g_quark_from_static_string ("URI"));
/* TpDBusPropertiesMixin already checked this */
g_assert (G_VALUE_HOLDS_STRING (value));
- if (self->priv->file_uri != NULL)
+ if (self->priv->uri != NULL)
{
g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
- "FileURI has already be set");
+ "URI has already be set");
return FALSE;
}
@@ -599,14 +599,14 @@ file_transfer_channel_properties_setter (GObject *object,
if (self->priv->state != TP_FILE_TRANSFER_STATE_PENDING)
{
g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
- "State is not pending; cannot set FileURI");
+ "State is not pending; cannot set URI");
return FALSE;
}
- self->priv->file_uri = g_value_dup_string (value);
+ self->priv->uri = g_value_dup_string (value);
- gabble_svc_channel_type_filetransfer_future_emit_file_uri_defined (self,
- self->priv->file_uri);
+ gabble_svc_channel_type_filetransfer_future_emit_uri_defined (self,
+ self->priv->uri);
return TRUE;
}
@@ -648,7 +648,7 @@ gabble_file_transfer_channel_class_init (
static TpDBusPropertiesMixinPropImpl file_future_props[] = {
{ "FileCollection", "file-collection", NULL },
- { "FileURI", "file-uri", NULL },
+ { "URI", "uri", NULL },
{ NULL }
};
@@ -888,12 +888,12 @@ gabble_file_transfer_channel_class_init (
param_spec);
param_spec = g_param_spec_string (
- "file-uri", "file URI",
+ "uri", "URI",
"URI of the file being transferred",
NULL,
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_FILE_URI,
+ g_object_class_install_property (object_class, PROP_URI,
param_spec);
gabble_file_transfer_channel_class->dbus_props_class.interfaces =
@@ -971,7 +971,7 @@ gabble_file_transfer_channel_finalize (GObject *object)
g_free (self->priv->description);
g_hash_table_destroy (self->priv->available_socket_types);
g_free (self->priv->file_collection);
- g_free (self->priv->file_uri);
+ g_free (self->priv->uri);
G_OBJECT_CLASS (gabble_file_transfer_channel_parent_class)->finalize (object);
}
@@ -2256,7 +2256,7 @@ gabble_file_transfer_channel_new (GabbleConnection *conn,
GabbleBytestreamIface *bytestream,
GTalkFileCollection *gtalk_file_collection,
const gchar *file_collection,
- const gchar *file_uri)
+ const gchar *uri)
{
return g_object_new (GABBLE_TYPE_FILE_TRANSFER_CHANNEL,
@@ -2276,6 +2276,6 @@ gabble_file_transfer_channel_new (GabbleConnection *conn,
"file-collection", file_collection,
"bytestream", bytestream,
"gtalk-file-collection", gtalk_file_collection,
- "file-uri", file_uri,
+ "uri", uri,
NULL);
}
diff --git a/src/ft-channel.h b/src/ft-channel.h
index 0ee625801..3465b79a6 100644
--- a/src/ft-channel.h
+++ b/src/ft-channel.h
@@ -72,7 +72,7 @@ gabble_file_transfer_channel_new (GabbleConnection *conn,
const gchar *description, guint64 date, guint64 initial_offset,
gboolean resume_supported, GabbleBytestreamIface *bytestream,
GTalkFileCollection *gtalk_fc, const gchar *file_collection,
- const gchar *file_uri);
+ const gchar *uri);
gboolean gabble_file_transfer_channel_offer_file (
GabbleFileTransferChannel *self, GError **error);
diff --git a/src/ft-manager.c b/src/ft-manager.c
index 0d27f1fe6..b3eff6ae7 100644
--- a/src/ft-manager.c
+++ b/src/ft-manager.c
@@ -548,7 +548,7 @@ gabble_ft_manager_handle_request (TpChannelManager *manager,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".InitialOffset", NULL);
file_uri = tp_asv_get_string (request_properties,
- GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE ".FileURI");
+ GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE ".URI");
DEBUG ("Requested outgoing channel with contact: %s",
tp_handle_inspect (contact_repo, handle));
@@ -595,7 +595,7 @@ static const gchar * const file_transfer_channel_allowed_properties[] =
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentHash",
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Description",
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Date",
- GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE ".FileURI",
+ GABBLE_IFACE_CHANNEL_TYPE_FILETRANSFER_FUTURE ".URI",
NULL
};
diff --git a/tests/twisted/caps_helper.py b/tests/twisted/caps_helper.py
index 090ceb67d..105594dcd 100644
--- a/tests/twisted/caps_helper.py
+++ b/tests/twisted/caps_helper.py
@@ -108,7 +108,7 @@ ft_allowed_properties = dbus.Array([
cs.CHANNEL_TYPE_FILE_TRANSFER + '.ContentHash',
cs.CHANNEL_TYPE_FILE_TRANSFER + '.Description',
cs.CHANNEL_TYPE_FILE_TRANSFER + '.Date',
- cs.FT_FILE_URI])
+ cs.FT_URI])
fake_client_dataforms = {
'urn:xmpp:dataforms:softwareinfo':
diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py
index a929662b9..f764a499f 100644
--- a/tests/twisted/constants.py
+++ b/tests/twisted/constants.py
@@ -263,7 +263,7 @@ 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_URI = CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE.FileURI'
+FT_URI = CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE.URI'
GF_CAN_ADD = 1
GF_CAN_REMOVE = 2
diff --git a/tests/twisted/file-transfer/file_transfer_helper.py b/tests/twisted/file-transfer/file_transfer_helper.py
index d4f7f633a..d0978898a 100644
--- a/tests/twisted/file-transfer/file_transfer_helper.py
+++ b/tests/twisted/file-transfer/file_transfer_helper.py
@@ -155,7 +155,7 @@ class ReceiveFileTest(FileTransferTest):
self._actions = [self.connect, self.announce_contact,
self.send_ft_offer_iq, self.check_new_channel, self.create_ft_channel,
- self.set_file_uri, self.accept_file,
+ self.set_uri, self.accept_file,
self.receive_file, self.close_channel, self.done]
def send_ft_offer_iq(self):
@@ -223,23 +223,23 @@ class ReceiveFileTest(FileTransferTest):
self.ft_path = path
- def set_file_uri(self):
+ def set_uri(self):
ft_props = dbus.Interface(self.ft_channel, cs.PROPERTIES_IFACE)
- # FileURI is not set yet
- uri = ft_props.Get(cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE', 'FileURI')
+ # URI is not set yet
+ uri = ft_props.Get(cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE', 'URI')
assertEquals('', uri)
- # Setting FileURI
+ # Setting URI
call_async(self.q, ft_props, 'Set',
- cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE', 'FileURI', self.file.uri)
+ cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE', 'URI', self.file.uri)
- self.q.expect('dbus-signal', signal='FileURIDefined', args=[self.file.uri])
+ self.q.expect('dbus-signal', signal='URIDefined', args=[self.file.uri])
self.q.expect('dbus-return', method='Set')
# Check it has the right value now
- uri = ft_props.Get(cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE', 'FileURI')
+ uri = ft_props.Get(cs.CHANNEL_TYPE_FILE_TRANSFER + '.FUTURE', 'URI')
assertEquals(self.file.uri, uri)
def accept_file(self):
@@ -343,7 +343,7 @@ class SendFileTest(FileTransferTest):
assert ({cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_FILE_TRANSFER,
cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT},
[cs.FT_CONTENT_HASH_TYPE, cs.TARGET_HANDLE, cs.TARGET_ID, cs.FT_CONTENT_TYPE,
- cs.FT_FILENAME, cs.FT_SIZE, cs.FT_CONTENT_HASH, cs.FT_DESCRIPTION, cs.FT_DATE, cs.FT_FILE_URI]
+ cs.FT_FILENAME, cs.FT_SIZE, cs.FT_CONTENT_HASH, cs.FT_DESCRIPTION, cs.FT_DATE, cs.FT_URI]
) in properties.get('RequestableChannelClasses'),\
properties['RequestableChannelClasses']
@@ -353,7 +353,7 @@ class SendFileTest(FileTransferTest):
cs.FT_CONTENT_HASH_TYPE: cs.FILE_HASH_TYPE_MD5},
[cs.TARGET_HANDLE, cs.TARGET_ID, cs.FT_CONTENT_TYPE, cs.FT_FILENAME,
cs.FT_SIZE, cs.FT_CONTENT_HASH, cs.FT_DESCRIPTION, cs.FT_DATE,
- cs.FT_FILE_URI]
+ cs.FT_URI]
) in properties.get('RequestableChannelClasses'),\
properties['RequestableChannelClasses']
@@ -372,7 +372,7 @@ class SendFileTest(FileTransferTest):
cs.FT_DESCRIPTION: self.file.description,
cs.FT_DATE: self.file.date,
cs.FT_INITIAL_OFFSET: 0,
- cs.FT_FILE_URI: self.file.uri,
+ cs.FT_URI: self.file.uri,
})
# org.freedesktop.Telepathy.Channel D-Bus properties
@@ -396,7 +396,7 @@ class SendFileTest(FileTransferTest):
assert props[cs.FT_DATE] == self.file.date
assert props[cs.FT_TRANSFERRED_BYTES] == 0
assert props[cs.FT_INITIAL_OFFSET] == 0
- assert props[cs.FT_FILE_URI] == self.file.uri
+ assert props[cs.FT_URI] == self.file.uri
self.check_platform_socket_types(props[cs.FT_AVAILABLE_SOCKET_TYPES])
diff --git a/tests/twisted/jingle-share/file_transfer_helper.py b/tests/twisted/jingle-share/file_transfer_helper.py
index 1d4cbb3b6..0fed89524 100644
--- a/tests/twisted/jingle-share/file_transfer_helper.py
+++ b/tests/twisted/jingle-share/file_transfer_helper.py
@@ -388,7 +388,7 @@ class SendFileTest(FileTransferTest):
cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT},
[cs.FT_CONTENT_HASH_TYPE, cs.TARGET_HANDLE, cs.TARGET_ID, cs.FT_CONTENT_TYPE,
cs.FT_FILENAME, cs.FT_SIZE, cs.FT_CONTENT_HASH, cs.FT_DESCRIPTION, cs.FT_DATE,
- cs.FT_FILE_URI]
+ cs.FT_URI]
) in properties.get('RequestableChannelClasses'),\
properties['RequestableChannelClasses']
@@ -398,7 +398,7 @@ class SendFileTest(FileTransferTest):
cs.FT_CONTENT_HASH_TYPE: cs.FILE_HASH_TYPE_MD5},
[cs.TARGET_HANDLE, cs.TARGET_ID, cs.FT_CONTENT_TYPE, cs.FT_FILENAME,
cs.FT_SIZE, cs.FT_CONTENT_HASH, cs.FT_DESCRIPTION, cs.FT_DATE,
- cs.FT_FILE_URI]
+ cs.FT_URI]
) in properties.get('RequestableChannelClasses'),\
properties['RequestableChannelClasses']