anchor.diff:                 }).
   
   -define(TIMEOUT, 10000).
  -
  --define(auth_mechs_tcp, [dbus_auth_cookie_sha1, dbus_auth_anonymous]).
  --define(auth_mechs_unix, [dbus_auth_external, dbus_auth_cookie_sha1, dbus_auth_anonymous]).
   
   -spec start_link(bus_id()) -> {ok, dbus_connection()} | {error, term()}.
   start_link(BusId) ->
  
positive.code:     {reply, {error, authentication_needed}, waiting_for_reject, State};
  
  waiting_for_reject(auth, {_Pid, Tag}=From, #state{waiting=Waiting}=State) ->
      {reply, {ok, {self(), Tag}}, waiting_for_reject, 
       State#state{waiting=[From|Waiting]}};
  waiting_for_reject(_Evt, _From, State) ->
      ?debug("Unexpected event: ~p~n", [_Evt]),
      {reply, {error, invalid_event}, waiting_for_reject, State}.
  
negative.code: %%%
  connected(auth, {_Pid, Tag}=From, #state{sock=Sock, mechs=[]}=State) ->
      dbus_transport:send(Sock, <<"AUTH\r\n">>),
      {reply, {ok, {self(), Tag}}, waiting_for_reject, State#state{waiting=[From]}};
  connected(auth, {_Pid, Tag}=From, #state{sock=Sock, mechs=[Mech|Rest]}=State) ->
      case Mech:init() of
          {ok, Resp} ->
              ?debug("DBUS auth: sending initial data~n", []),
              dbus_transport:send(Sock, Resp),
              {reply, {ok, {self(), Tag}}, waiting_for_ok, 
               State#state{waiting=[From], mechs=Rest}};
          {continue, Resp, MechState} ->
              ?debug("DBUS auth: sending initial data (continue)~n", []),
              dbus_transport:send(Sock, Resp),
              {reply, {ok, {self(), Tag}}, waiting_for_data,
               State#state{waiting=[From], mechs=Rest, mech_state={Mech, MechState}}}
      end;
  
  connected({call, _}, _From, State) ->
  