profilesservices/ProfileEngine/WrapperSrc/CProEngCenRepObserverBase.cpp
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:20:44 +0100
branchRCL_3
changeset 54 7e0eff37aedb
parent 53 8ee96d21d9bf
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2002-2004 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 CProEngCenRepObserverBase.
*
*/



// INCLUDE FILES
#include    "CProEngCenRepObserverBase.h"
#include    <centralrepository.h>
#include    <ProfileEnginePrivatePSKeys.h>
#include    "ProfileEngineSDKCRKeys.h"

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

// -----------------------------------------------------------------------------
// CProEngCenRepObserverBase::CProEngCenRepObserverBase
// -----------------------------------------------------------------------------
//
CProEngCenRepObserverBase::CProEngCenRepObserverBase( TUint32 aPartialCenRepKey,
                                                      TUint32 aKeyMask )
    : CProEngObserverBase( aPartialCenRepKey ), iKeyMask( aKeyMask )
    {
    }

// Destructor
CProEngCenRepObserverBase::~CProEngCenRepObserverBase()
    {
    Cancel();
    delete iRepository;
    }

// -----------------------------------------------------------------------------
// CProEngCenRepObserverBase::ConstructL
// -----------------------------------------------------------------------------
//
void CProEngCenRepObserverBase::ConstructL()
    {
    iRepository = CRepository::NewL( KCRUidProfileEngine );
    }

// -----------------------------------------------------------------------------
// CProEngCenRepObserverBase::RequestNotification
// -----------------------------------------------------------------------------
//
TInt CProEngCenRepObserverBase::RequestNotification()
    {
    TInt result( iRepository->NotifyRequest( iKey, iKeyMask, iStatus ) );
    if( result == KErrNone )
        {
        SetActive();
        }

    return result;
    }

// -----------------------------------------------------------------------------
// CProEngCenRepObserverBase::DoCancel
// -----------------------------------------------------------------------------
//
void CProEngCenRepObserverBase::DoCancel()
    {
    iRepository->NotifyCancel( iKey, iKeyMask );
    }

//  End of File