webengine/wrtharvester/src/wrtharvesterregistryaccess.cpp
branchRCL_3
changeset 48 79859ed3eea9
parent 47 e1bea15f9a39
child 49 919f36ff910f
equal deleted inserted replaced
47:e1bea15f9a39 48:79859ed3eea9
    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 
    64         if ( SupportsMiniviewL( session, widgetInfo->iUid ) )
    65         if ( SupportsMiniviewL( session, widgetInfo->iUid ) &&
       
    66         	   IsNokiaWidget( session, widgetInfo->iUid ))
       
    67             {
    65             {
    68             CWrtInfo* info = new CWrtInfo();
    66             CWrtInfo* info = new CWrtInfo();
    69             CleanupStack::PushL(info);
       
    70             info->iUid = widgetInfo->iUid;
    67             info->iUid = widgetInfo->iUid;
    71             info->iBundleId = WidgetPropertyL( session, widgetInfo->iUid, EBundleIdentifier );
    68             info->iBundleId = WidgetPropertyL( session, widgetInfo->iUid, EBundleIdentifier );
    72             info->iDisplayName = WidgetPropertyL( session, widgetInfo->iUid, EBundleDisplayName );
    69             info->iDisplayName = WidgetPropertyL( session, widgetInfo->iUid, EBundleDisplayName );
    73             info->iType = KS60Widget;
       
    74             aWidgetInfoArray.AppendL( info );
    70             aWidgetInfoArray.AppendL( info );
    75             CleanupStack::Pop(info);
       
    76             }
    71             }
    77         }
    72         }
    78     CleanupStack::PopAndDestroy( &session );
    73     CleanupStack::PopAndDestroy( &session );
    79     CleanupStack::PopAndDestroy( &widgetInfoArr );
    74     CleanupStack::PopAndDestroy( &widgetInfoArr );
    80     }
    75     }
    97     delete value;
    92     delete value;
    98     return res;
    93     return res;
    99     }
    94     }
   100     
    95     
   101 // ---------------------------------------------------------------------------
    96 // ---------------------------------------------------------------------------
   102 // Check if it is wgz widget  .
       
   103 // ---------------------------------------------------------------------------
       
   104 //
       
   105 TBool WrtHarvesterRegistryAccess::IsNokiaWidget( 
       
   106     RWidgetRegistryClientSession& aSession,
       
   107     const TUid& aUid )
       
   108     {
       
   109     TBool res( EFalse );
       
   110     
       
   111     CWidgetPropertyValue* value( NULL );
       
   112     value = aSession.GetWidgetPropertyValueL( aUid, ENokiaWidget );
       
   113     
       
   114     res = value && ( *value == 0 || *value == 1 );
       
   115     
       
   116     delete value;
       
   117     return res;
       
   118     }
       
   119     
       
   120 // ---------------------------------------------------------------------------
       
   121 // Get the widget property as string.
    97 // Get the widget property as string.
   122 // ---------------------------------------------------------------------------
    98 // ---------------------------------------------------------------------------
   123 //
    99 //
   124 HBufC* WrtHarvesterRegistryAccess::WidgetPropertyL( 
   100 HBufC* WrtHarvesterRegistryAccess::WidgetPropertyL( 
   125     RWidgetRegistryClientSession& aSession,
   101     RWidgetRegistryClientSession& aSession,
   135     return strBuf;
   111     return strBuf;
   136     }
   112     }
   137     
   113     
   138  //  End of File
   114  //  End of File
   139 
   115 
   140