コード例 #1
0
static void
create_ft_channel_cb (TpConnection	*conn,
                      const char	*object_path,
		      GHashTable	*properties,
		      const GError	*in_error,
		      gpointer		 user_data,
		      GObject		*weak_obj)
{
	GError *error = NULL;
	handle_error (in_error);

	TpChannel *channel = tp_channel_new_from_properties (conn, object_path,
			properties, &error);
	handle_error (error);

	tp_channel_call_when_ready (channel, file_transfer_channel_ready, NULL);
}
コード例 #2
0
static void
create_contact_list_channel_cb (TpConnection	*conn,
                                gboolean	 yours,
                                const char	*object_path,
				GHashTable	*properties,
				const GError	*in_error,
				gpointer	 user_data,
				GObject		*weak_obj)
{
	char **argv = (char **) user_data;
	GError *error = NULL;

	handle_error (in_error);

	TpChannel *channel = tp_channel_new_from_properties (conn, object_path,
			properties, &error);
	handle_error (error);

	tp_channel_call_when_ready (channel, contact_list_channel_ready, argv);
}
static void
tp_contact_list_group_add_channel (EmpathyTpContactList *list,
				   const gchar          *object_path,
				   GHashTable           *properties)
{
	EmpathyTpContactListPriv *priv = GET_PRIV (list);
	TpChannel                *channel;
	GError *error = NULL;

	channel = tp_channel_new_from_properties (priv->connection,
				  object_path, properties, &error);
	if (channel == NULL) {
		DEBUG ("Failed to create group channel: %s", error->message);
		g_error_free (error);
		return;
	}

	/* Give the ref to the callback */
	tp_channel_call_when_ready (channel,
				    tp_contact_list_group_ready_cb,
				    list);
}
コード例 #4
0
static void remmina_tp_channel_handler_connection_ready(TpConnection *connection, const GError *connection_error,
		gpointer user_data)
{
	RemminaTpChannelHandler *chandler = (RemminaTpChannelHandler *) user_data;
	GError *error = NULL;

	if (connection_error != NULL)
	{
		g_print("remmina_tp_channel_handler_connection_ready: %s\n", connection_error->message);
		remmina_tp_channel_handler_free(chandler);
		return;
	}

	chandler->channel = tp_channel_new_from_properties(connection, chandler->channel_path, chandler->channel_properties,
			&error);
	if (chandler->channel == NULL)
	{
		g_print("tp_channel_new_from_properties: %s\n", error->message);
		remmina_tp_channel_handler_free(chandler);
		return;
	}
	tp_channel_call_when_ready(chandler->channel, remmina_tp_channel_handler_channel_ready, chandler);
}