os/boardsupport/haitest/bspsvs/suite/e32/src/T_RSessionBaseData.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/boardsupport/haitest/bspsvs/suite/e32/src/T_RSessionBaseData.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,89 @@
     1.4 +/*
     1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +#include "T_RSessionBaseData.h"
    1.22 +
    1.23 +/*@{*/
    1.24 +_LIT(KCmdShareAuto,							"ShareAuto");
    1.25 +_LIT(KCmdShareProtected,					"ShareProtected");
    1.26 +
    1.27 +_LIT(KLogError,								"Error=%d");
    1.28 +/*@}*/
    1.29 +
    1.30 +//////////////////////////////////////////////////////////////////////
    1.31 +// Construction/Destruction
    1.32 +//////////////////////////////////////////////////////////////////////
    1.33 +
    1.34 +CT_RSessionBaseData::CT_RSessionBaseData()
    1.35 +:	CT_RHandleBaseData()
    1.36 +	{
    1.37 +	}
    1.38 +
    1.39 +CT_RSessionBaseData::~CT_RSessionBaseData()
    1.40 +/**
    1.41 + * Public destructor
    1.42 + */
    1.43 +	{
    1.44 +	}
    1.45 +
    1.46 +TBool CT_RSessionBaseData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
    1.47 +/**
    1.48 + * Process a command read from the ini file
    1.49 + *
    1.50 + * @param aCommand			The command to process
    1.51 + * @param aSection			The section in the ini containing data for the command
    1.52 + * @param aAsyncErrorIndex	Command index for async calls to return errors to
    1.53 + *
    1.54 + * @return					ETrue if the command is processed
    1.55 + *
    1.56 + * @leave					System wide error
    1.57 + */
    1.58 +	{
    1.59 +	TBool	ret=ETrue;
    1.60 +	TInt	err=KErrNone;
    1.61 +
    1.62 +	if ( aCommand==KCmdShareAuto )
    1.63 +		{
    1.64 +		err=DoCmdShareAuto();
    1.65 +		}
    1.66 +	else if ( aCommand==KCmdShareProtected )
    1.67 +		{
    1.68 +		err=DoCmdShareProtected();
    1.69 +		}
    1.70 +	else
    1.71 +		{
    1.72 +		ret=CT_RHandleBaseData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
    1.73 +		}
    1.74 +
    1.75 +	if ( err!=KErrNone )
    1.76 +		{
    1.77 +		ERR_PRINTF2(KLogError, err);
    1.78 +		SetError(err);
    1.79 +		}
    1.80 +
    1.81 +	return ret;
    1.82 +	}
    1.83 +
    1.84 +TInt CT_RSessionBaseData::DoCmdShareAuto()
    1.85 +	{
    1.86 +	return GetSessionBase()->ShareAuto();
    1.87 +	}
    1.88 +
    1.89 +TInt CT_RSessionBaseData::DoCmdShareProtected()
    1.90 +	{
    1.91 +	return GetSessionBase()->ShareProtected();
    1.92 +	}