coreapplicationuis/SysAp/Src/SysApAppUi.cpp
changeset 77 b01c07dfcf84
parent 74 1505405bc645
child 81 676b6116ca93
--- a/coreapplicationuis/SysAp/Src/SysApAppUi.cpp	Wed Sep 29 15:24:56 2010 +0300
+++ b/coreapplicationuis/SysAp/Src/SysApAppUi.cpp	Thu Oct 07 06:25:45 2010 +0300
@@ -55,7 +55,7 @@
 #include "sysapkeymanagement.h"
 #include "SysApShutdownImage.h"
 #include "SysApKeySndHandler.h"
-
+#include "SysApCenRepSilentModeObserver.h"
 #include "SysApShutdownAnimation.h"
 #include "SysApEtelConnector.h"
 
@@ -74,6 +74,21 @@
 #include <usbpersonalityids.h>
 #include "sysap.rsg"
 #include <hbindicatorsymbian.h>
+//Qt Highway
+#include <xqappmgr.h>
+#include <xqaiwdecl.h>
+#include <xqaiwrequest.h>
+#include <QString.h>
+#include <QVariant.h>
+#include <QMap.h>
+#include <QList.h>
+//For End Key
+#include <APGWGNAM.H>
+//For HS RPropertyKey
+#include <homescreendomainpskeys.h>
+//For Hs Changes
+#include <afactivitylauncher.h>
+#include <apgcli.h>
 
 class CHbSymbianVariant;
 const TInt KModifierMask( 0 );
@@ -156,7 +171,10 @@
     RWindowGroup groupWin = iCoeEnv->RootWin();
     User::LeaveIfError ( iCapturedEKeyPowerOff = groupWin.CaptureKey( EKeyPowerOff, KModifierMask, KModifierMask ) );
     User::LeaveIfError ( iCapturedEKeyPowerOffUpAndDowns = groupWin.CaptureKeyUpAndDowns( EStdKeyDevice2, KModifierMask, KModifierMask ) );
-     
+    //Capture SEND and END keys
+    User::LeaveIfError ( iCapturedEKeySendKey = groupWin.CaptureKey( EKeyPhoneSend, KModifierMask, KModifierMask ) );
+    User::LeaveIfError ( iCapturedEKeyEndKey = groupWin.CaptureKey( EKeyPhoneEnd, KModifierMask, KModifierMask ) );
+    
     TRACES ( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApDefaultKeyHandler::NewL()") ) );
     iSysApDefaultKeyHandler = CSysApDefaultKeyHandler::NewL(*this);
     
@@ -256,6 +274,10 @@
     TRACES( RDebug::Print( _L("CCSysApAppUi::ConstructL  trying CSysApCenRepHacSettingObserver::NewL") ) );
     iSysApCenRepHacSettingObserver = CSysApCenRepHacSettingObserver::NewL( *this ); 
     
+    TRACES( RDebug::Print( _L("CCSysApAppUi::ConstructL  trying CSysApCenRepSilentModeObserver::NewL") ) );
+    iSysApCenRepSilentModeObserver = CSysApCenRepSilentModeObserver::NewL( ); 
+    
+    
 #ifndef RD_MULTIPLE_DRIVE
     if ( iSysApFeatureManager->MmcSupported() )
         {
@@ -320,7 +342,10 @@
     delete iVariantAccState; 
 
     delete iSysApAudioRoutingObserver;
-    
+
+    delete iChargingAnimation;
+    iChargingAnimation=NULL;
+
     if (iMemCardPwdDialog!=NULL)
         {
         //PowerMenu already exist
@@ -344,13 +369,17 @@
     RWindowGroup groupWin = iCoeEnv->RootWin();
     groupWin.CancelCaptureKey( iCapturedEKeyPowerOff );
     groupWin.CancelCaptureKeyUpAndDowns( iCapturedEKeyPowerOffUpAndDowns );
+    //Deregister SendKey
+    groupWin.CancelCaptureKey( iCapturedEKeySendKey );
+    //Deregister EndKey
+    groupWin.CancelCaptureKey( iCapturedEKeyEndKey );
     
     delete iSysApDefaultKeyHandler;
     delete iSysApCenRepLightSettingsObserver;
     delete iSysApCenRepBtObserver;
     delete iSysApCenRepHacSettingObserver;
     delete iSysApCenRepController;
-
+    delete iSysApCenRepSilentModeObserver;
     delete iSysApPubSubObserver;
     
     delete iSysApLightsController;
@@ -491,7 +520,7 @@
 
     if ( iSysApPsmController )
        {
-	   if ( iCharging ) // if charger is connected on boot PSM queries may need to be shown
+	   if ( iCharging ) // 
         {
          HandleChargingStatusL( StateOfProperty( KPSUidHWRMPowerState, KHWRMChargingStatus ) );
         }
@@ -516,14 +545,7 @@
         // low and empty battery states are informed to the user in device startup
         HandleBatteryStatusL( batteryStatus );
         }
-    else if ( iSysApPsmController && !iCharging )
-        {
-            TRACES( RDebug::Print(_L("CSysApAppUi::HandleUiReadyAfterBootL: batteryStatus %d, iCharging %d -> disable partial psm" ), batteryStatus, iCharging ) );
-
-            iSysApPsmController->BatteryLow( EFalse );
-            iSysApPsmController->DoEnablePartialPsm( EFalse );
-        }
-    
+        
     if ( ! iSysApUsbIndicatorController )
         {
         TRAPD ( usbErr, iSysApUsbIndicatorController = CreateSysApUsbIndicatorL( *this ) );
@@ -556,16 +578,23 @@
             iSysApPsmController = CSysApPsmController::NewL( *this );        
             }
 
-        // in charger boot explicitly disable  power save mode
+        // In charger boot explicitly disable  power save mode
         if ( aSwState == RStarterSession::ECharging )
             {
             iSysApPsmController->ChargerConnected();
-            iSysApPsmController->DoEnableFullPsm(EFalse); // disable  power save now
+            iSysApPsmController->DoEnableFullPsm(EFalse); // disable  power save mode now
             }
         }
 
     if ( aSwState == RStarterSession::ECharging || aSwState == RStarterSession::EAlarm )
         {
+        if(aSwState == RStarterSession::ECharging )
+            {
+	        TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL: Stop the splash screen and start charging animation.") ) );			
+            //Stop the splash screen and start charging animation
+            RProperty::Set( KPSUidStartup, KPSSplashShutdown, ESplashShutdown);
+            }
+       
         TInt state( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) );
         //Also Charging status will be updated with the following function.
         UpdateBatteryBarsL( state );    
@@ -665,14 +694,14 @@
     return iResourcesFreed;
     }
 
-void CSysApAppUi::ShowExampleUiNoteL( const TDesC& noteText )const
+void CSysApAppUi::ShowNoteL( const TDesC& noteText )const
     {          
- 	TRACES( RDebug::Print( _L("CSysApAppUi::ShowExampleUiNoteL:: constructing CHbDeviceMessageBoxSymbian:BeGIN") ) );    
+ 	TRACES( RDebug::Print( _L("CSysApAppUi::ShowNoteL:: constructing CHbDeviceMessageBoxSymbian:BeGIN") ) );    
     CHbDeviceMessageBoxSymbian *note = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EInformation);
  	CleanupStack::PushL(note);
-    TRACES( RDebug::Print( _L("CSysApAppUi::ShowExampleUiNoteL:: construction of CHbDeviceMessageBoxSymbian:END") ) ); 
+    TRACES( RDebug::Print( _L("CSysApAppUi::ShowNoteL:: construction of CHbDeviceMessageBoxSymbian:END") ) ); 
     note->SetTextL(noteText);
-	note->SetTimeout(300);
+	note->SetTimeout(3000);
  	TRACES( RDebug::Print( _L("CSysApAppUi:: Display of  CHbDeviceMessageBoxSymbian::Begin") ) );    
     note->ShowL();
 	TRACES( RDebug::Print( _L("CSysApAppUi:: Display of  CHbDeviceMessageBoxSymbian::End") ) );
@@ -1133,6 +1162,9 @@
         if( !iIgnoreNextPowerKeyRepeats )
             {
             iIgnoreNextPowerKeyRepeats = ETrue;
+			
+            delete iChargingAnimation;
+            iChargingAnimation=NULL;
 
             SetStarterState( RStarterSession::ENormal );
             }
@@ -1263,7 +1295,7 @@
     TPtrC aStringPointer = aString->Des();
     aStringPointer.Set(KPowerPressKey);
     TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
-    ShowExampleUiNoteL( aStringPointer );  
+    ShowNoteL( aStringPointer );  
     CleanupStack::PopAndDestroy(); // aString
     }
 
@@ -2014,8 +2046,7 @@
         {
         if ( iSysApPsmController && UiReady() )
             {
-            iSysApPsmController->BatteryLow( ETrue );
-            
+                    
                        
             if ( enableAutoPsm)
                 {
@@ -2056,64 +2087,42 @@
 // CSysApAppUi::ShowUiNoteL( const TSysApNoteIds aNote ) const
 // ----------------------------------------------------------------------------
 
-void CSysApAppUi::ShowUiNoteL( const TSysApNoteIds aNote ) const
+void CSysApAppUi::ShowUiNoteL( const TSysApNoteIds aNote ) 
     {
-    TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL aNote: %d"), aNote ) );
-    
+	TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL aNote") ) );
     TInt swState( StateOfProperty( KPSUidStartup, KPSGlobalSystemState ) );
-
     if( UiReady() || swState == ESwStateSecurityCheck)
-      {
+		{
+		TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL aNote: %d"), aNote ) );
           switch ( aNote )
             {
             case EBatteryLowNote:
                 {
-                 _LIT(KPowerPressKey,"Battery low");
-                 HBufC* aString = HBufC16::NewLC(100);
-                 TPtrC aStringPointer = aString->Des();
-                 aStringPointer.Set(KPowerPressKey);
-                 TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
-                 ShowExampleUiNoteL( aStringPointer );
-                 CleanupStack::PopAndDestroy(); // aString
+                 _LIT(KLowBattery,"Battery low");
+                 ShowNoteL( KLowBattery() );
                 }
                 break;
             case EBatteryFullNote:
                 {
-                _LIT(KPowerPressKey,"Battery full");
-                HBufC* aString = HBufC16::NewLC(100);
-                TPtrC aStringPointer = aString->Des();
-                aStringPointer.Set(KPowerPressKey);
-                TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
-                ShowExampleUiNoteL( aStringPointer );
-                CleanupStack::PopAndDestroy(); // aString
+                _LIT(KBatteryFull,"Battery full");
+                ShowNoteL( KBatteryFull() );
                 }
                 break;
             case ERechargeBatteryNote:
                 {
                 iSysApLightsController->BatteryEmptyL( ETrue );
-                _LIT(KPowerPressKey,"Battery empty. Recharge");
-                HBufC* aString = HBufC16::NewLC(100);
-                TPtrC aStringPointer = aString->Des();
-                aStringPointer.Set(KPowerPressKey);
-                TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
-                ShowExampleUiNoteL( aStringPointer );
-                CleanupStack::PopAndDestroy(); // aString
+                _LIT(KRechargeBattery,"Battery empty. Recharge");
+                ShowNoteL( KRechargeBattery() );
                 }
                 break;
             case ENotChargingNote:
                 {
-                _LIT(KPowerPressKey,"Not charging");
-                HBufC* aString = HBufC16::NewLC(100);
-                TPtrC aStringPointer = aString->Des();
-                aStringPointer.Set(KPowerPressKey);
-                TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
-                ShowExampleUiNoteL( aStringPointer );
-                CleanupStack::PopAndDestroy(); // aString
+                _LIT(KNotCharging,"Not charging");
+                ShowNoteL( KNotCharging() );
                 }
                 break;
             case EBatteryFullUnplugChargerNote:
                 {
-                TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) ); 
                 iSysApLightsController->BatteryEmptyL( ETrue );
                  _LIT(KunplugCharger,"txt_power_dpopinfo_unplug_charger_to_save_energy");                 
                  HBufC* unplugCharger = HbTextResolverSymbian::LoadL(KunplugCharger);
@@ -2124,22 +2133,28 @@
                 break;
             case EUnplugChargerNote:
                 {
-                _LIT(KPowerPressKey,"Unplug charger from power supply to save energy");
-                HBufC* aString = HBufC16::NewLC(250);
-                TPtrC aStringPointer = aString->Des();
-                aStringPointer.Set(KPowerPressKey);
-                TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
-                ShowExampleUiNoteL( aStringPointer );
-                CleanupStack::PopAndDestroy(); // aString
+                _LIT(KUnplugCharger,"Unplug charger from power supply to save energy");
+                ShowNoteL( KUnplugCharger() );
                 }
                 break;
+            case ESysApRestartPhone:
+                {
+				//Show the restart note
+				_LIT(KRestartPhone,"Phone will be restarted");
+				ShowNoteL( KRestartPhone() );
+				//wait for 3 seconds to close note. Other wise the shutdown will continue
+				//without waiting for note to complete.
+				User::After(4000000);
+				//Now restart the device
+				DoShutdownL( ETrue, RStarterSession::EDataRestoreReset );	                
+				}
+                break;
             default:
                 break;
             }
         }
     }
-
-
+	
 // ----------------------------------------------------------------------------
 // CSysApAppUi::BatteryEmptyL()
 // ----------------------------------------------------------------------------
@@ -2296,6 +2311,16 @@
             {
             TRACES( RDebug::Print( _L("CSysApAppUi::UpdateBatteryBarsL: Starting Charging") ) );
             iCharging = ETrue;
+            
+            TInt swState;
+            RProperty::Get( KPSUidStartup, KPSGlobalSystemState, swState );
+            if(swState == ESwStateCharging)
+                {
+                if(!iChargingAnimation)
+                    iChargingAnimation= CSysApChargingAnimation::NewL(); 
+				
+                iChargingAnimation->StartChargingAnimationL();
+                }
             }
         }
     else
@@ -2304,6 +2329,14 @@
             {
             TRACES( RDebug::Print( _L("CSysApAppUi::UpdateBatteryBarsL: Stopping Charging") ) );
             iCharging = EFalse;
+            
+            TInt swState;
+            RProperty::Get( KPSUidStartup, KPSGlobalSystemState, swState );
+            if(swState == ESwStateCharging)
+                {
+                delete iChargingAnimation;
+                iChargingAnimation=NULL;
+                }
             }
         }
     
@@ -2355,10 +2388,7 @@
         if ( showNote ) // Power Mgmt UI spec defines that no Charging note is shown while the phone is ringing/alerting
             {
             TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
-            _LIT(KChargingNote,"txt_power_management_dblist_charging");
-            HBufC* chargingNote = HbTextResolverSymbian::LoadL(KChargingNote);
-            CHbDeviceNotificationDialogSymbian::NotificationL(KNullDesC,*chargingNote);     
-                    
+                             
             }
         }
     }
@@ -2776,6 +2806,30 @@
                     Exit();
                     break;
 #endif
+                case EKeyPhoneSend:
+                    {
+                    TRACES( RDebug::Print(_L("CSysApAppUi::HandleKeyEventL, Send  key event received::Start") ) );
+                    if (UiReady()&& aKeyEvent.iRepeats == 0)
+                        {
+                        //Ignore LongPress on SEND key event as Long press generates Short press event too, 
+                        //And there is no Different use case for long press. 
+                        HandleSendKeyEventL();
+                        }
+                    TRACES( RDebug::Print(_L("CSysApAppUi::HandleKeyEventL, Send  key event received::End") ) );
+                    break;
+                    }
+                case EKeyPhoneEnd:
+                    {
+                    TRACES( RDebug::Print(_L("CSysApAppUi::HandleKeyEventL, End  key event received") ) );
+                    if (UiReady() && aKeyEvent.iRepeats == 0)
+                        {
+                        //Ignore LongPress on END key event as Long press generates Short press event too, 
+                        //And there is no Different use case for long press. 
+                        HandleEndKeyEventL();
+                        }
+                    TRACES( RDebug::Print(_L("CSysApAppUi::HandleKeyEventL()::EKeyPhoneEnd: End" ) ) );
+                    break;
+                    }
                 case EKeyPowerOff:
                     //Short power key press
                     iKeyBoardRepeatCount++;
@@ -3104,19 +3158,8 @@
 
 void CSysApAppUi::ShowEjectWaitNoteL( TInt /* aDriveToEject */ )
     {
- /*   if ( iSysApWaitNote )
-        {
-        return;
-        }
-    HBufC* text = iSysApDriveList->GetFormattedDriveNameLC(
-        aDriveToEject,
-        0, // Not used
-        R_QTN_EJECTING_MEMORY_NAME_WAIT );
-    iSysApWaitNote = CSysApWaitNote::NewL(
-        iSysApFeatureManager->CoverDisplaySupported() );
-    iSysApWaitNote->ShowNoteL( EClosingApplicationsNote, text );
-    CleanupStack::PopAndDestroy( text );
- */   }
+ 		// removed code , it can  be needed if the wait note required in 10.1
+    }
 
 // ----------------------------------------------------------------------------
 // CSysApAppUi::IsEjectQueryVisible
@@ -3142,9 +3185,6 @@
     iSysApDriveList->GetMemoryCardsL(
         iInsertedMemoryCards, CSysApDriveList::EIncludeInserted );
 
-    // Update memory card indicator status
-//    SetMemoryCardIndicatorL();
-
     // Handle unlock
     RunUnlockNotifierL();
     }
@@ -3721,15 +3761,6 @@
                         iSysApDriveList->MarkDriveInsertBeepIgnored( aDrive );
                         }
                     }
-
-//                if ( iDriveToDismount == aDrive && iSysApConfirmationQuery )
-                    {
-//                    if ( iSysApConfirmationQuery->CurrentQuery() == ESysApRemoveMmcNote )
-                        {
-                        // User put back ejected memory card or did not remove it
-//                        iSysApConfirmationQuery->Cancel();
-                        }
-                    }
                 RunUnlockNotifierL();
                 }
             break;
@@ -3754,8 +3785,6 @@
                     iSysApDriveList->ResetDriveInsertBeepIgnored( aDrive );
                     }
 
-//                CancelGlobalListQuery(); // Cancel power menu
-
                 if ( aDrive == defaultMemoryCard )
                     {
                     RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 );
@@ -3814,9 +3843,6 @@
     iSysApDriveList->GetMemoryCardsL(
         iInsertedMemoryCards, CSysApDriveList::EIncludeInserted );
 
-    // Update memory card indicator status
-//    SetMemoryCardIndicatorL();
-
     TRACES( RDebug::Print(
         _L( "CSysApAppUi::MMCStatusChangedL END: MMCCount: %d, iMMCEjectUsed: %d" ),
         iInsertedMemoryCards.Count(), iMMCEjectUsed ) );
@@ -4055,6 +4081,147 @@
         }
     }
 
+/**
+ * Handles SEND key events
+ * If SEND key is pressed in idle Home screen view, This will bring LOGS View without DialPad.
+ * otherwise, it brings LOGS&Dial pad.
+ */
+void CSysApAppUi::HandleSendKeyEventL()
+    {
+    TRACES( RDebug::Print( _L("CSysApAppUi::HandleSendKeyEventL: START") ) );    
+    //Check whether ForeGround app is HomeScreen
+    TInt hsStatus(EHomeScreenIdleState) ;
+    //Get the RProperty
+    User::LeaveIfError( RProperty::Get(KHsCategoryUid, KHsCategoryStateKey, hsStatus));
+    //Enable dialpad in Non-HS view
+    const TBool enableDialPad( EHomeScreenIdleState != hsStatus ); 
+    
+    //invoke LOGS/Dialer app
+    XQApplicationManager appMgr;
+    QScopedPointer<XQAiwRequest> request(appMgr.create(QString("logs"), XQI_LOGS_VIEW, XQOP_LOGS_SHOW, false));   
+    
+    if (!request.isNull()) 
+        {
+        TRACES( RDebug::Print( _L("CSysApAppUi::HandleSendKeyEventL::Request::Begin") ) );
+        int retValue = -1; 
+        
+        QVariantMap map;
+        map.insert(XQLOGS_VIEW_INDEX, QVariant(0)); 
+        map.insert(XQLOGS_SHOW_DIALPAD, QVariant(enableDialPad));
+        map.insert(XQLOGS_DIALPAD_TEXT, QVariant(QString()));
+        
+        QList<QVariant> arglist;
+
+        arglist.append(QVariant(map));
+        request->setArguments(arglist);
+        QVariant ret(retValue);        
+        request->send(ret);
+        TRACES( RDebug::Print( _L("CSysApAppUi::InvokeApp::Request::End") ) );
+        }
+    
+    TRACES( RDebug::Print( _L("CSysApAppUi::HandleSendKeyEventL: End") ) );
+    }
+
+/**
+ * Handles END key events
+ * If END key is pressed, Fore ground app will be exits and 
+ * Home screen view will brought to Foreground
+ */
+void CSysApAppUi::HandleEndKeyEventL()
+    {
+    TRACES( RDebug::Print( _L("CSysApAppUi::HandleEndKeyEventL: Start") ) );
+    //Get ForeGround App
+    TInt foregroundWindowGroupId = iEikonEnv->WsSession().GetFocusWindowGroup();
+    CApaWindowGroupName* doomedApp = CApaWindowGroupName::NewLC(iEikonEnv->WsSession(),foregroundWindowGroupId );
+    
+    //Bring the HS before killing the ForeGround App.
+    _LIT(KHsActivactionUri, "appto://20022F35?activityname=HsIdleView");
+    RApaLsSession apaLsSession;
+    CleanupClosePushL(apaLsSession);
+    User::LeaveIfError(apaLsSession.Connect());
+    CAfActivityLauncher *activityEnabler = CAfActivityLauncher::NewLC(apaLsSession, iEikonEnv->WsSession());
+    activityEnabler->launchActivityL(KHsActivactionUri);
+    CleanupStack::PopAndDestroy(activityEnabler);
+    CleanupStack::PopAndDestroy(&apaLsSession);
+        
+    //End or Kill the Foreground App
+    //If Phone is in HS idle view, End key have no impact.
+    if ( !doomedApp->IsSystem() )
+       {
+       TApaTask task( iEikonEnv->WsSession() );
+       task.SetWgId( foregroundWindowGroupId );
+       TRACES (
+               const TDesC& caption = doomedApp->Caption();
+               const TDesC& docname = doomedApp->DocName();
+               const TDesC& wgname = doomedApp->WindowGroupName();
+               TUid uid = doomedApp->AppUid();
+               RDebug::Print( _L("CSysApAppUi::HandleEndKeyEventL: Closing app \"%S\" (ThreadId %d, WgId %d, UID 0x%X); Docname: %S, WGName : %S"),
+                              &caption,
+                              (TUint)(task.ThreadId()),
+                              foregroundWindowGroupId,
+                              uid.iUid,
+                              &docname,
+                              &wgname);
+               );
+      task.EndTask();
+      TRACES( RDebug::Print(_L("CSysApAppUi::HandleKeyEventL::HandleEndKeyEventL, End  task event triggered") ) );
+       }
+    CleanupStack::PopAndDestroy(doomedApp);//doomedApp
+    TRACES( RDebug::Print( _L("CSysApAppUi::HandleEndKeyEventL: End") ) );    
+    }
+
+// ----------------------------------------------------------------------------
+// CSysApAppUi::GetTelServerL()
+// ----------------------------------------------------------------------------
+
+RTelServer* CSysApAppUi::GetTelServer()
+    {
+    if ( iSysApEtelConnector )
+        {
+        return iSysApEtelConnector->GetTelServer();
+        }
+    else
+        {
+        return NULL;
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CSysApAppUi::StartChargingAnimationL
+// ----------------------------------------------------------------------------
+//
+void CSysApAppUi::StartChargingAnimationL() 
+    {
+    TRACES( RDebug::Print( _L("CSysApAppUi::StartChargingAnimationL") ) );
+    if(!iChargingAnimation)
+        iChargingAnimation= CSysApChargingAnimation::NewL();
+    
+    iChargingAnimation->StartChargingAnimationL();
+    }
+    
+// ----------------------------------------------------------------------------
+// CSysApAppUi::StartChargingFullAnimationL
+// ----------------------------------------------------------------------------
+//
+void CSysApAppUi::StartChargingFullAnimationL() 
+    {
+    TRACES( RDebug::Print( _L("CSysApAppUi::StartChargingFullAnimationL") ) );
+    if(!iChargingAnimation)
+        iChargingAnimation= CSysApChargingAnimation::NewL();
+    
+    iChargingAnimation->StartChargingFullAnimationL();
+    }
+
+// ----------------------------------------------------------------------------
+// CSysApAppUi::StopChargingAnimationL
+// ----------------------------------------------------------------------------
+//
+void CSysApAppUi::StopChargingAnimationL()
+    {
+    TRACES( RDebug::Print( _L("CSysApAppUi::StopChargingAnimationL") ) );
+    if(iChargingAnimation)    
+        iChargingAnimation->StopAnimation();
+    }
 
 
 //end of file