1 /* |
1 /* |
2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005 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". |
67 // CSysApCenRepLogsObserver::ConstructL() |
67 // CSysApCenRepLogsObserver::ConstructL() |
68 // ---------------------------------------------------------------------------- |
68 // ---------------------------------------------------------------------------- |
69 |
69 |
70 void CSysApCenRepLogsObserver::ConstructL() |
70 void CSysApCenRepLogsObserver::ConstructL() |
71 { |
71 { |
|
72 const TUid KCRUidLogs = {0x101F874E}; |
|
73 /** |
|
74 * Informs the Logs application about the amount of new missed calls. |
|
75 * Integer type |
|
76 **/ |
|
77 const TUint32 KLogsNewMissedCalls = 0x00000006; |
72 TRAPD( err, iSession = CRepository::NewL( KCRUidLogs ) ); |
78 TRAPD( err, iSession = CRepository::NewL( KCRUidLogs ) ); |
73 TRACES( RDebug::Print( _L("CSysApCenRepLogsObserver::ConstructL: err=%d (KCRUidLogs)"), err ) ); |
79 TRACES( RDebug::Print( _L("CSysApCenRepLogsObserver::ConstructL: err=%d (KCRUidLogs)"), err ) ); |
74 User::LeaveIfError( err ); |
80 User::LeaveIfError( err ); |
75 iNewMissedCallsHandler = |
81 iNewMissedCallsHandler = |
76 CCenRepNotifyHandler::NewL( *this, |
82 CCenRepNotifyHandler::NewL( *this, |
77 *iSession, |
83 *iSession, |
78 CCenRepNotifyHandler::EIntKey, |
84 CCenRepNotifyHandler::EIntKey, |
79 KLogsNewMissedCalls ); |
85 KLogsNewMissedCalls ); |
80 iNewMissedCallsHandler->StartListeningL(); |
86 iNewMissedCallsHandler->StartListeningL(); |
81 |
87 |
82 User::LeaveIfError(iSession->Get(KLogsNewMissedCalls, iMissedCallsValue)); |
88 iSession->Get(KLogsNewMissedCalls, iMissedCallsValue); |
83 } |
89 } |
84 |
90 |
85 // ---------------------------------------------------------------------------- |
91 // ---------------------------------------------------------------------------- |
86 // CSysApCenRepLogsObserver::HandleNotifyInt() |
92 // CSysApCenRepLogsObserver::HandleNotifyInt() |
87 // ---------------------------------------------------------------------------- |
93 // ---------------------------------------------------------------------------- |
146 TRACES( RDebug::Print( _L("CSysApCenRepLogsObserver::UpdateMissedCallsIndicatorL(): iMissedCallsValue=%d, UI flags=%d" ), |
152 TRACES( RDebug::Print( _L("CSysApCenRepLogsObserver::UpdateMissedCallsIndicatorL(): iMissedCallsValue=%d, UI flags=%d" ), |
147 iMissedCallsValue, iSimChangedCheckDone && iUiReady ) ); |
153 iMissedCallsValue, iSimChangedCheckDone && iUiReady ) ); |
148 |
154 |
149 if ( iSimChangedCheckDone && iUiReady ) |
155 if ( iSimChangedCheckDone && iUiReady ) |
150 { |
156 { |
151 TInt newState( iMissedCallsValue > 0 ? EAknIndicatorStateOn : EAknIndicatorStateOff ); |
157 // TInt newState( iMissedCallsValue > 0 ? EAknIndicatorStateOn : EAknIndicatorStateOff ); |
152 |
158 |
153 iSysApAppUi.SetIndicatorStateL( EAknIndicatorMissedCalls, newState ); |
159 // iSysApAppUi.SetIndicatorStateL( EAknIndicatorMissedCalls, newState ); |
154 } |
160 } |
155 } |
161 } |
156 |
162 |
157 // End of File |
163 // End of File |
158 |
164 |