webengine/wrtharvester/src/wrtharvesterregistryaccess.cpp
branchRCL_3
changeset 59 1f3c3f2f5b0a
parent 16 a359256acfc6
child 92 e1bea15f9a39
equal deleted inserted replaced
58:220a17280356 59:1f3c3f2f5b0a
    59     
    59     
    60     for( TInt i( widgetInfoArr.Count() - 1 ); i >= 0; --i )
    60     for( TInt i( widgetInfoArr.Count() - 1 ); i >= 0; --i )
    61         {
    61         {
    62         CWidgetInfo* widgetInfo( widgetInfoArr[i] );
    62         CWidgetInfo* widgetInfo( widgetInfoArr[i] );
    63         
    63         
    64         if ( SupportsMiniviewL( session, widgetInfo->iUid ) )
    64 
       
    65         if ( SupportsMiniviewL( session, widgetInfo->iUid ) &&
       
    66         	   IsNokiaWidget( session, widgetInfo->iUid ))
    65             {
    67             {
    66             CWrtInfo* info = new CWrtInfo();
    68             CWrtInfo* info = new CWrtInfo();
    67             info->iUid = widgetInfo->iUid;
    69             info->iUid = widgetInfo->iUid;
    68             info->iBundleId = WidgetPropertyL( session, widgetInfo->iUid, EBundleIdentifier );
    70             info->iBundleId = WidgetPropertyL( session, widgetInfo->iUid, EBundleIdentifier );
    69             info->iDisplayName = WidgetPropertyL( session, widgetInfo->iUid, EBundleDisplayName );
    71             info->iDisplayName = WidgetPropertyL( session, widgetInfo->iUid, EBundleDisplayName );
       
    72             info->iType = KS60Widget;
    70             aWidgetInfoArray.AppendL( info );
    73             aWidgetInfoArray.AppendL( info );
    71             }
    74             }
    72         }
    75         }
    73     CleanupStack::PopAndDestroy( &session );
    76     CleanupStack::PopAndDestroy( &session );
    74     CleanupStack::PopAndDestroy( &widgetInfoArr );
    77     CleanupStack::PopAndDestroy( &widgetInfoArr );
    92     delete value;
    95     delete value;
    93     return res;
    96     return res;
    94     }
    97     }
    95     
    98     
    96 // ---------------------------------------------------------------------------
    99 // ---------------------------------------------------------------------------
       
   100 // Check if it is wgz widget  .
       
   101 // ---------------------------------------------------------------------------
       
   102 //
       
   103 TBool WrtHarvesterRegistryAccess::IsNokiaWidget( 
       
   104     RWidgetRegistryClientSession& aSession,
       
   105     const TUid& aUid )
       
   106     {
       
   107     TBool res( EFalse );
       
   108     
       
   109     CWidgetPropertyValue* value( NULL );
       
   110     value = aSession.GetWidgetPropertyValueL( aUid, ENokiaWidget );
       
   111     
       
   112     res = value && ( *value == 0 || *value == 1 );
       
   113     
       
   114     delete value;
       
   115     return res;
       
   116     }
       
   117     
       
   118 // ---------------------------------------------------------------------------
    97 // Get the widget property as string.
   119 // Get the widget property as string.
    98 // ---------------------------------------------------------------------------
   120 // ---------------------------------------------------------------------------
    99 //
   121 //
   100 HBufC* WrtHarvesterRegistryAccess::WidgetPropertyL( 
   122 HBufC* WrtHarvesterRegistryAccess::WidgetPropertyL( 
   101     RWidgetRegistryClientSession& aSession,
   123     RWidgetRegistryClientSession& aSession,
   111     return strBuf;
   133     return strBuf;
   112     }
   134     }
   113     
   135     
   114  //  End of File
   136  //  End of File
   115 
   137 
       
   138