+ tp_file_check_if_ready (tp_file);
+}
+
+static GObject *
+tp_file_constructor (GType type,
+ guint n_props,
+ GObjectConstructParam *props)
+{
+ GObject *file_obj;
+ EmpathyTpFile *tp_file;
+ TpHandle handle;
+ TpConnection *connection;
+
+ file_obj = G_OBJECT_CLASS (empathy_tp_file_parent_class)->constructor (type,
+ n_props, props);
+
+ tp_file = EMPATHY_TP_FILE (file_obj);
+
+ connection = tp_channel_borrow_connection (tp_file->priv->channel);
+ tp_file->priv->factory = empathy_tp_contact_factory_dup_singleton (connection);
+ tp_file->priv->mc = empathy_mission_control_dup_singleton ();
+ tp_file->priv->state_change_reason =
+ TP_FILE_TRANSFER_STATE_CHANGE_REASON_NONE;
+
+ g_signal_connect (tp_file->priv->channel, "invalidated",
+ G_CALLBACK (tp_file_invalidated_cb), tp_file);
+
+ tp_cli_channel_type_file_transfer_connect_to_file_transfer_state_changed (
+ tp_file->priv->channel, tp_file_state_changed_cb, NULL, NULL,
+ G_OBJECT (tp_file), NULL);
+
+ tp_cli_channel_type_file_transfer_connect_to_transferred_bytes_changed (
+ tp_file->priv->channel, tp_file_transferred_bytes_changed_cb,
+ NULL, NULL, G_OBJECT (tp_file), NULL);
+
+ tp_cli_dbus_properties_call_get (tp_file->priv->channel, -1,
+ TP_IFACE_CHANNEL, "Requested",
+ tp_file_get_requested_cb, NULL, NULL, file_obj);
+
+ tp_cli_dbus_properties_call_get_all (tp_file->priv->channel, -1,
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER,
+ tp_file_get_all_cb, NULL, NULL, file_obj);
+
+ handle = tp_channel_get_handle (tp_file->priv->channel, NULL);
+ empathy_tp_contact_factory_get_from_handle (tp_file->priv->factory,
+ handle, tp_file_got_contact_cb, NULL, NULL, file_obj);