idlehomescreen/nativeuicontroller/src/aititlepanerenderer.cpp
branchRCL_3
changeset 35 3321d3e205b6
parent 34 5456b4e8b3a8
equal deleted inserted replaced
34:5456b4e8b3a8 35:3321d3e205b6
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // System includes
    18 // System includes
    19 #include <StringLoader.h>
    19 #include <StringLoader.h>
    20 #include <AiNativeUi.rsg>
    20 #include <ainativeui.rsg>
    21 #include <gulicon.h>
    21 #include <gulicon.h>
    22 
    22 
    23 // User includes
    23 // User includes
    24 #include <hscontentpublisher.h>
    24 #include <hscontentpublisher.h>
    25 #include <hspublisherinfo.h>
    25 #include <hspublisherinfo.h>
   103 
   103 
   104 	            break;
   104 	            break;
   105 	            }
   105 	            }
   106 	        default:
   106 	        default:
   107 	            {
   107 	            {
       
   108                 __PRINTS( "XAI: Rendering title pane > different content - leave");                
   108 	            User::Leave( KErrNotFound );
   109 	            User::Leave( KErrNotFound );
   109 	            break;
   110 	            break;
   110 	            }
   111 	            }
   111 	        };
   112 	        };
   112 	    }
   113 	    }
   113 	else
   114 	else
   114 		{
   115 		{
       
   116         __PRINTS( "XAI: Rendering title pane > Uid mismatch - leave");        
   115 		User::Leave( KErrNotFound );
   117 		User::Leave( KErrNotFound );
   116 		}
   118 		}
   117     }
   119     }
   118 
   120 
   119 // ----------------------------------------------------------------------------
   121 // ----------------------------------------------------------------------------
   148 	                // problem passing KErrNotFound
   150 	                // problem passing KErrNotFound
   149 	                iStatusPanel.SetTitlePaneBitmapL( bitmapHandle, maskHandle );
   151 	                iStatusPanel.SetTitlePaneBitmapL( bitmapHandle, maskHandle );
   150 	                // We're publishing bitmap -> set text as invalid
   152 	                // We're publishing bitmap -> set text as invalid
   151 	                iStatusPanel.SetTitlePaneTextL( KNullDesC );
   153 	                iStatusPanel.SetTitlePaneTextL( KNullDesC );
   152 	                iStatusPanel.RenderTitlePaneL();
   154 	                iStatusPanel.RenderTitlePaneL();
   153 	                 __PRINTS("XAI: Rendering title pane - done");
   155 	                __PRINTS("XAI: Rendering title pane - done");
   154 	                }
   156 	                }
   155 	            break;
   157 	            break;
   156 	            }
   158 	            }
   157 	        default:
   159 	        default:
   158 	            {
   160 	            {
       
   161                 __PRINTS( "XAI: Rendering title pane > different content - leave");
   159 	            User::Leave( KErrNotFound );
   162 	            User::Leave( KErrNotFound );
   160 	            break;
   163 	            break;
   161 	            }
   164 	            }
   162 	        };
   165 	        };
   163 	   	}
   166 	   	}
   164 	else
   167 	else
   165 		{
   168 		{
       
   169         __PRINTS( "XAI: Rendering title pane > Uid mismatch - leave");
   166 		User::Leave( KErrNotFound );
   170 		User::Leave( KErrNotFound );
   167 		}
   171 		}
   168     }
   172     }
   169 
   173 
   170 // ----------------------------------------------------------------------------
   174 // ----------------------------------------------------------------------------
   173 // ----------------------------------------------------------------------------
   177 // ----------------------------------------------------------------------------
   174 //
   178 //
   175 void CAiTitlePaneRenderer::DoPublishL( CHsContentPublisher& aPlugin, 
   179 void CAiTitlePaneRenderer::DoPublishL( CHsContentPublisher& aPlugin, 
   176     TInt aContent, TInt aResource, TInt /*aIndex*/ )
   180     TInt aContent, TInt aResource, TInt /*aIndex*/ )
   177     {
   181     {
       
   182     __PRINT(__DBG_FORMAT("XAI: CAiTitlePaneRenderer::DoPublishL - aContent %d"), aContent );
       
   183 
   178     const THsPublisherInfo& info( aPlugin.PublisherInfo() );
   184     const THsPublisherInfo& info( aPlugin.PublisherInfo() );
   179     
   185     
   180     if( info.Uid() == KDeviceStatusPluginUid )
   186     if( info.Uid() == KDeviceStatusPluginUid )
   181 	    {
   187 	    {
   182 	    switch( aContent )
   188 	    switch( aContent )
   188 	        	// We're publishing text -> set bitmap as invalid
   194 	        	// We're publishing text -> set bitmap as invalid
   189 	        	iStatusPanel.SetTitlePaneBitmapL( KErrNotFound, KErrNotFound );
   195 	        	iStatusPanel.SetTitlePaneBitmapL( KErrNotFound, KErrNotFound );
   190 	            iStatusPanel.RenderTitlePaneL();
   196 	            iStatusPanel.RenderTitlePaneL();
   191 	       
   197 	       
   192 	            CleanupStack::PopAndDestroy(text); //text
   198 	            CleanupStack::PopAndDestroy(text); //text
   193 	            break;
   199                 __PRINTS("XAI: Rendering title pane - done");
   194 	            }
   200 	            break;
   195 	        default:
   201 	            }
   196 	            {
   202 	        default:
       
   203 	            {
       
   204                 __PRINTS( "XAI: Rendering title pane > different content - leave");
   197 	            User::Leave( KErrNotFound );
   205 	            User::Leave( KErrNotFound );
   198 	            break;
   206 	            break;
   199 	            }
   207 	            }
   200 	        };
   208 	        };
   201 	    }
   209 	    }
   202 	else
   210 	else
   203 		{
   211 		{
       
   212         __PRINTS( "XAI: Rendering title pane > Uid mismatch - leave");
   204 		User::Leave( KErrNotFound );
   213 		User::Leave( KErrNotFound );
   205 		}
   214 		}
   206     }
   215     }
   207 
   216 
   208 // ----------------------------------------------------------------------------
   217 // ----------------------------------------------------------------------------
   211 // ----------------------------------------------------------------------------
   220 // ----------------------------------------------------------------------------
   212 //
   221 //
   213 void CAiTitlePaneRenderer::DoCleanL( CHsContentPublisher& aPlugin, 
   222 void CAiTitlePaneRenderer::DoCleanL( CHsContentPublisher& aPlugin, 
   214     TInt aContent )
   223     TInt aContent )
   215 	{
   224 	{
   216     __PRINT(__DBG_FORMAT("XAI: Clean title pane - %d"), aContent );
   225     __PRINT(__DBG_FORMAT("XAI: Clean title pane - aContent %d"), aContent );
   217 	
   226 	
   218     const THsPublisherInfo& info( aPlugin.PublisherInfo() );
   227     const THsPublisherInfo& info( aPlugin.PublisherInfo() );
   219     
   228     
   220     if( info.Uid() == KDeviceStatusPluginUid )
   229     if( info.Uid() == KDeviceStatusPluginUid )
   221 		{
   230 		{
   231 	            break;
   240 	            break;
   232 	            }
   241 	            }
   233 
   242 
   234 	        default:
   243 	        default:
   235 	            {
   244 	            {
   236 				User::Leave( KErrNotFound );
   245 				__PRINTS( "XAI: clean > different content - leave");
   237 	            break;
   246                 User::Leave( KErrNotFound );
   238 	            }
   247 	            break;
   239 	        };
   248 	            }
   240 		}
   249 	        };
   241 	else
   250 		}
   242 		{
   251 	else
       
   252 		{
       
   253         __PRINTS( "XAI: clean > Uid mismatch - leave");
   243 		User::Leave( KErrNotFound );
   254 		User::Leave( KErrNotFound );
   244 		}
   255 		}
   245 	}
   256 	}
   246 
   257 
   247 // ----------------------------------------------------------------------------
   258 // ----------------------------------------------------------------------------