coreapplicationuis/SysAp/Src/SysApAppUi.cpp
changeset 29 6a787171e1de
parent 28 b0b858956ed5
child 46 eea20ed08f4b
child 48 2222076f5c60
equal deleted inserted replaced
28:b0b858956ed5 29:6a787171e1de
   104 
   104 
   105 #include <sysap.mbg>
   105 #include <sysap.mbg>
   106 
   106 
   107 #include "SysApShutdownAnimation.h"
   107 #include "SysApShutdownAnimation.h"
   108 
   108 
   109 #include <hwrmfmtx.h>
   109 //#include <hwrmfmtx.h>
   110 #include <hwrmfmtxdomainpskeys.h>
   110 //#include <hwrmfmtxdomainpskeys.h>
   111 #include <hwrmfmtxdomaincrkeys.h>
   111 //#include <hwrmfmtxdomaincrkeys.h>
   112 #include "sysapcenrepfmtxobserver.h"
   112 //#include "sysapcenrepfmtxobserver.h"
   113 
   113 
   114 #include "SysApKeySndHandler.h"
   114 #include "SysApKeySndHandler.h"
   115 
   115 
   116 #include <ir_sock.h> // KIrdaPropertyCategory // KIrdaStatus
   116 #include <ir_sock.h> // KIrdaPropertyCategory // KIrdaStatus
   117 
   117 
   334     iSysApCenRepLightSettingsObserver = CSysApCenRepLightSettingsObserver::NewL( *this );
   334     iSysApCenRepLightSettingsObserver = CSysApCenRepLightSettingsObserver::NewL( *this );
   335 
   335 
   336     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApCenRepBtObserver::NewL") ) );
   336     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApCenRepBtObserver::NewL") ) );
   337     iSysApCenRepBtObserver = CSysApCenRepBtObserver::NewL( *this );
   337     iSysApCenRepBtObserver = CSysApCenRepBtObserver::NewL( *this );
   338 
   338 
   339     if ( iSysApFeatureManager->FmTxSupported() )
   339 /*    if ( iSysApFeatureManager->FmTxSupported() )
   340         {
   340         {
   341         TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApCenRepFmTxObserver::NewL") ) );        
   341         TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApCenRepFmTxObserver::NewL") ) );        
   342         iSysApCenRepFmTxObserver = CSysApCenRepFmTxObserver::NewL( *this );    
   342         iSysApCenRepFmTxObserver = CSysApCenRepFmTxObserver::NewL( *this );    
   343         }
   343         }
   344 
   344 */
   345     // Define P&S keys "owned" by SysAp
   345     // Define P&S keys "owned" by SysAp
   346     RProperty::Define( KPSUidUikon, KUikMMCInserted, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy );
   346     RProperty::Define( KPSUidUikon, KUikMMCInserted, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy );
   347     //initially assuming that the memory card is not inserted
   347     //initially assuming that the memory card is not inserted
   348     RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 );
   348     RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 );
   349     TDriveInfo driveInfo;
   349     TDriveInfo driveInfo;
  1210     delete iSysApCenRepCallForwardingObserver;
  1210     delete iSysApCenRepCallForwardingObserver;
  1211     delete iSysApConnectionMonitorObserver;
  1211     delete iSysApConnectionMonitorObserver;
  1212     delete iSysApCenRepLightSettingsObserver;
  1212     delete iSysApCenRepLightSettingsObserver;
  1213     delete iSysApCenRepLogsObserver;
  1213     delete iSysApCenRepLogsObserver;
  1214     delete iSysApCenRepBtObserver;
  1214     delete iSysApCenRepBtObserver;
  1215     delete iSysApCenRepFmTxObserver;
  1215 //    delete iSysApCenRepFmTxObserver;
  1216     delete iSysApCenRepHacSettingObserver;
  1216     delete iSysApCenRepHacSettingObserver;
  1217     delete iSysApCenRepController;
  1217     delete iSysApCenRepController;
  1218 
  1218 
  1219     delete iSysApPubSubObserver;
  1219     delete iSysApPubSubObserver;
  1220 
  1220 
  1317         case EKeypadActiveNote:
  1317         case EKeypadActiveNote:
  1318             noteType = EAknGlobalInformationNote;
  1318             noteType = EAknGlobalInformationNote;
  1319             tone = EAvkonSIDInformationTone;
  1319             tone = EAvkonSIDInformationTone;
  1320             secondaryDisplayId = SecondaryDisplay::ECmdShowKeypadActiveNote;
  1320             secondaryDisplayId = SecondaryDisplay::ECmdShowKeypadActiveNote;
  1321             break;
  1321             break;
  1322         case EFmTxAccessoryStandbyNote:
  1322 /*        case EFmTxAccessoryStandbyNote:
  1323             noteType = EAknGlobalInformationNote; 
  1323             noteType = EAknGlobalInformationNote; 
  1324             tone = EAvkonSIDInformationTone;
  1324             tone = EAvkonSIDInformationTone;
  1325             secondaryDisplayId = SecondaryDisplay::ECmdShowFmTxStandbyInAccessoryConnectionNote;
  1325             secondaryDisplayId = SecondaryDisplay::ECmdShowFmTxStandbyInAccessoryConnectionNote;
  1326             break;
  1326             break;
  1327         case EFmTxAccessoryForbidsNote:
  1327         case EFmTxAccessoryForbidsNote:
  1342         case EFmTxOffNote:
  1342         case EFmTxOffNote:
  1343             noteType = EAknGlobalInformationNote; 
  1343             noteType = EAknGlobalInformationNote; 
  1344             tone = EAvkonSIDInformationTone;
  1344             tone = EAvkonSIDInformationTone;
  1345             secondaryDisplayId = SecondaryDisplay::ECmdShowFmTxDisabledNote;
  1345             secondaryDisplayId = SecondaryDisplay::ECmdShowFmTxDisabledNote;
  1346             break;
  1346             break;
  1347         case EBatteryFullUnplugChargerNote:
  1347 */        case EBatteryFullUnplugChargerNote:
  1348             noteType = EAknGlobalBatteryFullUnplugNote;
  1348             noteType = EAknGlobalBatteryFullUnplugNote;
  1349             tone = EAvkonSIDInformationTone;
  1349             tone = EAvkonSIDInformationTone;
  1350             break;
  1350             break;
  1351         case EUnplugChargerNote:
  1351         case EUnplugChargerNote:
  1352             noteType = EAknGlobalUnplugChargerNote;
  1352             noteType = EAknGlobalUnplugChargerNote;
  1418                     noteStringBuf = StringLoader::LoadLC( R_QTN_KEYG_CONF_KEYPAD_ACTIVE,
  1418                     noteStringBuf = StringLoader::LoadLC( R_QTN_KEYG_CONF_KEYPAD_ACTIVE,
  1419                                                           iEikonEnv );
  1419                                                           iEikonEnv );
  1420                     }
  1420                     }
  1421                 note->SetAnimation( R_QGN_NOTE_KEYGUARD_OPEN_ANIM );
  1421                 note->SetAnimation( R_QGN_NOTE_KEYGUARD_OPEN_ANIM );
  1422                 break;
  1422                 break;
  1423             case EFmTxOnNote:
  1423 /*            case EFmTxOnNote:
  1424                 {
  1424                 {
  1425                 const TInt KFrequencyMaxLength(7);
  1425                 const TInt KFrequencyMaxLength(7);
  1426                 // read frequency
  1426                 // read frequency
  1427                 TInt frequencykHz = iSysApCenRepFmTxObserver->Frequency();
  1427                 TInt frequencykHz = iSysApCenRepFmTxObserver->Frequency();
  1428                 TReal frequencyMHz = static_cast<TReal>( frequencykHz ) / KCoefficientKhzToMhz; // kHz to Mhz
  1428                 TReal frequencyMHz = static_cast<TReal>( frequencykHz ) / KCoefficientKhzToMhz; // kHz to Mhz
  1457                 {
  1457                 {
  1458                 noteStringBuf = StringLoader::LoadLC( R_QTN_FMTX_SYSAP_INFO_NOTE_DISABLED, 
  1458                 noteStringBuf = StringLoader::LoadLC( R_QTN_FMTX_SYSAP_INFO_NOTE_DISABLED, 
  1459                                                        iEikonEnv );
  1459                                                        iEikonEnv );
  1460                 break;
  1460                 break;
  1461                 }
  1461                 }
  1462             case EPowerSaveModeActivated:
  1462 */            case EPowerSaveModeActivated:
  1463                 noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_ACTIVATED_CONF_NOTE, iEikonEnv );
  1463                 noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_ACTIVATED_CONF_NOTE, iEikonEnv );
  1464                 break;
  1464                 break;
  1465             case EPowerSaveModeDeactivated:
  1465             case EPowerSaveModeDeactivated:
  1466                 noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_DEACTIVATED_CONF_NOTE, iEikonEnv );
  1466                 noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_DEACTIVATED_CONF_NOTE, iEikonEnv );
  1467                 break;
  1467                 break;
  1476             }
  1476             }
  1477 
  1477 
  1478         note->SetTone( tone );
  1478         note->SetTone( tone );
  1479 
  1479 
  1480         // Set secondary display data if necessary
  1480         // Set secondary display data if necessary
  1481         if ( iSysApFeatureManager->CoverDisplaySupported() && secondaryDisplayId != SecondaryDisplay::ECmdNoNote)
  1481 /*        if ( iSysApFeatureManager->CoverDisplaySupported() && secondaryDisplayId != SecondaryDisplay::ECmdNoNote)
  1482             {
  1482             {
  1483             TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL - Notifying secondary display") ) );
  1483             TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL - Notifying secondary display") ) );
  1484             CAknSDData* sd;
  1484             CAknSDData* sd;
  1485             
  1485             
  1486             if ( aNote == EFmTxOnNote ) // frequency information is passed to secondary display
  1486             if ( aNote == EFmTxOnNote ) // frequency information is passed to secondary display
  1493                 sd = CAknSDData::NewL(SecondaryDisplay::KCatSysAp, secondaryDisplayId, KNullDesC8);
  1493                 sd = CAknSDData::NewL(SecondaryDisplay::KCatSysAp, secondaryDisplayId, KNullDesC8);
  1494                 }
  1494                 }
  1495              
  1495              
  1496             note->SetSecondaryDisplayData(sd); // ownership to notifier client
  1496             note->SetSecondaryDisplayData(sd); // ownership to notifier client
  1497             }
  1497             }
  1498 
  1498 */
  1499         if ( noteStringBuf )
  1499         if ( noteStringBuf )
  1500             {
  1500             {
  1501             TPtr textBuffer = noteStringBuf->Des();
  1501             TPtr textBuffer = noteStringBuf->Des();
  1502             TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL Next:note->ShowNoteL" ) ) );
  1502             TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL Next:note->ShowNoteL" ) ) );
  1503             note->ShowNoteL( noteType, textBuffer );
  1503             note->ShowNoteL( noteType, textBuffer );
  2191 // ----------------------------------------------------------------------------
  2191 // ----------------------------------------------------------------------------
  2192 // CSysApAppUi::SwitchFromOnlineToOfflineModeL()
  2192 // CSysApAppUi::SwitchFromOnlineToOfflineModeL()
  2193 // ----------------------------------------------------------------------------
  2193 // ----------------------------------------------------------------------------
  2194 void CSysApAppUi::SwitchFromOnlineToOfflineModeL()
  2194 void CSysApAppUi::SwitchFromOnlineToOfflineModeL()
  2195     {
  2195     {
  2196     if ( iSysApFeatureManager->FmTxSupported() )
  2196 /*    if ( iSysApFeatureManager->FmTxSupported() )
  2197         {
  2197         {
  2198         TFmTxState state = static_cast<TFmTxState>(StateOfProperty( KPSUidHWRMFmTx, KHWRMFmTxStatus ));
  2198         TFmTxState state = static_cast<TFmTxState>(StateOfProperty( KPSUidHWRMFmTx, KHWRMFmTxStatus ));
  2199         switch ( state )
  2199         switch ( state )
  2200             {
  2200             {
  2201             case EFmTxStateActive:
  2201             case EFmTxStateActive:
  2207             default:
  2207             default:
  2208                 // do nothing
  2208                 // do nothing
  2209                 break;                
  2209                 break;                
  2210             }
  2210             }
  2211         }
  2211         }
  2212     iSysApOfflineModeController->SwitchFromOnlineToOfflineModeL();
  2212 */    iSysApOfflineModeController->SwitchFromOnlineToOfflineModeL();
  2213     }
  2213     }
  2214 
  2214 
  2215 // ----------------------------------------------------------------------------
  2215 // ----------------------------------------------------------------------------
  2216 // CSysApAppUi::OfflineModeChangedL()
  2216 // CSysApAppUi::OfflineModeChangedL()
  2217 // ----------------------------------------------------------------------------
  2217 // ----------------------------------------------------------------------------
  2288 
  2288 
  2289 TBool CSysApAppUi::DeviceLockState() const
  2289 TBool CSysApAppUi::DeviceLockState() const
  2290     {
  2290     {
  2291     return iDeviceLockEnabled;
  2291     return iDeviceLockEnabled;
  2292     }
  2292     }
  2293 
  2293 /*
  2294 // ----------------------------------------------------------------------------
  2294 // ----------------------------------------------------------------------------
  2295 // CSysApAppUi::ChangeFmTxStateL()
  2295 // CSysApAppUi::ChangeFmTxStateL()
  2296 // ----------------------------------------------------------------------------     
  2296 // ----------------------------------------------------------------------------     
  2297 void CSysApAppUi::ChangeFmTxStateL( TBool aEnable )
  2297 void CSysApAppUi::ChangeFmTxStateL( TBool aEnable )
  2298     {
  2298     {
  2306        {
  2306        {
  2307        fmtx->DisableL();
  2307        fmtx->DisableL();
  2308        }
  2308        }
  2309     CleanupStack::PopAndDestroy( fmtx );
  2309     CleanupStack::PopAndDestroy( fmtx );
  2310     } 
  2310     } 
       
  2311 */
  2311 
  2312 
  2312 // ----------------------------------------------------------------------------
  2313 // ----------------------------------------------------------------------------
  2313 // CSysApAppUi::SetIhfIndicatorL()
  2314 // CSysApAppUi::SetIhfIndicatorL()
  2314 // ----------------------------------------------------------------------------
  2315 // ----------------------------------------------------------------------------
  2315 void CSysApAppUi::SetIhfIndicatorL()
  2316 void CSysApAppUi::SetIhfIndicatorL()