anchor.diff:      table=none :: atom()
   }).
   
  --define(SERVER, ?MODULE).
   -ignore_xref([{start_link, 0}]).
   
   %%====================================================================
  
positive.code: -export([start_link/0,
           query_state/1]).
  
  %% gen_server callbacks
  -export([init/1,
           handle_call/3,
  
negative.code: %% @end
  -spec query_state(integer()) -> unknown | {value, [{term(), term()}]}.
  query_state(Id) ->
      gen_server:call(?SERVER, {query_state, Id}).
  
  -spec srv_name() -> atom().
  srv_name() ->
      ?MODULE.
  
  %% @doc
  %% Create a snapshot of all torrents that are loaded into etorrent
  %% at the time when this function is called.
  %% @end
  -spec update() -> ok.
  update() ->
      gen_server:call(srv_name(), update).
  
  %% ==================================================================
  
  upgrade(1, St) ->
      upgrade1(St).
  