mtpfws/mtpfw/dataproviders/devdp/src/cmtpresetdevicepropvalue.cpp
changeset 20 6e82ae192c3a
parent 0 d0791faffa3f
child 47 63cf70d3ecd8
equal deleted inserted replaced
18:1b39655331a3 20:6e82ae192c3a
   261     __FLOG(_L8("ServiceUseDeviceStageL - Exit"));
   261     __FLOG(_L8("ServiceUseDeviceStageL - Exit"));
   262     }
   262     }
   263 
   263 
   264 TMTPTypeGuid* CMTPResetDevicePropValue::GetGUIDL(const TUint aKey)
   264 TMTPTypeGuid* CMTPResetDevicePropValue::GetGUIDL(const TUint aKey)
   265     {
   265     {
   266     
   266     TBuf<KGUIDFormatStringLength> buf;
   267     TBuf8<KMTPTypeUINT128Size> ptr;
   267     
   268     
   268     User::LeaveIfError(iRepository->Get(aKey,buf));
   269     iRepository->Get(aKey,ptr);
   269 
   270     
   270     TMTPTypeGuid* ret = new (ELeave) TMTPTypeGuid( buf );
   271     TMTPTypeGuid* ret = new (ELeave) TMTPTypeGuid( ptr );
       
   272     
   271     
   273     return ret;
   272     return ret;
   274     }
   273     }
   275 
   274 
   276 void CMTPResetDevicePropValue::SaveGUID( const TUint aKey,  TMTPTypeGuid& aValue )
   275 void CMTPResetDevicePropValue::SaveGUID( const TUint aKey,  TMTPTypeGuid& aValue )
   277     {
   276     {
   278     TPtrC8 ptr;
   277 	TBuf<KGUIDFormatStringLength> buf;
   279     if ( KMTPChunkSequenceCompletion == aValue.FirstReadChunk(ptr) )
   278 	if(aValue.ToString(buf) == KErrNone)
   280     	{
   279 		{
   281     	iRepository->Set(aKey,ptr);
   280 		iRepository->Set(aKey,buf);
   282     	}
   281 		}
   283     }
   282     }