cellular/PsetNotesUi/Src/PsuiNoteController.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 15:45:17 +0300
branchRCL_3
changeset 19 7d48bed6ce0c
parent 0 ff3b6d0fd310
child 20 987c9837762f
permissions -rw-r--r--
Revision: 201033 Kit: 201035

/*
* Copyright (c) 2007 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: Implementation of CPsuiNoteController class.
*
*/


// INCLUDE FILES
#include "psuinotecontroller.h" 
#include "psuiinternalconstants.h" 

// ================= MEMBER FUNCTIONS =======================

// -----------------------------------------------------------------------------
// CPsuiNoteController::CPsuiNoteController
// C++ default constructor can NOT contain any code, that
// might leave.
// -----------------------------------------------------------------------------
//
CPsuiNoteController::CPsuiNoteController() : CCoeStatic( KUidNoteControllerSingleton )
    {
    }

// Destructor
CPsuiNoteController::~CPsuiNoteController()
    {
    delete iNote;
    iNote = NULL; 
    }

// ---------------------------------------------------------
// CPsuiNoteController::InstanceL
// (other items were commented in a header).
// ---------------------------------------------------------
//
CPsuiNoteController* CPsuiNoteController::InstanceL()
    {
    CPsuiNoteController* instance = static_cast<CPsuiNoteController*>(
        CCoeEnv::Static( KUidNoteControllerSingleton ) );
    if ( !instance )
        {
        instance = new ( ELeave ) CPsuiNoteController;
        CleanupStack::PushL( instance );
        instance->ConstructL();
        CleanupStack::Pop( instance );
        }
    return instance;
    }

// -----------------------------------------------------------------------------
// CPsuiNoteController::ConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CPsuiNoteController::ConstructL()
    {
    iNote = CPsuiNoteMaster::NewL();
    }

// ---------------------------------------------------------
// CPsuiNoteController::ShowNoteL
// ---------------------------------------------------------
//
void CPsuiNoteController::ShowNoteL( TPsuiNoteTypes aType, TInt aResourceID )
    {
      iNote->ShowNoteL( aType, aResourceID );
    }       

// ---------------------------------------------------------
// CPsuiNoteController::ShowBscListL
// ---------------------------------------------------------
//
void CPsuiNoteController::ShowBscListL( TInt aResourceHeading, TUint8 aBsc[KPSUIMaxBscNumber] )
    {
      iNote->ShowBscListL( aResourceHeading, aBsc );
    }

// ---------------------------------------------------------
// CPsuiNoteController::SetErrorNoteResourceID
// ---------------------------------------------------------
//
TInt CPsuiNoteController::SetErrorNoteResourceID ( const TInt aErrorCode )
    {
      return iNote->SetErrorNoteResourceID( aErrorCode );
    }

// ---------------------------------------------------------
// CPsuiNoteController::RemoveNotesL
// ---------------------------------------------------------
//
void CPsuiNoteController::RemoveNotesL()
    {
      delete iNote;
      iNote = NULL;
      iNote = CPsuiNoteMaster::NewL();
    }

// ---------------------------------------------------------
// CPsuiNoteController::KillStaticNoteL
// ---------------------------------------------------------
//
void CPsuiNoteController::KillStaticNoteL()
    {
      iNote->KillStaticNoteL();
    }

// ---------------------------------------------------------
// CPsuiNoteController::SetEngineContacts
// ---------------------------------------------------------
//
void CPsuiNoteController::SetEngineContacts( MPsetCallWaiting* aWaitingEngine,
    MPsetCallBarring* aBarringEngine, MPsetCallDiverting* aDivertEngine,
    MPsetCli* aCliEngine )
    {
    iNote->SetEngineContacts( aWaitingEngine, aBarringEngine,
        aDivertEngine, aCliEngine );    
    }

// ---------------------------------------------------------
// CPsuiNoteController::ShowBscCFListL
// ---------------------------------------------------------
//
TCFType CPsuiNoteController::ShowBscCFListL( TInt aResourceHeading, 
    CMobilePhoneCFList& aList, TCFType aCFType, TInt& aIndex )
    {
    return iNote->ShowBscCFListL( aResourceHeading, aList,
        aCFType, aIndex );  
    }

// ---------------------------------------------------------
// CPsuiNoteController::ShowCfInfoL
// ---------------------------------------------------------
//
void CPsuiNoteController::ShowCfInfoL( TCFType& aCFType,
    const RMobilePhone::TMobilePhoneCFInfoEntryV1& aSetting )
    {
    iNote->ShowCfInfoL( aCFType, aSetting );    
    }

// End of File