anchor.diff:           get/2,
            all/0,
            update_ring/1]).
  +
  +-export([make_capability/4,
  +         preferred_modes/4]).
   
   %% gen_server callbacks
   -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
  
positive.code:         error ->
              State;
          {ok, MyCaps} ->
              N1 = reformat_capabilities(Registered, Capabilities),
              N2 = intersect_capabilities(N1),
              N3 = order_by_preference(MyCaps, N2),
              N4 = override_capabilities(N3, Override),
              N5 = [{Cap, hd(Common)} || {Cap, Common} <- N4],
              State#state{negotiated=N5}
      end.
  
  renegotiate_capabilities(State=#state{supported=[]}) ->
  
negative.code:         _ ->
              add_supported_to_ring(node(), Supported, Ring)
      end.
  
  %% @doc Make a capbility from
  -spec make_capability(capability(), [mode()], mode(), term())
                       -> {capability(), #capability{}}.
  make_capability(Capability, Supported, Default, Legacy) ->
      {Capability, capability_info(Supported, Default, Legacy)}.
  
  %%%===================================================================
  %%% gen_server callbacks
  