webengine/wrtharvester/src/wrtharvesterregistryaccess.cpp
branchRCL_3
changeset 49 919f36ff910f
parent 48 79859ed3eea9
equal deleted inserted replaced
48:79859ed3eea9 49:919f36ff910f
    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();
       
    69             CleanupStack::PushL(info);
    67             info->iUid = widgetInfo->iUid;
    70             info->iUid = widgetInfo->iUid;
    68             info->iBundleId = WidgetPropertyL( session, widgetInfo->iUid, EBundleIdentifier );
    71             info->iBundleId = WidgetPropertyL( session, widgetInfo->iUid, EBundleIdentifier );
    69             info->iDisplayName = WidgetPropertyL( session, widgetInfo->iUid, EBundleDisplayName );
    72             info->iDisplayName = WidgetPropertyL( session, widgetInfo->iUid, EBundleDisplayName );
       
    73             info->iType = KS60Widget;
    70             aWidgetInfoArray.AppendL( info );
    74             aWidgetInfoArray.AppendL( info );
       
    75             CleanupStack::Pop(info);
    71             }
    76             }
    72         }
    77         }
    73     CleanupStack::PopAndDestroy( &session );
    78     CleanupStack::PopAndDestroy( &session );
    74     CleanupStack::PopAndDestroy( &widgetInfoArr );
    79     CleanupStack::PopAndDestroy( &widgetInfoArr );
    75     }
    80     }
    92     delete value;
    97     delete value;
    93     return res;
    98     return res;
    94     }
    99     }
    95     
   100     
    96 // ---------------------------------------------------------------------------
   101 // ---------------------------------------------------------------------------
       
   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 // ---------------------------------------------------------------------------
    97 // Get the widget property as string.
   121 // Get the widget property as string.
    98 // ---------------------------------------------------------------------------
   122 // ---------------------------------------------------------------------------
    99 //
   123 //
   100 HBufC* WrtHarvesterRegistryAccess::WidgetPropertyL( 
   124 HBufC* WrtHarvesterRegistryAccess::WidgetPropertyL( 
   101     RWidgetRegistryClientSession& aSession,
   125     RWidgetRegistryClientSession& aSession,
   111     return strBuf;
   135     return strBuf;
   112     }
   136     }
   113     
   137     
   114  //  End of File
   138  //  End of File
   115 
   139 
       
   140