mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp
branchRCL_3
changeset 5 3673b591050c
parent 2 4843bb5893b6
child 6 ef55b168cedb
equal deleted inserted replaced
4:60a94a45d437 5:3673b591050c
   144     
   144     
   145     TMTPResponseCode response = EMTPRespCodeOK; 
   145     TMTPResponseCode response = EMTPRespCodeOK; 
   146     TUint32 propCode = Request().Uint32(TMTPTypeRequest::ERequestParameter3);
   146     TUint32 propCode = Request().Uint32(TMTPTypeRequest::ERequestParameter3);
   147     if (propCode == 0)
   147     if (propCode == 0)
   148         {
   148         {
   149             TUint32 groupCode = Request().Uint32(TMTPTypeRequest::ERequestParameter4);
   149             /*Do nothing */
   150             if(groupCode != KMTPImageDpPropertyGroupOneNumber)
       
   151             {
       
   152             //Only supported group one
       
   153             response = EMTPRespCodeSpecificationByGroupUnsupported;
       
   154             }
       
   155         }
   150         }
   156     else if (propCode != KMaxTUint)
   151     else if (propCode != KMaxTUint)
   157         {
   152         {
   158         const TInt count = sizeof(KMTPImageDpSupportedProperties)/sizeof(KMTPImageDpSupportedProperties[0]);
   153         const TInt count = sizeof(KMTPImageDpSupportedProperties)/sizeof(KMTPImageDpSupportedProperties[0]);
   159 		TInt i(0);
   154 		TInt i(0);
   307     }
   302     }
   308     
   303     
   309 void CMTPImageDpGetObjectPropList::ServiceGroupPropertiesL(TUint32 aHandle,TUint16 /*aGroupCode*/)
   304 void CMTPImageDpGetObjectPropList::ServiceGroupPropertiesL(TUint32 aHandle,TUint16 /*aGroupCode*/)
   310     {
   305     {
   311     __FLOG(_L8(">> CMTPImageDpGetObjectPropList::ServiceGroupPropertiesL"));
   306     __FLOG(_L8(">> CMTPImageDpGetObjectPropList::ServiceGroupPropertiesL"));
   312     
   307     TUint32 groupCode = Request().Uint32(TMTPTypeRequest::ERequestParameter4);
   313     if (iFramework.ObjectMgr().ObjectOwnerId(aHandle) == iFramework.DataProviderId())
   308     if (KMTPImageDpPropertyGroupOneNumber == groupCode) //only return data for group one
   314         {
   309         {
   315         for (TUint propCodeIndex(0); propCodeIndex < KMTPImageDpGroupOneSize; propCodeIndex++)
   310         if (iFramework.ObjectMgr().ObjectOwnerId(aHandle) == iFramework.DataProviderId())
   316             {
   311             {
   317             TUint16 propCode = KMTPImageDpGroupOneProperties[propCodeIndex];  
   312             for (TUint propCodeIndex(0); propCodeIndex < KMTPImageDpGroupOneSize; propCodeIndex++)
   318             if(propCode != 0)
       
   319                 {
   313                 {
   320                 ServiceOneObjectPropertyL(aHandle, propCode);
   314                 TUint16 propCode = KMTPImageDpGroupOneProperties[propCodeIndex];  
       
   315                 if(propCode != 0)
       
   316                     {
       
   317                     ServiceOneObjectPropertyL(aHandle, propCode);
       
   318                     }
   321                 }
   319                 }
   322             }
   320             }
   323         }
   321         }
   324     __FLOG(_L8("<< CMTPImageDpGetObjectPropList::ServiceGroupPropertiesL"));
   322     __FLOG(_L8("<< CMTPImageDpGetObjectPropList::ServiceGroupPropertiesL"));
   325     }
   323     }