controlpanelui/src/tonefetcher/tonefetcherengine/private/CToneSelection.cpp
changeset 29 313976a11e23
parent 22 a5692c68d772
child 41 ab0490982943
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/private/CToneSelection.cpp	Fri Jul 23 11:04:51 2010 +0800
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/CToneSelection.cpp	Thu Aug 05 11:28:29 2010 +0800
@@ -28,6 +28,7 @@
 //refresh interval, 2 seconds.
 const TInt KTimerInterval = 2 * 1000 * 1000;
 const TInt KObserverCallStep = 100;
+const TInt KOneKiloByte = 1024;
 // CONSTANTS
 _LIT( KMimeMp3, "mp3" );
 
@@ -172,8 +173,8 @@
     }
 
 void CToneSelection::HandleObjectNotification( CMdESession& /*aSession*/, 
-                                        TObserverNotificationType aType,
-                                        const RArray<TItemId>& aObjectIdArray )
+                                        TObserverNotificationType /*aType*/,
+                                        const RArray<TItemId>& /*aObjectIdArray*/ )
     {   
     /*if ( aObjectIdArray.Count() > 0 && ( aType == ENotifyAdd || aType == ENotifyModify || aType == ENotifyRemove ) )
         {
@@ -300,7 +301,7 @@
     return PropertyDefL( iSession, aAttr );
     }
 
-CMdEPropertyDef& CToneSelection::PropertyDefL( CMdESession* aSession, TInt aAttr )
+CMdEPropertyDef& CToneSelection::PropertyDefL( CMdESession* /*aSession*/, TInt aAttr )
     {
     CMdEObjectDef& objectDef = 
             iDefNS->GetObjectDefL( MdeConstants::Audio::KAudioObject );
@@ -337,6 +338,8 @@
         {
         User::Leave( KErrNotSupported );
         }
+	//avoid critical warning
+    return objectDef.GetPropertyDefL( MdeConstants::Audio::KAudioObject );
     }
 
 void CToneSelection::ExcludeMusicPropertiesL( CMdELogicCondition& aCondition )
@@ -357,7 +360,7 @@
     
     CMdELogicCondition& condition = 
                         aCondition.AddLogicConditionL( ELogicConditionOperatorAnd );
-    condition.AddPropertyConditionL( sizeTypeDef, TMdEIntRange(0, iMaxFileSize, EMdERangeTypeBetween) );
+    condition.AddPropertyConditionL( sizeTypeDef, TMdEIntRange(0, iMaxFileSize * KOneKiloByte, EMdERangeTypeNotBetween) );
     condition.AddPropertyConditionL( mimeTypeDef, 
             ETextPropertyConditionCompareContains, KMimeMp3 );
     condition.AddPropertyConditionL( artistTypeDef );