widgets/widgetsidchecker/src/widgetsidchecker.cpp
branchRCL_3
changeset 71 4bd5176e1bc8
parent 42 d39add9822e2
equal deleted inserted replaced
70:8bfb9186a8b8 71:4bd5176e1bc8
    66 	}
    66 	}
    67 	
    67 	
    68 
    68 
    69 CWidgetSidChecker::~CWidgetSidChecker()
    69 CWidgetSidChecker::~CWidgetSidChecker()
    70 	{
    70 	{
    71 	iClientSession.Close();
    71 	
    72 	}
    72 	}
    73 
    73 
    74 TBool CWidgetSidChecker::AppRegisteredAt(const TUid& aSid, TDriveUnit /*aDrive*/)
    74 TBool CWidgetSidChecker::AppRegisteredAt(const TUid& /*aSid*/, TDriveUnit /*aDrive*/)
    75     {
    75     {
    76       TFindProcess findProcess (_L("widgetregistry*"));
    76     return ETrue;      
    77       TFullName result;       
       
    78       if(findProcess.Next(result) == KErrNone )
       
    79         {
       
    80         TBool res = AppRegisteredAtL(aSid);
       
    81         return res;
       
    82         }
       
    83       return EFalse;      
       
    84     }
    77     }
    85 	
       
    86 
    78 
    87 TBool CWidgetSidChecker::AppRegisteredAtL( TUid aSid )
       
    88     {
       
    89     TBuf<KMaxFileName> aWidgetBundleId;
       
    90     TBool res = EFalse;
       
    91     
       
    92     User::LeaveIfError( iClientSession.Connect() );    
       
    93     iClientSession.GetWidgetBundleId(aSid, aWidgetBundleId);
       
    94     //check if the widget exists by querying to WidgetRegisrty return ETrue if exists else return EFalse
       
    95     if(iClientSession.WidgetExistsL( aWidgetBundleId ) )    
       
    96       res = ETrue;
       
    97     else
       
    98       res = EFalse;
       
    99     
       
   100     iClientSession.Disconnect();
       
   101     return res;
       
   102     }
       
   103 	
    79 	
   104 void CWidgetSidChecker::SetRescanCallBackL(const TCallBack &/*aCallBack*/)
    80 void CWidgetSidChecker::SetRescanCallBackL(const TCallBack &/*aCallBack*/)
   105 	{
    81 	{
   106 	return;
    82 	return;
   107 	}
    83 	}