diff -r 5529f24b6aaf -r da1f3efa404b mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp Sun Mar 14 13:11:48 2010 +0000 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include "cpropertysettingutility.h" +#include "cmmmtpdpmetadataaccesswrapper.h" +#include "mmmtpdpconfig.h" +#include "mmmtpdputility.h" +#include "mmmtpdplogger.h" + +EXPORT_C CPropertySettingUtility::CPropertySettingUtility() + { + // Do nothing + } + +EXPORT_C CPropertySettingUtility::~CPropertySettingUtility() + { + // Do nothing + } + +// ----------------------------------------------------------------------------- +// CPropertySettingUtility::SetMetaDataToWrapperL +// +// ----------------------------------------------------------------------------- +// +EXPORT_C TMTPResponseCode CPropertySettingUtility::SetMetaDataToWrapperL( MMmMtpDpConfig& aDpConfig, + const TUint16 aPropCode, + MMTPType& aNewData, + const CMTPObjectMetaData& aObjectMetaData ) + { + TMTPResponseCode responseCode = EMTPRespCodeOK; + TRAPD( err, aDpConfig.GetWrapperL().SetObjectMetadataValueL( aPropCode, + aNewData, + aObjectMetaData ) ); + + PRINT1( _L("MM MTP <> CPropertySettingUtility::SetMetaDataToWrapperL err = %d"), err); + + if ( err == KErrNone ) + responseCode = EMTPRespCodeOK; + else // Other errors are not SetMetaDataToWrapperL related, should be respond before this calling + responseCode = EMTPRespCodeGeneralError; + + PRINT1( _L( "MM MTP <= CPropertySettingUtility::SetMetaDataToWrapperL resCode = 0x%x" ), responseCode ); + + return responseCode; + } + +// end of file