[Bug 39188] TpFileTransferChannel: add API to send and receive the file
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Nov 9 18:49:13 CET 2011
https://bugs.freedesktop.org/show_bug.cgi?id=39188
--- Comment #4 from Will Thompson <will.thompson at collabora.co.uk> 2011-11-09 09:49:13 PST ---
I'm lost in a sea of green pluses, but here's a few initial thoughts:
+ * To send a file to a contact, one should create a File Transfer
+ * channel with the appropriate D-Bus properties set by specifying
+ * their values in the channel creation method call. The file transfer
+ * invitation will be sent to the remote contact when the channel is
+ * created.
It would be much more helpful to give a code example here.
You could make _TpFileTransferChannelPrivate.access_control_param a GValue
rather than a GValue *; but no big deal.
+static void
+operation_failed (TpFileTransferChannel *self,
+ const GError *error)
+{
+ g_simple_async_result_set_from_error (self->priv->result, error);
It comes to my attention that we do now depend on a new enough GLib that we
could use _take_error where appropriate. (Almost every place that calls
operation_failed calls g_error_free right afterwards.)
+static void
+client_socket_connected (TpFileTransferChannel *self)
+{
+ GSocketConnection *conn;
+ GError *error = NULL;
+
+ conn = g_socket_connection_factory_create_connection (
+ self->priv->client_socket);
+ if (conn == NULL)
+ {
+ DEBUG ("Failed to create client connection: %s", error->message);
+ operation_failed (self, error);
+ return;
+ }
but here, error will always be NULL on the error path and we'll crash.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list