profilesservices/ProfileEngine/WrapperSrc/CProEngActiveSettingsEventDelegate.cpp
changeset 21 851e19007849
equal deleted inserted replaced
19:30540fccecae 21:851e19007849
       
     1 /*
       
     2 * Copyright (c) 2009 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 CProEngActiveSettingsEventDelegate
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    "CProEngActiveSettingsEventDelegate.h"
       
    22 #include    <MProEngActiveSettingsObserver.h>
       
    23 
       
    24 namespace
       
    25     {
       
    26     // CONSTANTS
       
    27     const TInt KProEngActiveId( 0x7E000000 );
       
    28     const TUint32 KProEngProfileIdMask( 0xFF000000 );
       
    29     }
       
    30 
       
    31 // ============================ MEMBER FUNCTIONS ===============================
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // CProEngActiveSettingsEventDelegate::CProEngActiveSettingsEventDelegate
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 CProEngActiveSettingsEventDelegate::CProEngActiveSettingsEventDelegate(
       
    38         TUint32 aPartialCenRepKey,
       
    39         TUint32 aKeyMask,
       
    40         MProEngActiveSettingsObserver& aObserver )
       
    41     : CProEngCenRepObserverBase( aPartialCenRepKey, aKeyMask ),
       
    42       iObserver( aObserver )
       
    43     {
       
    44     }
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // CProEngActiveSettingsEventDelegate::NewL
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 CProEngActiveSettingsEventDelegate* CProEngActiveSettingsEventDelegate::NewL(
       
    51           MProEngActiveSettingsObserver& aObserver )
       
    52     {
       
    53     CProEngActiveSettingsEventDelegate* self = new ( ELeave )
       
    54         CProEngActiveSettingsEventDelegate( KProEngActiveId,
       
    55                                      KProEngProfileIdMask, aObserver );
       
    56 
       
    57     CleanupStack::PushL( self );
       
    58     self->ConstructL();
       
    59     CleanupStack::Pop( self );
       
    60 
       
    61     return self;
       
    62     }
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // CProEngActiveSettingsEventDelegate::NotifyObserverL
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 void CProEngActiveSettingsEventDelegate::NotifyObserverL()
       
    69     {
       
    70     iObserver.HandleActiveSettingsModifiedL( );
       
    71     }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // CProEngActiveSettingsEventDelegate::NotifyError
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 void CProEngActiveSettingsEventDelegate::NotifyError( TInt aError )
       
    78     {
       
    79     iObserver.HandleActiveSettingsNotificationError( aError );
       
    80     }
       
    81 
       
    82 //  End of File
       
    83