equal
deleted
inserted
replaced
51 |
51 |
52 if ( !instance ) |
52 if ( !instance ) |
53 { |
53 { |
54 TRAPD( err, instance = CPhonePubSubProxy::NewL() ); |
54 TRAPD( err, instance = CPhonePubSubProxy::NewL() ); |
55 if ( err ) |
55 if ( err ) |
56 { |
56 { |
57 Panic( EPhoneUtilsCouldNotCreateSingleton ); |
57 Panic( EPhoneUtilsCouldNotCreateSingleton ); |
58 } |
58 } |
59 } |
59 } |
60 return instance; |
60 return instance; |
61 } |
61 } |
62 |
62 |
63 // --------------------------------------------------------- |
63 // --------------------------------------------------------- |
168 const TUint aKey, |
168 const TUint aKey, |
169 MPhonePubSubObserver* aObserver ) |
169 MPhonePubSubObserver* aObserver ) |
170 { |
170 { |
171 __ASSERT_DEBUG( aObserver, Panic( EPhoneUtilsParameterNotInitialized ) ); |
171 __ASSERT_DEBUG( aObserver, Panic( EPhoneUtilsParameterNotInitialized ) ); |
172 __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhonePubSubProxy::NotifyChangeL() "); |
172 __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhonePubSubProxy::NotifyChangeL() "); |
173 |
173 |
174 // make sure this a new item in iObserverArray |
174 // make sure this a new item in iObserverArray |
175 TBool requestIssued = EFalse; |
175 TBool requestIssued = EFalse; |
176 TBool sameRequestIssuedByObserver = EFalse; |
176 TBool sameRequestIssuedByObserver = EFalse; |
177 TInt count = iObserverArray->Count(); |
177 TInt count = iObserverArray->Count(); |
178 |
178 |
289 void CPhonePubSubProxy::CancelAllObserverNotifies( |
289 void CPhonePubSubProxy::CancelAllObserverNotifies( |
290 MPhonePubSubObserver* aObserver ) |
290 MPhonePubSubObserver* aObserver ) |
291 { |
291 { |
292 TInt count = iObserverArray->Count(); |
292 TInt count = iObserverArray->Count(); |
293 |
293 |
294 // Remove the observer |
294 // Remove the observer and its subscriptions |
295 TBool observerRemoved = EFalse; |
295 TBool observerRemoved = EFalse; |
296 for( TInt i = count - 1; i >= 0 && !observerRemoved; i-- ) |
296 for( TInt i = count - 1; i >= 0 && !observerRemoved; i-- ) |
297 { |
297 { |
298 const TPubSubObserverTag& observerTag = iObserverArray->At( i ); |
298 const TPubSubObserverTag& observerTag = iObserverArray->At( i ); |
299 if ( observerTag.iObserver == aObserver ) |
299 if ( observerTag.iObserver == aObserver ) |