mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectpropdesc.cpp
branchRCL_3
changeset 48 debf68073f2f
parent 11 4843bb5893b6
child 58 142dacf7b30e
equal deleted inserted replaced
45:74aa6861c87d 48:debf68073f2f
   155 			ServiceNameL();
   155 			ServiceNameL();
   156 			break;
   156 			break;
   157 		case EMTPObjectPropCodeNonConsumable:
   157 		case EMTPObjectPropCodeNonConsumable:
   158 			ServiceNonConsumableL();
   158 			ServiceNonConsumableL();
   159 			break;
   159 			break;
       
   160 		case EMTPObjectPropCodeHidden:
       
   161 		    ServiceHiddenL();
       
   162 		    break;
   160 		default:
   163 		default:
   161 		    User::Leave( KErrNotSupported );
   164 		    User::Leave( KErrNotSupported );
   162 			break;
   165 			break;
   163 		}
   166 		}
   164 	__ASSERT_DEBUG(iObjectProperty, Panic(EMTPDpObjectPropertyNull));
   167 	__ASSERT_DEBUG(iObjectProperty, Panic(EMTPDpObjectPropertyNull));
   292         } 	
   295         } 	
   293 	iObjectProperty = CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeNonConsumable, *expectedForm);		
   296 	iObjectProperty = CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeNonConsumable, *expectedForm);		
   294 	CleanupStack::PopAndDestroy(expectedForm);
   297 	CleanupStack::PopAndDestroy(expectedForm);
   295 	}
   298 	}
   296 
   299 
   297 
   300 void CMTPGetObjectPropDesc::ServiceHiddenL()
       
   301     {
       
   302     CMTPTypeObjectPropDescEnumerationForm* expectedForm = CMTPTypeObjectPropDescEnumerationForm::NewL(EMTPTypeUINT16);
       
   303     CleanupStack::PushL(expectedForm);
       
   304     TUint16 values[] = {EMTPVisible,EMTPHidden};
       
   305     TUint   numValues((sizeof(values) / sizeof(values[0])));
       
   306     for (TUint i = 0; i < numValues; i++)
       
   307         {
       
   308         TMTPTypeUint16 data(values[i]);
       
   309         expectedForm->AppendSupportedValueL(data);
       
   310         }   
       
   311     iObjectProperty = CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeHidden, *expectedForm);
       
   312     CleanupStack::PopAndDestroy(expectedForm);
       
   313     }
   298 	
   314 	
   299 TUint16  CMTPGetObjectPropDesc::GetPropertyGroupNumber(const TUint16 aPropCode) const
   315 TUint16  CMTPGetObjectPropDesc::GetPropertyGroupNumber(const TUint16 aPropCode) const
   300     {
   316     {
   301     
   317     
   302     // begin from group 1, since group 0 is not used
   318     // begin from group 1, since group 0 is not used