Example #1
0
/**
* Process a command read from the ini file
*
* @param aCommand			the command to process
* @param aSection			the entry in the ini file requiring the command to be processed
* @param aAsyncErrorIndex	index of command. used for async calls
*
* @return ETrue if the command is processed
*/
TBool CT_DataAnimDll::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
	{
	TBool	ret = ETrue;

	if ( aCommand==KCmdDestructorGeneral || aCommand==KCmdDestructor )
		{
		DoCmdDestructor();
		}
	else if ( aCommand==KCmdnew || aCommand==KDataClassname )
		{
		DoCmdnewL(aSection);
		}
	else if ( aCommand==KCmdLoad )
		{
		DoCmdLoad(aSection);
		}
	else if ( aCommand==KCmdDestroy )
		{
		DoCmdDestroy();
		}
	else if ( aCommand==KCmdClose )
		{
		DoCmdClose();
		}
	else
		{
		ret=CT_DataWsClientClass::DoCommandL(*this, aCommand, aSection, aAsyncErrorIndex);
		}

	return ret;
	}
TBool CT_RMmCustomApiData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
{
    TBool ret = ETrue;

    if ( aCommand==KCmdUtilityModeCheck )
    {
        DoCmdUtilityModeCheck(aSection);
    }
    else if ( aCommand==KCmdGetCurrentSystemNetworkModes )
    {
        DoCmdGetCurrentSystemNetworkModes(aAsyncErrorIndex);
    }
    else if ( aCommand==KCmdSetSystemNetworkMode )
    {
        DoCmdSetSystemNetworkMode(aSection, aAsyncErrorIndex);
    }
    else if (aCommand==KCmdOpen)
    {
        DoCmdOpen(aSection);
    }
    else if (aCommand==KCmdClose)
    {
        DoCmdClose();
    }
    else
    {
        ERR_PRINTF1(_L("Unknown command"));
        ret = EFalse;
    }
    return ret;
}
TBool CT_DataRSubConParameterBundle::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
	{
	TBool	ret = ETrue;
	
	//-------------------------------------------------------------------------
	// RSubConParameterBundle (Currently only used for other classes Copy constructor(s))
	//-------------------------------------------------------------------------		

	if ( aCommand==KConstructor )
		{
		DoCmdConstructorL();
		}
	else if ( aCommand==KFindFamily )
		{
		DoCmdFindFamily( aSection );
		}
	else if ( aCommand==KClose )
		{
		DoCmdClose();
		}
	else if( aCommand==KDestructor )
		{
		DoCmdDestructor();
		}
	else
		{
		ret = EFalse;
		}
		
	return ret;
	}
TBool CT_RMobilePhoneData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
	{
	TBool ret = ETrue;
	
	if ( aCommand==KCmdOpen )
		{
		DoCmdOpen(aSection);
		}
	else if ( aCommand==KCmdClose )
		{
		DoCmdClose();
		}
	else if ( aCommand==KCmdInitialise )
		{
		DoCmdInitialise();
		}
	else
		{
		ret = EFalse;
		ERR_PRINTF1(_L("Unknown command"));
		}
	
	return ret;
	}
/**
 * Process a command read from the ini file
 *
 * @param aCommand			The command to process
 * @param aSection			The section in the ini containing data for the command
 * @param aAsyncErrorIndex	Command index for async calls to return errors to
 *
 * @return					ETrue if the command is processed
 *
 * @leave					System wide error
 */
TBool CT_RMobileCallData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
	{

	TBool ret = ETrue;

	if ( aCommand==KCmdGetCaps)
		{
		DoCmdGetCaps (aSection);
		}
	else if	( aCommand==KCmdUtilityCheckCaps)
		{
		DoCmdUtilityCheckCapability(aSection);
		}
	else if ( aCommand==KCmdGetCallDuration)
		{
		DoCmdGetCallDuration (aSection);
		}
	else if ( aCommand==KCmdHangUp)
		{
		DoCmdHangUp (aSection, aAsyncErrorIndex);
		}
	else if ( aCommand==KCmdClose)
		{
		DoCmdClose (aSection);
		}
	else if ( aCommand==KCmdOpenNewCall)
		{
		DoCmdOpenNewCall (aSection);
		}
	else if ( aCommand==KCmdOpenExistingCall)
		{
		DoCmdOpenExistingCall (aSection);
		}
	else if ( aCommand==KCmdDial)
		{
		DoCmdDial (aSection, aAsyncErrorIndex);
		}
	else if ( aCommand==KCmdDialCancel)
		{
		DoCmdDialCancel (aSection);
		}
	else if ( aCommand==KCmdAnswerIncomingCall)
		{
		DoCmdAnswerIncomingCall (aSection, aAsyncErrorIndex);
		}
	else if ( aCommand==KCmdAnswerIncomingCallPost)
		{
		DoCmdAnswerIncomingCallPost ( aSection, aAsyncErrorIndex);
		}
	else if ( aCommand==KCmdGetStatus)
		{
		DoCmdGetStatus ();
		}
	else if ( aCommand == KCmdHold)
		{
		DoCmdHold (aSection, aAsyncErrorIndex);
		}
	else if ( aCommand == KCmdSwap)
		{
		DoCmdSwap (aSection, aAsyncErrorIndex);
		}
	else if ( aCommand == KCmdResume)
		{
		DoCmdResume (aSection, aAsyncErrorIndex);
		}
	else if ( aCommand == KCmdTransfer)
		{
		DoCmdTransfer (aSection, aAsyncErrorIndex);
		}
	else
		{
		ERR_PRINTF1(_L("Unknown command"));
		ret = EFalse;
		}

	return ret;
	}