qtinternetradio/irqcommon/src/irqisdsdatastructure.cpp
changeset 3 ee64f059b8e1
parent 0 09774dfdd46b
child 8 3b03c28289e6
equal deleted inserted replaced
2:2e1adbfc62af 3:ee64f059b8e1
   182 
   182 
   183     aURL = urlArray[aIndex].url;
   183     aURL = urlArray[aIndex].url;
   184     return EIRQErrorNone;
   184     return EIRQErrorNone;
   185 }
   185 }
   186 
   186 
   187 EXPORT_C int IRQPreset::getChannelBitrate(int aIndex, int &aBitrate) const
   187 EXPORT_C int IRQPreset::getChannelBitrate(unsigned int aIndex, unsigned int &aBitrate) const
   188 {
   188 {
   189     if (aIndex >= 0 && aIndex < urlArray.count())
   189     if ( aIndex < urlArray.count())
   190     {
   190     {
   191         aBitrate = urlArray[aIndex].bitrate;
   191         aBitrate = urlArray[aIndex].bitrate;
   192         return EIRQErrorNone;
   192         return EIRQErrorNone;
   193     }
   193     }
   194     
   194     
   222     qSort(urlArray.begin(), urlArray.end(),  bitrateLessThan);
   222     qSort(urlArray.begin(), urlArray.end(),  bitrateLessThan);
   223 
   223 
   224     iIsSorted = true;
   224     iIsSorted = true;
   225 }
   225 }
   226 
   226 
   227 EXPORT_C bool IRQPreset::setUrlBitrate(const int aUrlIndex, const int aBitrate)
   227 EXPORT_C bool IRQPreset::setUrlBitrate(const unsigned int aUrlIndex, const unsigned int aBitrate)
   228 {
   228 {
   229     if(aUrlIndex < 0 || aUrlIndex > (urlArray.count()-1) )
   229     if( aUrlIndex > (urlArray.count()-1) )
   230     {
   230     {
   231         return false;
   231         return false;
   232     }
   232     }
   233     
   233     
   234     urlArray[aUrlIndex].bitrate = aBitrate;
   234     urlArray[aUrlIndex].bitrate = aBitrate;