mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cpropertysettingutility.cpp
branchRCL_3
changeset 9 bee149131e4b
child 14 05b0d2323768
equal deleted inserted replaced
4:d45095c2f4f3 9:bee149131e4b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #include <mtp/cmtptypeobjectproplist.h>
       
    19 #include <mtp/cmtptypestring.h>
       
    20 #include <mtp/cmtptypearray.h>
       
    21 #include <mtp/tmtptypeuint8.h>
       
    22 #include <mtp/tmtptypeuint16.h>
       
    23 #include <mtp/tmtptypeuint32.h>
       
    24 #include <mtp/mtpdatatypeconstants.h>
       
    25 
       
    26 #include "cpropertysettingutility.h"
       
    27 #include "cmmmtpdpmetadataaccesswrapper.h"
       
    28 #include "mmmtpdpconfig.h"
       
    29 #include "mmmtpdputility.h"
       
    30 #include "mmmtpdplogger.h"
       
    31 
       
    32 EXPORT_C CPropertySettingUtility::CPropertySettingUtility()
       
    33     {
       
    34     // Do nothing
       
    35     }
       
    36 
       
    37 EXPORT_C CPropertySettingUtility::~CPropertySettingUtility()
       
    38     {
       
    39     // Do nothing
       
    40     }
       
    41 
       
    42 // -----------------------------------------------------------------------------
       
    43 // CPropertySettingUtility::SetMetaDataToWrapperL
       
    44 //
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 EXPORT_C TMTPResponseCode CPropertySettingUtility::SetMetaDataToWrapperL( MMmMtpDpConfig& aDpConfig,
       
    48     const TUint16 aPropCode,
       
    49     MMTPType& aNewData,
       
    50     const CMTPObjectMetaData& aObjectMetaData )
       
    51     {
       
    52     TMTPResponseCode responseCode = EMTPRespCodeOK;
       
    53     TRAPD( err, aDpConfig.GetWrapperL().SetObjectMetadataValueL( aPropCode,
       
    54             aNewData,
       
    55             aObjectMetaData ) );
       
    56 
       
    57     PRINT1( _L("MM MTP <> CPropertySettingUtility::SetMetaDataToWrapperL err = %d"), err);
       
    58 
       
    59     if ( err == KErrNone )
       
    60         responseCode = EMTPRespCodeOK;
       
    61     else // Other errors are not SetMetaDataToWrapperL related, should be respond before this calling
       
    62         responseCode = EMTPRespCodeGeneralError;
       
    63 
       
    64     PRINT1( _L( "MM MTP <= CPropertySettingUtility::SetMetaDataToWrapperL resCode = 0x%x" ), responseCode );
       
    65 
       
    66     return responseCode;
       
    67     }
       
    68 
       
    69 // end of file