bluetoothengine/headsetsimulator/profiles/hfpprofile/src/hfpcod.cpp
branchheadsetsimulator
changeset 60 90dbfc0435e3
equal deleted inserted replaced
59:02103bf20ee5 60:90dbfc0435e3
       
     1 /* 
       
     2  *
       
     3  * Copyright (c) <2010> Comarch S.A. and/or its subsidiary(-ies).
       
     4  * All rights reserved.
       
     5  * This component and the accompanying materials are made available
       
     6  * under the terms of the License "Eclipse Public License v1.0"
       
     7  * which accompanies this distribution, and is available
       
     8  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9  *
       
    10  * Original Contributors:
       
    11  * Comarch S.A. - original contribution.
       
    12  *
       
    13  * Contributors:
       
    14  *
       
    15  * Description:
       
    16  *
       
    17  */
       
    18 
       
    19 #include <btdevice.h>
       
    20 
       
    21 #include "hfpcod.h"
       
    22 #include "debug.h"
       
    23 
       
    24 CHsHFPCoD* CHsHFPCoD::NewL()
       
    25     {
       
    26 
       
    27     CHsHFPCoD *self = CHsHFPCoD::NewLC();
       
    28     CleanupStack::Pop(self);
       
    29 
       
    30     return self;
       
    31     }
       
    32 
       
    33 CHsHFPCoD* CHsHFPCoD::NewLC()
       
    34     {
       
    35 
       
    36     CHsHFPCoD *self = new (ELeave) CHsHFPCoD();
       
    37     CleanupStack::PushL(self);
       
    38     self->ConstructL();
       
    39     return self;
       
    40     }
       
    41 
       
    42 CHsHFPCoD::~CHsHFPCoD()
       
    43     {
       
    44     TRACE_FUNC_ENTRY
       
    45     RestoreOldCod();
       
    46     TRACE_FUNC_EXIT
       
    47     }
       
    48 
       
    49 void CHsHFPCoD::SetNewCodL()
       
    50     {
       
    51     TRACE_FUNC_ENTRY
       
    52 
       
    53     TBTDeviceClass newDeviceClass = TBTDeviceClass(KHsHFPDeviceClass);
       
    54     TInt err =
       
    55             RProperty::Set(KPropertyUidBluetoothCategory,
       
    56                     KPropertyKeyBluetoothSetDeviceClass,
       
    57                     newDeviceClass.DeviceClass());
       
    58 
       
    59     TRACE_INFO( (_L("returned value = %d"), err));
       
    60 
       
    61     User::LeaveIfError(err);
       
    62 
       
    63     TRACE_FUNC_EXIT
       
    64     }
       
    65 
       
    66 CHsHFPCoD::CHsHFPCoD()
       
    67     {
       
    68 
       
    69     }
       
    70 
       
    71 void CHsHFPCoD::ConstructL()
       
    72     {
       
    73 
       
    74     }