anchor.diff:  
   %% @doc Start linked to the calling process.  `Args' is used in
   %% `Callback:init/1'.
  --spec(start_link/3 :: (Callback :: atom(), Connection :: pid(),
  -	Args :: any()) -> {'ok', pid()}).
  -start_link(Callback, Connection, Args) ->
  -	gen_server:start_link(?MODULE, {Callback, Connection, Args, []}, []).
  -
  -%% @private
  -behavior_info(callbacks) ->
  -	[{handle_client_event, 3},
  -	{handle_client_response, 3},
  -	{handle_client_request, 3},
  -	{handle_call, 3},
  -	{handle_cast, 2},
  -	{handle_info, 2},
  -	{teminate, 2},
  -	{code_change, 3}];
  -behavior_info(_) ->
  -	invalid.
  -
  -%% @doc Same as {@link gen_server:call/2}, just here to make code prettier.
  --spec(call/2 :: (Pid :: pid(), Req :: any()) -> any()).
  -call(Pid, Req) ->
  -	call(Pid, Req, 5000).
  -
  -%% @doc Same as {@link gen_server:call/3}, just here to make code prettier.
  --spec(call/3 :: (Pid :: pid(), Req :: any(),
  -	Timeout :: 'infinity' | non_neg_integer()) -> any()).
  -call(Pid, Req, Timeout) ->
  -	gen_server:call(Pid, Req, Timeout).
  -
  -%% @doc Same as {@link gen_server:cast/2}, just here to make code prettier.
  --spec(cast/2 :: (Pid :: pid(), Msg :: any()) -> any()).
  -cast(Pid, Msg) ->
  -	gen_server:cast(Pid, Msg).
  +-spec(start_link/1 :: (Connection :: pid()) -> {'ok', pid()}).
  +start_link(Connection) ->
  +	gen_server:start_link(?MODULE, Connection, []).
   
   %% @doc Asynchronously handle an event sent from the client to the server
   %% (us).  Replies are usually sent through the `send' return structure.
  
positive.code: -include("precursors_pb.hrl").
  
  % API
  -export([start_link/3, behavior_info/1, call/2, call/3, cast/2,
  	client_event/3, client_request/3, client_response/3, reply/2]).
  % gen_server
  -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
  
  -record(state, {
  	connection :: pid(),
  	callback :: atom(),
  	substate :: any()
  }).
  
  %% ==================================================================
  
negative.code: client_response(Pid, Channel, Response) when is_record(Response, response) ->
  	gen_server:cast(Pid, {{'$pre_client', client_response}, {Channel, Response}}).
  
  add_handler(Client, Handler, Args) ->
  	gen_server:call(Client, {{'$pre_client', add_handler}, {Handler, Args}}).
  
  add_sup_handler(Client, Handler, Args) ->
  	gen_server:call(Client, {{'$pre_client', add_sup_handler}, {Handler, Args}}).
  
  async_add_handler(Client, Handler, Args) ->
  	gen_server:cast(Client, {{'$pre_client', add_handler}, {Handler, Args}}).
  
  async_add_sup_handler(Client, Handler, Args) ->
  	gen_server:cast(Client, {{'$pre_client', add_sup_handler}, {Handler, Args}}).
  
  notify(Client, Event) ->
  	gen_server:cast(Client, {{'$pre_client', notify}, Event}).
  
  sync_notify(Client, Event) ->
  	gen_server:call(Client, {{'$pre_client', sync_notify}, Event}).
  
  call(Client, Request) ->
  	call(Client, Request, infinity).
  
  call(Client, Request, Timeout) ->
  	gen_server:call(Client, {{'$pre_client', call}, {Request, Timeout}}).
  
  delete_handler(Client, Handler, Args) ->
  	gen_server:call(Client, {{'$pre_client', delete_handler}, {Handler, Args}}).
  
  swap_handler(Client, {Handler1, Args1}, {Handler2, Args2}) ->
  	gen_server:call(Client, {{'$pre_client', swap_handler}, {{Handler1, Args1}, {Handler2, Args2}}}).
  
  swap_sup_handler(Client, {Handler1, Args1}, {Handler2, Args2}) ->
  	gen_server:call(Client, {{'$pre_client', swap_sup_handler}, {{Handler1, Args1}, {Handler2, Args2}}}).
  
  which_handlers(Client) ->
  	List = gen_server:call(Client, {{'$pre_client', which_handlers}, undefined}),
  	[X || {pre_gen_event, X} <- List].
  
  %% ==================================================================
  %% gen_server Function Definitions
  