Beispiel #1
0
torrent_handle session::add_torrent(add_torrent_params const& params)
{
    error_code ec;
    TORRENT_SYNC_CALL_RET2(torrent_handle, add_torrent, params, boost::ref(ec));
    if (ec) throw libtorrent_exception(ec);
    return r;
}
Beispiel #2
0
	torrent_handle session::add_torrent(add_torrent_params const& params, error_code& ec)
	{
		ec.clear();
		if (string_begins_no_case("magnet:", params.url.c_str()))
		{
			add_torrent_params p(params);
			p.url.clear();
			return add_magnet_uri(*this, params.url, p, ec);
		}

		TORRENT_SYNC_CALL_RET2(torrent_handle, add_torrent, params, boost::ref(ec));
		return r;
	}
Beispiel #3
0
	torrent_handle session::add_torrent(add_torrent_params const& params)
	{
		if (string_begins_no_case("magnet:", params.url.c_str()))
		{
			add_torrent_params p(params);
			p.url.clear();
			return add_magnet_uri(*this, params.url, p);
		}

		error_code ec;
		TORRENT_SYNC_CALL_RET2(torrent_handle, add_torrent, params, ec);
		if (ec) throw libtorrent_exception(ec);
		return r;
	}
Beispiel #4
0
torrent_handle session::add_torrent(add_torrent_params const& params, error_code& ec)
{
    ec.clear();
    TORRENT_SYNC_CALL_RET2(torrent_handle, add_torrent, params, boost::ref(ec));
    return r;
}