cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cpsetrefreshhandler.cpp
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 * All rights reserved.
       
     3 * This component and the accompanying materials are made available
       
     4 * under the terms of the License "Eclipse Public License v1.0"
       
     5 * which accompanies this distribution, and is available
       
     6 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 *
       
     8 * Initial Contributors:
       
     9 * Nokia Corporation - initial contribution.
       
    10 *
       
    11 * Contributors:
       
    12 *
       
    13 * Description:
       
    14 *
       
    15 */
       
    16 #include <QDebug>
       
    17 #include <smcmockclassincludes.h>
       
    18 #include <mock_cpsetrefreshhandler.h>
       
    19 
       
    20 // ============================ MEMBER FUNCTIONS ===============================
       
    21 
       
    22 // -----------------------------------------------------------------------------
       
    23 // CPSetRefreshHandlerMock::NewL
       
    24 // -----------------------------------------------------------------------------
       
    25 //
       
    26 CPSetRefreshHandlerMock * CPSetRefreshHandlerMock::NewL(  )
       
    27     {
       
    28     SMC_MOCK_NEWL0( CPSetRefreshHandlerMock * )
       
    29 
       
    30     CPSetRefreshHandlerMock* self = new( ELeave ) CPSetRefreshHandlerMock;
       
    31     CleanupStack::PushL( self );
       
    32     //self->ConstructL()
       
    33     CleanupStack::Pop( self );
       
    34     return self;
       
    35     }
       
    36 
       
    37 
       
    38 // -----------------------------------------------------------------------------
       
    39 // CPSetRefreshHandlerMock::NotifyFileChangeL
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 void CPSetRefreshHandlerMock::NotifyFileChangeL( 
       
    43         MSSSettingsRefreshObserver & aObserver,
       
    44         TSatElementaryFiles aObservedFile,
       
    45         TSatRefreshType aObservedRefreshType )
       
    46     {
       
    47     m_observer = &aObserver;
       
    48     SMC_MOCK_METHOD3( void, MSSSettingsRefreshObserver &, aObserver, 
       
    49         TSatElementaryFiles, aObservedFile, 
       
    50         TSatRefreshType, aObservedRefreshType )
       
    51     }
       
    52 
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // CPSetRefreshHandlerMock::CancelNotify
       
    56 // -----------------------------------------------------------------------------
       
    57 //
       
    58 void CPSetRefreshHandlerMock::CancelNotify(  )
       
    59     {
       
    60     SMC_MOCK_METHOD0( void )
       
    61     }
       
    62 
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // CPSetRefreshHandlerMock::ChangedCspSettings
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 TInt CPSetRefreshHandlerMock::ChangedCspSettings( 
       
    69         TPSetChangedCspSetting & aChangedCspSettings,
       
    70         TPSetChangedCspSetting & aNewValues )
       
    71     {
       
    72     SMC_MOCK_METHOD2( TInt, TPSetChangedCspSetting &, aChangedCspSettings, 
       
    73         TPSetChangedCspSetting &, aNewValues )
       
    74     }
       
    75 
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // CPSetRefreshHandlerMock::ChangedCspSettings
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 void CPSetRefreshHandlerMock::trigerAllowRefresh( 
       
    82         const TSatRefreshType aType,
       
    83         const TSatElementaryFiles aFiles  )
       
    84     {
       
    85     m_observer->AllowRefresh(aType, aFiles);
       
    86     }
       
    87 
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // CPSetRefreshHandlerMock::ChangedCspSettings
       
    91 // -----------------------------------------------------------------------------
       
    92 //
       
    93 void CPSetRefreshHandlerMock::trigerRefresh( 
       
    94         const TSatRefreshType aType,
       
    95         const TSatElementaryFiles aFiles  )
       
    96     {
       
    97     m_observer->Refresh(aType, aFiles);
       
    98     }
       
    99