│ │ │
add_torrent_params
│ │ │
Declared in "libtorrent/add_torrent_params.hpp"
│ │ │
The add_torrent_params contains all the information in a .torrent file
│ │ │ along with all information necessary to add that torrent to a session.
│ │ │ The key fields when adding a torrent are:
│ │ │
│ │ │ - ti - the immutable info-dict part of the torrent
│ │ │ @@ -399,14 +357,56 @@
│ │ │ [report issue]
│ │ │ - last_download last_upload
│ │ │ - the posix time of the last time payload was received or sent for this
│ │ │ torrent, respectively. A value of 0 means we don't know when we last
│ │ │ uploaded or downloaded, or we have never uploaded or downloaded any
│ │ │ payload for this torrent.
│ │ │
│ │ │ +[report issue]
│ │ │ +
client_data_t
│ │ │ +
Declared in "libtorrent/client_data.hpp"
│ │ │ +
A thin wrapper around a void pointer used as "user data". i.e. an opaque
│ │ │ +cookie passed in to libtorrent and returned on demand. It adds type-safety by
│ │ │ +requiring the same type be requested out of it as was assigned to it.
│ │ │ +
│ │ │ +struct client_data_t
│ │ │ +{
│ │ │ + client_data_t () = default;
│ │ │ + explicit client_data_t (T* v);
│ │ │ + client_data_t& operator= (T* v);
│ │ │ + explicit operator T () const;
│ │ │ + T* get () const;
│ │ │ + operator void* () const = delete;
│ │ │ + client_data_t& operator= (void const*) = delete;
│ │ │ + client_data_t& operator= (void*) = delete;
│ │ │ + operator void const* () const = delete;
│ │ │ +
│ │ │ + template <typename T, typename U = typename std::enable_if<std::is_pointer<T>::value>::type>
│ │ │ +};
│ │ │ +
│ │ │ +
[report issue]
│ │ │ +
client_data_t()
│ │ │ +
│ │ │ +client_data_t () = default;
│ │ │ +
│ │ │ +
construct a nullptr client data
│ │ │ +
│ │ │ +
│ │ │ +
[report issue]
│ │ │ +
│ │ │ +
const*() void*() operator=()
│ │ │ +
│ │ │ +operator void* () const = delete;
│ │ │ +client_data_t& operator= (void const*) = delete;
│ │ │ +client_data_t& operator= (void*) = delete;
│ │ │ +operator void const* () const = delete;
│ │ │ +
│ │ │ +
we don't allow type-unsafe operations
│ │ │ +
│ │ │