bluetoothengine/btaudioman/src/basrvaccman.cpp
branchRCL_3
changeset 21 53b7818cd282
parent 6 6a29d5ad0713
child 51 625f43ae9362
equal deleted inserted replaced
20:2f88a7d66f50 21:53b7818cd282
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  Implementation of an accessory management.
    14 * Description:  Implementation of an accessory management.
    15 *  Version     : %version:  14.1.10 %
    15 *  Version     : %version:  14.1.11 %
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    51         CBasrvActive::NewL(*this, CActive::EPriorityStandard, KAsyncHandlingRequest);
    51         CBasrvActive::NewL(*this, CActive::EPriorityStandard, KAsyncHandlingRequest);
    52     
    52     
    53     CRepository* cenrep = NULL;
    53     CRepository* cenrep = NULL;
    54     TRAP_IGNORE(cenrep = CRepository::NewL(KCRUidBluetoothEngine));
    54     TRAP_IGNORE(cenrep = CRepository::NewL(KCRUidBluetoothEngine));
    55     TInt avrcpVol = EBTAvrcpVolCTNotSupported;
    55     TInt avrcpVol = EBTAvrcpVolCTNotSupported;
       
    56     TInt avrcpLegacyVol = EBTAvrcpLegacyVolCTNotSupported;
    56     TInt autoDisconnect = EBTDisconnectIfAudioOpenFails;
    57     TInt autoDisconnect = EBTDisconnectIfAudioOpenFails;
    57     if (cenrep)
    58     if (cenrep)
    58         {
    59         {
    59         cenrep->Get(KBTAvrcpVolCTLV, avrcpVol);
    60         cenrep->Get(KBTAvrcpVolCTLV, avrcpVol);
       
    61         cenrep->Get(KBTAvrcpLegacyVolCTLV, avrcpLegacyVol);
    60         cenrep->Get(KBTDisconnectIfAudioOpenFailsLV, autoDisconnect);
    62         cenrep->Get(KBTDisconnectIfAudioOpenFailsLV, autoDisconnect);
    61         delete cenrep;
    63         delete cenrep;
    62         }
    64         }
    63     iAvrcpVolCTSupported = (avrcpVol == EBTAvrcpVolCTSupported);
    65     iAvrcpVolCTSupported = (avrcpVol == EBTAvrcpVolCTSupported);
       
    66     iAvrcpLegacyVolCTSupported = (avrcpLegacyVol == EBTAvrcpLegacyVolCTSupported);
    64     iDisconnectIfAudioOpenFails = (autoDisconnect == EBTDisconnectIfAudioOpenFails);
    67     iDisconnectIfAudioOpenFails = (autoDisconnect == EBTDisconnectIfAudioOpenFails);
    65     TRACE_INFO((_L("[AVRCP_Vol_CT] %d [DisconnectIfAudioOpenFails] %d"), 
    68     TRACE_INFO((_L("[AVRCP_Vol_CT] %d [DisconnectIfAudioOpenFails] %d"), 
    66         iAvrcpVolCTSupported, iDisconnectIfAudioOpenFails))
    69         iAvrcpVolCTSupported, iDisconnectIfAudioOpenFails))
       
    70     TRACE_INFO((_L("[EBTAvrcpLegacyVolCTSupported] %d"), iAvrcpLegacyVolCTSupported))
    67     LoadServicesL();
    71     LoadServicesL();
    68     }
    72     }
    69 
    73 
    70 CBasrvAccMan::~CBasrvAccMan()
    74 CBasrvAccMan::~CBasrvAccMan()
    71     {
    75     {
   529     }
   533     }
   530 
   534 
   531 TBool CBasrvAccMan::IsAvrcpVolCTSupported()
   535 TBool CBasrvAccMan::IsAvrcpVolCTSupported()
   532     {
   536     {
   533     return iAvrcpVolCTSupported;
   537     return iAvrcpVolCTSupported;
       
   538     }
       
   539 
       
   540 TBool CBasrvAccMan::IsAvrcpLegacyVolCTSupported()
       
   541     {
       
   542     return iAvrcpLegacyVolCTSupported;
   534     }
   543     }
   535     
   544     
   536 TBool CBasrvAccMan::IsAbsoluteVolumeSupported(const TBTDevAddr& aAddr)
   545 TBool CBasrvAccMan::IsAbsoluteVolumeSupported(const TBTDevAddr& aAddr)
   537 	{
   546 	{
   538     TInt count = iAccs.Count();
   547     TInt count = iAccs.Count();