featuremgmt/featuremgr/src/serverexe/featmgrfeatureregistry.cpp
changeset 40 b8bdbc8f59c7
parent 17 55f2396f6d25
child 51 7d4490026038
equal deleted inserted replaced
33:5e4beccba4e9 40:b8bdbc8f59c7
   161         aFeature = entry;
   161         aFeature = entry;
   162         err = KFeatureSupported;
   162         err = KFeatureSupported;
   163         }
   163         }
   164     else
   164     else
   165         {
   165         {
       
   166         TBitFlags32 flags = iFeatureList[index].FeatureFlags();
       
   167         flags.Assign( EFeatureSupported, KFeatureUnsupported );
       
   168         TUint32 data = iFeatureList[index].FeatureData();
       
   169         TFeatureServerEntry entry( aFeature.FeatureUid(), flags, data );
       
   170         aFeature = entry;
   166         err = KFeatureUnsupported;
   171         err = KFeatureUnsupported;
   167         }
   172         }
   168 
   173 
   169     return err;
   174     return err;
   170     }
   175     }
   267 
   272 
   268     TInt err( KErrNone );
   273     TInt err( KErrNone );
   269     
   274     
   270     if( iSWIProcessId == aPrcId && iSWICacheFeature )
   275     if( iSWIProcessId == aPrcId && iSWICacheFeature )
   271     	{
   276     	{
   272 		TBitFlags32 flags(0);
   277         TBitFlags32 flags(0);
   273     	flags.Assign( EFeatureSupported, aEnable );
   278         flags.Assign( EFeatureSupported, aEnable );
   274     	TFeatureServerEntry entry( aFeature, flags, *aData );    
   279         TUint32 data = 0;
   275 	    err = SWICacheCommand(ESWISetFeatAndData, entry);
   280         if( aData )
       
   281             {
       
   282             data = *aData;
       
   283             }
       
   284 
       
   285         TFeatureServerEntry entry( aFeature, flags, data );
       
   286 
       
   287         // If aData is not null, we want to change the user data too
       
   288         //  otherwise only change the feature status.
       
   289         if( aData )
       
   290             {
       
   291             err = SWICacheCommand(ESWISetFeatAndData, entry);
       
   292             }
       
   293         else
       
   294             {
       
   295             err = SWICacheCommand(ESWISetFeat, entry);
       
   296             }
   276     	}
   297     	}
   277     else 
   298     else 
   278     	{
   299     	{
   279 	    TInt index;
   300 	    TInt index;
   280 	
   301 	
  1435 				TUint32 data = iSWICachedOperations[i].iFeatEntry.FeatureData();
  1456 				TUint32 data = iSWICachedOperations[i].iFeatEntry.FeatureData();
  1436 				SetFeature(iSWICachedOperations[i].iFeatEntry.FeatureUid(),
  1457 				SetFeature(iSWICachedOperations[i].iFeatEntry.FeatureUid(),
  1437 							EFeatureSupportUntouch,&data);
  1458 							EFeatureSupportUntouch,&data);
  1438 				}
  1459 				}
  1439 				break;
  1460 				break;
       
  1461             case ESWISetFeat:
       
  1462                 {
       
  1463                 SetFeature( iSWICachedOperations[i].iFeatEntry.FeatureUid(),
       
  1464                             iSWICachedOperations[i].iFeatEntry.FeatureFlags().Value(),
       
  1465                             NULL);
       
  1466                 }
       
  1467                 break;
  1440 			default:
  1468 			default:
  1441 				break;
  1469 				break;
  1442 				};
  1470 				};
  1443 			}
  1471 			}
  1444 		
  1472