os/boardsupport/haitest/bspsvs/suite/e32/src/T_RSessionBaseData.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2005-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 "T_RSessionBaseData.h"
    19 
    20 /*@{*/
    21 _LIT(KCmdShareAuto,							"ShareAuto");
    22 _LIT(KCmdShareProtected,					"ShareProtected");
    23 
    24 _LIT(KLogError,								"Error=%d");
    25 /*@}*/
    26 
    27 //////////////////////////////////////////////////////////////////////
    28 // Construction/Destruction
    29 //////////////////////////////////////////////////////////////////////
    30 
    31 CT_RSessionBaseData::CT_RSessionBaseData()
    32 :	CT_RHandleBaseData()
    33 	{
    34 	}
    35 
    36 CT_RSessionBaseData::~CT_RSessionBaseData()
    37 /**
    38  * Public destructor
    39  */
    40 	{
    41 	}
    42 
    43 TBool CT_RSessionBaseData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
    44 /**
    45  * Process a command read from the ini file
    46  *
    47  * @param aCommand			The command to process
    48  * @param aSection			The section in the ini containing data for the command
    49  * @param aAsyncErrorIndex	Command index for async calls to return errors to
    50  *
    51  * @return					ETrue if the command is processed
    52  *
    53  * @leave					System wide error
    54  */
    55 	{
    56 	TBool	ret=ETrue;
    57 	TInt	err=KErrNone;
    58 
    59 	if ( aCommand==KCmdShareAuto )
    60 		{
    61 		err=DoCmdShareAuto();
    62 		}
    63 	else if ( aCommand==KCmdShareProtected )
    64 		{
    65 		err=DoCmdShareProtected();
    66 		}
    67 	else
    68 		{
    69 		ret=CT_RHandleBaseData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
    70 		}
    71 
    72 	if ( err!=KErrNone )
    73 		{
    74 		ERR_PRINTF2(KLogError, err);
    75 		SetError(err);
    76 		}
    77 
    78 	return ret;
    79 	}
    80 
    81 TInt CT_RSessionBaseData::DoCmdShareAuto()
    82 	{
    83 	return GetSessionBase()->ShareAuto();
    84 	}
    85 
    86 TInt CT_RSessionBaseData::DoCmdShareProtected()
    87 	{
    88 	return GetSessionBase()->ShareProtected();
    89 	}