cellular/telephonysettings/src/PSetCallDivertingCreator.cpp
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Implementation of CPSetCallDivertingCreator class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    "PSetCallDivertingBasicImpl.h"
       
    22 #include    "PSetCallDivertingDualAffectImpl.h"
       
    23 #include    "PSetCallDivertingCreator.h"
       
    24 #include    "PsetVariationProxy.h"
       
    25 
       
    26 #include    <PsetCallDiverting.h>
       
    27 #include    <centralrepository.h>
       
    28 #include    <telservicesinternalcrkeys.h> // Telephony service local variation keys.
       
    29 #include    <telservicesvariant.hrh>
       
    30 
       
    31 
       
    32 // ============================ MEMBER FUNCTIONS ===============================
       
    33 
       
    34 // ---------------------------------------------------------------------------
       
    35 // CreateCallDivertingL
       
    36 // ---------------------------------------------------------------------------
       
    37 //
       
    38 MCallDiverting* CPSetCallDivertingCreator::CreateCallDivertingL(
       
    39         MPsetDivertObserver& aObserver, 
       
    40         RMobilePhone& aPhone,
       
    41         CPsetCallDiverting* aDivert  )
       
    42     {
       
    43     if( IsDivertDualAffectFeatureEnabledL() )
       
    44         {
       
    45         return CPSetCallDivertingDualAffectImpl::NewL( aObserver, aPhone, aDivert );
       
    46         }
       
    47     else
       
    48         {
       
    49         return CPSetCallDivertingBasicImpl::NewL( aObserver, aPhone, aDivert );
       
    50         }
       
    51     }
       
    52 
       
    53 // ---------------------------------------------------------------------------
       
    54 // IsDivertDualAffectFeatureEnabledL
       
    55 // ---------------------------------------------------------------------------
       
    56 //
       
    57 TBool CPSetCallDivertingCreator::IsDivertDualAffectFeatureEnabledL()
       
    58     {
       
    59     TBool retValue(EFalse);
       
    60     CPSetVariationProxy* variationProxy = 
       
    61         CPSetVariationProxy::NewL( KCRUidTelSrvVariation, KTelSrvVariationFlags );
       
    62     CleanupStack::PushL( variationProxy );
       
    63     retValue = variationProxy->IsFeatureEnabled( KTelephonyLVFlagDivertDualAffect );
       
    64     CleanupStack::PopAndDestroy( variationProxy );
       
    65     return retValue; 
       
    66     }
       
    67 
       
    68 // End of File