bluetoothappprofiles/avrcp/remconbeareravrcp/src/playerstatewatcher.cpp
branchRCL_3
changeset 55 613943a21004
parent 6 6a29d5ad0713
child 56 9386f31cc85b
equal deleted inserted replaced
54:0ba996a9b75d 55:613943a21004
    35 	}
    35 	}
    36 
    36 
    37 void CPlayerWatcherBase::StopWatchingPlayer(TRemConClientId aClientId)
    37 void CPlayerWatcherBase::StopWatchingPlayer(TRemConClientId aClientId)
    38 	{
    38 	{
    39 	LOG_FUNC;
    39 	LOG_FUNC;
    40 	CInternalCommand* command = *iCommands.Find(aClientId);
    40 	CInternalCommand** cmdPtr = iCommands.Find(aClientId);
    41 	__ASSERT_DEBUG(command, AVRCP_PANIC(ENotWatchingPlayer));
    41 	if (cmdPtr) // This may be NULL if we've already stopped watching the player as a result of reciving a reject
    42 
    42 	    {
    43 	TUint transId = command->RemConCommandId();
    43         CInternalCommand* cmd = *cmdPtr;
    44 	iCommandInterface.MrcciCommandExpired(transId);
    44         
    45 
    45         TUint transId = cmd->RemConCommandId();
    46 	iCommands.Remove(aClientId);
    46         iCommandInterface.MrcciCommandExpired(transId);
    47 	command->DecrementUsers();
    47     
       
    48         iCommands.Remove(aClientId);
       
    49         cmd->DecrementUsers();
       
    50 	    }
    48 	}
    51 	}
    49 
    52 
    50 void CPlayerWatcherBase::MessageSent(CAvrcpCommand& /*aCommand*/, TInt /*aSendResult*/)
    53 void CPlayerWatcherBase::MessageSent(CAvrcpCommand& /*aCommand*/, TInt /*aSendResult*/)
    51 	{
    54 	{
    52 	LOG_FUNC;
    55 	LOG_FUNC;