qtinternetradio/irqcommon/src/irqutility.cpp
changeset 11 f683e24efca3
parent 8 3b03c28289e6
child 14 896e9dbc5f19
equal deleted inserted replaced
8:3b03c28289e6 11:f683e24efca3
   153 //
   153 //
   154 EXPORT_C void IRQUtility::convertCIRPreset2IRQPreset(const CIRPreset& aCIRPreset, IRQPreset& aIRQPreset)
   154 EXPORT_C void IRQUtility::convertCIRPreset2IRQPreset(const CIRPreset& aCIRPreset, IRQPreset& aIRQPreset)
   155 {
   155 {
   156     aIRQPreset.uniqID = aCIRPreset.Id(); 
   156     aIRQPreset.uniqID = aCIRPreset.Id(); 
   157     aIRQPreset.type = aCIRPreset.GetChannelType();
   157     aIRQPreset.type = aCIRPreset.GetChannelType();
   158     aIRQPreset.index  = aCIRPreset.Index();
       
   159     
   158     
   160     aIRQPreset.presetId = aCIRPreset.GetId();
   159     aIRQPreset.presetId = aCIRPreset.GetId();
   161     aIRQPreset.iChannelUrlCount  = aCIRPreset.GetUrlCount();
   160     aIRQPreset.iChannelUrlCount  = aCIRPreset.GetUrlCount();
   162     aIRQPreset.name = QString::fromUtf16((aCIRPreset.Name()).Ptr(), (aCIRPreset.Name()).Length());
   161     aIRQPreset.name = QString::fromUtf16((aCIRPreset.Name()).Ptr(), (aCIRPreset.Name()).Length());
   163     
   162     
   272         return false;
   271         return false;
   273     }
   272     }
   274     
   273     
   275     bool ret = false;
   274     bool ret = false;
   276     TUid songRecognitionAppUid = getSongRecognitionAppUid();
   275     TUid songRecognitionAppUid = getSongRecognitionAppUid();
   277     TApaAppInfo appInfo;
   276     TApaAppInfo *appInfo = new TApaAppInfo;
   278     lsSession.GetAllApps();  
   277     lsSession.GetAllApps();  
   279 
   278 
   280     while( KErrNone == lsSession.GetNextApp(appInfo) )
   279     while( KErrNone == lsSession.GetNextApp(*appInfo) )
   281     {
   280     {
   282         TBool appIsHidden = EFalse;
   281         TBool appIsHidden = EFalse;
   283         TApaAppCapabilityBuf capability;
   282         TApaAppCapabilityBuf capability;
   284         if( KErrNone == lsSession.GetAppCapability(capability,appInfo.iUid) )
   283         if( KErrNone == lsSession.GetAppCapability(capability,appInfo->iUid) )
   285         {
   284         {
   286             appIsHidden = capability().iAppIsHidden;
   285             appIsHidden = capability().iAppIsHidden;
   287         }
   286         }
   288         
   287         
   289         if(!appIsHidden)
   288         if(!appIsHidden)
   290         {
   289         {
   291             if(songRecognitionAppUid == appInfo.iUid)
   290             if(songRecognitionAppUid == appInfo->iUid)
   292             {
   291             {
   293                 ret = true;
   292                 ret = true;
   294                 break;
   293                 break;
   295             }
   294             }
   296         }
   295         }
   297     }
   296     }
   298     
   297     delete appInfo;
   299     lsSession.Close();
   298     lsSession.Close();
   300     return ret;         
   299     return ret;         
   301 }   
   300 }   
   302     
   301     
   303     
   302