radioengine/utils/src/cradioremcontargetimp.cpp
branchGCC_SURGE
changeset 37 451b2e1545b2
parent 14 63aabac4416d
parent 28 075425b8d9a4
equal deleted inserted replaced
26:6bcf277166c1 37:451b2e1545b2
    35 //
    35 //
    36 // ---------------------------------------------------------------------------
    36 // ---------------------------------------------------------------------------
    37 //
    37 //
    38 CRadioRemConTargetImp::CRadioRemConTargetImp()
    38 CRadioRemConTargetImp::CRadioRemConTargetImp()
    39     {
    39     {
       
    40     LEVEL3( LOG_METHOD_AUTO );
    40     }
    41     }
    41 
    42 
    42 // ---------------------------------------------------------------------------
    43 // ---------------------------------------------------------------------------
    43 //
    44 //
    44 // ---------------------------------------------------------------------------
    45 // ---------------------------------------------------------------------------
    45 //
    46 //
    46 void CRadioRemConTargetImp::ConstructL()
    47 void CRadioRemConTargetImp::ConstructL()
    47     {
    48     {
       
    49     LEVEL3( LOG_METHOD_AUTO );
    48     RadioEngineUtils::InitializeL();
    50     RadioEngineUtils::InitializeL();
    49     // Create interface selector.
    51     // Create interface selector.
    50     iInterfaceSelector = CRemConInterfaceSelector::NewL();
    52     iInterfaceSelector = CRemConInterfaceSelector::NewL();
    51     // Create a new CRemConCoreApiTarget, owned by the interface selector.
    53     // Create a new CRemConCoreApiTarget, owned by the interface selector.
    52     iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this );
    54     iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this );
    62 //
    64 //
    63 // ---------------------------------------------------------------------------
    65 // ---------------------------------------------------------------------------
    64 //
    66 //
    65 CRadioRemConTargetImp* CRadioRemConTargetImp::NewL()
    67 CRadioRemConTargetImp* CRadioRemConTargetImp::NewL()
    66     {
    68     {
       
    69     LEVEL3( LOG_METHOD_AUTO );
    67     CRadioRemConTargetImp* self = new ( ELeave ) CRadioRemConTargetImp();
    70     CRadioRemConTargetImp* self = new ( ELeave ) CRadioRemConTargetImp();
    68     CleanupStack::PushL( self );
    71     CleanupStack::PushL( self );
    69     self->ConstructL();
    72     self->ConstructL();
    70     CleanupStack::Pop();
    73     CleanupStack::Pop();
    71     return self;
    74     return self;
    75 //
    78 //
    76 // ---------------------------------------------------------------------------
    79 // ---------------------------------------------------------------------------
    77 //
    80 //
    78 CRadioRemConTargetImp::~CRadioRemConTargetImp()
    81 CRadioRemConTargetImp::~CRadioRemConTargetImp()
    79     {
    82     {
       
    83     LEVEL3( LOG_METHOD_AUTO );
    80     if ( iRepeatTimer )
    84     if ( iRepeatTimer )
    81         {
    85         {
    82         iRepeatTimer->Cancel();
    86         iRepeatTimer->Cancel();
    83         }
    87         }
    84     delete iRepeatTimer;
    88     delete iRepeatTimer;
    92 //
    96 //
    93 // ---------------------------------------------------------------------------
    97 // ---------------------------------------------------------------------------
    94 //
    98 //
    95 void CRadioRemConTargetImp::SetControlEventObserver( MRadioControlEventObserver* aControlEventObserver )
    99 void CRadioRemConTargetImp::SetControlEventObserver( MRadioControlEventObserver* aControlEventObserver )
    96     {
   100     {
       
   101     LEVEL3( LOG_METHOD_AUTO );
    97     iObserver = aControlEventObserver;
   102     iObserver = aControlEventObserver;
    98     }
   103     }
    99 
   104 
   100 // ---------------------------------------------------------------------------
   105 // ---------------------------------------------------------------------------
   101 //
   106 //
   102 // ---------------------------------------------------------------------------
   107 // ---------------------------------------------------------------------------
   103 //
   108 //
   104 void CRadioRemConTargetImp::MrccatoCommand( TRemConCoreApiOperationId aOperationId,
   109 void CRadioRemConTargetImp::MrccatoCommand( TRemConCoreApiOperationId aOperationId,
   105                                          TRemConCoreApiButtonAction aButtonAct )
   110                                          TRemConCoreApiButtonAction aButtonAct )
   106     {
   111     {
   107     LOG_FORMAT( "CRadioRemConTargetImp::MrccatoCommand ( aOperationId = %d, aButtonAct = %d )", aOperationId, aButtonAct );
   112     LOG_METHOD_AUTO;
       
   113     LOG_FORMAT( "aOperationId = %d, aButtonAct = %d", aOperationId, aButtonAct );
   108     //TODO: Refactor
   114     //TODO: Refactor
   109     if ( iObserver )
   115     if ( iObserver )
   110         {
   116         {
   111         switch ( aOperationId )
   117         switch ( aOperationId )
   112             {
   118             {
   259 // ---------------------------------------------------------------------------
   265 // ---------------------------------------------------------------------------
   260 //
   266 //
   261 void CRadioRemConTargetImp::MrccatoPlay( TRemConCoreApiPlaybackSpeed /*aSpeed*/,
   267 void CRadioRemConTargetImp::MrccatoPlay( TRemConCoreApiPlaybackSpeed /*aSpeed*/,
   262                                       TRemConCoreApiButtonAction aButtonAct )
   268                                       TRemConCoreApiButtonAction aButtonAct )
   263     {
   269     {
   264     LOG( "CRadioRemConTargetImp::MrccatoPlay" );
   270     LOG_METHOD_AUTO;
   265     if ( iObserver )
   271     if ( iObserver )
   266         {
   272         {
   267         if ( aButtonAct == ERemConCoreApiButtonClick )
   273         if ( aButtonAct == ERemConCoreApiButtonClick )
   268             {
   274             {
   269             TRAP_IGNORE( iObserver->PlayL( ETrue ); iObserver->PlayL( EFalse ))
   275             TRAP_IGNORE( iObserver->PlayL( ETrue ); iObserver->PlayL( EFalse ))
   278 void CRadioRemConTargetImp::MrccatoTuneFunction( TBool /*aTwoPart*/,
   284 void CRadioRemConTargetImp::MrccatoTuneFunction( TBool /*aTwoPart*/,
   279                                               TUint /*aMajorChannel*/,
   285                                               TUint /*aMajorChannel*/,
   280                                               TUint /*aMinorChannel*/,
   286                                               TUint /*aMinorChannel*/,
   281                                               TRemConCoreApiButtonAction /*aButtonAct*/)
   287                                               TRemConCoreApiButtonAction /*aButtonAct*/)
   282     {
   288     {
   283     LOG( "CRadioRemConTargetImp::MrccatoTuneFunction ( currently unsupported in Visual Radio )" );
   289     LEVEL3( LOG_METHOD_AUTO );
   284     }
   290     }
   285 
   291 
   286 // ---------------------------------------------------------------------------
   292 // ---------------------------------------------------------------------------
   287 //
   293 //
   288 // ---------------------------------------------------------------------------
   294 // ---------------------------------------------------------------------------
   289 //
   295 //
   290 void CRadioRemConTargetImp::MrccatoSelectDiskFunction( TUint /*aDisk*/,
   296 void CRadioRemConTargetImp::MrccatoSelectDiskFunction( TUint /*aDisk*/,
   291                                                     TRemConCoreApiButtonAction /*aButtonAct*/)
   297                                                     TRemConCoreApiButtonAction /*aButtonAct*/)
   292     {
   298     {
   293     LOG( "CRadioRemConTargetImp::MrccatoSelectDiskFunction ( currently unsupported in Visual Radio )" );
   299     LEVEL3( LOG_METHOD_AUTO );
   294     }
   300     }
   295 
   301 
   296 // ---------------------------------------------------------------------------
   302 // ---------------------------------------------------------------------------
   297 //
   303 //
   298 // ---------------------------------------------------------------------------
   304 // ---------------------------------------------------------------------------
   299 //
   305 //
   300 void CRadioRemConTargetImp::MrccatoSelectAvInputFunction( TUint8 /*aAvInputSignalNumber*/,
   306 void CRadioRemConTargetImp::MrccatoSelectAvInputFunction( TUint8 /*aAvInputSignalNumber*/,
   301                                                        TRemConCoreApiButtonAction /*aButtonAct*/)
   307                                                        TRemConCoreApiButtonAction /*aButtonAct*/)
   302     {
   308     {
   303     LOG( "CRadioRemConTargetImp::MrccatoSelectAvInputFunction ( currently unsupported in Visual Radio )" );
   309     LEVEL3( LOG_METHOD_AUTO );
   304     }
   310     }
   305 
   311 
   306 // ---------------------------------------------------------------------------
   312 // ---------------------------------------------------------------------------
   307 //
   313 //
   308 // ---------------------------------------------------------------------------
   314 // ---------------------------------------------------------------------------
   309 //
   315 //
   310 void CRadioRemConTargetImp::MrccatoSelectAudioInputFunction( TUint8 /*aAudioInputSignalNumber*/,
   316 void CRadioRemConTargetImp::MrccatoSelectAudioInputFunction( TUint8 /*aAudioInputSignalNumber*/,
   311                                                           TRemConCoreApiButtonAction /*aButtonAct*/)
   317                                                           TRemConCoreApiButtonAction /*aButtonAct*/)
   312     {
   318     {
   313     LOG( "CRadioRemConTargetImp::MrccatoSelectAudioInputFunction ( currently unsupported in Visual Radio )" );
   319     LEVEL3( LOG_METHOD_AUTO );
   314     }
   320     }
   315 
   321 
   316 // ---------------------------------------------------------------------------
   322 // ---------------------------------------------------------------------------
   317 //
   323 //
   318 // ---------------------------------------------------------------------------
   324 // ---------------------------------------------------------------------------
   319 //
   325 //
   320 TInt CRadioRemConTargetImp::RepeatTimerCallback( TAny* aPtr )
   326 TInt CRadioRemConTargetImp::RepeatTimerCallback( TAny* aPtr )
   321     {
   327     {
   322     LOG( "CRadioRemConTargetImp::RepeatTimerCallback" );
   328     LEVEL3( LOG_METHOD_AUTO );
   323 
   329 
   324     CRadioRemConTargetImp* self = reinterpret_cast<CRadioRemConTargetImp*>( aPtr );
   330     CRadioRemConTargetImp* self = reinterpret_cast<CRadioRemConTargetImp*>( aPtr );
   325 
   331 
   326     if ( self )
   332     if ( self )
   327         {
   333         {
   354 //
   360 //
   355 // ---------------------------------------------------------------------------
   361 // ---------------------------------------------------------------------------
   356 //
   362 //
   357 void CRadioRemConTargetImp::AnswerCall()
   363 void CRadioRemConTargetImp::AnswerCall()
   358     {
   364     {
   359     LOG( "CRadioRemConTargetImp::AnswerCall() ( currently unsupported in Visual Radio )" );
   365     LEVEL3( LOG_METHOD_AUTO );
       
   366     LOG( "This function currently unsupported." );
   360     }
   367     }
   361 
   368 
   362 // ---------------------------------------------------------------------------
   369 // ---------------------------------------------------------------------------
   363 //
   370 //
   364 // ---------------------------------------------------------------------------
   371 // ---------------------------------------------------------------------------
   365 //
   372 //
   366 void CRadioRemConTargetImp::AnswerEndCall()
   373 void CRadioRemConTargetImp::AnswerEndCall()
   367     {
   374     {
   368     LOG( "CRadioRemConTargetImp::AnswerEndCall() " );
   375     LEVEL3( LOG_METHOD_AUTO );
   369     if ( iObserver )
   376     if ( iObserver )
   370         {
   377         {
   371         TRAP_IGNORE( iObserver->AnswerEndCallL())
   378         TRAP_IGNORE( iObserver->AnswerEndCallL())
   372         }
   379         }
   373     }
   380     }
   376 //
   383 //
   377 // ---------------------------------------------------------------------------
   384 // ---------------------------------------------------------------------------
   378 //
   385 //
   379 void CRadioRemConTargetImp::DialCall( const TDesC8& /*aTelNumber*/ )
   386 void CRadioRemConTargetImp::DialCall( const TDesC8& /*aTelNumber*/ )
   380     {
   387     {
   381     LOG( "CRadioRemConTargetImp::DialCall ( currently unsupported in Visual Radio )" );
   388     LEVEL3( LOG_METHOD_AUTO );
   382     }
   389     }
   383 
   390 
   384 // ---------------------------------------------------------------------------
   391 // ---------------------------------------------------------------------------
   385 //
   392 //
   386 // ---------------------------------------------------------------------------
   393 // ---------------------------------------------------------------------------
   387 //
   394 //
   388 void CRadioRemConTargetImp::EndCall()
   395 void CRadioRemConTargetImp::EndCall()
   389     {
   396     {
   390     LOG( "CRadioRemConTargetImp::EndCall() ( currently unsupported in Visual Radio )" );
   397     LEVEL3( LOG_METHOD_AUTO );
   391     }
   398     }
   392 
   399 
   393 // ---------------------------------------------------------------------------
   400 // ---------------------------------------------------------------------------
   394 //
   401 //
   395 // ---------------------------------------------------------------------------
   402 // ---------------------------------------------------------------------------
   396 //
   403 //
   397 void CRadioRemConTargetImp::GenerateDTMF( const TChar /*aChar*/ )
   404 void CRadioRemConTargetImp::GenerateDTMF( const TChar /*aChar*/ )
   398     {
   405     {
   399     LOG( "CRadioRemConTargetImp::GenerateDTMF ( currently unsupported in Visual Radio )" );
   406     LEVEL3( LOG_METHOD_AUTO );
   400     }
   407     }
   401 
   408 
   402 // ---------------------------------------------------------------------------
   409 // ---------------------------------------------------------------------------
   403 //
   410 //
   404 // ---------------------------------------------------------------------------
   411 // ---------------------------------------------------------------------------
   405 //
   412 //
   406 void CRadioRemConTargetImp::LastNumberRedial()
   413 void CRadioRemConTargetImp::LastNumberRedial()
   407     {
   414     {
   408     LOG( "CRadioRemConTargetImp::LastNumberRedial ( currently unsupported in Visual Radio )" );
   415     LEVEL3( LOG_METHOD_AUTO );
   409     }
   416     }
   410 
   417 
   411 // ---------------------------------------------------------------------------
   418 // ---------------------------------------------------------------------------
   412 //
   419 //
   413 // ---------------------------------------------------------------------------
   420 // ---------------------------------------------------------------------------
   414 //
   421 //
   415 void CRadioRemConTargetImp::MultipartyCalling( const TDesC8& /*aData*/ )
   422 void CRadioRemConTargetImp::MultipartyCalling( const TDesC8& /*aData*/ )
   416     {
   423     {
   417     LOG( "CRadioRemConTargetImp::MultipartyCalling ( currently unsupported in Visual Radio )" );
   424     LEVEL3( LOG_METHOD_AUTO );
   418     }
   425     }
   419 
   426 
   420 // ---------------------------------------------------------------------------
   427 // ---------------------------------------------------------------------------
   421 //
   428 //
   422 // ---------------------------------------------------------------------------
   429 // ---------------------------------------------------------------------------
   423 //
   430 //
   424 void CRadioRemConTargetImp::SpeedDial( const TInt /*aIndex*/ )
   431 void CRadioRemConTargetImp::SpeedDial( const TInt /*aIndex*/ )
   425     {
   432     {
   426     LOG( "CRadioRemConTargetImp::SpeedDial ( currently unsupported in Visual Radio )" );
   433     LEVEL3( LOG_METHOD_AUTO );
   427     }
   434     }
   428 
   435 
   429 // ---------------------------------------------------------------------------
   436 // ---------------------------------------------------------------------------
   430 //
   437 //
   431 // ---------------------------------------------------------------------------
   438 // ---------------------------------------------------------------------------
   432 //
   439 //
   433 void CRadioRemConTargetImp::VoiceDial( const TBool /*aActivate*/ )
   440 void CRadioRemConTargetImp::VoiceDial( const TBool /*aActivate*/ )
   434     {
   441     {
   435     LOG( "CRadioRemConTargetImp::VoiceDial ( currently unsupported in Visual Radio )" );
   442     LEVEL3( LOG_METHOD_AUTO );
   436     }
   443     }