phoneengine/engineinfo/src/cpeengineinfoimpl.cpp
changeset 37 ba76fc04e6c2
child 45 6b911d05207e
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2002-2008 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:  This module contains the implementation of CPEEngineInfoImpl class 
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include "cpecallinfo.h"
       
    20 #include "cpeclientinformation.h"
       
    21 #include "cpeengineinfoimpl.h"
       
    22 #include <pepanic.pan>
       
    23 #include <telinternalpskeys.h>
       
    24 #include <cphcltdialdata.h>
       
    25 #include <phclttypes.h>
       
    26 #include <talogger.h>
       
    27 
       
    28 // ================= MEMBER FUNCTIONS ==========================================
       
    29 
       
    30 // -----------------------------------------------------------------------------
       
    31 // CPEEngineInfoImpl::CPEEngineInfoImpl
       
    32 // C++ default constructor can NOT contain any code, that
       
    33 // might leave.
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 CPEEngineInfoImpl::CPEEngineInfoImpl()
       
    37     : iCurrentCalls( KPEMaximumNumberOfCalls )
       
    38     ,iContactId( KErrNotFound )
       
    39     {
       
    40     iCallCommandInfo.iPhoneNumber = KNullDesC;
       
    41     iCallCommandInfo.iCallId = 0;
       
    42     iCallCommandInfo.iKeyCode = 0;
       
    43     iCallCommandInfo.iAudioVolume = KPENumberInitValue;
       
    44     iCallCommandInfo.iAudioMute = EFalse;
       
    45     iCallCommandInfo.iDtmfString = KNullDesC;
       
    46     iCallCommandInfo.iCallType = EPECallTypeUninitialized;
       
    47     iCallCommandInfo.iServiceId = 0;
       
    48     iBasicInfo.iAudioOutputPreference = EPSAudioPrivate;
       
    49     iBasicInfo.iALSLine = CCCECallParameters::ECCELineTypePrimary;
       
    50     iBasicInfo.iALSLineSupport = EFalse;
       
    51     iBasicInfo.iPhoneAudioRouteParameters.iAudioOutput = EPENotActive;
       
    52     iBasicInfo.iAudioVolume = KPEDefaultAudioVolume;
       
    53     iBasicInfo.iKeypadVolume = KPENumberInitValue;
       
    54     iBasicInfo.iAudioMute = EFalse;
       
    55     iBasicInfo.iDtmfString = KNullDesC;
       
    56     iBasicInfo.iErrorInfo.iErrorCode = ECCPErrorNone;
       
    57     iBasicInfo.iErrorInfo.iCallId = KPECallIdNotUsed;
       
    58     iBasicInfo.iProfileId = ECCPErrorNotFound;
       
    59     iBasicInfo.iProfileName = KNullDesC;
       
    60     iBasicInfo.iPhoneIdentityParameters.iManufacturer = KNullDesC;
       
    61     iBasicInfo.iPhoneIdentityParameters.iModel = KNullDesC;
       
    62     iBasicInfo.iPhoneIdentityParameters.iRevision = KNullDesC;
       
    63     iBasicInfo.iPhoneIdentityParameters.iSerialNumber = KNullDesC;
       
    64     iBasicInfo.iLastCallDuration = KPENumberInitValue;
       
    65     iBasicInfo.iVMBXNumbers.iVMBXL1 = KNullDesC;
       
    66     iBasicInfo.iVMBXNumbers.iVMBXL2 = KNullDesC;
       
    67     iBasicInfo.iRingingType = EProfileRingingTypeRinging;
       
    68     iBasicInfo.iTextToSpeech = EFalse;
       
    69     iBasicInfo.iPhoneNumberIsServiceCode = EFalse;
       
    70     iBasicInfo.iTwoDigitSupportStatus = EFalse;
       
    71     iBasicInfo.iLifeTimeData.iHours = 0;
       
    72     iBasicInfo.iLifeTimeData.iMinutes = 0;
       
    73 
       
    74     iBasicInfo.iNetworkRegistrationStatus = ENWStatusRegistrationUnknown;
       
    75 
       
    76     iCallCommandInfo.iIdRestrict = RMobileCall::EIdRestrictDefault;
       
    77     iCallCommandInfo.iEmergencyNumber = KNullDesC;
       
    78     
       
    79     iCallCommandInfo.iTransferToAddress = KNullDesC;
       
    80     iCallCommandInfo.iForwardToAddressIndex = ECCPErrorNotFound;
       
    81     iBasicInfo.iActiveForward.iActiveType = RMobilePhone::ECFUnconditionalActive;
       
    82     iBasicInfo.iActiveForward.iServiceGroup =  RMobilePhone::EServiceUnspecified;
       
    83     iBasicInfo.iBarringInfo.iGroupCount = KPENumberInitValue;
       
    84     for( TInt i = 0; i < KPEMaxServiceGroup; i++ )
       
    85         {
       
    86         __ASSERT_DEBUG( 
       
    87             iBasicInfo.iBarringInfo.iBarredInfo.Count() > i, 
       
    88             Panic( EPEPanicIndexOutOfRange ) );
       
    89         iBasicInfo.iBarringInfo.iBarredInfo[i].iCondition = RMobilePhone::EBarUnspecified;
       
    90         iBasicInfo.iBarringInfo.iBarredInfo[i].iServiceGroup = 
       
    91             RMobilePhone::EServiceUnspecified;
       
    92         iBasicInfo.iBarringInfo.iBarredInfo[i].iStatus = 
       
    93             RMobilePhone::ECallBarringStatusUnknown;
       
    94         }
       
    95     iBasicInfo.iSSCommandInfo.action = EPESSActionUnspecified;
       
    96     iBasicInfo.iSSCommandInfo.type = EPESSTypeUnspecified;
       
    97     iBasicInfo.iSSCommandInfo.group = RMobilePhone::EServiceUnspecified;
       
    98     iBasicInfo.iSimState = EPESimStatusUninitialized;
       
    99     iBasicInfo.iSecureSpecified = ETrue; 
       
   100     iBasicInfo.iDataPortName = KNullDesC;
       
   101     iBasicInfo.iSwitchToOngoing = EFalse;
       
   102     iConferenceCallInfo.iConferenceCallState = EPEStateConferenceIdle;
       
   103     
       
   104     //TODO remove after profile information is available
       
   105     iBasicInfo.iRingingVolume = 10;
       
   106     }
       
   107 
       
   108 // -----------------------------------------------------------------------------
       
   109 // CPEEngineInfoImpl::NewL
       
   110 // Two-phased constructor.
       
   111 // -----------------------------------------------------------------------------
       
   112 //
       
   113 CPEEngineInfoImpl* CPEEngineInfoImpl::NewL()
       
   114     {
       
   115     CPEEngineInfoImpl* self = new ( ELeave ) CPEEngineInfoImpl;
       
   116     CleanupStack::PushL( self );
       
   117     self->ConstructL();
       
   118     CleanupStack::Pop( self );
       
   119     return self;
       
   120     }
       
   121 
       
   122 // -----------------------------------------------------------------------------
       
   123 // CPEEngineInfoImpl::ConstructL
       
   124 // Initializes class member variables
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 void CPEEngineInfoImpl::ConstructL()
       
   128     {
       
   129     iCallParams = CCCECallParameters::NewL();
       
   130 
       
   131     iRemoteInfo = new ( ELeave ) RPointerArray<CPERemoteInfo>( KPEMaximumNumberOfCalls );
       
   132 
       
   133     for ( TInt i = 0; i < KPEMaximumNumberOfCalls; i++ )
       
   134         {
       
   135         TEFLOGSTRING( KTAOBJECT, "CPEEngineInfoImpl::ConstructL" );
       
   136         CPERemoteInfo* remoteInfo = CPERemoteInfo::NewL();
       
   137         CleanupStack::PushL( remoteInfo );
       
   138         // associate this remote info instance with a call id
       
   139         remoteInfo->SetCallId( i );
       
   140         iRemoteInfo->InsertL( remoteInfo, i );
       
   141         CleanupStack::Pop( remoteInfo );
       
   142         
       
   143         CPECallInfo* callInfo = CPECallInfo::NewL();
       
   144         CleanupStack::PushL( callInfo );
       
   145         iCurrentCalls.AppendL( callInfo );
       
   146         CleanupStack::Pop( callInfo );
       
   147         }
       
   148         
       
   149     for( TInt i = 0 ; i < KPEMaximumNumberOfCalls ; i++ ) 
       
   150         {
       
   151         ResetCallInfo( i );    // Resets every call.
       
   152         }
       
   153     }
       
   154 
       
   155 // Destructor
       
   156 CPEEngineInfoImpl::~CPEEngineInfoImpl()
       
   157     {
       
   158     if ( iRemoteInfo )
       
   159         {
       
   160         iRemoteInfo->ResetAndDestroy();
       
   161         iRemoteInfo->Close();
       
   162         delete iRemoteInfo;
       
   163         iRemoteInfo = NULL;
       
   164         }
       
   165     delete iCallParams;
       
   166     
       
   167     iCurrentCalls.ResetAndDestroy();
       
   168     iCurrentCalls.Close();
       
   169     }
       
   170 
       
   171 // -----------------------------------------------------------------------------
       
   172 // CPEEngineInfoImpl::AlertForGroup
       
   173 // Gets group ids  from the TPEBasicInfo structure.
       
   174 // -----------------------------------------------------------------------------
       
   175 //
       
   176 const TArray< TContactItemId > CPEEngineInfoImpl::AlertForGroup() const
       
   177     {
       
   178     return iAlertForGroup.Array();
       
   179     }
       
   180 
       
   181 // -----------------------------------------------------------------------------
       
   182 // CPEEngineInfoImpl::ALSLine
       
   183 // Gets active als line of the phone.
       
   184 // -----------------------------------------------------------------------------
       
   185 //
       
   186 const CCCECallParameters::TCCELineType& CPEEngineInfoImpl::ALSLine() const
       
   187     {
       
   188     return iBasicInfo.iALSLine;
       
   189     }    
       
   190 
       
   191 
       
   192 // -----------------------------------------------------------------------------
       
   193 // CPEEngineInfoImpl::ALSLine
       
   194 // Gets active als line of the phone.
       
   195 // -----------------------------------------------------------------------------
       
   196 //
       
   197 const TBool& CPEEngineInfoImpl::ALSLineSupport() const
       
   198     {
       
   199     TEFLOGSTRING2( KTAMESIN,"CPEEngineInfoImpl::ALSLineSupport(),iALSLineSupport: %d"
       
   200         , iBasicInfo.iALSLineSupport );
       
   201     return iBasicInfo.iALSLineSupport;
       
   202     }  
       
   203     
       
   204 // -----------------------------------------------------------------------------
       
   205 // CPEEngineInfoImpl::AudioMute
       
   206 // Gets audio mute value from the TPEBasicInfo structure.
       
   207 // -----------------------------------------------------------------------------
       
   208 //
       
   209 const TBool& CPEEngineInfoImpl::AudioMute() const
       
   210     {
       
   211     return iBasicInfo.iAudioMute;
       
   212     }
       
   213 
       
   214 // -----------------------------------------------------------------------------
       
   215 // CPEEngineInfoImpl::AudioOutput
       
   216 // Gets audio output value from the TPEBasicInfo structure.
       
   217 // -----------------------------------------------------------------------------
       
   218 //
       
   219 const TPEAudioOutput& CPEEngineInfoImpl::AudioOutput() const
       
   220     {
       
   221     TEFLOGSTRING2( KTAINT, 
       
   222         "PE CPEEngineInfoImpl::AudioOutput: iBasicInfo.iAudioOutput: %d", 
       
   223         iBasicInfo.iPhoneAudioRouteParameters.iAudioOutput );
       
   224     return iBasicInfo.iPhoneAudioRouteParameters.iAudioOutput;
       
   225     }
       
   226 
       
   227 // -----------------------------------------------------------------------------
       
   228 // CPEEngineInfoImpl::PhoneIdentityParameters
       
   229 // Gets the phone identity parameters from the TPEBasicInfo structure
       
   230 // (other items were commented in a header).
       
   231 // -----------------------------------------------------------------------------
       
   232 //
       
   233 const TPEPhoneAudioRouteParameters& CPEEngineInfoImpl::RouteParameters() const
       
   234     {
       
   235     return iBasicInfo.iPhoneAudioRouteParameters;
       
   236     }
       
   237  
       
   238 // -----------------------------------------------------------------------------
       
   239 // CPEEngineInfoImpl::AudioOutputAvailable
       
   240 // Gets audio output path availability status from array
       
   241 // -----------------------------------------------------------------------------
       
   242 //
       
   243 TBool CPEEngineInfoImpl::AudioOutputAvailable( 
       
   244         const TPEAudioOutput aOutput ) const 
       
   245     {
       
   246     __ASSERT_ALWAYS( ( EPENotActive <= aOutput && 
       
   247         aOutput <= EPETTY ), Panic( EPEPanicInvalidParameter ) );
       
   248         
       
   249     TBool available( EFalse );
       
   250     // find given output from the available outputs array
       
   251     for (TInt i = 0; i < iAvailableAudioOutputs.Count(); i++)
       
   252         {
       
   253         if ( iAvailableAudioOutputs[i] == aOutput )
       
   254             {
       
   255             available = ETrue;
       
   256             }
       
   257         }
       
   258     return available;
       
   259     }
       
   260 
       
   261 // -----------------------------------------------------------------------------
       
   262 // CPEEngineInfoImpl::AudioMuteCommand
       
   263 // Gets audio mute command value from the TPECallCommandInfo structure.
       
   264 // -----------------------------------------------------------------------------
       
   265 //
       
   266 const TBool& CPEEngineInfoImpl::AudioMuteCommand() const
       
   267     {
       
   268     return iCallCommandInfo.iAudioMute;
       
   269     }
       
   270 
       
   271 // -----------------------------------------------------------------------------
       
   272 // CPEEngineInfoImpl::AudioOutputCommand
       
   273 // Gets audio output command value from the TPECallCommandInfo structure.
       
   274 // -----------------------------------------------------------------------------
       
   275 //
       
   276 const TPEAudioOutput& CPEEngineInfoImpl::AudioOutputCommand() const
       
   277     {
       
   278     return iCallCommandInfo.iAudioOutput;
       
   279     }
       
   280 
       
   281 // -----------------------------------------------------------------------------
       
   282 // CPEEngineInfoImpl::ShowNoteCommand
       
   283 // Gets audio note command value from the TPECallCommandInfo structure.
       
   284 // -----------------------------------------------------------------------------
       
   285 //
       
   286 TBool CPEEngineInfoImpl::ShowNoteCommand() const
       
   287     {
       
   288     return iCallCommandInfo.iShowNote;
       
   289     }
       
   290         
       
   291 // -----------------------------------------------------------------------------
       
   292 // CPEEngineInfoImpl::AudioOutputPreference
       
   293 // Gets audio output preference value from the TPEBasicInfo structure.
       
   294 // -----------------------------------------------------------------------------
       
   295 //
       
   296 const TInt& CPEEngineInfoImpl::AudioOutputPreference() const
       
   297     {
       
   298     return iBasicInfo.iAudioOutputPreference;
       
   299     }
       
   300 
       
   301 // -----------------------------------------------------------------------------
       
   302 // CPEEngineInfoImpl::AudioVolume
       
   303 // Gets audio volume value from the TPEBasicInfo structure.
       
   304 // -----------------------------------------------------------------------------
       
   305 //
       
   306 const TInt& CPEEngineInfoImpl::AudioVolume() const
       
   307     {
       
   308     TEFLOGSTRING2( KTAINT, 
       
   309         "PE CPEEngineInfoImpl::AudioVolume, volume: %d", iBasicInfo.iAudioVolume );
       
   310     return iBasicInfo.iAudioVolume;
       
   311     }
       
   312 
       
   313 // -----------------------------------------------------------------------------
       
   314 // CPEEngineInfoImpl::AudioVolumeCommand
       
   315 // Gets audio volume command value from the TPECallCommandInfo structure.
       
   316 // -----------------------------------------------------------------------------
       
   317 //
       
   318 const TInt& CPEEngineInfoImpl::AudioVolumeCommand() const
       
   319     {
       
   320     TEFLOGSTRING2( KTAINT, 
       
   321         "PE CPEEngineInfoImpl::AudioVolumeCommand, volume: %d", 
       
   322         iCallCommandInfo.iAudioVolume );
       
   323     return iCallCommandInfo.iAudioVolume;
       
   324     } 
       
   325 
       
   326 // -----------------------------------------------------------------------------
       
   327 // CPEEngineInfoImpl::CallClientInformation
       
   328 // Gets phone client information from the TPECallInfo structure.
       
   329 // -----------------------------------------------------------------------------
       
   330 //
       
   331 const MPEClientInformation& CPEEngineInfoImpl::CallClientInformation(
       
   332         const TInt aCallId ) const
       
   333     {
       
   334     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   335     return iCurrentCalls[ aCallId ]->ClientInformation();
       
   336     }
       
   337 
       
   338 // -----------------------------------------------------------------------------
       
   339 // CPEEngineInfoImpl::CallDirection
       
   340 // Gets the call direction.
       
   341 // -----------------------------------------------------------------------------
       
   342 //
       
   343 RMobileCall::TMobileCallDirection CPEEngineInfoImpl::CallDirection( 
       
   344         const TInt aCallId ) const
       
   345     {
       
   346     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   347     return iCurrentCalls[ aCallId ]->CallDirection();
       
   348     }
       
   349 
       
   350 // -----------------------------------------------------------------------------
       
   351 // CPEEngineInfoImpl::CallDuration
       
   352 // Gets the duration of the last call to idle.
       
   353 // -----------------------------------------------------------------------------
       
   354 //
       
   355 const TInt& CPEEngineInfoImpl::CallDuration() const
       
   356     {
       
   357     return iBasicInfo.iLastCallDuration;
       
   358     }
       
   359 
       
   360 // -----------------------------------------------------------------------------
       
   361 // CPEEngineInfoImpl::CallDuration
       
   362 // Gets the duration of the call.
       
   363 // -----------------------------------------------------------------------------
       
   364 //
       
   365 TTimeIntervalSeconds CPEEngineInfoImpl::CallDuration(
       
   366         const TInt aCallId ) const
       
   367     {
       
   368     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   369     return iCurrentCalls[ aCallId ]->Duration();
       
   370     }
       
   371 
       
   372 // -----------------------------------------------------------------------------
       
   373 // CPEEngineInfoImpl::CallId
       
   374 // Gets the identification number of the call from the TPECallCommandInfo structure. 
       
   375 // -----------------------------------------------------------------------------
       
   376 //
       
   377 const TInt& CPEEngineInfoImpl::CallId() const
       
   378     {
       
   379     return iCallCommandInfo.iCallId;
       
   380     }
       
   381     
       
   382 // -----------------------------------------------------------------------------
       
   383 // CPEEngineInfoImpl::CallALSLine
       
   384 // Gets als line value from the TPECallInfo structure.
       
   385 // -----------------------------------------------------------------------------
       
   386 //
       
   387 CCCECallParameters::TCCELineType CPEEngineInfoImpl::CallALSLine( 
       
   388         const TInt aCallId ) const
       
   389     {
       
   390     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   391     return iCurrentCalls[ aCallId ]->AlsLine();
       
   392     }
       
   393 
       
   394 // -----------------------------------------------------------------------------
       
   395 // CPEEngineInfoImpl::CallStartTime
       
   396 // Gets the start time of the call.
       
   397 // -----------------------------------------------------------------------------
       
   398 //
       
   399 const TTime& CPEEngineInfoImpl::CallStartTime(
       
   400         const TInt aCallId ) const
       
   401     {
       
   402     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   403     return iCurrentCalls[ aCallId ]->StartTime();
       
   404     }
       
   405 
       
   406 // -----------------------------------------------------------------------------
       
   407 // CPEEngineInfoImpl::CallState
       
   408 // Gets the state of the call.
       
   409 // -----------------------------------------------------------------------------
       
   410 //
       
   411 TPEState CPEEngineInfoImpl::CallState( 
       
   412         const TInt aCallId ) const
       
   413     {
       
   414     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   415     return iCurrentCalls[ aCallId ]->CallState();
       
   416     }
       
   417 
       
   418 // -----------------------------------------------------------------------------
       
   419 // CPEEngineInfoImpl::CallType
       
   420 // Gets the type of the call.
       
   421 // -----------------------------------------------------------------------------
       
   422 //
       
   423 TPECallType CPEEngineInfoImpl::CallType(
       
   424         const TInt aCallId ) const
       
   425     {
       
   426     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   427     return iCurrentCalls[ aCallId ]->CallType();
       
   428     }
       
   429 
       
   430 // -----------------------------------------------------------------------------
       
   431 // CPEEngineInfoImpl::CallTypeCommand
       
   432 // Gets call type information for the attempted call
       
   433 // -----------------------------------------------------------------------------
       
   434 //
       
   435 const TPECallType& CPEEngineInfoImpl::CallTypeCommand() const
       
   436     {
       
   437     return iCallCommandInfo.iCallType;
       
   438     }
       
   439 
       
   440 // -----------------------------------------------------------------------------
       
   441 // CPEEngineInfoImpl::ConferenceCallState
       
   442 // -----------------------------------------------------------------------------
       
   443 //
       
   444 TPEState CPEEngineInfoImpl::ConferenceCallState() const
       
   445     {
       
   446     return iConferenceCallInfo.iConferenceCallState;
       
   447     }
       
   448 
       
   449 // -----------------------------------------------------------------------------
       
   450 // CPEEngineInfoImpl::IsSecureCall
       
   451 // Gets secured status from call info
       
   452 // -----------------------------------------------------------------------------
       
   453 //
       
   454 TBool CPEEngineInfoImpl::IsSecureCall( const TInt aCallId ) const
       
   455     {
       
   456     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   457     TInt isSecured = EFalse; 
       
   458     
       
   459     // Conference call secure status
       
   460     if ( KPEConferenceCallID == aCallId )
       
   461         {
       
   462         TInt count = iCurrentCalls.Count();
       
   463 
       
   464         for ( TInt i = 0; i < count; i++ )
       
   465             {
       
   466             if ( iCurrentCalls[ i ]->ConferenceMemberId() != KPECallIdNotUsed )
       
   467             {
       
   468                 if ( iCurrentCalls[ i ]->SecureStatus() )
       
   469                     {
       
   470                     isSecured = ETrue;
       
   471                     }
       
   472                 else
       
   473                     {
       
   474                     isSecured = EFalse;
       
   475                     break;
       
   476                     }
       
   477                 }
       
   478             }
       
   479         }
       
   480     else
       
   481         {
       
   482         isSecured = iCurrentCalls[ aCallId ]->SecureStatus();
       
   483         }
       
   484     
       
   485     return isSecured;
       
   486     }
       
   487 
       
   488 // -----------------------------------------------------------------------------
       
   489 // CPEEngineInfoImpl::DataPortName
       
   490 // Gets the name of data port currently on-loan.
       
   491 // -----------------------------------------------------------------------------
       
   492 //
       
   493 const TName& CPEEngineInfoImpl::DataPortName() const
       
   494     {
       
   495     return iBasicInfo.iDataPortName;
       
   496     }
       
   497         
       
   498 // -----------------------------------------------------------------------------
       
   499 // CPEEngineInfoImpl::DtmfPostFix
       
   500 // Gets dtmf postfix value from the TPEBasicInfo structure.
       
   501 // -----------------------------------------------------------------------------
       
   502 //
       
   503 const TPEDtmfString& CPEEngineInfoImpl::DtmfPostFix( const TInt aCallId ) const
       
   504     {
       
   505     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   506     return iCurrentCalls[ aCallId ]->DtmfPostFix();
       
   507     }
       
   508 
       
   509 // -----------------------------------------------------------------------------
       
   510 // CPEEngineInfoImpl::DtmfString
       
   511 // Gets dtmf string value from the TPEBasicInfo structure.
       
   512 // -----------------------------------------------------------------------------
       
   513 //
       
   514 const TPEDtmfString& CPEEngineInfoImpl::DtmfString() const
       
   515     {
       
   516     return iBasicInfo.iDtmfString;
       
   517     }
       
   518 
       
   519 // -----------------------------------------------------------------------------
       
   520 // CPEEngineInfoImpl::DtmfStringCommand
       
   521 // Gets dtmf string command value from TPECallCommandInfo-structure
       
   522 // -----------------------------------------------------------------------------
       
   523 //
       
   524 const TPEDtmfString& CPEEngineInfoImpl::DtmfStringCommand() const
       
   525     {
       
   526     return iCallCommandInfo.iDtmfString; 
       
   527     }
       
   528 
       
   529 // -----------------------------------------------------------------------------
       
   530 // CPEEngineInfoImpl::ErrorInfo
       
   531 // Gets the error code value of the phone from the TPEBasicInfo structure.
       
   532 // -----------------------------------------------------------------------------
       
   533 //
       
   534 const TPEErrorInfo& CPEEngineInfoImpl::ErrorInfo() const
       
   535     {
       
   536     return iBasicInfo.iErrorInfo;
       
   537     }
       
   538 
       
   539 // -----------------------------------------------------------------------------
       
   540 // CPEEngineInfoImpl::InbandTone
       
   541 // Gets correct inband tone for specific call state transition or error
       
   542 // -----------------------------------------------------------------------------
       
   543 //
       
   544 const TCCPTone& CPEEngineInfoImpl::InbandTone() const 
       
   545     {
       
   546     return iBasicInfo.iInbandTone; 
       
   547     }
       
   548 
       
   549 // -----------------------------------------------------------------------------
       
   550 // CPEEngineInfoImpl::KeyCode
       
   551 //  Gets key code value.
       
   552 // -----------------------------------------------------------------------------
       
   553 //
       
   554 const TChar& CPEEngineInfoImpl::KeyCode() const
       
   555     {
       
   556     return iCallCommandInfo.iKeyCode;
       
   557     }
       
   558 
       
   559 // -----------------------------------------------------------------------------
       
   560 // CPEEngineInfoImpl::KeypadVolume
       
   561 // Gets Keypad volume value from the TPEBasicInfo structure.
       
   562 // (other items were commented in a header).
       
   563 // -----------------------------------------------------------------------------
       
   564 //
       
   565 const TInt& CPEEngineInfoImpl::KeypadVolume() const
       
   566     {
       
   567     return iBasicInfo.iKeypadVolume;
       
   568     }
       
   569 
       
   570 // -----------------------------------------------------------------------------
       
   571 // CPEEngineInfoImpl::LifeTimerData
       
   572 // Gets lifetimerdata from the TPEBasicInfo structure.
       
   573 // (other items were commented in a header).
       
   574 // -----------------------------------------------------------------------------
       
   575 //
       
   576 const TPELifeTimeData& CPEEngineInfoImpl::LifeTimerData() const
       
   577     {
       
   578     return iBasicInfo.iLifeTimeData;
       
   579     }
       
   580 
       
   581 // -----------------------------------------------------------------------------
       
   582 // CPEEngineInfoImpl::LoggingIndicator
       
   583 // Get logging indicator from TPECallInfo.
       
   584 // (other items were commented in a header).
       
   585 // -----------------------------------------------------------------------------
       
   586 //
       
   587 TBool CPEEngineInfoImpl::LoggingIndicator(
       
   588         const TInt aCallId ) const
       
   589     {
       
   590     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   591     __ASSERT_ALWAYS( !CallIdCheck::IsConference( aCallId ), Panic( EPEPanicIllegalCommand ) );
       
   592     return iCurrentCalls[ aCallId ]->LoggingEnabled();
       
   593     }
       
   594 
       
   595 // -----------------------------------------------------------------------------
       
   596 // CPEEngineInfoImpl::MissedCall
       
   597 // Get missed call indicator from TPECallInfo.
       
   598 // (other items were commented in a header).
       
   599 // -----------------------------------------------------------------------------
       
   600 //
       
   601 TBool CPEEngineInfoImpl::MissedCall(
       
   602         const TInt aCallId ) const
       
   603     {
       
   604     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   605     __ASSERT_ALWAYS( !CallIdCheck::IsConference( aCallId ), Panic( EPEPanicIllegalCommand ) );
       
   606     return iCurrentCalls[ aCallId ]->MissedCall();     
       
   607     }
       
   608 
       
   609 // -----------------------------------------------------------------------------
       
   610 // CPEEngineInfoImpl::NetworkInformation
       
   611 // Return network information
       
   612 // (other items were commented in a header).
       
   613 // -----------------------------------------------------------------------------
       
   614 //
       
   615 const TNWNetworkRegistrationStatus& CPEEngineInfoImpl::NetworkRegistrationStatus() const
       
   616     {
       
   617     return iBasicInfo.iNetworkRegistrationStatus;
       
   618     }
       
   619 
       
   620 // -----------------------------------------------------------------------------
       
   621 // CPEEngineInfoImpl::PersonalToneStatus
       
   622 // Gets personal tone status from the TPEBasicInfo structure.
       
   623 // (other items were commented in a header).
       
   624 // -----------------------------------------------------------------------------
       
   625 //
       
   626 const TBool& CPEEngineInfoImpl::PersonalToneStatus() const
       
   627     {
       
   628     return iBasicInfo.iPersonalToneStatus;
       
   629     }
       
   630 
       
   631 // -----------------------------------------------------------------------------
       
   632 // CPEEngineInfoImpl::PhoneIdentityParameters
       
   633 // Gets the phone identity parameters from the TPEBasicInfo structure
       
   634 // -----------------------------------------------------------------------------
       
   635 //
       
   636 const TPEPhoneIdentityParameters& CPEEngineInfoImpl::PhoneIdentityParameters() const
       
   637     {
       
   638     return iBasicInfo.iPhoneIdentityParameters;
       
   639     }
       
   640 
       
   641 // -----------------------------------------------------------------------------
       
   642 // CPEEngineInfoImpl::PhoneNumber
       
   643 // Return the phone number from the TPECallCommandInfo structure.
       
   644 // -----------------------------------------------------------------------------
       
   645 //
       
   646 const TPEPhoneNumber& CPEEngineInfoImpl::PhoneNumber() const
       
   647     {
       
   648     return iCallCommandInfo.iPhoneNumber;
       
   649     }
       
   650 
       
   651 // -----------------------------------------------------------------------------
       
   652 // CPEEngineInfoImpl::PhoneNumberIsServiceCode
       
   653 // Return the phone number parsing result
       
   654 // -----------------------------------------------------------------------------
       
   655 //
       
   656 const TBool& CPEEngineInfoImpl::PhoneNumberIsServiceCode() const
       
   657     {
       
   658     return iBasicInfo.iPhoneNumberIsServiceCode;
       
   659     }
       
   660 
       
   661 // -----------------------------------------------------------------------------
       
   662 // CPEEngineInfoImpl::CallOriginCommand
       
   663 // Gets call origin for next call attempt
       
   664 // -----------------------------------------------------------------------------
       
   665 //
       
   666 const TPECallOrigin& CPEEngineInfoImpl::CallOriginCommand() const
       
   667     {
       
   668     return iCallCommandInfo.iCallOrigin;
       
   669     }
       
   670             
       
   671 // CPEEngineInfoImpl::ProfileId
       
   672 // Gets the profile id from the TPEBasicInfo structure.
       
   673 // -----------------------------------------------------------------------------
       
   674 //
       
   675 const TInt& CPEEngineInfoImpl::ProfileId() const
       
   676     {
       
   677     return iBasicInfo.iProfileId;
       
   678     }
       
   679 
       
   680 // -----------------------------------------------------------------------------
       
   681 // CPEEngineInfoImpl::ProfileName
       
   682 // Gets the profile name from the TPEBasicInfo structure.
       
   683 // -----------------------------------------------------------------------------
       
   684 //
       
   685 const TPEProfileName& CPEEngineInfoImpl::ProfileName() const
       
   686     {
       
   687     return iBasicInfo.iProfileName;
       
   688     }
       
   689 
       
   690 // -----------------------------------------------------------------------------
       
   691 // CPEEngineInfoImpl::RemoteIdentity
       
   692 // Gets the remote identity from the TPEBasicInfo structure.
       
   693 // -----------------------------------------------------------------------------
       
   694 //
       
   695 RMobileCall::TMobileCallRemoteIdentityStatus CPEEngineInfoImpl::RemoteIdentity(
       
   696         const TInt aCallId ) const
       
   697     {
       
   698     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   699     return iCurrentCalls[ aCallId ]->RemoteIdentity();
       
   700     }
       
   701 
       
   702 // -----------------------------------------------------------------------------
       
   703 // CPEEngineInfoImpl::RingingTone
       
   704 // Gets the ringing tone file name from the TPEBasicInfo structure.
       
   705 // -----------------------------------------------------------------------------
       
   706 // 
       
   707 const TPEContactFileName& CPEEngineInfoImpl::RingingTone(
       
   708         const TInt& aCallId ) const
       
   709     {
       
   710     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   711 
       
   712     if ( iCurrentCalls[aCallId]->AlsLine() == CCCECallParameters::ECCELineTypeAux )
       
   713         {
       
   714         return iBasicInfo.iRingingToneName2;
       
   715         }
       
   716     else if ( EPECallTypeVideo == iCurrentCalls[aCallId]->CallType() )
       
   717         {
       
   718         return iBasicInfo.iVideoCallRingingTone;
       
   719         }
       
   720     else
       
   721         {
       
   722         return iBasicInfo.iRingingToneName1;
       
   723         }
       
   724     }
       
   725     
       
   726 // -----------------------------------------------------------------------------
       
   727 // CPEEngineInfoImpl::RingingType 
       
   728 // Gets the ringingtype.
       
   729 // (other items were commented in a header).
       
   730 // -----------------------------------------------------------------------------
       
   731 //
       
   732 const TProfileRingingType& CPEEngineInfoImpl::RingingType() const
       
   733     {
       
   734     return iBasicInfo.iRingingType;
       
   735     }
       
   736     
       
   737 // -----------------------------------------------------------------------------
       
   738 // CPEEngineInfoImpl::RingingVolume
       
   739 // Gets the ringing volume.
       
   740 // (other items were commented in a header).
       
   741 // -----------------------------------------------------------------------------
       
   742 //
       
   743 const TInt& CPEEngineInfoImpl::RingingVolume() const
       
   744     {
       
   745     return iBasicInfo.iRingingVolume;
       
   746     }
       
   747 
       
   748 // -----------------------------------------------------------------------------
       
   749 // CPEEngineInfoImpl::TextToSpeech
       
   750 // Return the status of the text-to-speech preference setting.
       
   751 // (other items were commented in a header).
       
   752 // -----------------------------------------------------------------------------
       
   753 //
       
   754 const TBool& CPEEngineInfoImpl::TextToSpeech() const
       
   755     {
       
   756     return iBasicInfo.iTextToSpeech;
       
   757     }
       
   758 
       
   759 // -----------------------------------------------------------------------------
       
   760 // CPEEngineInfoImpl::UserToUserInformation
       
   761 // Return User to user information
       
   762 // (other items were commented in a header).
       
   763 // -----------------------------------------------------------------------------
       
   764 //    
       
   765 const TPEUserToUserInfo& CPEEngineInfoImpl::UserToUserInformation() const
       
   766     {
       
   767     return iCallCommandInfo.iUserToUserInfo;
       
   768     }
       
   769 
       
   770 // -----------------------------------------------------------------------------
       
   771 // CPEEngineInfoImpl::SetALSLine
       
   772 // Sets active als line value to the TPEBasicInfo structure
       
   773 // (other items were commented in a header).
       
   774 // -----------------------------------------------------------------------------
       
   775 //
       
   776 void CPEEngineInfoImpl::SetALSLine( 
       
   777     const CCCECallParameters::TCCELineType& aALSLine ) 
       
   778     {
       
   779     TEFLOGSTRING2( KTAINT, 
       
   780         "PE CPEEngineInfoImpl::SetALSLine: aALSLine: %d", aALSLine );
       
   781     __ASSERT_ALWAYS( ( CCCECallParameters::ECCELineTypePrimary <= aALSLine && aALSLine <= CCCECallParameters::ECCELineTypeAux ), 
       
   782         Panic( EPEPanicInvalidParameter ) );
       
   783     iBasicInfo.iALSLine = aALSLine;
       
   784     }
       
   785 
       
   786 
       
   787 // -----------------------------------------------------------------------------
       
   788 // CPEEngineInfoImpl::SetALSLine
       
   789 // Sets active als line value to the TPEBasicInfo structure
       
   790 // (other items were commented in a header).
       
   791 // -----------------------------------------------------------------------------
       
   792 //
       
   793 void CPEEngineInfoImpl::SetALSLineSupport( 
       
   794     const TBool& aALSLineSupport ) 
       
   795     {
       
   796     TEFLOGSTRING2( KTAINT, 
       
   797         "PE CPEEngineInfoImpl::ALSLineSupport: aALSLineSupport: %d", aALSLineSupport );
       
   798     iBasicInfo.iALSLineSupport = aALSLineSupport;
       
   799     }
       
   800     
       
   801 // -----------------------------------------------------------------------------
       
   802 // CPEEngineInfoImpl::SetAudioMuteCommand
       
   803 // Sets audio mode of the phone to the TPEBasicInfo structure.
       
   804 // (other items were commented in a header).
       
   805 // -----------------------------------------------------------------------------
       
   806 //
       
   807 void CPEEngineInfoImpl::SetAudioMuteCommand( 
       
   808         const TBool& aAudioMute )
       
   809     {
       
   810     TEFLOGSTRING2( KTAINT, 
       
   811         "PE CPEEngineInfoImpl::SetAudioMuteCommand, mute: %d", aAudioMute );
       
   812     iCallCommandInfo.iAudioMute = aAudioMute;
       
   813     }
       
   814 
       
   815 // -----------------------------------------------------------------------------
       
   816 // CPEEngineInfoImpl::SetAudioOutputCommand
       
   817 // Sets audio output path to the TPECallCommandInfo structure.
       
   818 // (other items were commented in a header).
       
   819 // -----------------------------------------------------------------------------
       
   820 //
       
   821 void CPEEngineInfoImpl::SetAudioOutputCommand( 
       
   822         const TPEAudioOutput& aOutput,
       
   823         const TBool aShowNote
       
   824          )
       
   825     {
       
   826     TEFLOGSTRING2( KTAINT, 
       
   827         "PE CPEEngineInfoImpl::SetAudioOutputCommand, output: %d", aOutput );
       
   828     __ASSERT_ALWAYS( ( EPENotActive <= aOutput && 
       
   829         aOutput <= EPETTY ), Panic( EPEPanicInvalidParameter ) );
       
   830     iCallCommandInfo.iAudioOutput = aOutput;
       
   831     iCallCommandInfo.iShowNote = aShowNote;
       
   832     }
       
   833 
       
   834 // -----------------------------------------------------------------------------
       
   835 // CPEEngineInfoImpl::SetAudioVolumeCommand
       
   836 // Sets audio mode of the phone to the TPEBasicInfo structure.
       
   837 // (other items were commented in a header).
       
   838 // -----------------------------------------------------------------------------
       
   839 //
       
   840 void CPEEngineInfoImpl::SetAudioVolumeCommand( 
       
   841         const TInt& aAudioVolume )
       
   842     {
       
   843     TEFLOGSTRING2( KTAINT, 
       
   844         "PE CPEEngineInfoImpl::SetAudioVolumeCommand, volume: %d", aAudioVolume );
       
   845     // No need to check that, is parameter value correct. Maximun value is 
       
   846     // platform depended. If the volume is not within this range, the volume 
       
   847     // is automatically set to minimum or maximum value based on the value 
       
   848     // that is being passed (by CMMFDevSound ).
       
   849     iCallCommandInfo.iAudioVolume = aAudioVolume;
       
   850     }
       
   851 
       
   852 // -----------------------------------------------------------------------------
       
   853 // CPEEngineInfoImpl::SetCallClientInformation
       
   854 // Sets phone client information to the TPECallInfo structure.
       
   855 // (other items were commented in a header).
       
   856 // -----------------------------------------------------------------------------
       
   857 //
       
   858 void CPEEngineInfoImpl::SetCallClientInformation( 
       
   859         const MPEClientInformation& aClientInformation, 
       
   860         const TInt aCallId )
       
   861     {
       
   862     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   863     iCurrentCalls[ aCallId ]->ClientInformation().Set( aClientInformation );
       
   864     }
       
   865 
       
   866 // -----------------------------------------------------------------------------
       
   867 // CPEEngineInfoImpl::SetCallDirection
       
   868 // Sets the call direction to the TPECallInfo structure.
       
   869 // (other items were commented in a header).
       
   870 // -----------------------------------------------------------------------------
       
   871 //
       
   872 void CPEEngineInfoImpl::SetCallDirection( 
       
   873         const RMobileCall::TMobileCallDirection& aCallDirection, 
       
   874         const TInt aCallId )
       
   875     {
       
   876     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   877     __ASSERT_ALWAYS( ( RMobileCall::EDirectionUnknown <= aCallDirection && 
       
   878         aCallDirection <= RMobileCall::EMobileTerminated ), Panic( EPEPanicInvalidParameter ) );
       
   879     iCurrentCalls[ aCallId ]->SetCallDirection( aCallDirection );
       
   880     }
       
   881 
       
   882 // -----------------------------------------------------------------------------
       
   883 // CPEEngineInfoImpl::SetCallDuration
       
   884 // Sets the duration of the call to the TPECallInfo structure.
       
   885 // (other items were commented in a header).
       
   886 // -----------------------------------------------------------------------------
       
   887 //
       
   888 void CPEEngineInfoImpl::SetCallDuration( 
       
   889         const TTimeIntervalSeconds& aCallDuration,  
       
   890         const TInt aCallId )
       
   891     {
       
   892     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   893     iCurrentCalls[ aCallId ]->SetDuration( aCallDuration );
       
   894     }
       
   895 
       
   896 // -----------------------------------------------------------------------------
       
   897 // CPEEngineInfoImpl::SetCallId
       
   898 // Sets the identification number of the call to the TPECallCommandInfo structure
       
   899 // (other items were commented in a header).
       
   900 // -----------------------------------------------------------------------------
       
   901 //
       
   902 void CPEEngineInfoImpl::SetCallId( 
       
   903         const TInt& aCallId )
       
   904     {
       
   905     __ASSERT_ALWAYS( CallIdCheck::IsValid( aCallId ), 
       
   906         Panic( EPEPanicCallIndexOutOfRange ) );
       
   907     iCallCommandInfo.iCallId = aCallId;
       
   908     }
       
   909 
       
   910 // -----------------------------------------------------------------------------
       
   911 // CPEEngineInfoImpl::SetCallStartTime
       
   912 // Sets the start time of the call to the TPECallInfo structure.
       
   913 // (other items were commented in a header).
       
   914 // -----------------------------------------------------------------------------
       
   915 //
       
   916 void CPEEngineInfoImpl::SetCallStartTime( 
       
   917         const TTime& aCallStartTime,
       
   918         const TInt aCallId )
       
   919     {
       
   920     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   921     iCurrentCalls[ aCallId ]->SetStartTime( aCallStartTime );
       
   922     }
       
   923 
       
   924 // -----------------------------------------------------------------------------
       
   925 // CPEEngineInfoImpl::SetCallState
       
   926 // Sets the state of the call to the TPECallInfo structure.
       
   927 // (other items were commented in a header).
       
   928 // -----------------------------------------------------------------------------
       
   929 //
       
   930 void CPEEngineInfoImpl::SetCallState( 
       
   931         const TPEState& aCallState, 
       
   932         const TInt aCallId )
       
   933     {
       
   934     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   935     __ASSERT_ALWAYS( !( aCallState > EPEStateMaximumState ), 
       
   936         Panic( EPEPanicInvalidParameter ) );
       
   937     iCurrentCalls[ aCallId ]->SetCallState( aCallState );
       
   938     }
       
   939 
       
   940 // -----------------------------------------------------------------------------
       
   941 // CPEEngineInfoImpl::SetCallType
       
   942 // Sets the type of the call.
       
   943 // -----------------------------------------------------------------------------
       
   944 //
       
   945 void CPEEngineInfoImpl::SetCallType( 
       
   946         const TPECallType& aCallType,   
       
   947         const TInt aCallId )
       
   948     {
       
   949     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
   950     __ASSERT_ALWAYS( ( EPECallTypeUninitialized <= aCallType &&
       
   951         aCallType <= EPECallTypeVoIP ), Panic( EPEPanicInvalidParameter ) );
       
   952     iCurrentCalls[ aCallId ]->SetCallType( aCallType );
       
   953     TEFLOGSTRING3( KTAINT, 
       
   954         "PE CPEEngineInfoImpl::SetCallType: call id: %d , aCallType: %d"
       
   955         ,aCallId ,aCallType );
       
   956     }
       
   957 
       
   958 // -----------------------------------------------------------------------------
       
   959 // CPEEngineInfoImpl::SetCallTypeCommand
       
   960 // Sets call type information for following command message
       
   961 // -----------------------------------------------------------------------------
       
   962 //
       
   963 void CPEEngineInfoImpl::SetCallTypeCommand( 
       
   964         const TPECallType& aCallType )
       
   965     {
       
   966     __ASSERT_ALWAYS( ( EPECallTypeUninitialized <= aCallType &&
       
   967         aCallType <= EPECallTypeVoIP ), Panic( EPEPanicInvalidParameter ) );
       
   968     iCallCommandInfo.iCallType = aCallType;
       
   969     }
       
   970 
       
   971 // -----------------------------------------------------------------------------
       
   972 // CPEEngineInfoImpl::SetConferenceCallState
       
   973 // -----------------------------------------------------------------------------
       
   974 //
       
   975 void CPEEngineInfoImpl::SetConferenceCallState(
       
   976         const TPEState& aCallState )
       
   977     {
       
   978     __ASSERT_ALWAYS( !( aCallState > EPEStateMaximumState ), 
       
   979         Panic( EPEPanicInvalidParameter ) );
       
   980     iConferenceCallInfo.iConferenceCallState = aCallState;
       
   981     }
       
   982 
       
   983 
       
   984 
       
   985 // -----------------------------------------------------------------------------
       
   986 // CPEEngineInfoImpl::SetDataPortName
       
   987 // Sets the name of data port currently on-loan.
       
   988 // -----------------------------------------------------------------------------
       
   989 //
       
   990 void CPEEngineInfoImpl::SetDataPortName(
       
   991         const TName& aDataPortName )
       
   992     {
       
   993     TEFLOGSTRING2( KTAINT, 
       
   994         "PE CPEEngineInfoImpl::SetDataPortName: dataport name = %S", &aDataPortName );
       
   995     iBasicInfo.iDataPortName = aDataPortName;
       
   996     }
       
   997     
       
   998 // -----------------------------------------------------------------------------
       
   999 // CPEEngineInfoImpl::SetDtmfStringCommand
       
  1000 // Sets the dtmf string value to the TPECommandInfo structure.
       
  1001 // (other items were commented in a header).
       
  1002 // -----------------------------------------------------------------------------
       
  1003 //
       
  1004 void CPEEngineInfoImpl::SetDtmfStringCommand( 
       
  1005         const TPEDtmfString& aDtmfString )
       
  1006     {
       
  1007     __ASSERT_DEBUG( !( aDtmfString.Length() > KPEDtmfMaxLength ),
       
  1008         Panic( EPEPanicInvalidParameter ) );
       
  1009     iCallCommandInfo.iDtmfString = aDtmfString;
       
  1010     }
       
  1011 
       
  1012 // -----------------------------------------------------------------------------
       
  1013 // CPEEngineInfoImpl::SetKeyCode
       
  1014 // Sets the key code value to the TPECallCommandInfo structure.
       
  1015 // -----------------------------------------------------------------------------
       
  1016 //
       
  1017 void CPEEngineInfoImpl::SetKeyCode( 
       
  1018         const TChar& aKeyCode )
       
  1019     {
       
  1020     iCallCommandInfo.iKeyCode = aKeyCode;
       
  1021     }
       
  1022     
       
  1023 // -----------------------------------------------------------------------------
       
  1024 // CPEEngineInfoImpl::SetLoggingIndicator
       
  1025 // Set logging indicator to TPECallInfo.
       
  1026 // -----------------------------------------------------------------------------
       
  1027 //
       
  1028 void CPEEngineInfoImpl::SetLoggingIndicator(
       
  1029         const TBool aLoggingIndicator, 
       
  1030         const TInt aCallId )
       
  1031     {
       
  1032     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1033     __ASSERT_ALWAYS( !CallIdCheck::IsConference( aCallId ), Panic( EPEPanicCallIndexOutOfRange ) );
       
  1034     iCurrentCalls[ aCallId ]->SetLoggingEnabled( aLoggingIndicator );
       
  1035     TEFLOGSTRING3( KTAINT, 
       
  1036         "PE CPEEngineInfoImpl::SetLoggingIndicator: call id: %d , iLoggingEnabled: %d"
       
  1037         ,aCallId ,aLoggingIndicator );
       
  1038     }
       
  1039 
       
  1040 // -----------------------------------------------------------------------------
       
  1041 // CPEEngineInfoImpl::SetMissedCall
       
  1042 // Set missed call indicator to TPECallInfo.
       
  1043 // -----------------------------------------------------------------------------
       
  1044 //
       
  1045 void CPEEngineInfoImpl::SetMissedCall(
       
  1046         const TBool& aMissedCall,    
       
  1047         const TInt aCallId )
       
  1048     {
       
  1049     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1050     __ASSERT_ALWAYS( !CallIdCheck::IsConference( aCallId ), Panic( EPEPanicCallIndexOutOfRange ) );
       
  1051     iCurrentCalls[ aCallId ]->SetMissedCall( aMissedCall );
       
  1052     }
       
  1053     
       
  1054 // -----------------------------------------------------------------------------
       
  1055 // CPEEngineInfoImpl::SetPhoneNumber
       
  1056 // Sets the phone number to the TPECallCommandInfo structure.
       
  1057 // -----------------------------------------------------------------------------
       
  1058 //
       
  1059 void CPEEngineInfoImpl::SetPhoneNumber( 
       
  1060         const TPEPhoneNumber& aPhoneNumber )
       
  1061     {
       
  1062     __ASSERT_DEBUG( !( aPhoneNumber.Length() > KPEPhoneNumberMaxLength ),
       
  1063         Panic( EPEPanicExternalDataIdOutOfRange ) );
       
  1064     iCallCommandInfo.iPhoneNumber = aPhoneNumber;
       
  1065     }
       
  1066 
       
  1067 // -----------------------------------------------------------------------------
       
  1068 // CPEEngineInfoImpl::SetRemoteIdentity
       
  1069 // Sets the remote party status to the TPECallInfo structure.
       
  1070 // -----------------------------------------------------------------------------
       
  1071 //
       
  1072 void CPEEngineInfoImpl::SetRemoteIdentity( 
       
  1073     const RMobileCall::TMobileCallRemoteIdentityStatus& aIdentity, 
       
  1074     const TInt aCallId )
       
  1075     {
       
  1076     TEFLOGSTRING2( KTAINT, 
       
  1077         "PE CPEEngineInfoImpl::SetRemoteIdentity: aIdentity = %d", aIdentity );
       
  1078     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1079     __ASSERT_ALWAYS( ( RMobileCall::ERemoteIdentityUnknown <= aIdentity &&
       
  1080         aIdentity <= RMobileCall::ERemoteIdentityAvailableNoCliUnavailable ), 
       
  1081         Panic( EPEPanicInvalidParameter ) );    
       
  1082     iCurrentCalls[ aCallId ]->SetRemoteIdentity( aIdentity );
       
  1083     }
       
  1084 
       
  1085 // -----------------------------------------------------------------------------
       
  1086 // CPEEngineInfoImpl::TwoDigitSupportStatus
       
  1087 // Return the status of the two dial digit.
       
  1088 // (other items were commented in a header).
       
  1089 // -----------------------------------------------------------------------------
       
  1090 //
       
  1091 
       
  1092 const TBool& CPEEngineInfoImpl::TwoDigitSupportStatus() const
       
  1093     {
       
  1094     return iBasicInfo.iTwoDigitSupportStatus;
       
  1095     }
       
  1096 
       
  1097 // -----------------------------------------------------------------------------
       
  1098 // CPEEngineInfoImpl::VoiceMailBoxNumberLine1
       
  1099 // Gets the VoiceMailBoxNumber for line 1.
       
  1100 // (other items were commented in a header).
       
  1101 // -----------------------------------------------------------------------------
       
  1102 //
       
  1103 const TPEPhoneNumber& CPEEngineInfoImpl::VoiceMailBoxNumberLine1() const
       
  1104     {
       
  1105     return iBasicInfo.iVMBXNumbers.iVMBXL1;
       
  1106     }
       
  1107 
       
  1108 // -----------------------------------------------------------------------------
       
  1109 // CPEEngineInfoImpl::VoiceMailBoxNumberLine2
       
  1110 // Gets the VoiceMailBoxNumber for line 2.
       
  1111 // (other items were commented in a header).
       
  1112 // -----------------------------------------------------------------------------
       
  1113 //
       
  1114 const TPEPhoneNumber& CPEEngineInfoImpl::VoiceMailBoxNumberLine2() const
       
  1115     {
       
  1116     return iBasicInfo.iVMBXNumbers.iVMBXL2;
       
  1117     }
       
  1118     
       
  1119 // -----------------------------------------------------------------------------
       
  1120 // CPEEngienInfo::DTMFVoiceMailBoxNumberLine1
       
  1121 // Gets the DTMFVoiceMailBoxNumber for line 1.
       
  1122 // (other items were commented in a header).
       
  1123 // -----------------------------------------------------------------------------
       
  1124 //
       
  1125 const TPEPhoneNumber& CPEEngineInfoImpl::DTMFVoiceMailBoxNumberLine1() const
       
  1126     {
       
  1127     return iBasicInfo.iVMBXNumbers.iDTMFVMBXL1;
       
  1128     }
       
  1129 
       
  1130 // -----------------------------------------------------------------------------
       
  1131 // CPEEngienInfo::DTMFVoiceMailBoxNumberLine2
       
  1132 // Gets the DTMFVoiceMailBoxNumber for line 2.
       
  1133 // -----------------------------------------------------------------------------
       
  1134 //
       
  1135 const TPEPhoneNumber& CPEEngineInfoImpl::DTMFVoiceMailBoxNumberLine2() const
       
  1136     {
       
  1137     return iBasicInfo.iVMBXNumbers.iDTMFVMBXL2;
       
  1138     }    
       
  1139 
       
  1140 // -----------------------------------------------------------------------------
       
  1141 // CPEEngineInfoImpl::SetAlertForGroup
       
  1142 // Set the group id's which are active to play ring tone
       
  1143 // -----------------------------------------------------------------------------
       
  1144 //
       
  1145 void CPEEngineInfoImpl::SetAlertForGroup(
       
  1146         const TArray< TContactItemId >& aAlertForGroup ) 
       
  1147     {
       
  1148     TInt errorCode( KErrNone );
       
  1149 
       
  1150     iAlertForGroup.Reset();
       
  1151     for ( TInt i = 0; i < aAlertForGroup.Count(); i++ )
       
  1152         {
       
  1153         errorCode = iAlertForGroup.Append( aAlertForGroup[ i ] );
       
  1154         TEFLOGSTRING3( 
       
  1155             KTAINT, 
       
  1156             "PE CPEEngineInfoImpl::SetAlertForGroup, index: %d, alert for: %d", 
       
  1157             i, 
       
  1158             aAlertForGroup[ i ] );
       
  1159         }
       
  1160     if ( errorCode != KErrNone )
       
  1161         {
       
  1162         TEFLOGSTRING2( KTAERROR,
       
  1163             "CPEENGINEINFOIMPL::SETALERTFORGROUP ! RARRAY::APPEND FAILED WITH EXIT CODE: &d",
       
  1164             errorCode );
       
  1165         iAlertForGroup.Reset();
       
  1166         }
       
  1167     }
       
  1168 
       
  1169 // -----------------------------------------------------------------------------
       
  1170 // CPEEngineInfoImpl::SetAudioMute
       
  1171 // Sets audio mute state of the phone to TPEBasicInfo-structure
       
  1172 // -----------------------------------------------------------------------------
       
  1173 //
       
  1174 void CPEEngineInfoImpl::SetAudioMute(
       
  1175         const TBool aAudioMute ) 
       
  1176     {
       
  1177     iBasicInfo.iAudioMute = aAudioMute; 
       
  1178     }
       
  1179 
       
  1180 // -----------------------------------------------------------------------------
       
  1181 // CPEEngineInfoImpl::SetAudioOutput
       
  1182 // Sets hands free mode of the phone to TPEBasicInfo-structure
       
  1183 // -----------------------------------------------------------------------------
       
  1184 //
       
  1185 void CPEEngineInfoImpl::SetAudioOutput(
       
  1186         const TPEAudioOutput aOutput,
       
  1187         const TPEAudioOutput aPreviousOutput,
       
  1188         const TBool aShowNote ) 
       
  1189     {
       
  1190     TEFLOGSTRING2( KTAINT, 
       
  1191         "PE CPEEngineInfoImpl::SetAudioOutput, output: %d", aOutput );
       
  1192     __ASSERT_ALWAYS( ( EPENotActive <= aOutput && 
       
  1193         aOutput <= EPETTY ), Panic( EPEPanicInvalidParameter ) );
       
  1194     iBasicInfo.iPhoneAudioRouteParameters.iAudioOutput = aOutput;
       
  1195     iBasicInfo.iPhoneAudioRouteParameters.iPreviousOutput = aPreviousOutput;
       
  1196     iBasicInfo.iPhoneAudioRouteParameters.iShowNote = aShowNote;
       
  1197     }
       
  1198 
       
  1199 // -----------------------------------------------------------------------------
       
  1200 // CPEEngineInfoImpl::SetAvailableAudioOutputs
       
  1201 // Sets hands free mode of the phone to TPEBasicInfo-structure
       
  1202 // -----------------------------------------------------------------------------
       
  1203 //
       
  1204 void CPEEngineInfoImpl::SetAvailableAudioOutputs(
       
  1205         const TArray<TPEAudioOutput>& aAvailableOutputs ) 
       
  1206     {
       
  1207     TEFLOGSTRING( KTAINT, "PE CPEEngineInfoImpl::SetAvailableAudioOutputs" );
       
  1208     // reset the array
       
  1209     iAvailableAudioOutputs.Reset();
       
  1210 
       
  1211     // set the available outputs
       
  1212     for (TInt j = 0; j < aAvailableOutputs.Count(); j++)
       
  1213         {
       
  1214         iAvailableAudioOutputs[j] = aAvailableOutputs[j];
       
  1215         TEFLOGSTRING3( 
       
  1216             KTAINT, 
       
  1217             "PE CPEEngineInfoImpl::SetAvailableAudioOutputs, index: %d, available: %d", 
       
  1218             j, 
       
  1219             aAvailableOutputs[j] );
       
  1220         }
       
  1221     TEFLOGSTRING( KTAINT, "PE CPEEngineInfoImpl::SetAvailableAudioOutputs:  Done" );    
       
  1222     }
       
  1223 
       
  1224 // -----------------------------------------------------------------------------
       
  1225 // CPEEngineInfoImpl::SetAudioOutputPreference
       
  1226 // Sets audio output preference to TPEBasicInfo-structure
       
  1227 // -----------------------------------------------------------------------------
       
  1228 //
       
  1229 void CPEEngineInfoImpl::SetAudioOutputPreference(
       
  1230         const TInt aOutputPreference )
       
  1231     {    
       
  1232     TEFLOGSTRING2( KTAINT, 
       
  1233         "PE CPEEngineInfoImpl::SetAudioOutputPreference, value: %d", 
       
  1234         aOutputPreference );    
       
  1235     __ASSERT_ALWAYS( !( aOutputPreference != EPSAudioPrivate && 
       
  1236         aOutputPreference != EPSAudioPublic ), Panic( EPEPanicInvalidParameter ) );
       
  1237     iBasicInfo.iAudioOutputPreference = aOutputPreference;
       
  1238     }
       
  1239 
       
  1240 // -----------------------------------------------------------------------------
       
  1241 // CPEEngineInfoImpl::SetAudioVolume
       
  1242 // Sets audio volume of the phone to TPEBasicInfo-structure
       
  1243 // -----------------------------------------------------------------------------
       
  1244 //
       
  1245 void CPEEngineInfoImpl::SetAudioVolume(
       
  1246         const TInt aAudioVolume )
       
  1247     {
       
  1248     TEFLOGSTRING2( KTAINT, 
       
  1249         "PE CPEEngineInfoImpl::SetAudioVolume, volume: %d", aAudioVolume );
       
  1250     iBasicInfo.iAudioVolume = aAudioVolume;
       
  1251     }
       
  1252     
       
  1253 // -----------------------------------------------------------------------------
       
  1254 // CPEEngineInfoImpl::SetCallALSLine
       
  1255 // Sets the alsline value to the TPECallInfo structure.
       
  1256 // -----------------------------------------------------------------------------
       
  1257 //
       
  1258 void CPEEngineInfoImpl::SetCallALSLine( 
       
  1259         const CCCECallParameters::TCCELineType& aALSLine,
       
  1260         const TInt aCallId )
       
  1261     {
       
  1262     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1263     __ASSERT_ALWAYS( ( CCCECallParameters::ECCELineTypePrimary <= aALSLine && aALSLine <= CCCECallParameters::ECCELineTypeAux ),
       
  1264         Panic( EPEPanicInvalidParameter ) );
       
  1265     iCurrentCalls[ aCallId ]->SetAlsLine( aALSLine );
       
  1266     TEFLOGSTRING3( KTAINT, 
       
  1267         "PE CPEEngineInfoImpl::SetCallALSLine: line: %d, call id: %d", 
       
  1268         iCurrentCalls[ aCallId ]->AlsLine(), 
       
  1269         aCallId );
       
  1270     }    
       
  1271 
       
  1272 // -----------------------------------------------------------------------------
       
  1273 // CPEEngineInfoImpl::SetCallDuration
       
  1274 // Sets call duration of the last call to Idle to TPEBasicInfo-structure
       
  1275 // -----------------------------------------------------------------------------
       
  1276 //
       
  1277 void CPEEngineInfoImpl::SetCallDuration(
       
  1278         const TInt& aCallDuration ) 
       
  1279     {
       
  1280     iBasicInfo.iLastCallDuration = aCallDuration; 
       
  1281     }
       
  1282     
       
  1283 // -----------------------------------------------------------------------------
       
  1284 // CPEEngineInfoImpl::SetDtmfPostFix
       
  1285 // Sets dtmf postfix value to TPEBasicInfo-structure
       
  1286 // -----------------------------------------------------------------------------
       
  1287 //
       
  1288 void CPEEngineInfoImpl::SetDtmfPostFix( 
       
  1289         const TPEDtmfString& aDtmfPostFix,
       
  1290         const TInt aCallId )
       
  1291     {
       
  1292     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1293     __ASSERT_DEBUG( !( aDtmfPostFix.Length() > KPEDtmfMaxLength ),
       
  1294             Panic( EPEPanicInvalidParameter ) );
       
  1295     iCurrentCalls[ aCallId ]->SetDtmfPostFix( aDtmfPostFix );
       
  1296     }
       
  1297 
       
  1298 // -----------------------------------------------------------------------------
       
  1299 // CPEEngineInfoImpl::SetDtmfString
       
  1300 // Sets dtmf string value to TPEBasicInfo-structure
       
  1301 // -----------------------------------------------------------------------------
       
  1302 //
       
  1303 void CPEEngineInfoImpl::SetDtmfString(
       
  1304         const TPEDtmfString& aDtmfString ) 
       
  1305     {
       
  1306     __ASSERT_DEBUG( !( aDtmfString.Length() > KPEDtmfMaxLength ),
       
  1307         Panic( EPEPanicInvalidParameter ) );
       
  1308     iBasicInfo.iDtmfString = aDtmfString; 
       
  1309     }
       
  1310 // -----------------------------------------------------------------------------
       
  1311 // CPEEngineInfoImpl::SetErrorCode
       
  1312 // Sets error code of the phone to TPEBasicInfo-structure
       
  1313 // -----------------------------------------------------------------------------
       
  1314 //
       
  1315 void CPEEngineInfoImpl::SetErrorCode(
       
  1316         const TInt aErrorCode ) 
       
  1317     {
       
  1318     iBasicInfo.iErrorInfo.iErrorCode = aErrorCode; 
       
  1319     }
       
  1320 
       
  1321 // -----------------------------------------------------------------------------
       
  1322 // CPEEngineInfoImpl::SetInbandTone
       
  1323 // Sets correct inband tone for specific call state transition or error
       
  1324 // -----------------------------------------------------------------------------
       
  1325 //
       
  1326 void CPEEngineInfoImpl::SetInbandTone( const TCCPTone aTone ) 
       
  1327     {
       
  1328     iBasicInfo.iInbandTone = aTone; 
       
  1329     }
       
  1330 
       
  1331 // -----------------------------------------------------------------------------
       
  1332 // CPEEngineInfoImpl::SetKeypadVolume
       
  1333 // Sets keypad volume of the phone to TPEBasicInfo-structure
       
  1334 // -----------------------------------------------------------------------------
       
  1335 //
       
  1336 void CPEEngineInfoImpl::SetKeypadVolume(
       
  1337         const TInt aKeypadVolume ) 
       
  1338     {
       
  1339     iBasicInfo.iKeypadVolume = aKeypadVolume; 
       
  1340     }
       
  1341 
       
  1342 // -----------------------------------------------------------------------------
       
  1343 // CPEEngineInfoImpl::SetLifeTimerData
       
  1344 // Sets lifetimer data of the phone to TPELifeTimeData-structure
       
  1345 // -----------------------------------------------------------------------------
       
  1346 //
       
  1347 void CPEEngineInfoImpl::SetLifeTimerData( 
       
  1348         TCCPLifeTimeDataPckg& aPckg )
       
  1349     {
       
  1350     iBasicInfo.iLifeTimeData.iHours = aPckg().iHours;
       
  1351     iBasicInfo.iLifeTimeData.iMinutes = aPckg().iMinutes;
       
  1352     }
       
  1353 
       
  1354 // -----------------------------------------------------------------------------
       
  1355 // CPEEngineInfoImpl::SetNetworkRegistrationStatus
       
  1356 // Sets network registration status to TPEBasicInfo-structure
       
  1357 // -----------------------------------------------------------------------------
       
  1358 //
       
  1359 void CPEEngineInfoImpl::SetNetworkRegistrationStatus(
       
  1360         const TNWNetworkRegistrationStatus& aRegistrationStatus ) 
       
  1361     {
       
  1362     __ASSERT_ALWAYS( ( ENWStatusRegistrationUnknown <= aRegistrationStatus &&
       
  1363         aRegistrationStatus <= ENWStatusRegisteredRoaming ), Panic( EPEPanicInvalidParameter ) );
       
  1364     iBasicInfo.iNetworkRegistrationStatus = aRegistrationStatus;
       
  1365     TEFLOGSTRING2( KTAINT, 
       
  1366         "PE CPEEngineInfoImpl::SetNetworkRegistrationStatus, iNetworkRegistrationStatus: %d", 
       
  1367         iBasicInfo.iNetworkRegistrationStatus );
       
  1368     }
       
  1369 
       
  1370 // -----------------------------------------------------------------------------
       
  1371 // CPEEngineInfoImpl::SetPersonalToneStatus
       
  1372 // Sets personal tone status of the phones profile settings to TPEBasicInfo-structure
       
  1373 // -----------------------------------------------------------------------------
       
  1374 //
       
  1375 void CPEEngineInfoImpl::SetPersonalToneStatus( 
       
  1376         const TInt& aPersonalToneStatus ) 
       
  1377     {
       
  1378     iBasicInfo.iPersonalToneStatus = aPersonalToneStatus; 
       
  1379     }
       
  1380 
       
  1381 // -----------------------------------------------------------------------------
       
  1382 // CPEEngineInfoImpl::SetPhoneIdentityParameters
       
  1383 // Sets phone number to TPECallCommandInfo-structure
       
  1384 // -----------------------------------------------------------------------------
       
  1385 //
       
  1386 void CPEEngineInfoImpl::SetPhoneIdentityParameters(
       
  1387         const TPEPhoneIdentityParameters& aPhoneIdentityParameters ) 
       
  1388     { 
       
  1389     iBasicInfo.iPhoneIdentityParameters = aPhoneIdentityParameters; 
       
  1390     }
       
  1391 
       
  1392 // -----------------------------------------------------------------------------
       
  1393 // CPEEngineInfoImpl::SetPhoneNumberIsServiceCode
       
  1394 // Sets phone number parsing result
       
  1395 // -----------------------------------------------------------------------------
       
  1396 //
       
  1397 void CPEEngineInfoImpl::SetPhoneNumberIsServiceCode( 
       
  1398     const TBool& aServiceCode )
       
  1399     {
       
  1400     iBasicInfo.iPhoneNumberIsServiceCode = aServiceCode;
       
  1401     }
       
  1402 
       
  1403 // -----------------------------------------------------------------------------
       
  1404 // CPEEngineInfoImpl::SetCallOriginCommand
       
  1405 // Sets call origin for the next call attempt
       
  1406 // -----------------------------------------------------------------------------
       
  1407 //
       
  1408 void CPEEngineInfoImpl::SetCallOriginCommand( const TPECallOrigin& aOrigin )
       
  1409     {
       
  1410     iCallCommandInfo.iCallOrigin = aOrigin;
       
  1411     }
       
  1412 
       
  1413 // -----------------------------------------------------------------------------
       
  1414 // CPEEngineInfoImpl::SetProfileId
       
  1415 // Sets profile id to TPEBasicInfo-structure
       
  1416 // (other items were commented in a header).
       
  1417 // -----------------------------------------------------------------------------
       
  1418 //
       
  1419 void CPEEngineInfoImpl::SetProfileId(
       
  1420         const TInt aProfileId ) 
       
  1421     {
       
  1422     iBasicInfo.iProfileId = aProfileId; 
       
  1423     }
       
  1424 
       
  1425 // -----------------------------------------------------------------------------
       
  1426 // CPEEngineInfoImpl::SetProfileName
       
  1427 // Sets profile name to TPEBasicInfo-structure
       
  1428 // (other items were commented in a header).
       
  1429 // -----------------------------------------------------------------------------
       
  1430 //
       
  1431 void CPEEngineInfoImpl::SetProfileName(
       
  1432         const TPEProfileName& aProfileName ) 
       
  1433     {
       
  1434     __ASSERT_DEBUG( !( aProfileName.Length() > KPEProfileNameLength ), Panic( EPEPanicInvalidParameter ) );
       
  1435     iBasicInfo.iProfileName = aProfileName; 
       
  1436     }
       
  1437 
       
  1438 // -----------------------------------------------------------------------------
       
  1439 // CPEEngineInfoImpl::SetRingingTone1
       
  1440 // Sets ringing type to TPEBasicInfo-structure
       
  1441 // (other items were commented in a header).
       
  1442 // -----------------------------------------------------------------------------
       
  1443 //
       
  1444 void CPEEngineInfoImpl::SetRingingTone1(
       
  1445         const TPEContactFileName& aRingingToneName )
       
  1446     {
       
  1447     __ASSERT_DEBUG( !( aRingingToneName.Length() > KMaxFileName ), 
       
  1448         Panic( EPEPanicInvalidParameter ) );
       
  1449     iBasicInfo.iRingingToneName1 = aRingingToneName; 
       
  1450     }
       
  1451     
       
  1452 // -----------------------------------------------------------------------------
       
  1453 // CPEEngineInfoImpl::SetRingingTone2
       
  1454 // Sets ringing type to TPEBasicInfo-structure
       
  1455 // (other items were commented in a header).
       
  1456 // -----------------------------------------------------------------------------
       
  1457 //
       
  1458 void CPEEngineInfoImpl::SetRingingTone2( 
       
  1459         const TPEContactFileName& aRingingToneName )
       
  1460     {
       
  1461     __ASSERT_DEBUG( !( aRingingToneName.Length() > KMaxFileName ), 
       
  1462         Panic( EPEPanicInvalidParameter ) );
       
  1463     iBasicInfo.iRingingToneName2 = aRingingToneName; 
       
  1464     }
       
  1465 
       
  1466 // -----------------------------------------------------------------------------
       
  1467 // CPEEngineInfoImpl::SetVideoCallRingingTone
       
  1468 // Sets video call ringing tone name to TPEBasicInfo-structure
       
  1469 // (other items were commented in a header).
       
  1470 // -----------------------------------------------------------------------------
       
  1471 //
       
  1472 void CPEEngineInfoImpl::SetVideoCallRingingTone( 
       
  1473         const TPEContactFileName& aRingingToneName )
       
  1474     {
       
  1475     __ASSERT_DEBUG( !( aRingingToneName.Length() > KMaxFileName ), 
       
  1476         Panic( EPEPanicInvalidParameter ) );
       
  1477     iBasicInfo.iVideoCallRingingTone = aRingingToneName; 
       
  1478     }
       
  1479     
       
  1480 // -----------------------------------------------------------------------------
       
  1481 // CPEEngineInfoImpl::SetRingingType
       
  1482 // Sets ringing type to TPEBasicInfo-structure
       
  1483 // (other items were commented in a header).
       
  1484 // -----------------------------------------------------------------------------
       
  1485 //
       
  1486 void CPEEngineInfoImpl::SetRingingType(
       
  1487         const TProfileRingingType& aRingingType )
       
  1488     {
       
  1489     __ASSERT_ALWAYS( ( EProfileRingingTypeRinging <= aRingingType && 
       
  1490         aRingingType <= EProfileRingingTypeSilent ), Panic( EPEPanicInvalidParameter ) );
       
  1491     iBasicInfo.iRingingType = aRingingType; 
       
  1492     }
       
  1493 
       
  1494 // -----------------------------------------------------------------------------
       
  1495 // CPEEngineInfoImpl::SetRingingVolume
       
  1496 // Sets ringing volume to TPEBasicInfo-structure
       
  1497 // (other items were commented in a header).
       
  1498 // -----------------------------------------------------------------------------
       
  1499 //
       
  1500 void CPEEngineInfoImpl::SetRingingVolume(
       
  1501         const TInt& aRingingVolume )
       
  1502     {
       
  1503     iBasicInfo.iRingingVolume = aRingingVolume; 
       
  1504     }
       
  1505 
       
  1506 // -----------------------------------------------------------------------------
       
  1507 // CPEEngineInfoImpl::SetTextToSpeech
       
  1508 // Sets text-to-speech of the phone to TPEBasicInfo-structure
       
  1509 // (other items were commented in a header).
       
  1510 // -----------------------------------------------------------------------------
       
  1511 //
       
  1512 void CPEEngineInfoImpl::SetTextToSpeech( 
       
  1513     const TBool aTextToSpeech )
       
  1514     {
       
  1515     iBasicInfo.iTextToSpeech = aTextToSpeech;
       
  1516     }
       
  1517     
       
  1518 // -----------------------------------------------------------------------------
       
  1519 // CPEEngineInfoImpl::SetTwoDigitSupportStatus
       
  1520 // Sets two digit support status of the phone to TPEBasicInfo-structure
       
  1521 // (other items were commented in a header).
       
  1522 // -----------------------------------------------------------------------------
       
  1523 //
       
  1524 void CPEEngineInfoImpl::SetTwoDigitSupportStatus( 
       
  1525     const TBool aTwoDigitSupportStatus )
       
  1526     {
       
  1527     iBasicInfo.iTwoDigitSupportStatus = aTwoDigitSupportStatus;
       
  1528     }
       
  1529     
       
  1530 // -----------------------------------------------------------------------------
       
  1531 // CPEEngineInfoImpl::SetCallSecureStatus
       
  1532 // Sets Secure status to call info
       
  1533 // -----------------------------------------------------------------------------
       
  1534 //
       
  1535 void CPEEngineInfoImpl::SetCallSecureStatus( 
       
  1536     const TBool aSecureStatus, 
       
  1537     const TInt aCallId )
       
  1538     {
       
  1539     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1540     iCurrentCalls[ aCallId ]->SetSecureStatus( aSecureStatus );
       
  1541     TEFLOGSTRING3( KTAINT, 
       
  1542         "PE CPEEngineInfoImpl::SetCallSecureStatus, iSecureStatus: %d, call id: %d", 
       
  1543         iCurrentCalls[ aCallId ]->SecureStatus(), 
       
  1544         aCallId );
       
  1545     }  
       
  1546 
       
  1547 // -----------------------------------------------------------------------------
       
  1548 // CPEEngineInfoImpl::SetSecureSpecified
       
  1549 // Sets Secure status to call info
       
  1550 // -----------------------------------------------------------------------------
       
  1551 //
       
  1552 void CPEEngineInfoImpl::SetSecureSpecified( 
       
  1553     const TBool aSecureSpecified )
       
  1554     {
       
  1555     iBasicInfo.iSecureSpecified = aSecureSpecified;
       
  1556     }  
       
  1557 
       
  1558 // -----------------------------------------------------------------------------
       
  1559 // CPEEngienInfo::SetDTMFVoiceMailBoxNumberLine1
       
  1560 // Sets DTMFVoiceMailBoxNumber for Line 1 information from TPEBasicInfo-structure
       
  1561 // (other items were commented in a header).
       
  1562 // -----------------------------------------------------------------------------
       
  1563 //
       
  1564 void CPEEngineInfoImpl::SetDTMFVoiceMailBoxNumberLine1( 
       
  1565     const TDesC& aDTMFVoiceMailBoxNumberLine1 ) 
       
  1566     { 
       
  1567     __ASSERT_DEBUG( !( aDTMFVoiceMailBoxNumberLine1.Length() 
       
  1568         > KPEPhoneNumberMaxLength ), Panic( EPEPanicInvalidParameter ) );
       
  1569     iBasicInfo.iVMBXNumbers.iDTMFVMBXL1 = aDTMFVoiceMailBoxNumberLine1; 
       
  1570     }
       
  1571 
       
  1572 // -----------------------------------------------------------------------------
       
  1573 // CPEEngienInfo::SetDTMFVoiceMailBoxNumberLine2
       
  1574 // Sets DTMFVoiceMailBoxNumber for Line 2 information from 
       
  1575 // TPEBasicInfo-structure
       
  1576 // -----------------------------------------------------------------------------
       
  1577 //
       
  1578 void CPEEngineInfoImpl::SetDTMFVoiceMailBoxNumberLine2( 
       
  1579     const TDesC& aDTMFVoiceMailBoxNumberLine2 )
       
  1580     {
       
  1581     __ASSERT_DEBUG( !( aDTMFVoiceMailBoxNumberLine2.Length() 
       
  1582         > KPEPhoneNumberMaxLength ), Panic( EPEPanicInvalidParameter ) );
       
  1583     iBasicInfo.iVMBXNumbers.iDTMFVMBXL2 = aDTMFVoiceMailBoxNumberLine2; 
       
  1584     }
       
  1585     
       
  1586 // -----------------------------------------------------------------------------
       
  1587 // CPEEngienInfo::SetVoiceMailBoxNumberLine1
       
  1588 // Gets VoiceMailBoxNumber for Line 1 information from TPEBasicInfo-structure
       
  1589 // (other items were commented in a header).
       
  1590 // -----------------------------------------------------------------------------
       
  1591 //
       
  1592 void CPEEngineInfoImpl::SetVoiceMailBoxNumberLine1( 
       
  1593     const TDesC& aVoiceMailBoxNumberLine1 ) 
       
  1594     {
       
  1595     __ASSERT_DEBUG( !( aVoiceMailBoxNumberLine1.Length() 
       
  1596         > KPEPhoneNumberMaxLength ), Panic( EPEPanicInvalidParameter ) );
       
  1597     iBasicInfo.iVMBXNumbers.iVMBXL1 = aVoiceMailBoxNumberLine1; 
       
  1598     }
       
  1599 
       
  1600 // -----------------------------------------------------------------------------
       
  1601 // CPEEngienInfo::SetVoiceMailBoxNumberLine2
       
  1602 // Gets VoiceMailBoxNumber for Line 2 information from TPEBasicInfo-structure
       
  1603 // (other items were commented in a header).
       
  1604 // -----------------------------------------------------------------------------
       
  1605 //
       
  1606 void CPEEngineInfoImpl::SetVoiceMailBoxNumberLine2( 
       
  1607     const TDesC& aVoiceMailBoxNumberLine2 )
       
  1608     {
       
  1609     __ASSERT_DEBUG( !( aVoiceMailBoxNumberLine2.Length() 
       
  1610         > KPEPhoneNumberMaxLength ), Panic( EPEPanicInvalidParameter ) );
       
  1611     iBasicInfo.iVMBXNumbers.iVMBXL2 = aVoiceMailBoxNumberLine2; 
       
  1612     }
       
  1613     
       
  1614 // -----------------------------------------------------------------------------
       
  1615 // CPEEngineInfoImpl::SetLogForcedCopletion
       
  1616 // Set the log forced completion indicator.
       
  1617 // (other items were commented in a header).
       
  1618 // -----------------------------------------------------------------------------
       
  1619 //
       
  1620 void CPEEngineInfoImpl::SetLogForcedCompletion(
       
  1621     const TBool aForcedCompletion,  
       
  1622     const TInt aCallId )
       
  1623     {
       
  1624     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1625     iCurrentCalls[ aCallId ]->SetLogForcedCompletion( aForcedCompletion );
       
  1626     }    
       
  1627 
       
  1628 // -----------------------------------------------------------------------------
       
  1629 // CPEEngineInfoImpl::GetLogForcedCompletion
       
  1630 // Gets the log forced completion indicator
       
  1631 // (other items were commented in a header).
       
  1632 // -----------------------------------------------------------------------------
       
  1633 //
       
  1634 TBool CPEEngineInfoImpl::LogForcedCompletion( 
       
  1635     const TInt aCallId ) const
       
  1636     {
       
  1637     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1638     return iCurrentCalls[ aCallId ]->LogForcedCompletion();
       
  1639     }
       
  1640    
       
  1641 // -----------------------------------------------------------------------------
       
  1642 // CPEEngineInfoImpl::SetPhoneNumber
       
  1643 // Sets the phone number to the TPECallCommandInfo structure.
       
  1644 // (other items were commented in a header).
       
  1645 // -----------------------------------------------------------------------------
       
  1646 //
       
  1647 void CPEEngineInfoImpl::SetWholeOutgoingPhoneNumber( 
       
  1648         const TPEPhoneNumber& aPhoneNumber, 
       
  1649         const TInt aCallId )
       
  1650     {
       
  1651     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1652     __ASSERT_DEBUG( !( aPhoneNumber.Length() > KPEPhoneNumberMaxLength ),
       
  1653         Panic( EPEPanicInvalidParameter ) );
       
  1654     iCurrentCalls[ aCallId ]->SetWholeOutgoingPhoneNumber( aPhoneNumber );
       
  1655     TEFLOGSTRING3( KTAINT, 
       
  1656         "PE CPEEngineInfoImpl::SetWholeOutgoingPhoneNumber: phone number: '%S', call id: %d"
       
  1657         , &iCurrentCalls[ aCallId ]->WholeOutgoingPhoneNumber(), aCallId );
       
  1658     }
       
  1659     
       
  1660 // -----------------------------------------------------------------------------
       
  1661 // CPEEngineInfoImpl::PhoneNumber
       
  1662 // Return the phone number from the TPECallCommandInfo structure.
       
  1663 // (other items were commented in a header).
       
  1664 // -----------------------------------------------------------------------------
       
  1665 //
       
  1666 const TPEPhoneNumber& CPEEngineInfoImpl::WholeOutgoingPhoneNumber( 
       
  1667         const TInt aCallId ) const
       
  1668     {
       
  1669     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1670     return iCurrentCalls[ aCallId ]->WholeOutgoingPhoneNumber();
       
  1671     }
       
  1672                 
       
  1673 // -----------------------------------------------------------------------------
       
  1674 // CPEEngineInfoImpl::ServiceIdCommand
       
  1675 // Return the Service Id from the TPECallCommandInfo structure.
       
  1676 // -----------------------------------------------------------------------------
       
  1677 //
       
  1678 TUint32 CPEEngineInfoImpl::ServiceIdCommand() const
       
  1679     {
       
  1680     return iCallCommandInfo.iServiceId; 
       
  1681     } 
       
  1682 
       
  1683 // -----------------------------------------------------------------------------
       
  1684 // CPEEngineInfoImpl::SetServiceIdCommand
       
  1685 // Set the Service Id to the TPECallCommandInfo structure.
       
  1686 // -----------------------------------------------------------------------------
       
  1687 //
       
  1688 void CPEEngineInfoImpl::SetServiceIdCommand( TUint32 aServiceId )
       
  1689     {
       
  1690     iCallCommandInfo.iServiceId = aServiceId; 
       
  1691     }
       
  1692                 
       
  1693 // -----------------------------------------------------------------------------
       
  1694 // CPEEngineInfoImpl::ServiceId
       
  1695 // Return the Service Id from the TPECallInfo structure.
       
  1696 // -----------------------------------------------------------------------------
       
  1697 //
       
  1698 TUint32 CPEEngineInfoImpl::ServiceId( const TInt aCallId ) const
       
  1699     {
       
  1700     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1701     return iCurrentCalls[ aCallId ]->CallServiceId(); 
       
  1702     } 
       
  1703 
       
  1704 // -----------------------------------------------------------------------------
       
  1705 // CPEEngineInfoImpl::SetServiceId
       
  1706 // Set the Service Id to the TPECallInfo structure.
       
  1707 // -----------------------------------------------------------------------------
       
  1708 //
       
  1709 void CPEEngineInfoImpl::SetServiceId( const TInt aCallId, TUint32 aServiceId )
       
  1710     {
       
  1711     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1712     iCurrentCalls[ aCallId ]->SetCallServiceId( aServiceId ); 
       
  1713     }
       
  1714     
       
  1715 // -----------------------------------------------------------------------------
       
  1716 // CPEEngineInfoImpl::ActiveForwardingInfo
       
  1717 // Gets active forward info from the TPEBasicInfo structure. 
       
  1718 // (other items were commented in a header).
       
  1719 // -----------------------------------------------------------------------------
       
  1720 //
       
  1721 const TPEActiveForwardInfo& CPEEngineInfoImpl::ActiveForwardingInfo() const
       
  1722     {
       
  1723     return iBasicInfo.iActiveForward;
       
  1724     }
       
  1725 
       
  1726 // -----------------------------------------------------------------------------
       
  1727 // CPEEngineInfoImpl::BarringInfo
       
  1728 // Gets the call barring information.
       
  1729 // (other items were commented in a header).
       
  1730 // -----------------------------------------------------------------------------
       
  1731 //
       
  1732 const TPEBarringInfo& CPEEngineInfoImpl::BarringInfo() const
       
  1733     {
       
  1734     return iBasicInfo.iBarringInfo;
       
  1735     }
       
  1736 
       
  1737 // -----------------------------------------------------------------------------
       
  1738 // CPEEngineInfoImpl::CallConference
       
  1739 // Gets the call's conference value.
       
  1740 // (other items were commented in a header).
       
  1741 // -----------------------------------------------------------------------------
       
  1742 //
       
  1743 TInt CPEEngineInfoImpl::CallConference( const TInt aCallId ) const
       
  1744     {
       
  1745     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1746     return iCurrentCalls[ aCallId ]->Conference();
       
  1747     }
       
  1748 
       
  1749 // -----------------------------------------------------------------------------
       
  1750 // CPEEngineInfoImpl::CallControlCaps
       
  1751 // Gets the call control caps
       
  1752 // (other items were commented in a header).
       
  1753 // -----------------------------------------------------------------------------
       
  1754 //
       
  1755 TPECallControlCaps CPEEngineInfoImpl::CallControlCaps( const TInt aCallId ) const
       
  1756     {
       
  1757     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1758     return iCurrentCalls[ aCallId ]->CallControlCaps();
       
  1759     }
       
  1760 
       
  1761 // -----------------------------------------------------------------------------
       
  1762 // CPEEngineInfoImpl::CallForwarded
       
  1763 // Gets the call forwarded value. 
       
  1764 // (other items were commented in a header).
       
  1765 // -----------------------------------------------------------------------------
       
  1766 //
       
  1767 TBool CPEEngineInfoImpl::CallForwarded( const TInt aCallId ) const
       
  1768     {
       
  1769     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1770     return iCurrentCalls[ aCallId ]->Forwarded();
       
  1771     }
       
  1772 
       
  1773 // -----------------------------------------------------------------------------
       
  1774 // CPEEngineInfoImpl::CallService
       
  1775 // Gets Service value.
       
  1776 // (other items were commented in a header).
       
  1777 // -----------------------------------------------------------------------------
       
  1778 //
       
  1779 RMobilePhone::TMobileService CPEEngineInfoImpl::CallService( const TInt aCallId ) const
       
  1780     {
       
  1781     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1782     return iCurrentCalls[ aCallId ]->Service();
       
  1783     }
       
  1784 
       
  1785 // -----------------------------------------------------------------------------
       
  1786 // CPEEngineInfoImpl::ConferenceCallCaps
       
  1787 // Gets Conference call capabilities.
       
  1788 // (other items were commented in a header).
       
  1789 // -----------------------------------------------------------------------------
       
  1790 //
       
  1791 TUint32 CPEEngineInfoImpl::ConferenceCallCaps( const TInt aCallId ) const
       
  1792     {
       
  1793     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1794     return iCurrentCalls[ aCallId ]->ConferenceCaps();
       
  1795     }
       
  1796 
       
  1797 // -----------------------------------------------------------------------------
       
  1798 // CPEEngineInfoImpl::ConferenceMemberName 
       
  1799 // Gets added or removed Conference members TName information.
       
  1800 // (other items were commented in a header).
       
  1801 // -----------------------------------------------------------------------------
       
  1802 //
       
  1803 const TName& CPEEngineInfoImpl::ConferenceMemberName( const TInt aCallId ) const
       
  1804     {
       
  1805     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1806     return iCurrentCalls[ aCallId ]->ConferenceMemberName();
       
  1807     }
       
  1808 // -----------------------------------------------------------------------------
       
  1809 // CPEEngineInfoImpl::IsConferenceMemberId 
       
  1810 // Gets added or removed Conference members TName information.
       
  1811 // (other items were commented in a header).
       
  1812 // -----------------------------------------------------------------------------
       
  1813 //
       
  1814 TInt CPEEngineInfoImpl::IsConferenceMemberId( const TInt aCallId ) const
       
  1815     {
       
  1816     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1817     return iCurrentCalls[ aCallId ]->ConferenceMemberId();
       
  1818     }
       
  1819 
       
  1820 // -----------------------------------------------------------------------------
       
  1821 // CPEEngineInfoImpl::EmergencyNumber
       
  1822 // Gets emergency number for checking.
       
  1823 // (other items were commented in a header).
       
  1824 // -----------------------------------------------------------------------------
       
  1825 //
       
  1826 const TPEPhoneNumber& CPEEngineInfoImpl::EmergencyNumber() const
       
  1827     {
       
  1828     return iCallCommandInfo.iEmergencyNumber;
       
  1829     }
       
  1830 
       
  1831 // -----------------------------------------------------------------------------
       
  1832 // CPEEngineInfoImpl::NumberOfConferenceMembers
       
  1833 // Gets number of conference members involved in conference call.
       
  1834 // (other items were commented in a header).
       
  1835 // -----------------------------------------------------------------------------
       
  1836 //
       
  1837 TInt CPEEngineInfoImpl::NumberOfConferenceMembers( const TInt aCallId ) const
       
  1838     {
       
  1839     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1840     return iCurrentCalls[ aCallId ]->NumberOfConferenceMembers();
       
  1841     }
       
  1842 
       
  1843 // -----------------------------------------------------------------------------
       
  1844 // CPEEngineInfoImpl::SimState 
       
  1845 // Gets Sim state from the TPEBasicInfo structure.
       
  1846 // (other items were commented in a header).
       
  1847 // -----------------------------------------------------------------------------
       
  1848 //
       
  1849 const TPESimState& CPEEngineInfoImpl::SimState() const
       
  1850     {
       
  1851     return iBasicInfo.iSimState;
       
  1852     }
       
  1853 
       
  1854 // -----------------------------------------------------------------------------
       
  1855 // CPEEngineInfoImpl::SecureSpecified
       
  1856 // Gets secure specified status 
       
  1857 // -----------------------------------------------------------------------------
       
  1858 //
       
  1859 TBool CPEEngineInfoImpl::SecureSpecified( ) const
       
  1860     {
       
  1861     return iBasicInfo.iSecureSpecified;
       
  1862     }
       
  1863 
       
  1864 // -----------------------------------------------------------------------------
       
  1865 // CPEEngineInfoImpl::SSCommandInfo
       
  1866 // Gets the last suplementary services string command information.
       
  1867 // (other items were commented in a header).
       
  1868 // -----------------------------------------------------------------------------
       
  1869 //
       
  1870 const TPESSCommandInfo& CPEEngineInfoImpl::SSCommandInfo() const
       
  1871     {
       
  1872     return iBasicInfo.iSSCommandInfo;
       
  1873     }
       
  1874 
       
  1875 // -----------------------------------------------------------------------------
       
  1876 // CPEEngineInfoImpl::ResetCallInfo
       
  1877 // Resets TPECallInfo structure.
       
  1878 // (other items were commented in a header).
       
  1879 // -----------------------------------------------------------------------------
       
  1880 //
       
  1881 void CPEEngineInfoImpl::ResetCallInfo( const TInt aCallId )
       
  1882     {
       
  1883     TEFLOGSTRING2( KTAINT, 
       
  1884         "PE CPEEngineInfoImpl::ResetCallInfo CallId %d", aCallId );
       
  1885     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1886 
       
  1887     iCurrentCalls[aCallId]->Reset( CallIdCheck::IsConference( aCallId ) );
       
  1888     
       
  1889     if ( iRemoteInfo->Count() &&       // Check that array is not empty
       
  1890          ( *iRemoteInfo )[aCallId ]     // Check that there is content in this index
       
  1891        )
       
  1892         {
       
  1893         ( *iRemoteInfo )[aCallId ]->ResetRemoteInfo();
       
  1894         }
       
  1895     }
       
  1896 
       
  1897 // -----------------------------------------------------------------------------
       
  1898 // CPEEngineInfoImpl::SetCallConference
       
  1899 // Sets the conference value to the TPECallInfo structure.
       
  1900 // (other items were commented in a header).
       
  1901 // -----------------------------------------------------------------------------
       
  1902 //
       
  1903 void CPEEngineInfoImpl::SetCallConference( const TInt aConference, const TInt aCallId )
       
  1904     {
       
  1905     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicIllegalCommand ) );
       
  1906     iCurrentCalls[ aCallId ]->SetConference( aConference );
       
  1907     }
       
  1908 
       
  1909 // -----------------------------------------------------------------------------
       
  1910 // CPEEngineInfoImpl::SetCallControlCaps
       
  1911 // Sets the call control caps to the TPECallInfo structure.
       
  1912 // (other items were commented in a header).
       
  1913 // -----------------------------------------------------------------------------
       
  1914 //
       
  1915 void CPEEngineInfoImpl::SetCallControlCaps( const TPECallControlCaps& aCallControlCaps,
       
  1916         const TInt aCallId )
       
  1917     {
       
  1918     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicIllegalCommand ) );
       
  1919     iCurrentCalls[ aCallId ]->SetCallControlCaps( aCallControlCaps );
       
  1920     }
       
  1921 
       
  1922 // -----------------------------------------------------------------------------
       
  1923 // CPEEngineInfoImpl::SetCallForwarded
       
  1924 // Sets the forwarded value to the TPECallInfo structure.
       
  1925 // (other items were commented in a header).
       
  1926 // -----------------------------------------------------------------------------
       
  1927 //
       
  1928 void CPEEngineInfoImpl::SetCallForwarded( const TBool aCallForwarded, const TInt aCallId )
       
  1929     {
       
  1930     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1931     iCurrentCalls[ aCallId ]->SetForwarded( aCallForwarded );
       
  1932     }
       
  1933 
       
  1934 // -----------------------------------------------------------------------------
       
  1935 // CPEEngineInfoImpl::SetCallService
       
  1936 // Sets the call service to the TPECallInfo structure.
       
  1937 // (other items were commented in a header).
       
  1938 // -----------------------------------------------------------------------------
       
  1939 //
       
  1940 void CPEEngineInfoImpl::SetCallService( const RMobilePhone::TMobileService& aCallService,
       
  1941         const TInt aCallId )
       
  1942     {
       
  1943     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1944     iCurrentCalls[ aCallId ]->SetService( aCallService );
       
  1945     }
       
  1946 
       
  1947 // -----------------------------------------------------------------------------
       
  1948 // CPEEngineInfoImpl::SetConferenceCallCaps
       
  1949 // Sets the conference call capabilities to the TPECallInfo structure.
       
  1950 // (other items were commented in a header).
       
  1951 // -----------------------------------------------------------------------------
       
  1952 //
       
  1953 void CPEEngineInfoImpl::SetConferenceCallCaps( const TUint32 aCaps, const TInt aCallId )
       
  1954     {
       
  1955     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1956     iCurrentCalls[ aCallId ]->SetConferenceCaps( aCaps );
       
  1957     }
       
  1958 
       
  1959 // -----------------------------------------------------------------------------
       
  1960 // CPEEngineInfoImpl::SetConferenceMemberInfo
       
  1961 // Sets the added or removed conference members TName information to the TPECallInfo structure.
       
  1962 // (other items were commented in a header).
       
  1963 // -----------------------------------------------------------------------------
       
  1964 //
       
  1965 void CPEEngineInfoImpl::SetConferenceMemberInfo( const TName& aConferenceMemberName, 
       
  1966         const TInt aConferenceMemberCallId, const TInt aCallId  )
       
  1967     {
       
  1968     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1969     iCurrentCalls[ aCallId ]->SetConferenceMemberName( aConferenceMemberName );
       
  1970     iCurrentCalls[ aCallId ]->SetConferenceMemberId( aConferenceMemberCallId ); 
       
  1971     }
       
  1972 
       
  1973 // -----------------------------------------------------------------------------
       
  1974 // CPEEngineInfoImpl::SetEmergencyNumber
       
  1975 // Sets the emergency numbers of the phone to the TPEBasicInfo structure.
       
  1976 // (other items were commented in a header).
       
  1977 // -----------------------------------------------------------------------------
       
  1978 //
       
  1979 void CPEEngineInfoImpl::SetEmergencyNumber( const TPEPhoneNumber& aEmergencyNumber )
       
  1980     {
       
  1981     iCallCommandInfo.iEmergencyNumber = aEmergencyNumber;
       
  1982     }
       
  1983 
       
  1984 // -----------------------------------------------------------------------------
       
  1985 // CPEEngineInfoImpl::RemotePartyName
       
  1986 // Remote party's network given name. (CNAP, skype id).
       
  1987 // (other items were commented in a header).
       
  1988 // -----------------------------------------------------------------------------
       
  1989 //
       
  1990 const TPEContactName& CPEEngineInfoImpl::RemotePartyName( 
       
  1991     const TInt aCallId ) const
       
  1992     {
       
  1993     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  1994     return iCurrentCalls[ aCallId ]->RemotePartyName();
       
  1995     }
       
  1996 
       
  1997 // -----------------------------------------------------------------------------
       
  1998 // CPEEngineInfoImpl::ErrorCode
       
  1999 // Error code from basic call info.
       
  2000 // (other items were commented in a header).
       
  2001 // -----------------------------------------------------------------------------
       
  2002 //
       
  2003 TInt CPEEngineInfoImpl::ErrorCode() const
       
  2004     {
       
  2005     return iBasicInfo.iErrorInfo.iErrorCode;
       
  2006     }
       
  2007 
       
  2008 // -----------------------------------------------------------------------------
       
  2009 // CPEEngineInfoImpl::SetNumberOfConferenceMembers
       
  2010 // Sets the number of conference members involved in Conference
       
  2011 // call to the TPECallInfo structure.
       
  2012 // (other items were commented in a header).
       
  2013 // -----------------------------------------------------------------------------
       
  2014 //
       
  2015 void CPEEngineInfoImpl::SetNumberOfConferenceMembers( const TInt aNumberOfMembers, const TInt aCallId )
       
  2016     {
       
  2017     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  2018     iCurrentCalls[ aCallId ]->SetNumberOfConferenceMembers( aNumberOfMembers );
       
  2019     }
       
  2020 
       
  2021 // -----------------------------------------------------------------------------
       
  2022 // CPEEngineInfoImpl::ResumeHeldCall
       
  2023 // -----------------------------------------------------------------------------
       
  2024 //
       
  2025 TBool CPEEngineInfoImpl::ResumeHeldCall( const TInt aCallId ) const
       
  2026     {
       
  2027     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  2028     return iCurrentCalls[ aCallId ]->ResumeHeldCall(); 
       
  2029     }
       
  2030 
       
  2031 // -----------------------------------------------------------------------------
       
  2032 // From base class MPEDataStore
       
  2033 // -----------------------------------------------------------------------------
       
  2034 //
       
  2035 TInt CPEEngineInfoImpl::CallIndex( TInt aCallId ) const
       
  2036     {
       
  2037     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  2038     return iCurrentCalls[ aCallId ]->CallIndex(); 
       
  2039     }
       
  2040 
       
  2041 // -----------------------------------------------------------------------------
       
  2042 // CPEEngineInfoImpl::SetBarringInfo
       
  2043 // Sets Barring information to TPEBasicInfo-structure
       
  2044 // (other items were commented in a header).
       
  2045 // -----------------------------------------------------------------------------
       
  2046 //
       
  2047 void CPEEngineInfoImpl::SetBarringInfo( const TPEBarringInfo& aBarringInfo ) 
       
  2048     {
       
  2049     iBasicInfo.iBarringInfo = aBarringInfo;
       
  2050     }
       
  2051 
       
  2052 // -----------------------------------------------------------------------------
       
  2053 // CPEEngineInfoImpl::SetDeflectInfo
       
  2054 // Sets deflect information to the TPEBasicInfo structure
       
  2055 // (other items were commented in a header).
       
  2056 // -----------------------------------------------------------------------------
       
  2057 //
       
  2058 void CPEEngineInfoImpl::SetDeflectInfo( const TPEActiveForwardInfo& aActiveForward )
       
  2059     {
       
  2060     iBasicInfo.iActiveForward  = aActiveForward;
       
  2061     }
       
  2062 
       
  2063 // -----------------------------------------------------------------------------
       
  2064 // CPEEngineInfoImpl::SetResumeHeldCall
       
  2065 // Set iHeldByUser value to TPECallInfo structure
       
  2066 // -----------------------------------------------------------------------------
       
  2067 //
       
  2068 void CPEEngineInfoImpl::SetResumeHeldCall( const TBool aResumeHeldCall, 
       
  2069     const TInt aCallId )
       
  2070     {
       
  2071     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  2072     iCurrentCalls[ aCallId ]->SetResumeHeldCall( aResumeHeldCall ); 
       
  2073     }
       
  2074     
       
  2075 // -----------------------------------------------------------------------------
       
  2076 // CPEEngineInfoImpl::SetSimState
       
  2077 // Sets Sim state to TPEBasicInfo-structure
       
  2078 // (other items were commented in a header).
       
  2079 // -----------------------------------------------------------------------------
       
  2080 //
       
  2081 void CPEEngineInfoImpl::SetSimState( const TPESimState& aSimState )
       
  2082     {
       
  2083     iBasicInfo.iSimState = aSimState;
       
  2084     }
       
  2085 
       
  2086 // -----------------------------------------------------------------------------
       
  2087 // CPEEngineInfoImpl::SetSSCommandInfo
       
  2088 // Sets Suplementary Services command information to TPESSCommandInfo-structure
       
  2089 // (other items were commented in a header).
       
  2090 // -----------------------------------------------------------------------------
       
  2091 //
       
  2092 void CPEEngineInfoImpl::SetSSCommandInfo( const TPESSCommandInfo& aSSCommandInfo ) 
       
  2093     {
       
  2094     iBasicInfo.iSSCommandInfo = aSSCommandInfo; 
       
  2095     }
       
  2096 
       
  2097 // -----------------------------------------------------------------------------
       
  2098 // CPEEngineInfoImpl::SetUserToUserInfo
       
  2099 // Set the user to user info.
       
  2100 // -----------------------------------------------------------------------------
       
  2101 //    
       
  2102 void CPEEngineInfoImpl::SetUserToUserInformation( const TPEUserToUserInfo& aUUI )
       
  2103     {
       
  2104     iCallCommandInfo.iUserToUserInfo = aUUI;
       
  2105     }
       
  2106 
       
  2107 // -----------------------------------------------------------------------------
       
  2108 // CPEEngineInfoImpl::SetUserToUserInfo
       
  2109 // Set the user to user info.
       
  2110 // -----------------------------------------------------------------------------
       
  2111 //   
       
  2112 void CPEEngineInfoImpl::SetRemotePartyName( 
       
  2113     const TPEContactName& aName, 
       
  2114     const TInt aCallId )
       
  2115     {
       
  2116     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  2117     iCurrentCalls[ aCallId ]->SetRemotePartyName( aName ); 
       
  2118     }
       
  2119 
       
  2120 // -----------------------------------------------------------------------------
       
  2121 // CPEEngineInfoImpl::CallParameters
       
  2122 // Get the call parameters.
       
  2123 // -----------------------------------------------------------------------------
       
  2124 // 
       
  2125 CCCECallParameters& CPEEngineInfoImpl::CallParameters()
       
  2126     {
       
  2127     return *iCallParams;
       
  2128     }
       
  2129 
       
  2130 // -----------------------------------------------------------------------------
       
  2131 // CPEEngineInfoImpl::SetSwitchToNumberCommand
       
  2132 // Sets switch to number
       
  2133 // -----------------------------------------------------------------------------
       
  2134 //
       
  2135 void CPEEngineInfoImpl::SetSwitchToNumberCommand( 
       
  2136         const TPEPhoneNumber& aPhoneNumber )
       
  2137     {
       
  2138     __ASSERT_DEBUG( !( aPhoneNumber.Length() > KPEPhoneNumberMaxLength ),
       
  2139         Panic( EPEPanicExternalDataIdOutOfRange ) );
       
  2140     iCallCommandInfo.iSwitchToNumber = aPhoneNumber;
       
  2141     }
       
  2142 
       
  2143 // -----------------------------------------------------------------------------
       
  2144 // From base class MPEDataStore
       
  2145 // Sets call index
       
  2146 // -----------------------------------------------------------------------------
       
  2147 //
       
  2148 void CPEEngineInfoImpl::SetCallIndex( TInt aCallIndex, TInt aCallId )
       
  2149     {
       
  2150     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  2151     iCurrentCalls[ aCallId ]->SetCallIndex( aCallIndex );
       
  2152     }
       
  2153 
       
  2154 // -----------------------------------------------------------------------------
       
  2155 // From base class MPEDataStore
       
  2156 // Sets call origin
       
  2157 // -----------------------------------------------------------------------------
       
  2158 //
       
  2159 void CPEEngineInfoImpl::SetCallOrigin( TPECallOrigin aOrigin, TInt aCallId )
       
  2160     {
       
  2161     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  2162     return iCurrentCalls[ aCallId ]->SetCallOrigin( aOrigin ); 
       
  2163     }
       
  2164 
       
  2165 // -----------------------------------------------------------------------------
       
  2166 // CPEEngineInfoImpl::SwitchToNumberCommand
       
  2167 // Return the switch to number from the TPECallCommandInfo structure.
       
  2168 // -----------------------------------------------------------------------------
       
  2169 //
       
  2170 const TPEPhoneNumber& CPEEngineInfoImpl::SwitchToNumberCommand() const
       
  2171     {
       
  2172     return iCallCommandInfo.iSwitchToNumber;
       
  2173     }
       
  2174 
       
  2175 
       
  2176 // -----------------------------------------------------------------------------
       
  2177 // CPEEngineInfoImpl::UnattendedTransferTarget
       
  2178 // -----------------------------------------------------------------------------
       
  2179 //
       
  2180 const TPEPhoneNumber& CPEEngineInfoImpl::UnattendedTransferTarget( 
       
  2181         TInt aCallId ) const
       
  2182     {
       
  2183     __ASSERT_DEBUG( aCallId < iCurrentCalls.Count(), 
       
  2184         Panic( EPEPanicCallIndexOutOfRange ) );
       
  2185     return iCurrentCalls[ aCallId ]->UnattendedTransferTarget(); 
       
  2186     }
       
  2187 
       
  2188 
       
  2189 // -----------------------------------------------------------------------------
       
  2190 // CPEEngineInfoImpl::SetUnattendedTransferTarget
       
  2191 // -----------------------------------------------------------------------------
       
  2192 //
       
  2193 void CPEEngineInfoImpl::SetUnattendedTransferTarget( const TPEPhoneNumber& aTarget,
       
  2194         TInt aCallId )
       
  2195     {
       
  2196     __ASSERT_DEBUG( aCallId < iCurrentCalls.Count(),
       
  2197         Panic( EPEPanicCallIndexOutOfRange ) );
       
  2198     iCurrentCalls[ aCallId ]->SetUnattendedTransferTarget( aTarget );
       
  2199     }
       
  2200 
       
  2201 // -----------------------------------------------------------------------------
       
  2202 // CPEEngineInfoImpl::ForwardAddressChoices
       
  2203 // -----------------------------------------------------------------------------
       
  2204 //
       
  2205 const CDesC8Array* CPEEngineInfoImpl::ForwardAddressChoices( 
       
  2206         TInt aCallId ) const
       
  2207     {
       
  2208     __ASSERT_DEBUG( aCallId < iCurrentCalls.Count(), 
       
  2209         Panic( EPEPanicCallIndexOutOfRange ) );
       
  2210     return iCurrentCalls[ aCallId ]->ForwardAddressChoices(); 
       
  2211     }
       
  2212 
       
  2213 
       
  2214 // -----------------------------------------------------------------------------
       
  2215 // CPEEngineInfoImpl::SetForwardAddressChoices
       
  2216 // -----------------------------------------------------------------------------
       
  2217 //
       
  2218 void CPEEngineInfoImpl::SetForwardAddressChoices( const CDesC8Array* aArray,
       
  2219         TInt aCallId )
       
  2220     {
       
  2221     __ASSERT_DEBUG( aCallId < iCurrentCalls.Count(),
       
  2222         Panic( EPEPanicCallIndexOutOfRange ) );
       
  2223     iCurrentCalls[ aCallId ]->SetForwardAddressChoices( aArray );
       
  2224     }
       
  2225     
       
  2226 // -----------------------------------------------------------------------------
       
  2227 // CPEEngineInfoImpl::SetForwardAddressIndex
       
  2228 // -----------------------------------------------------------------------------
       
  2229 //
       
  2230 void CPEEngineInfoImpl::SetForwardAddressIndex( TInt aIndex )
       
  2231     {
       
  2232     iCallCommandInfo.iForwardToAddressIndex = aIndex;
       
  2233     }
       
  2234     
       
  2235 // -----------------------------------------------------------------------------
       
  2236 // CPEEngineInfoImpl::ForwardAddressIndex
       
  2237 // -----------------------------------------------------------------------------
       
  2238 //
       
  2239 TInt CPEEngineInfoImpl::ForwardAddressIndex()
       
  2240     {
       
  2241     return iCallCommandInfo.iForwardToAddressIndex;
       
  2242     }
       
  2243 
       
  2244 // -----------------------------------------------------------------------------
       
  2245 // CPEEngineInfoImpl::SetTransferTargetCommand
       
  2246 // (other items were commented in a header).
       
  2247 // -----------------------------------------------------------------------------
       
  2248 //
       
  2249 void CPEEngineInfoImpl::SetTransferTargetCommand( const TPEPhoneNumber& aTransferTarget )
       
  2250     {
       
  2251     iCallCommandInfo.iTransferToAddress = aTransferTarget; 
       
  2252     }
       
  2253 
       
  2254 // -----------------------------------------------------------------------------
       
  2255 // CPEEngineInfoImpl::TransferTarget
       
  2256 // (other items were commented in a header).
       
  2257 // -----------------------------------------------------------------------------
       
  2258 //
       
  2259 const TPEPhoneNumber& CPEEngineInfoImpl::TransferTargetCommand() const
       
  2260     {
       
  2261     return iCallCommandInfo.iTransferToAddress;
       
  2262     }
       
  2263 
       
  2264 // -----------------------------------------------------------------------------
       
  2265 // CPEEngineInfo::SetIsSwitchToOperationOngoing
       
  2266 // (other items were commented in a header).
       
  2267 // -----------------------------------------------------------------------------
       
  2268 //
       
  2269 void CPEEngineInfoImpl::SetIsSwitchToOperationOngoing( const TBool aValue )
       
  2270     {
       
  2271     TEFLOGSTRING2( KTAINT, "SetIsSwitchToOperationOngoing: %d", aValue );
       
  2272     iBasicInfo.iSwitchToOngoing = aValue;
       
  2273     }
       
  2274 
       
  2275 // -----------------------------------------------------------------------------
       
  2276 // CPEEngineInfo::IsSwitchToOperationOngoing
       
  2277 // (other items were commented in a header).
       
  2278 // -----------------------------------------------------------------------------
       
  2279 //
       
  2280 TBool CPEEngineInfoImpl::IsSwitchToOperationOngoing() const
       
  2281     {
       
  2282     TEFLOGSTRING2( KTAINT, "IsSwitchToOperationOngoing: %d", iBasicInfo.iSwitchToOngoing );
       
  2283     return iBasicInfo.iSwitchToOngoing;
       
  2284     }
       
  2285 
       
  2286 // -----------------------------------------------------------------------------
       
  2287 // CPEEngineInfo::CallOrigin
       
  2288 // (other items were commented in a header).
       
  2289 // -----------------------------------------------------------------------------
       
  2290 //
       
  2291 TPECallOrigin CPEEngineInfoImpl::CallOrigin( const TInt aCallId ) const
       
  2292     {
       
  2293     __ASSERT_DEBUG( iCurrentCalls.Count() > aCallId, Panic( EPEPanicCallIndexOutOfRange ) );
       
  2294     return iCurrentCalls[ aCallId ]->CallOrigin();
       
  2295     }
       
  2296 
       
  2297 // -----------------------------------------------------------------------------
       
  2298 // CPEEngineInfoImpl::CallerImage
       
  2299 // -----------------------------------------------------------------------------
       
  2300 //
       
  2301 const TPtrC CPEEngineInfoImpl::CallerImage( const TInt aCallId ) const
       
  2302     {
       
  2303     return ( *iRemoteInfo )[ aCallId ]->CallerImage();
       
  2304     }
       
  2305 
       
  2306 // -----------------------------------------------------------------------------
       
  2307 // CPEEngineInfoImpl::CallerText
       
  2308 // -----------------------------------------------------------------------------
       
  2309 //
       
  2310 const TPtrC CPEEngineInfoImpl::CallerText( const TInt aCallId ) const
       
  2311     {
       
  2312     return ( *iRemoteInfo )[ aCallId ]->CallerText();
       
  2313     }
       
  2314 
       
  2315 // -----------------------------------------------------------------------------
       
  2316 // CPEEngineInfoImpl::CallerThumbnail
       
  2317 // -----------------------------------------------------------------------------
       
  2318 //
       
  2319 CFbsBitmap* CPEEngineInfoImpl::CallerThumbnail( const TInt aCallId ) const
       
  2320     {
       
  2321     return ( *iRemoteInfo )[ aCallId ]->CallerThumbnail();
       
  2322     }
       
  2323 
       
  2324 // -----------------------------------------------------------------------------
       
  2325 // CPEEngineInfoImpl::HasCallerThumbnail
       
  2326 // -----------------------------------------------------------------------------
       
  2327 //
       
  2328 TBool CPEEngineInfoImpl::HasCallerThumbnail( const TInt aCallId ) const
       
  2329    {
       
  2330     return ( *iRemoteInfo )[ aCallId ]->HasCallerThumbnail();
       
  2331     }
       
  2332 
       
  2333 // -----------------------------------------------------------------------------
       
  2334 // CPEEngineInfoImpl::ContactId
       
  2335 // -----------------------------------------------------------------------------
       
  2336 //
       
  2337 const CPhCntContactId& CPEEngineInfoImpl::ContactId( const TInt aCallId ) const
       
  2338     {
       
  2339     return ( *iRemoteInfo )[ aCallId ]->ContactId();
       
  2340     }
       
  2341 
       
  2342 // -----------------------------------------------------------------------------
       
  2343 // CPEEngineInfoImpl::ContactGroups
       
  2344 // -----------------------------------------------------------------------------
       
  2345 //
       
  2346 const TArray< TContactItemId > CPEEngineInfoImpl::ContactGroups(
       
  2347     const TInt aCallId ) const
       
  2348     {
       
  2349     return ( *iRemoteInfo )[ aCallId ]->ContactGroups();
       
  2350     }
       
  2351 
       
  2352 // -----------------------------------------------------------------------------
       
  2353 // CPEEngineInfoImpl::ContactLink
       
  2354 // -----------------------------------------------------------------------------
       
  2355 //
       
  2356 const TDesC8& CPEEngineInfoImpl::ContactLink( const TInt aCallId ) const
       
  2357     {
       
  2358     return ( *iRemoteInfo )[ aCallId ]->ContactLink();
       
  2359     }
       
  2360 
       
  2361 // -----------------------------------------------------------------------------
       
  2362 // CPEEngineInfoImpl::PersonalRingingTone
       
  2363 // -----------------------------------------------------------------------------
       
  2364 //
       
  2365 const TPEContactFileName& CPEEngineInfoImpl::PersonalRingingTone(
       
  2366     const TInt aCallId ) const
       
  2367     {
       
  2368     return ( *iRemoteInfo )[ aCallId ]->PersonalRingingTone();
       
  2369     }
       
  2370 
       
  2371 // -----------------------------------------------------------------------------
       
  2372 // CPEEngineInfoImpl::RemoteCompanyName
       
  2373 // -----------------------------------------------------------------------------
       
  2374 //
       
  2375 const TPEContactCompany& CPEEngineInfoImpl::RemoteCompanyName(
       
  2376     const TInt aCallId ) const
       
  2377     {
       
  2378     return ( *iRemoteInfo )[ aCallId ]->CompanyName();
       
  2379     }
       
  2380 
       
  2381 // -----------------------------------------------------------------------------
       
  2382 // CPEEngineInfoImpl::RemoteName
       
  2383 // -----------------------------------------------------------------------------
       
  2384 //
       
  2385 const TPEContactName& CPEEngineInfoImpl::RemoteName( const TInt aCallId ) const
       
  2386     {
       
  2387     return ( *iRemoteInfo )[ aCallId ]->Name();
       
  2388     }
       
  2389 
       
  2390 // -----------------------------------------------------------------------------
       
  2391 // CPEEngineInfoImpl::RemotePhoneNumber
       
  2392 // -----------------------------------------------------------------------------
       
  2393 //
       
  2394 const TPEPhoneNumber& CPEEngineInfoImpl::RemotePhoneNumber(
       
  2395     const TInt aCallId ) const
       
  2396     {
       
  2397     return ( *iRemoteInfo )[ aCallId ]->PhoneNumber();
       
  2398     }
       
  2399 
       
  2400 // -----------------------------------------------------------------------------
       
  2401 // CPEEngineInfoImpl::RemotePhoneNumberType
       
  2402 // -----------------------------------------------------------------------------
       
  2403 //
       
  2404 const TPEPhoneNumberIdType& CPEEngineInfoImpl::RemotePhoneNumberType(
       
  2405     const TInt aCallId ) const
       
  2406     {
       
  2407     return ( *iRemoteInfo )[ aCallId ]->PhoneNumberType();
       
  2408     }
       
  2409 
       
  2410 // -----------------------------------------------------------------------------
       
  2411 // CPEEngineInfoImpl::RemoteTextToSpeechText
       
  2412 // -----------------------------------------------------------------------------
       
  2413 //
       
  2414 const TPtrC CPEEngineInfoImpl::RemoteTextToSpeechText(
       
  2415     const TInt aCallId ) const
       
  2416     {
       
  2417     return ( *iRemoteInfo )[ aCallId ]->TextToSpeechText();
       
  2418     }
       
  2419 
       
  2420 // -----------------------------------------------------------------------------
       
  2421 // CPEEngineInfoImpl::RemotePredefinedDtmfStrings
       
  2422 // -----------------------------------------------------------------------------
       
  2423 //
       
  2424 const  CDesCArray& CPEEngineInfoImpl::RemotePredefinedDtmfStrings(
       
  2425     const TInt aCallId ) const
       
  2426     {
       
  2427     return ( *iRemoteInfo )[ aCallId ]->PredefinedDtmfStrings();
       
  2428     }
       
  2429 
       
  2430 // -----------------------------------------------------------------------------
       
  2431 // CPEEngineInfoImpl::RemoteColpNumber
       
  2432 // -----------------------------------------------------------------------------
       
  2433 //
       
  2434 const TPEPhoneNumber& CPEEngineInfoImpl::RemoteColpNumber(
       
  2435     const TInt aCallId ) const
       
  2436     {
       
  2437     return ( *iRemoteInfo )[ aCallId ]->ColpNumber();
       
  2438     }
       
  2439 
       
  2440 // -----------------------------------------------------------------------------
       
  2441 // CPEEngineInfoImpl::ResetRemoteInfo
       
  2442 // -----------------------------------------------------------------------------
       
  2443 //
       
  2444 void CPEEngineInfoImpl::ResetRemoteInfo( const TInt aCallId )
       
  2445     {
       
  2446     return ( *iRemoteInfo )[ aCallId ]->ResetRemoteInfo();
       
  2447     }
       
  2448 
       
  2449 // -----------------------------------------------------------------------------
       
  2450 // CPEEngineInfoImpl::SetCallerImage
       
  2451 // -----------------------------------------------------------------------------
       
  2452 //
       
  2453 void CPEEngineInfoImpl::SetCallerImage(
       
  2454     const TPtrC aCallerImage, 
       
  2455     const TInt aCallId )
       
  2456     {
       
  2457     return ( *iRemoteInfo )[ aCallId ]->SetCallerImage( aCallerImage );
       
  2458     }
       
  2459 
       
  2460 // -----------------------------------------------------------------------------
       
  2461 // CPEEngineInfoImpl::SetCallerText
       
  2462 // -----------------------------------------------------------------------------
       
  2463 //
       
  2464 void CPEEngineInfoImpl::SetCallerText(
       
  2465     const TPtrC aCallerText, 
       
  2466     const TInt aCallId )
       
  2467     {
       
  2468     return ( *iRemoteInfo )[ aCallId ]->SetCallerText( aCallerText );
       
  2469     }
       
  2470 
       
  2471 // -----------------------------------------------------------------------------
       
  2472 // CPEEngineInfoImpl::SetCallerThumbnail
       
  2473 // -----------------------------------------------------------------------------
       
  2474 //
       
  2475 void CPEEngineInfoImpl::SetCallerThumbnail(
       
  2476     CFbsBitmap* aCallerThumbnail, 
       
  2477     const TInt aCallId )
       
  2478     {
       
  2479     return ( *iRemoteInfo )[ aCallId ]->SetCallerThumbnail( aCallerThumbnail );
       
  2480     }
       
  2481 
       
  2482 // -----------------------------------------------------------------------------
       
  2483 // CPEEngineInfoImpl::SetHasCallerThumbnail
       
  2484 // -----------------------------------------------------------------------------
       
  2485 //
       
  2486 void CPEEngineInfoImpl::SetHasCallerThumbnail(
       
  2487     TBool aStatus, 
       
  2488     const TInt aCallId )
       
  2489     {
       
  2490     return ( *iRemoteInfo )[ aCallId ]->SetHasCallerThumbnail( aStatus );
       
  2491     }
       
  2492 
       
  2493 // -----------------------------------------------------------------------------
       
  2494 // CPEEngineInfoImpl::SetPredefinedDtmfStrings
       
  2495 // -----------------------------------------------------------------------------
       
  2496 //
       
  2497 void CPEEngineInfoImpl::SetPredefinedDtmfStrings( 
       
  2498     const CDesCArray& aArray, 
       
  2499     const TInt aCallId )            
       
  2500     {
       
  2501     return ( *iRemoteInfo )[ aCallId ]->SetPredefinedDtmfStrings( aArray );
       
  2502     }
       
  2503 
       
  2504 // -----------------------------------------------------------------------------
       
  2505 // CPEEngineInfoImpl::SetContactGroups
       
  2506 // -----------------------------------------------------------------------------
       
  2507 //
       
  2508 void CPEEngineInfoImpl::SetContactGroups(
       
  2509     TArray< TContactItemId >& aGroupIdArray,
       
  2510     const TInt aCallId )
       
  2511     {
       
  2512     return ( *iRemoteInfo )[ aCallId ]->SetContactGroups( aGroupIdArray );
       
  2513     }
       
  2514 
       
  2515 // -----------------------------------------------------------------------------
       
  2516 // CPEEngineInfoImpl::SetContactId
       
  2517 // -----------------------------------------------------------------------------
       
  2518 //
       
  2519 void CPEEngineInfoImpl::SetContactId(
       
  2520         CPhCntContactId* aContactId,
       
  2521         const TInt aCallId )
       
  2522     {
       
  2523     return ( *iRemoteInfo )[ aCallId ]->SetContactId( aContactId );
       
  2524     }
       
  2525 
       
  2526 // -----------------------------------------------------------------------------
       
  2527 // CPEEngineInfoImpl::SetPersonalRingingTone
       
  2528 // -----------------------------------------------------------------------------
       
  2529 //
       
  2530 void CPEEngineInfoImpl::SetPersonalRingingTone(
       
  2531     const TPEContactFileName& aRingingTonepath,
       
  2532     const TInt aCallId )
       
  2533     {
       
  2534     return ( *iRemoteInfo )[ aCallId ]->SetPersonalRingingTone( aRingingTonepath );
       
  2535     }
       
  2536 
       
  2537 // -----------------------------------------------------------------------------
       
  2538 // CPEEngineInfoImpl::SetRemoteCompanyName
       
  2539 // -----------------------------------------------------------------------------
       
  2540 //
       
  2541 void CPEEngineInfoImpl::SetRemoteCompanyName(
       
  2542     const TPEContactName& aCompanyName, 
       
  2543     const TInt aCallId )
       
  2544     {
       
  2545     return ( *iRemoteInfo )[ aCallId ]->SetCompanyName( aCompanyName );
       
  2546     }
       
  2547 
       
  2548 // -----------------------------------------------------------------------------
       
  2549 // CPEEngineInfoImpl::SetRemoteColpNumber
       
  2550 // -----------------------------------------------------------------------------
       
  2551 //
       
  2552 void CPEEngineInfoImpl::SetRemoteColpNumber(
       
  2553     TPEPhoneNumber& aColpNumber, 
       
  2554     const TInt aCallId )
       
  2555     {
       
  2556     return ( *iRemoteInfo )[ aCallId ]->SetColpNumber( aColpNumber );
       
  2557     }
       
  2558 
       
  2559 // -----------------------------------------------------------------------------
       
  2560 // CPEEngineInfoImpl::SetRemoteName
       
  2561 // -----------------------------------------------------------------------------
       
  2562 //
       
  2563 void CPEEngineInfoImpl::SetRemoteName(
       
  2564     const TPEContactName& aContactName, 
       
  2565     const TInt aCallId )
       
  2566     {
       
  2567     return ( *iRemoteInfo )[ aCallId ]->SetName( aContactName );
       
  2568     }
       
  2569 
       
  2570 // -----------------------------------------------------------------------------
       
  2571 // CPEEngineInfoImpl::SetRemotePhoneNumber
       
  2572 // -----------------------------------------------------------------------------
       
  2573 //
       
  2574 void CPEEngineInfoImpl::SetRemotePhoneNumber(
       
  2575     const TPEPhoneNumber& aPhoneNumber, 
       
  2576     const TInt aCallId )
       
  2577     {
       
  2578     return ( *iRemoteInfo )[ aCallId ]->SetPhoneNumber( aPhoneNumber );
       
  2579     }
       
  2580 
       
  2581 // -----------------------------------------------------------------------------
       
  2582 // CPEEngineInfoImpl::SetRemotePhoneNumberType
       
  2583 // -----------------------------------------------------------------------------
       
  2584 //
       
  2585 void CPEEngineInfoImpl::SetRemotePhoneNumberType(
       
  2586     TPEPhoneNumberIdType aPhoneNumberType, 
       
  2587     const TInt aCallId )
       
  2588     {
       
  2589     return ( *iRemoteInfo )[ aCallId ]->SetPhoneNumberType( aPhoneNumberType );
       
  2590     }
       
  2591 
       
  2592 // -----------------------------------------------------------------------------
       
  2593 // CPEEngineInfoImpl::SetRemoteTextToSpeechText
       
  2594 // -----------------------------------------------------------------------------
       
  2595 //
       
  2596 void CPEEngineInfoImpl::SetRemoteTextToSpeechText(
       
  2597     HBufC* aText,
       
  2598     TInt aCallId )
       
  2599     {
       
  2600     return ( *iRemoteInfo )[ aCallId ]->SetTextToSpeechText( aText );
       
  2601     }
       
  2602 
       
  2603 // -----------------------------------------------------------------------------
       
  2604 // CPEEngineInfoImpl::CheckIfCallStateExists
       
  2605 // Checks if given state can be found.
       
  2606 // -----------------------------------------------------------------------------
       
  2607 //
       
  2608 TBool CPEEngineInfoImpl::CheckIfCallStateExists( const TPEState& aCallState )
       
  2609     {
       
  2610     TInt count = iCurrentCalls.Count();
       
  2611     TBool stateExists(EFalse);
       
  2612     for ( TInt i = 0; i < count; i++ )
       
  2613       {
       
  2614       if( aCallState == iCurrentCalls[ i ]->CallState() )
       
  2615           {
       
  2616           stateExists = ETrue;
       
  2617           break;
       
  2618           }
       
  2619       }
       
  2620     return stateExists;
       
  2621     }
       
  2622 
       
  2623 // -----------------------------------------------------------------------------
       
  2624 // CPEEngineInfoImpl::SetContactId
       
  2625 // -----------------------------------------------------------------------------
       
  2626 //
       
  2627 void CPEEngineInfoImpl::SetContactId2( const TInt aContactId )
       
  2628 {
       
  2629     TEFLOGSTRING2( KTAINT, 
       
  2630         "PE CPEEngineInfo::SetContactId: aContactId: %d", aContactId );
       
  2631     iContactId = aContactId;    
       
  2632 }
       
  2633 
       
  2634 // -----------------------------------------------------------------------------
       
  2635 // CPEEngineInfoImpl::ContactId
       
  2636 // -----------------------------------------------------------------------------
       
  2637 //
       
  2638 TInt CPEEngineInfoImpl::ContactId2 () const
       
  2639     {
       
  2640     TEFLOGSTRING2( KTAINT, "ContactId: %d", iContactId );
       
  2641     return iContactId;      
       
  2642     }
       
  2643 
       
  2644 // End of File