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". |
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; |
|
78 TRAPD( err, iSession = CRepository::NewL( KCRUidLogs ) ); |
72 TRAPD( err, iSession = CRepository::NewL( KCRUidLogs ) ); |
79 TRACES( RDebug::Print( _L("CSysApCenRepLogsObserver::ConstructL: err=%d (KCRUidLogs)"), err ) ); |
73 TRACES( RDebug::Print( _L("CSysApCenRepLogsObserver::ConstructL: err=%d (KCRUidLogs)"), err ) ); |
80 User::LeaveIfError( err ); |
74 User::LeaveIfError( err ); |
81 iNewMissedCallsHandler = |
75 iNewMissedCallsHandler = |
82 CCenRepNotifyHandler::NewL( *this, |
76 CCenRepNotifyHandler::NewL( *this, |
83 *iSession, |
77 *iSession, |
84 CCenRepNotifyHandler::EIntKey, |
78 CCenRepNotifyHandler::EIntKey, |
85 KLogsNewMissedCalls ); |
79 KLogsNewMissedCalls ); |
86 iNewMissedCallsHandler->StartListeningL(); |
80 iNewMissedCallsHandler->StartListeningL(); |
87 |
81 |
88 iSession->Get(KLogsNewMissedCalls, iMissedCallsValue); |
82 User::LeaveIfError(iSession->Get(KLogsNewMissedCalls, iMissedCallsValue)); |
89 } |
83 } |
90 |
84 |
91 // ---------------------------------------------------------------------------- |
85 // ---------------------------------------------------------------------------- |
92 // CSysApCenRepLogsObserver::HandleNotifyInt() |
86 // CSysApCenRepLogsObserver::HandleNotifyInt() |
93 // ---------------------------------------------------------------------------- |
87 // ---------------------------------------------------------------------------- |
152 TRACES( RDebug::Print( _L("CSysApCenRepLogsObserver::UpdateMissedCallsIndicatorL(): iMissedCallsValue=%d, UI flags=%d" ), |
146 TRACES( RDebug::Print( _L("CSysApCenRepLogsObserver::UpdateMissedCallsIndicatorL(): iMissedCallsValue=%d, UI flags=%d" ), |
153 iMissedCallsValue, iSimChangedCheckDone && iUiReady ) ); |
147 iMissedCallsValue, iSimChangedCheckDone && iUiReady ) ); |
154 |
148 |
155 if ( iSimChangedCheckDone && iUiReady ) |
149 if ( iSimChangedCheckDone && iUiReady ) |
156 { |
150 { |
157 // TInt newState( iMissedCallsValue > 0 ? EAknIndicatorStateOn : EAknIndicatorStateOff ); |
151 TInt newState( iMissedCallsValue > 0 ? EAknIndicatorStateOn : EAknIndicatorStateOff ); |
158 |
152 |
159 // iSysApAppUi.SetIndicatorStateL( EAknIndicatorMissedCalls, newState ); |
153 iSysApAppUi.SetIndicatorStateL( EAknIndicatorMissedCalls, newState ); |
160 } |
154 } |
161 } |
155 } |
162 |
156 |
163 // End of File |
157 // End of File |
164 |
158 |