profilesservices/ProfileEngine/WrapperSrc/CProEngProfileNameArrayEventDelegate.cpp
changeset 0 8c5d936e5675
equal deleted inserted replaced
-1:000000000000 0:8c5d936e5675
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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 CProEngProfileNameArrayEventDelegate.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    "CProEngProfileNameArrayEventDelegate.h"
       
    22 #include    <MProEngProfileNameArrayObserver.h>
       
    23 
       
    24 namespace
       
    25     {
       
    26     // CONSTANTS
       
    27     // Conjunction of KProEngProfileName (for any profile) and KProEngUsedIds
       
    28     // (see the key values in ProfileEnginePrivateCRKeys.h). This is the
       
    29     // partial key used in NotifyRequest() call made by the parent class.
       
    30     const TUint32 KProEngPartialNameAndDynamicProfilesKey( 0x00000002 );
       
    31     // This mask is used to filter out the key for KProEngActiveRingingType when
       
    32     // requesting notifications of name modifications and profile creations and
       
    33     // deletions. The 1's in mask means that the bits in those positions of the
       
    34     // partial Central Repository key given in NotifyRequest() are significant.
       
    35     const TUint32 KProEngNameAndDynamicProfilesKeyMask( 0x40FFFFFF );
       
    36     }
       
    37 
       
    38 // ============================ MEMBER FUNCTIONS ===============================
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 // CProEngProfileNameArrayEventDelegate::CProEngProfileNameArrayEventDelegate
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 CProEngProfileNameArrayEventDelegate::CProEngProfileNameArrayEventDelegate(
       
    45         TUint32 aPartialCenRepKey,
       
    46         TUint32 aKeyMask,
       
    47         MProEngProfileNameArrayObserver& aObserver )
       
    48     : CProEngCenRepObserverBase( aPartialCenRepKey, aKeyMask ),
       
    49       iObserver( aObserver )
       
    50     {
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // CProEngProfileNameArrayEventDelegate::NewL
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 CProEngProfileNameArrayEventDelegate* CProEngProfileNameArrayEventDelegate::NewL
       
    58         ( MProEngProfileNameArrayObserver& aObserver )
       
    59           
       
    60     {
       
    61     CProEngProfileNameArrayEventDelegate* self = new ( ELeave )
       
    62         CProEngProfileNameArrayEventDelegate(
       
    63                 KProEngPartialNameAndDynamicProfilesKey,
       
    64                 KProEngNameAndDynamicProfilesKeyMask,
       
    65                 aObserver );
       
    66 
       
    67     CleanupStack::PushL( self );
       
    68     self->ConstructL();
       
    69     CleanupStack::Pop( self );
       
    70 
       
    71     return self;
       
    72     }
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // CProEngProfileNameArrayEventDelegate::NotifyObserverL
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 void CProEngProfileNameArrayEventDelegate::NotifyObserverL()
       
    79     {
       
    80     iObserver.HandleProfileNameArrayModificationL();
       
    81     }
       
    82 
       
    83 // -----------------------------------------------------------------------------
       
    84 // CProEngProfileNameArrayEventDelegate::NotifyError
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 void CProEngProfileNameArrayEventDelegate::NotifyError( TInt aError )
       
    88     {
       
    89     iObserver.HandleProfileNameArrayNotificationError( aError );
       
    90     }
       
    91 
       
    92 //  End of File
       
    93