equal
deleted
inserted
replaced
85 void CWrtDataPlugin::ConstructL() |
85 void CWrtDataPlugin::ConstructL() |
86 { |
86 { |
87 iInfo.iUid.iUid = WRTDP_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DATAPLUGIN; |
87 iInfo.iUid.iUid = WRTDP_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DATAPLUGIN; |
88 iPluginState = ENone; |
88 iPluginState = ENone; |
89 iHSForeGround = EFalse; |
89 iHSForeGround = EFalse; |
|
90 iKeyLockOn = EFalse; |
90 iNetworkStatus = EUnknown; |
91 iNetworkStatus = EUnknown; |
91 iData = CWrtData::NewL(this); |
92 iData = CWrtData::NewL(this); |
92 |
93 |
93 } |
94 } |
94 |
95 |
127 // Publishes widget's texts and images |
128 // Publishes widget's texts and images |
128 // --------------------------------------------------------------------------- |
129 // --------------------------------------------------------------------------- |
129 // |
130 // |
130 void CWrtDataPlugin::PublishL() |
131 void CWrtDataPlugin::PublishL() |
131 { |
132 { |
132 TInt err( KErrNone ); |
|
133 User::LeaveIfError( iRfs.Connect() ); |
133 User::LeaveIfError( iRfs.Connect() ); |
134 |
134 |
135 TInt observers( iObservers.Count() ); |
135 TInt observers( iObservers.Count() ); |
136 TInt transactionId = reinterpret_cast<TInt>( this ); |
136 TInt transactionId = reinterpret_cast<TInt>( this ); |
137 |
137 |
363 //Refresh a specific image of text in the widget |
363 //Refresh a specific image of text in the widget |
364 // --------------------------------------------------------------------------- |
364 // --------------------------------------------------------------------------- |
365 // |
365 // |
366 void CWrtDataPlugin::RefreshL(TDesC16& aOperation) |
366 void CWrtDataPlugin::RefreshL(TDesC16& aOperation) |
367 { |
367 { |
368 TInt err( KErrNone ); |
|
369 User::LeaveIfError( iRfs.Connect() ); |
368 User::LeaveIfError( iRfs.Connect() ); |
370 TInt observers( iObservers.Count() ); |
369 TInt observers( iObservers.Count() ); |
371 TInt transactionId = reinterpret_cast<TInt>( this ); |
370 TInt transactionId = reinterpret_cast<TInt>( this ); |
372 |
371 |
373 for ( TInt obsIndex = 0; obsIndex < observers; obsIndex++ ) |
372 for ( TInt obsIndex = 0; obsIndex < observers; obsIndex++ ) |
701 { |
700 { |
702 iHSForeGround = ETrue; |
701 iHSForeGround = ETrue; |
703 } |
702 } |
704 case EAiBacklightOn: |
703 case EAiBacklightOn: |
705 { |
704 { |
706 if ( iPluginState == ESuspend ) |
705 if ( iPluginState == ESuspend && !iKeyLockOn ) |
707 { |
706 { |
708 iPluginState = EResume; |
707 iPluginState = EResume; |
709 iData->ResumeL(); |
708 iData->ResumeL(); |
710 } |
709 } |
711 break; |
710 break; |
712 } |
711 } |
713 case EAiKeylockDisabled: |
712 case EAiKeylockDisabled: |
714 { |
713 { |
|
714 iKeyLockOn = EFalse; |
715 // Key lock events considered only if HS is in foreground |
715 // Key lock events considered only if HS is in foreground |
716 if ( iHSForeGround && iPluginState == ESuspend ) |
716 if ( iHSForeGround && iPluginState == ESuspend ) |
717 { |
717 { |
718 iPluginState = EResume; |
718 iPluginState = EResume; |
719 iData->ResumeL(); |
719 iData->ResumeL(); |
720 } |
720 } |
721 break; |
721 break; |
722 } |
722 } |
723 case EAiKeylockEnabled: |
723 case EAiKeylockEnabled: |
724 { |
724 { |
|
725 iKeyLockOn = ETrue; |
725 // Key lock events considered only if HS is in foreground |
726 // Key lock events considered only if HS is in foreground |
726 if ( iHSForeGround && iPluginState == EResume ) |
727 if ( iHSForeGround && iPluginState == EResume ) |
727 { |
728 { |
728 iPluginState = ESuspend ; |
729 iPluginState = ESuspend ; |
729 iData->SuspendL(); |
730 iData->SuspendL(); |