phoneapp/phoneuicontrol/src/cphonesystemeventhandler.cpp
branchRCL_3
changeset 62 5266b1f337bd
parent 61 41a7f70b3818
child 81 c26cc2a7c548
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
     1 /*
     1 /*
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    20 #include <telinformationpskeys.h>
    20 #include <telinformationpskeys.h>
    21 #include <telephonyvariant.hrh>
    21 #include <telephonyvariant.hrh>
    22 #include <UikonInternalPSKeys.h>
    22 #include <UikonInternalPSKeys.h>
    23 #include <startupdomainpskeys.h>
    23 #include <startupdomainpskeys.h>
    24 #include <hwrmdomainpskeys.h>
    24 #include <hwrmdomainpskeys.h>
       
    25 #include <oem/simlockuikeys.h>
       
    26 #include <featmgr.h>
       
    27 #include <coreapplicationuisdomainpskeys.h>
    25 
    28 
    26 #include "cphonesystemeventhandler.h"
    29 #include "cphonesystemeventhandler.h"
    27 #include "mphonestate.h"
    30 #include "mphonestate.h"
    28 #include "mphonestatemachine.h"
    31 #include "mphonestatemachine.h"
    29 #include "cphonecenrepproxy.h"
    32 #include "cphonecenrepproxy.h"
    85     // Set up notifications for Sim security state values.
    88     // Set up notifications for Sim security state values.
    86     CPhonePubSubProxy::Instance()->NotifyChangeL(
    89     CPhonePubSubProxy::Instance()->NotifyChangeL(
    87         KPSUidStartup,
    90         KPSUidStartup,
    88         KStartupSimSecurityStatus,
    91         KStartupSimSecurityStatus,
    89         this );
    92         this );
       
    93     
       
    94     // Set up notifications for autolock state changes.
       
    95     CPhonePubSubProxy::Instance()->NotifyChangeL(
       
    96     	KPSUidCoreApplicationUIs,
       
    97     	KCoreAppUIsAutolockStatus,
       
    98     	this );
       
    99     
    90 
   100 
    91     if ( CPhoneCenRepProxy::Instance()->IsTelephonyFeatureSupported(
   101     if ( CPhoneCenRepProxy::Instance()->IsTelephonyFeatureSupported(
    92             KTelephonyLVFlagSwivelInDevice ))
   102             KTelephonyLVFlagSwivelInDevice ))
    93         {
   103         {
    94         // Set up notifications for Swivel state.
   104         // Set up notifications for Swivel state.
    95         CPhonePubSubProxy::Instance()->NotifyChangeL(
   105         CPhonePubSubProxy::Instance()->NotifyChangeL(
    96             KPSUidHWRM,
   106             KPSUidHWRM,
    97             KHWRMGripStatus,
   107             KHWRMGripStatus,
    98             this );
   108             this );
    99         }
   109         }
       
   110     
       
   111     if ( FeatureManager::FeatureSupported( KFeatureIdFfSimlockUi ) )
       
   112        {
       
   113         //Set up notifications for Sim Lock Dialogs values.
       
   114         CPhonePubSubProxy::Instance()->NotifyChangeL(
       
   115             KSimLockProperty,
       
   116             ESimLockActiveStatus,
       
   117             this );
       
   118        }
       
   119 
       
   120     if ( FeatureManager::FeatureSupported( KFeatureIdFfEntryPointForVideoShare ) )
       
   121         {
       
   122         // Set up notifications for Video Share (un)availability
       
   123         CPhonePubSubProxy::Instance()->NotifyChangeL(
       
   124             KPSUidCoreApplicationUIs,
       
   125             KCoreAppUIsVideoSharingIndicator,
       
   126             this );
       
   127         }
   100     }
   128     }
   101 
   129 
   102 // ---------------------------------------------------------
   130 // ---------------------------------------------------------
   103 // CPhoneSystemEventHandler::CPhoneSystemEventHandler
   131 // CPhoneSystemEventHandler::CPhoneSystemEventHandler
   104 // C++ default constructor
   132 // C++ default constructor
   108 CPhoneSystemEventHandler::~CPhoneSystemEventHandler()
   136 CPhoneSystemEventHandler::~CPhoneSystemEventHandler()
   109     {
   137     {
   110     }
   138     }
   111 
   139 
   112 // ---------------------------------------------------------
   140 // ---------------------------------------------------------
       
   141 // CPhoneSystemEventHandler::DynInitMenuPaneL
       
   142 // ---------------------------------------------------------
       
   143 //
       
   144 void CPhoneSystemEventHandler::DynInitMenuPaneL(
       
   145     TInt aResourceId,
       
   146     CEikMenuPane* aMenuPane )
       
   147     {
       
   148     iStateMachine->State()->DynInitMenuPaneL( aResourceId, aMenuPane );
       
   149     }
       
   150 
       
   151 // ---------------------------------------------------------
       
   152 // CPhoneSystemEventHandler::DynInitMenuBarL
       
   153 // ---------------------------------------------------------
       
   154 //
       
   155 void CPhoneSystemEventHandler::DynInitMenuBarL(
       
   156     TInt aResourceId,
       
   157     CEikMenuBar* aMenuBar )
       
   158     {
       
   159     iStateMachine->State()->DynInitMenuBarL( aResourceId, aMenuBar );
       
   160     }
       
   161 
       
   162 // ---------------------------------------------------------
   113 // CPhoneSystemEventHandler::HandleSystemEventL
   163 // CPhoneSystemEventHandler::HandleSystemEventL
   114 // ---------------------------------------------------------
   164 // ---------------------------------------------------------
   115 //
   165 //
   116 void CPhoneSystemEventHandler::HandleSystemEventL( const TWsEvent& aEvent )
   166 void CPhoneSystemEventHandler::HandleSystemEventL( const TWsEvent& aEvent )
   117     {
   167     {
   149 // ---------------------------------------------------------
   199 // ---------------------------------------------------------
   150 //
   200 //
   151 void CPhoneSystemEventHandler::HandleIdleForegroundEventL()
   201 void CPhoneSystemEventHandler::HandleIdleForegroundEventL()
   152     {
   202     {
   153     iStateMachine->State()->HandleIdleForegroundEventL();
   203     iStateMachine->State()->HandleIdleForegroundEventL();
   154     }
       
   155 
       
   156 // ---------------------------------------------------------
       
   157 // CPhoneSystemEventHandler::HandleKeyLockEnabled
       
   158 // ---------------------------------------------------------
       
   159 //
       
   160 void CPhoneSystemEventHandler::HandleKeyLockEnabled( TBool aKeylockEnabled )
       
   161     {
       
   162     iStateMachine->State()->HandleKeyLockEnabled( aKeylockEnabled );
       
   163     }
   204     }
   164 
   205 
   165 // -----------------------------------------------------------
   206 // -----------------------------------------------------------
   166 // CPhoneSystemEventHandler::HandleEnvironmentChangeL
   207 // CPhoneSystemEventHandler::HandleEnvironmentChangeL
   167 // -----------------------------------------------------------
   208 // -----------------------------------------------------------
   187 void CPhoneSystemEventHandler::HandlePropertyChangedL(
   228 void CPhoneSystemEventHandler::HandlePropertyChangedL(
   188     const TUid& aCategory,
   229     const TUid& aCategory,
   189     const TUint aKey,
   230     const TUint aKey,
   190     const TInt aValue )
   231     const TInt aValue )
   191     {
   232     {
   192     iStateMachine->State()->HandlePropertyChangedL( aCategory, aKey, aValue );
   233     iStateMachine->HandlePropertyChangedL( aCategory, aKey, aValue );
   193     }
   234     }
   194 
   235 
   195 // -----------------------------------------------------------
   236 // -----------------------------------------------------------
   196 // CPhoneSystemEventHandler::HandleCenRepChangeL
   237 // CPhoneSystemEventHandler::HandleCenRepChangeL
   197 // -----------------------------------------------------------
   238 // -----------------------------------------------------------