mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/crequestchecker.cpp
branchRCL_3
changeset 67 16db3449d7ba
parent 53 e42293e811d8
equal deleted inserted replaced
63:91d5ad76f5c6 67:16db3449d7ba
   241     PRINT1( _L("MM MTP => CRequestChecker::VerifyObjectHandleL aHandle = 0x%x"), aHandle );
   241     PRINT1( _L("MM MTP => CRequestChecker::VerifyObjectHandleL aHandle = 0x%x"), aHandle );
   242     TMTPResponseCode ret = EMTPRespCodeOK;
   242     TMTPResponseCode ret = EMTPRespCodeOK;
   243 
   243 
   244     CMTPObjectMetaData* object( CMTPObjectMetaData::NewLC() );
   244     CMTPObjectMetaData* object( CMTPObjectMetaData::NewLC() );
   245     TBool result( iFramework.ObjectMgr().ObjectL( aHandle, *object ) );
   245     TBool result( iFramework.ObjectMgr().ObjectL( aHandle, *object ) );
       
   246     iObjectArray.AppendL( object );
       
   247     CleanupStack::Pop( object );
       
   248     iHandles.AppendL( aHandle );
       
   249 
   246     // Obj handle exists
   250     // Obj handle exists
   247     if ( result )
   251     if ( result )
   248         {
   252         {
   249         const TDesC& suid( object->DesC( CMTPObjectMetaData::ESuid ) );
   253         const TDesC& suid( object->DesC( CMTPObjectMetaData::ESuid ) );
   250         TEntry entry;
   254         TEntry entry;
   271 
   275 
   272             if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrDir ) && !entry.IsDir() )
   276             if ( ( EMTPRespCodeOK == ret ) && ( aElementInfo.iElementAttr & EMTPElementAttrDir ) && !entry.IsDir() )
   273                 ret = EMTPRespCodeInvalidParentObject;
   277                 ret = EMTPRespCodeInvalidParentObject;
   274             }
   278             }
   275         }
   279         }
   276 
       
   277     if ( result )
       
   278         {
       
   279         iObjectArray.AppendL( object );
       
   280         CleanupStack::Pop( object );
       
   281         iHandles.AppendL( aHandle );
       
   282         }
       
   283     else
   280     else
   284         {
       
   285         CleanupStack::PopAndDestroy( object );
       
   286         ret = EMTPRespCodeInvalidObjectHandle;
   281         ret = EMTPRespCodeInvalidObjectHandle;
   287         }
       
   288 
   282 
   289     PRINT1( _L( "MM MTP <= CRequestChecker::VerifyObjectHandleL ret = 0x%x" ), ret );
   283     PRINT1( _L( "MM MTP <= CRequestChecker::VerifyObjectHandleL ret = 0x%x" ), ret );
   290 
   284 
   291     return ret;
   285     return ret;
   292     }
   286     }