accessoryservices/pluggeddisplay/pluggeddisplayengine/src/compositecablestateconnected.cpp
changeset 45 c6215323ad55
parent 35 f7565e9c9ce8
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/compositecablestateconnected.cpp	Wed Jun 23 19:38:32 2010 +0300
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/compositecablestateconnected.cpp	Tue Jul 06 15:43:30 2010 +0300
@@ -100,7 +100,8 @@
 void CCompositeCableStateConnected::Enter( )
     {
     FUNC_LOG;    
-    
+
+	iTVOutConfigForComposite.UpdateOverscanValues();
     ClearAvailableTvOutConfig();
     
     iTVOutConfigForSettingChanges->ListenSettingsChanges();
@@ -192,16 +193,24 @@
         TUint32 aId )
     {
     FUNC_LOG;
+	INFO("Cenrep Value Changed");
     if ( KCRUidTvoutSettings == aRepositoryId )
         {
         if (    ( KSettingsTvAspectRatio == aId ) ||
                 ( KSettingsTvoutFlickerFilter == aId  ) ||
-                ( KSettingsTvSystemInfo == aId ) ||
-                ( KSettingsTvoutVerticalOverscan == aId) )
+                ( KSettingsTvSystemInfo == aId ) )
             {
             Input( EPDEIfCentralRepositoryWatch, EPDEIfCentralRepositoryWatchEventKeyChanged );
             }
-        else
+        else if( KSettingsTvoutVerticalOverscan == aId )
+			{
+			if( iTVOutConfigForComposite.UpdateOverscanValues() )
+				{
+				INFO( "There is a real overscan change" );
+				Input( EPDEIfCentralRepositoryWatch, EPDEIfCentralRepositoryWatchEventOverscanKeyChanged );
+				}
+			}
+		else
             {
             INFO_1("Unexpected CR key ID, aId 0x%x", aId );            
             }       
@@ -375,12 +384,38 @@
 			iResettingInput = ETrue;
             Enter();
             }
+		else if ( EPDEIfCentralRepositoryWatchEventOverscanKeyChanged == aEvent )
+			{
+			INFO( "Event: EPDEIfCentralRepositoryWatchEventOverscanKeyChanged" );
+			iTVOutConfigForComposite.SetConfig( ETrue );
+			}
         else
             {
             INFO_1( "Unknown Event Id: %i", aEvent );        
             }
         break;
         }       
+    case EPDEIfTVOutConfig:
+        {       
+        INFO( "Interface: EPDEIfTVOutConfig" );       
+		if ( EIfTVOutConfigEventSet == aEvent )
+			{
+			INFO( "Event: EIfTVOutConfigEventSet" );
+			// Stay on the same state
+			}
+		else if ( EIfTVOutConfigEventSetFailed == aEvent )
+			{
+			INFO( "Event: EIfTVOutConfigEventSetFailed" );
+            iCRWatchForFlickerFilter->Cancel();
+            iCRWatchForAspectRatio->Cancel();
+            iCRWatchForTvSystem->Cancel();
+			iCRWatchForVOverScan->Cancel();
+            ClearAvailableTvOutConfig();
+            iTVOutConfigForComposite.Disable();
+            iSubState = ESubStateDisabling;
+			}
+		break;
+		}
     default:
         {
         INFO_2( "Event from unexpected interface. if Id, event id: %i", aInterfaceId, aEvent );