anchor.diff: -%%%-------------------------------------------------------------------
  -%%% File    : etorrent_torrent.erl
  -%%% Author  : Jesper Louis Andersen <>
  -%%% Description : Library for manipulating the torrent table.
  -%%%
  -%%% Created : 15 Jun 2008 by Jesper Louis Andersen <>
  -%%%-------------------------------------------------------------------
  +%% @author Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
  +%% @doc Maintain the torrent ETS table.
  +%% <p>This module is responsible for maintaining an ETS table, namely
  +%% the `torrent' table. This table is the general go-to place if you
  +%% want to know anything about a torrent and its internal state.</p>
  +%% <p>The code in this module is not expected to crash -- if it does,
  +%% it very well takes all of etorrent with it.</p>
  +%% <p>Also note that the module has a large number of API functions
  +%% you can call</p>
  +%% @end
  +%% @todo We could consider moving out the API to a separate module
   -module(etorrent_torrent).
   
   -behaviour(gen_server).
  
positive.code: statechange(Id, What) ->
      gen_server:call(?SERVER, {statechange, Id, What}).
  
  % @doc Return the number of pieces for torrent Id
  % @end
  -spec num_pieces(integer()) -> {value, integer()}.
  num_pieces(Id) ->
      gen_server:call(?SERVER, {num_pieces, Id}).
  
negative.code: 
  %% =======================================================================
  
  %% @private
  init([]) ->
      _ = ets:new(?TAB, [protected, named_table,
                                     {keypos, 2}]),
  