phoneapp/phoneringingtoneplayer/tsrc/ut_cphoneringingtonecontroller/mocks/mock_cphoneringingtoneplayer.cpp
changeset 78 baacf668fe89
parent 76 cfea66083b62
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #include <smcmockclassincludes.h>
       
    19 #include <ceunitalloctestcasedecorator.h>
       
    20 #include "cphoneringingtone.h"
       
    21 #include "cphoneringingtoneplayer.h"
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // CPhoneRingingtonePlayer::CPhoneRingingtonePlayer
       
    27 // -----------------------------------------------------------------------------
       
    28 //
       
    29 CPhoneRingingtonePlayer::CPhoneRingingtonePlayer(  )
       
    30     :CActive( CActive::EPriorityStandard )
       
    31     {
       
    32     
       
    33     }
       
    34 
       
    35 
       
    36 // -----------------------------------------------------------------------------
       
    37 // CPhoneRingingtonePlayer::ConstructL
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 void CPhoneRingingtonePlayer::ConstructL(  )
       
    41     {
       
    42     
       
    43     }
       
    44 
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // CPhoneRingingtonePlayer::~CPhoneRingingtonePlayer
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 CPhoneRingingtonePlayer::~CPhoneRingingtonePlayer(  )
       
    51     {
       
    52     
       
    53     }
       
    54 
       
    55 
       
    56 // -----------------------------------------------------------------------------
       
    57 // CPhoneRingingtonePlayer::NewL
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 CPhoneRingingtonePlayer * CPhoneRingingtonePlayer::NewL(  )
       
    61     {
       
    62     SMC_MOCK_NEWL0( CPhoneRingingtonePlayer * )
       
    63 
       
    64     CPhoneRingingtonePlayer* self = new( ELeave ) CPhoneRingingtonePlayer;
       
    65     CleanupStack::PushL( self );
       
    66     //self->ConstructL()
       
    67     CleanupStack::Pop( self );
       
    68     return self;
       
    69     }
       
    70 
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 // CPhoneRingingtonePlayer::PlayProfileBasedTone
       
    74 // -----------------------------------------------------------------------------
       
    75 //
       
    76 void CPhoneRingingtonePlayer::PlayProfileBasedTone( 
       
    77         CPhoneRingingTone * aAudioVideoRingingTone )
       
    78     {
       
    79     SMC_MOCK_METHOD1( void, CPhoneRingingTone *, aAudioVideoRingingTone )
       
    80     }
       
    81 
       
    82 
       
    83 // -----------------------------------------------------------------------------
       
    84 // CPhoneRingingtonePlayer::PlayBeepOnce
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 void CPhoneRingingtonePlayer::PlayBeepOnce( 
       
    88         TInt aVolume )
       
    89     {
       
    90     SMC_MOCK_METHOD1( void, TInt, aVolume )
       
    91     }
       
    92 
       
    93 
       
    94 // -----------------------------------------------------------------------------
       
    95 // CPhoneRingingtonePlayer::PlaySilentTone
       
    96 // -----------------------------------------------------------------------------
       
    97 //
       
    98 void CPhoneRingingtonePlayer::PlaySilentTone(  )
       
    99     {
       
   100     SMC_MOCK_METHOD0( void )
       
   101     }
       
   102 
       
   103 
       
   104 // -----------------------------------------------------------------------------
       
   105 // CPhoneRingingtonePlayer::PlayVideoRingingTone
       
   106 // -----------------------------------------------------------------------------
       
   107 //
       
   108 void CPhoneRingingtonePlayer::PlayVideoRingingTone( 
       
   109         const CPhoneRingingTone & aRingingTone,
       
   110         TInt aVolume,
       
   111         TProfileRingingType aRingingType,
       
   112         TBool aPersonalTone )
       
   113     {
       
   114     SMC_MOCK_METHOD4( void, const CPhoneRingingTone &, aRingingTone, 
       
   115         TInt, aVolume, 
       
   116         TProfileRingingType, aRingingType, 
       
   117         TBool, aPersonalTone )
       
   118     }
       
   119 
       
   120 
       
   121 // -----------------------------------------------------------------------------
       
   122 // CPhoneRingingtonePlayer::PlayDefaultTone
       
   123 // -----------------------------------------------------------------------------
       
   124 //
       
   125 void CPhoneRingingtonePlayer::PlayDefaultTone( 
       
   126         TInt aVolume,
       
   127         TProfileRingingType aRingingType )
       
   128     {
       
   129     SMC_MOCK_METHOD2( void, TInt, aVolume, 
       
   130         TProfileRingingType, aRingingType )
       
   131     }
       
   132 
       
   133 
       
   134 // -----------------------------------------------------------------------------
       
   135 // CPhoneRingingtonePlayer::PlayBackupTone
       
   136 // -----------------------------------------------------------------------------
       
   137 //
       
   138 void CPhoneRingingtonePlayer::PlayBackupTone( 
       
   139         TInt aVolume,
       
   140         TProfileRingingType aRingingType )
       
   141     {
       
   142     SMC_MOCK_METHOD2( void, TInt, aVolume, 
       
   143         TProfileRingingType, aRingingType )
       
   144     }
       
   145 
       
   146 
       
   147 // -----------------------------------------------------------------------------
       
   148 // CPhoneRingingtonePlayer::StopPlaying
       
   149 // -----------------------------------------------------------------------------
       
   150 //
       
   151 void CPhoneRingingtonePlayer::StopPlaying(  )
       
   152     {
       
   153     SMC_MOCK_METHOD0( void )
       
   154     }
       
   155 
       
   156 
       
   157 // -----------------------------------------------------------------------------
       
   158 // CPhoneRingingtonePlayer::GetCurrentlyActiveAudioPlayer
       
   159 // -----------------------------------------------------------------------------
       
   160 //
       
   161 CPhoneAudioPlayer * CPhoneRingingtonePlayer::GetCurrentlyActiveAudioPlayer(  )
       
   162     {
       
   163     SMC_MOCK_METHOD0( CPhoneAudioPlayer * )
       
   164     }
       
   165 
       
   166 
       
   167 // -----------------------------------------------------------------------------
       
   168 // CPhoneRingingtonePlayer::MuteActiveAudioPlayer
       
   169 // -----------------------------------------------------------------------------
       
   170 //
       
   171 void CPhoneRingingtonePlayer::MuteActiveAudioPlayer(  )
       
   172     {
       
   173     SMC_MOCK_METHOD0( void )
       
   174     }
       
   175 
       
   176 
       
   177 // -----------------------------------------------------------------------------
       
   178 // CPhoneRingingtonePlayer::HandleCenRepChangeL
       
   179 // -----------------------------------------------------------------------------
       
   180 //
       
   181 void CPhoneRingingtonePlayer::HandleCenRepChangeL( 
       
   182         const TUid & aUid,
       
   183         const TUint aId )
       
   184     {
       
   185     EUNIT_LEAVE_POINT
       
   186     SMC_MOCK_METHOD2( void, const TUid &, aUid, 
       
   187         const TUint, aId )
       
   188     }
       
   189 
       
   190 
       
   191 // -----------------------------------------------------------------------------
       
   192 // CPhoneRingingtonePlayer::RunL
       
   193 // -----------------------------------------------------------------------------
       
   194 //
       
   195 void CPhoneRingingtonePlayer::RunL(  )
       
   196     {
       
   197     EUNIT_LEAVE_POINT
       
   198     SMC_MOCK_METHOD0( void )
       
   199     }
       
   200 
       
   201 
       
   202 // -----------------------------------------------------------------------------
       
   203 // CPhoneRingingtonePlayer::DoCancel
       
   204 // -----------------------------------------------------------------------------
       
   205 //
       
   206 void CPhoneRingingtonePlayer::DoCancel(  )
       
   207     {
       
   208     SMC_MOCK_METHOD0( void )
       
   209     }
       
   210 
       
   211 
       
   212 // -----------------------------------------------------------------------------
       
   213 // CPhoneRingingtonePlayer::HandleAudioPlayerError
       
   214 // -----------------------------------------------------------------------------
       
   215 //
       
   216 void CPhoneRingingtonePlayer::HandleAudioPlayerError( 
       
   217         TPhoneAudioPlayerErrorEvent aEvent,
       
   218         TInt aError,
       
   219         TInt aId )
       
   220     {
       
   221     SMC_MOCK_METHOD3( void, TPhoneAudioPlayerErrorEvent, aEvent, 
       
   222         TInt, aError, 
       
   223         TInt, aId )
       
   224     }
       
   225 
       
   226 
       
   227 // -----------------------------------------------------------------------------
       
   228 // CPhoneRingingtonePlayer::HandleAudioPlayerInitComplete
       
   229 // -----------------------------------------------------------------------------
       
   230 //
       
   231 void CPhoneRingingtonePlayer::HandleAudioPlayerInitComplete( 
       
   232         TInt aId )
       
   233     {
       
   234     SMC_MOCK_METHOD1( void, TInt, aId )
       
   235     }
       
   236 
       
   237 
       
   238 // -----------------------------------------------------------------------------
       
   239 // CPhoneRingingtonePlayer::HandlePlayingComplete
       
   240 // -----------------------------------------------------------------------------
       
   241 //
       
   242 void CPhoneRingingtonePlayer::HandlePlayingComplete( 
       
   243         TInt aId )
       
   244     {
       
   245     SMC_MOCK_METHOD1( void, TInt, aId )
       
   246     }
       
   247 
       
   248 
       
   249 // -----------------------------------------------------------------------------
       
   250 // CPhoneRingingtonePlayer::HandleTimeOutL
       
   251 // -----------------------------------------------------------------------------
       
   252 //
       
   253 void CPhoneRingingtonePlayer::HandleTimeOutL(  )
       
   254     {
       
   255     EUNIT_LEAVE_POINT
       
   256     SMC_MOCK_METHOD0( void )
       
   257     }
       
   258 
       
   259 
       
   260 // -----------------------------------------------------------------------------
       
   261 // CPhoneRingingtonePlayer::DeletePlayerAsync
       
   262 // -----------------------------------------------------------------------------
       
   263 //
       
   264 void CPhoneRingingtonePlayer::DeletePlayerAsync( 
       
   265         TPlayerId aPlayer )
       
   266     {
       
   267     SMC_MOCK_METHOD1( void, TPlayerId, aPlayer )
       
   268     }
       
   269 
       
   270 
       
   271 // -----------------------------------------------------------------------------
       
   272 // CPhoneRingingtonePlayer::ConstructSequencePlayer
       
   273 // -----------------------------------------------------------------------------
       
   274 //
       
   275 void CPhoneRingingtonePlayer::ConstructSequencePlayer( 
       
   276         TPlayerId aPlayer )
       
   277     {
       
   278     SMC_MOCK_METHOD1( void, TPlayerId, aPlayer )
       
   279     }
       
   280 
       
   281 
       
   282 // -----------------------------------------------------------------------------
       
   283 // CPhoneRingingtonePlayer::ConstructSequencePlayerL
       
   284 // -----------------------------------------------------------------------------
       
   285 //
       
   286 void CPhoneRingingtonePlayer::ConstructSequencePlayerL( 
       
   287         TPlayerId aPlayer )
       
   288     {
       
   289     EUNIT_LEAVE_POINT
       
   290     SMC_MOCK_METHOD1( void, TPlayerId, aPlayer )
       
   291     }
       
   292 
       
   293 
       
   294 // -----------------------------------------------------------------------------
       
   295 // CPhoneRingingtonePlayer::ConstructBackupPlayer
       
   296 // -----------------------------------------------------------------------------
       
   297 //
       
   298 TInt CPhoneRingingtonePlayer::ConstructBackupPlayer(  )
       
   299     {
       
   300     SMC_MOCK_METHOD0( TInt )
       
   301     }
       
   302 
       
   303 
       
   304 // -----------------------------------------------------------------------------
       
   305 // CPhoneRingingtonePlayer::ConstructBackupPlayerL
       
   306 // -----------------------------------------------------------------------------
       
   307 //
       
   308 void CPhoneRingingtonePlayer::ConstructBackupPlayerL(  )
       
   309     {
       
   310     EUNIT_LEAVE_POINT
       
   311     SMC_MOCK_METHOD0( void )
       
   312     }
       
   313 
       
   314 
       
   315 // -----------------------------------------------------------------------------
       
   316 // CPhoneRingingtonePlayer::ConstructDefaultPlayerL
       
   317 // -----------------------------------------------------------------------------
       
   318 //
       
   319 void CPhoneRingingtonePlayer::ConstructDefaultPlayerL(  )
       
   320     {
       
   321     EUNIT_LEAVE_POINT
       
   322     SMC_MOCK_METHOD0( void )
       
   323     }
       
   324 
       
   325 
       
   326 // -----------------------------------------------------------------------------
       
   327 // CPhoneRingingtonePlayer::ConstructTonePlayer
       
   328 // -----------------------------------------------------------------------------
       
   329 //
       
   330 CPhoneAudioPlayer * CPhoneRingingtonePlayer::ConstructTonePlayer( 
       
   331         const CPhoneRingingTone & aRingingTone,
       
   332         TInt aId )
       
   333     {
       
   334     SMC_MOCK_METHOD2( CPhoneAudioPlayer *, const CPhoneRingingTone &, aRingingTone, 
       
   335         TInt, aId )
       
   336     }
       
   337 
       
   338 
       
   339 // -----------------------------------------------------------------------------
       
   340 // CPhoneRingingtonePlayer::ConvertRingingType
       
   341 // -----------------------------------------------------------------------------
       
   342 //
       
   343 CPhoneAudioPlayer::TRingingType CPhoneRingingtonePlayer::ConvertRingingType( 
       
   344         TProfileRingingType aRingingType )
       
   345     {
       
   346     SMC_MOCK_METHOD1( CPhoneAudioPlayer::TRingingType, TProfileRingingType, aRingingType )
       
   347     }
       
   348 
       
   349 
       
   350 // -----------------------------------------------------------------------------
       
   351 // CPhoneRingingtonePlayer::ConvertVideoRingingType
       
   352 // -----------------------------------------------------------------------------
       
   353 //
       
   354 MPhoneVideoPlayer::TPlayMode CPhoneRingingtonePlayer::ConvertVideoRingingType( 
       
   355         TProfileRingingType aRingingType )
       
   356     {
       
   357     SMC_MOCK_METHOD1( MPhoneVideoPlayer::TPlayMode, TProfileRingingType, aRingingType )
       
   358     }
       
   359 
       
   360 
       
   361 // -----------------------------------------------------------------------------
       
   362 // CPhoneRingingtonePlayer::CleanupPlayers
       
   363 // -----------------------------------------------------------------------------
       
   364 //
       
   365 void CPhoneRingingtonePlayer::CleanupPlayers(  )
       
   366     {
       
   367     SMC_MOCK_METHOD0( void )
       
   368     }
       
   369 
       
   370 
       
   371 // -----------------------------------------------------------------------------
       
   372 // CPhoneRingingtonePlayer::DoHandlePlayerError
       
   373 // -----------------------------------------------------------------------------
       
   374 //
       
   375 void CPhoneRingingtonePlayer::DoHandlePlayerError( 
       
   376         TBool aDelete,
       
   377         TBool aSync )
       
   378     {
       
   379     SMC_MOCK_METHOD2( void, TBool, aDelete, 
       
   380         TBool, aSync )
       
   381     }
       
   382 
       
   383