mediakeys/MMKeyBearer/src/MMKeyBearerImplementation.cpp
branchRCL_3
changeset 18 0818dd463d41
parent 2 7645e9ce10dc
child 19 924385140d98
equal deleted inserted replaced
17:5e7d68cc22e0 18:0818dd463d41
     1 /*
     1 /*
     2 * Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   340     FUNC_LOG;
   340     FUNC_LOG;
   341 
   341 
   342     INFO_3( "Received key: enumValue = %d, keyType = %d, usbFileTransfer = %d",
   342     INFO_3( "Received key: enumValue = %d, keyType = %d, usbFileTransfer = %d",
   343         aEnumValue, aKeyType, iUSBFileTransfer );
   343         aEnumValue, aKeyType, iUSBFileTransfer );
   344 
   344 
       
   345 	//Start the listener once again
       
   346     if (aKeyType == ESideVolumeKeys)
       
   347         {
       
   348         iMMKeyBearerObserver->Start();
       
   349         }
       
   350 
   345     // Mediakeys must be disabled when MTP (Music Transfer) is happening.
   351     // Mediakeys must be disabled when MTP (Music Transfer) is happening.
   346     if (aKeyType == EFileTransferStatus)
   352     if (aKeyType == EFileTransferStatus)
   347         {
   353         {
   348         iUSBFileTransferObserver->Start(); // Ensure first that no status change gets missed
   354         iUSBFileTransferObserver->Start(); // Ensure first that no status change gets missed
   349         iUSBFileTransfer = iUSBFileTransferObserver->GetValue(); // Read the MTP status
   355         iUSBFileTransfer = iUSBFileTransferObserver->GetValue(); // Read the MTP status
   410 
   416 
   411     // Msgtype  is ERemConCommand
   417     // Msgtype  is ERemConCommand
   412     TInt aError = Observer().NewCommand(addr);
   418     TInt aError = Observer().NewCommand(addr);
   413 
   419 
   414     //Start the listener once again
   420     //Start the listener once again
   415     if (aKeyType == ESideVolumeKeys)
   421     if (aKeyType == EMediaKeys)
   416         {
       
   417         iMMKeyBearerObserver->Start();
       
   418         }
       
   419     else if (aKeyType == EMediaKeys)
       
   420         {
   422         {
   421         iMediaKeyObserver->Start();
   423         iMediaKeyObserver->Start();
   422         }
   424         }
   423     else if (aKeyType == EAccessoryVolumeKeys)
   425     else if (aKeyType == EAccessoryVolumeKeys)
   424         {
   426         {