cellular/telephonysettings/inc/PSetCallDivertingBasicImpl.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:15:03 +0100
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Divert basic implementation.
*
*/


#ifndef CPSETCALLDIVERTINGBASICIMPL_H
#define CPSETCALLDIVERTINGBASICIMPL_H

//  INCLUDES
#include <e32base.h>
#include <PsetCallDiverting.h>
#include <mmretrieve.h>
#include <ctsydomaincrkeys.h>
#include "MSSSettingsObserver.h"
#include "nwdefs.h"             
#include "PsetConstants.h"
#include "PSetCallDivertingBase.h"

// CLASS DECLARATION
class CPsetSAObserver;
class CDesC16ArrayFlat;
class RSSSettings;
class MPsetDivertObserver;
class MPsetRequestObserver;
class RVmbxNumber;
class CRepository;
class TCallDivertNotifySetting;

/**
 * CPSetCallDivertingBasicImpl implements basic divert funcationality.
 *
 *  @lib phonesettings
 *  @since S60 v5.1
 */
NONSHARABLE_CLASS(CPSetCallDivertingBasicImpl) : public CPSetCallDivertingBase
    {
    public: // Constructors and destructors.

        /**
        * Two-phased constructor.
        *
        * @return new instance of the class.
        */
        static CPSetCallDivertingBasicImpl* NewL(
                MPsetDivertObserver& aObserver, 
                RMobilePhone& aPhone,
                CPsetCallDiverting* aDivert );

        /**
        * Destructor.
        */
        ~CPSetCallDivertingBasicImpl();

    public: // From base class.
        
        /**
        * @see MCallDiverting.
        */ 
        void SetDivertingL( const TCallDivertSetting& aDivert,  
                            TBasicServiceGroups aBsc );        

    public: //from base class CActive

        void RunL();
        
        void DoCancel();
        
        TInt RunError( TInt aError );
            
    protected:
        
        /**
        * C++ constructor.
        */
        CPSetCallDivertingBasicImpl( RMobilePhone& aPhone, CPsetCallDiverting* aDivert );

        /**
        * Symbian OS constructor.
        */
        void ConstructL( MPsetDivertObserver& aObserver );
    
    private:
        
        void HandleSANotificationL( 
            TBool aVmbxDivert, TDivertingStatus& aCfStatus );
        
        TBool SetVoiceDivert( const TCallDivertSetting& aDivert,
            const TBasicServiceGroups aBsc );
        
        TSelectedLine GetSAAls();
    };

#endif      // CPSETCALLDIVERTINGBASICIMPL_H 

// End of File